备货单调整
This commit is contained in:
@@ -655,7 +655,7 @@ class StockOrdersService
|
||||
*/
|
||||
private function generateVehicleUniqueId(array $veh): string
|
||||
{
|
||||
$keysToRemove = ['vin', 'remark', 'modify_list', 'order_id'];
|
||||
$keysToRemove = ['remark', 'modify_list', 'order_id'];
|
||||
$array = array_diff_key($veh, array_flip($keysToRemove));
|
||||
$uniqueIdStr = json_encode($array);
|
||||
return md5($uniqueIdStr);
|
||||
@@ -884,6 +884,7 @@ class StockOrdersService
|
||||
'num' => 1,
|
||||
'mileage' => $v->mileage,
|
||||
'remark' => $v->remark,
|
||||
'vin' => $v->vin,
|
||||
] + $moneyValues;
|
||||
}
|
||||
return ['list' => $vehList];
|
||||
@@ -925,25 +926,26 @@ class StockOrdersService
|
||||
{
|
||||
$vehicleData['num'] += 1;
|
||||
|
||||
$fieldList = [
|
||||
'fob_transport_fee',
|
||||
'car_price',
|
||||
'ocean_freight',
|
||||
'commission',
|
||||
'retention_price',
|
||||
'port_misc_fee',
|
||||
'total_price',
|
||||
'clearance_price',
|
||||
'profit'
|
||||
];
|
||||
// ** 11.11 remove 价格*数量
|
||||
// $fieldList = [
|
||||
// 'fob_transport_fee',
|
||||
// 'car_price',
|
||||
// 'ocean_freight',
|
||||
// 'commission',
|
||||
// 'retention_price',
|
||||
// 'port_misc_fee',
|
||||
// 'total_price',
|
||||
// 'clearance_price',
|
||||
// 'profit'
|
||||
// ];
|
||||
|
||||
foreach ($vehicleData as $field => $value) {
|
||||
if (in_array($field, $fieldList)) {
|
||||
$amount = $vehicleData[$field]['amount'] * $vehicleData['num'];
|
||||
$currencySymbol = SysCurrency::where('currency_code', $vehicleData[$field]['currency'])->value('currency_symbol');
|
||||
$vehicleData[$field]['currency_info'] = $currencySymbol . number_format($amount, 2, '.', ',');
|
||||
}
|
||||
}
|
||||
// foreach ($vehicleData as $field => $value) {
|
||||
// if (in_array($field, $fieldList)) {
|
||||
// $amount = $vehicleData[$field]['amount'] * $vehicleData['num'];
|
||||
// $currencySymbol = SysCurrency::where('currency_code', $vehicleData[$field]['currency'])->value('currency_symbol');
|
||||
// $vehicleData[$field]['currency_info'] = $currencySymbol . number_format($amount, 2, '.', ',');
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user