Merge branch 'develop'

# Conflicts:
#	config/route.php
This commit is contained in:
mzl
2025-11-11 16:46:22 +08:00
parent 6c59fdef10
commit 80fbf6c35a
17 changed files with 1030 additions and 110 deletions
+21 -19
View File
@@ -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, '.', ',');
// }
// }
}
/**