调整备货单&&修改采购单

This commit is contained in:
mzl
2025-09-22 18:49:18 +08:00
parent 419d0e9d54
commit aa3ee8acff
4 changed files with 776 additions and 681 deletions
+9 -2
View File
@@ -620,7 +620,10 @@ class StockOrdersService
'fob_transport_fee' => 'FOB运输费',
'port_misc_fee' => '港杂',
'retrofit_fee' => '改装费',
'ocean_freight' => '海运费'
'ocean_freight' => '海运费',
'commission' => '佣金',
'purchase_tax' => '购置税',
'tax_refund' => '预估退税'
];
foreach ($priceFields as $field => $description) {
@@ -703,8 +706,12 @@ class StockOrdersService
$portMiscFee = (float)($veh['port_misc_fee']['amount'] ?? 0);
$retrofitFee = (float)($veh['retrofit_fee']['amount'] ?? 0);
$oceanFreight = (float)($veh['ocean_freight']['amount'] ?? 0);
$commission = (float)($veh['commission']['amount'] ?? 0);
$purchaseTax = (float)($veh['purchase_tax']['amount'] ?? 0);
$taxRefund = (float)($veh['tax_refund']['amount'] ?? 0);
return $unitPrice - $ttPrice - $ddPrice - $handlingFee - $fobTransportFee - $portMiscFee - $retrofitFee - $oceanFreight;
// 退税额 tax_refund 是增加利润的,所以用加法
return $unitPrice - $ttPrice - $ddPrice - $handlingFee - $fobTransportFee - $portMiscFee - $retrofitFee - $oceanFreight - $commission - $purchaseTax + $taxRefund;
}
/**