更新採購單跟商品資料一些bug
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Has been skipped
Koori-ERP-Deploy-System / deploy-production (push) Successful in 52s

This commit is contained in:
2026-01-06 15:45:13 +08:00
parent 7160a7e780
commit fad74df6ac
9 changed files with 159 additions and 64 deletions

View File

@@ -76,8 +76,8 @@ export function validatePurchaseOrder(
}
/**
* 過濾有效項目(數量大於 0
* 過濾有效項目(數量和單價都必須大於 0
*/
export function filterValidItems(items: PurchaseOrderItem[]): PurchaseOrderItem[] {
return items.filter((item) => item.quantity > 0);
return items.filter((item) => item.quantity > 0 && item.unitPrice > 0);
}