|
|
|
@@ -7,7 +7,7 @@ export type StockQtyRoundChoice = { |
|
|
|
after: number; |
|
|
|
}; |
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.3 | 2026-09-10 */ |
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.4 | 2026-09-10 */ |
|
|
|
export function previewPoBatchStockQty( |
|
|
|
orderM18Qty: number, |
|
|
|
orderStockQty: number, |
|
|
|
@@ -25,7 +25,7 @@ export function isNotIntegerQty(qty: number): boolean { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.3 | 2026-09-10 |
|
|
|
* FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.4 | 2026-09-10 |
|
|
|
* PO 收貨/品檢:pending 或 escalated 且庫存數量非整數時需選擇 CEILING / FLOOR |
|
|
|
*/ |
|
|
|
export function needsPoQcStockQtyRound( |
|
|
|
@@ -39,7 +39,7 @@ export function needsPoQcStockQtyRound( |
|
|
|
return isNotIntegerQty(Number(acceptedQty ?? 0)); |
|
|
|
} |
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.3 | 2026-09-10 */ |
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 56 | v1.0.4 | 2026-09-10 */ |
|
|
|
export function roundStockQty(before: number, mode: StockQtyRoundMode): number { |
|
|
|
if (mode === "CEILING") return Math.ceil(before); |
|
|
|
return Math.floor(before); |
|
|
|
|