Pārlūkot izejas kodu

1.0 fix

fix負數倉
CANCERYS\kw093 pirms 5 dienas
vecāks
revīzija
3afdcea8a1
2 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. +1
    -0
      src/app/api/stockLedgerFix/client.ts
  2. +3
    -2
      src/components/StockLedgerFix/StockLedgerFixPageClient.tsx

+ 1
- 0
src/app/api/stockLedgerFix/client.ts Parādīt failu

@@ -61,6 +61,7 @@ export type StockLedgerFixInventoryResponse = {
missingUomPairsAfter: number;
patchedStockUomId: number;
nullStockUomIdAfter: number;
orphansDeleted?: number;
};

export type StockLedgerFixSearchInventoryHit = {


+ 3
- 2
src/components/StockLedgerFix/StockLedgerFixPageClient.tsx Parādīt failu

@@ -436,7 +436,7 @@ const StockLedgerFixPageClient: React.FC = () => {
try {
const res = await runStockLedgerFixInventory();
setInventoryMessage(
`inventory 1.0 完成:回填 stockUomId ${res.patchedStockUomId} 列、新增 ${res.inserted} 列、重算 ${res.updated} 列、之後仍缺 UOM ${res.missingUomPairsAfter}、仍 NULL stockUomId ${res.nullStockUomIdAfter}`,
`inventory 1.0 完成:回填 stockUomId ${res.patchedStockUomId} 列、新增 ${res.inserted} 列、殘列 deleted ${res.orphansDeleted ?? 0}、重算 ${res.updated} 列、之後仍缺 UOM ${res.missingUomPairsAfter}、仍 NULL stockUomId ${res.nullStockUomIdAfter}`,
);
await loadInventory();
} catch (e) {
@@ -713,7 +713,8 @@ const StockLedgerFixPageClient: React.FC = () => {
<Typography variant="h6">1.0 inventory(方案 A)</Typography>
<Typography variant="body2" color="text.secondary">
保留現有 id;lot 有、inventory 沒有的 UOM 會新增;onHand = Σ(in−out) 按
item+UOM。沒有 lot 的列會變成 0。請在進出倉暫停時執行,再逐日 Fix。
item+UOM。沒有 lot 的列會變成 0。同一料多顆舊列時只留一顆 stock UOM
桶,其餘 deleted=1。請在進出倉暫停時執行,再逐日 Fix。
</Typography>
{inventoryError && <Alert severity="error">{inventoryError}</Alert>}
{inventoryMessage && (


Notiek ielāde…
Atcelt
Saglabāt