调整备货单&&修改采购单
This commit is contained in:
@@ -118,7 +118,9 @@ class PurchaseOrdersService
|
||||
$config = $this->buildQueryConfig($request, $scene);
|
||||
|
||||
// 更新主表信息
|
||||
$updated = $this->logicUpdateBy($config, $data);
|
||||
$udata = $data;
|
||||
unset($udata['stock_order']);
|
||||
$updated = $this->logicUpdateBy($config, $udata);
|
||||
|
||||
// 获取更新后的数据
|
||||
$order = $this->logicShow($config);
|
||||
@@ -198,7 +200,7 @@ class PurchaseOrdersService
|
||||
}
|
||||
|
||||
// 删除采购单主表
|
||||
$deleted = $this->logicDestroy($config);
|
||||
$deleted = $this->logicDeleteBy($config);
|
||||
|
||||
return $this->postProcess('Destroy', $deleted);
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user