Refactor vendor mappings to canonical PN catalog
This commit is contained in:
@@ -22,7 +22,7 @@ func TestCreateWarehousePricelistFromStockLog(t *testing.T) {
|
||||
&models.PricelistItem{},
|
||||
&models.StockLog{},
|
||||
&models.Lot{},
|
||||
&models.LotPartnumber{},
|
||||
&models.PartnumberBookItem{},
|
||||
); err != nil {
|
||||
t.Fatalf("automigrate: %v", err)
|
||||
}
|
||||
@@ -30,7 +30,7 @@ func TestCreateWarehousePricelistFromStockLog(t *testing.T) {
|
||||
if err := db.Create(&models.Lot{LotName: "CPU_X", LotDescription: "CPU"}).Error; err != nil {
|
||||
t.Fatalf("seed lot: %v", err)
|
||||
}
|
||||
if err := db.Create(&models.LotPartnumber{Partnumber: "PN-CPU-X", LotName: "CPU_X"}).Error; err != nil {
|
||||
if err := db.Create(&models.PartnumberBookItem{Partnumber: "PN-CPU-X", LotsJSON: `[{"lot_name":"CPU_X","qty":1}]`}).Error; err != nil {
|
||||
t.Fatalf("seed mapping: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user