This commit is contained in:
Jimmy
2026-04-27 23:53:47 +08:00
parent 0cea74ad97
commit 5c7e489e1c
5 changed files with 123 additions and 57 deletions

View File

@@ -173,7 +173,8 @@ def fetch_receipt_details_incremental():
cursor.execute('SELECT id FROM receipt_details WHERE purchase_order_code = ? AND row_no = ? AND material_code = ?', (po_code, row_no, mat_code))
existing_record = cursor.fetchone()
p_qty = item.get("convertPlannedPurchaseQuantity") if item.get("convertPlannedPurchaseQuantity") is not None else item.get("plannedPurchaseQuantity")
# 进货数量(件数)永远只取原始的 plannedPurchaseQuantity,不取转换后的
p_qty = item.get("plannedPurchaseQuantity")
r_qty = item.get("convertGoodsQuantity") if item.get("convertGoodsQuantity") is not None else item.get("goodsQuantity")
if existing_record: