diff --git a/inventory-backend/app/services/inbound/base_service.py b/inventory-backend/app/services/inbound/base_service.py index 97bc2a9..bbfb7d7 100644 --- a/inventory-backend/app/services/inbound/base_service.py +++ b/inventory-backend/app/services/inbound/base_service.py @@ -368,9 +368,9 @@ class MaterialBaseService: # 处理采购件 for stock, base in list_buy: # 价格计算 - unit_price = float(stock.unit_price or 0) + unit_price = float(stock.pre_tax_unit_price or 0) tax_rate = float(stock.tax_rate or 0) - price_incl = unit_price * (1 + tax_rate / 100.0) + price_incl = float(stock.post_tax_unit_price or (unit_price * (1 + tax_rate / 100.0))) qty = float(stock.stock_quantity or 0) # 计算不含税总价 = 数量 * 不含税单价 @@ -535,4 +535,4 @@ class MaterialBaseService: except Exception as e: traceback.print_exc() - raise e \ No newline at end of file + raise e