|
|
@@ -167,15 +167,15 @@ class WaybillService
|
|
|
->get();
|
|
|
foreach ($waybills as $waybill){
|
|
|
if (!$waybill['carrier_weight_other'] && !$waybill['carrier_weight']) return null;
|
|
|
- if (!$waybill['carrier_weight_other']) $waybill['carrier_weight_other']=floor($waybill['carrier_weight']/0.4);
|
|
|
+ if (!$waybill['carrier_weight_other']) $waybill['carrier_weight_other']=($waybill['carrier_weight']/0.4);
|
|
|
}
|
|
|
$daily_total_weight=$waybills->sum('carrier_weight_other');
|
|
|
$updateParams = [['id','pick_up_fee','updated_at']];
|
|
|
foreach ($waybills as $waybill){
|
|
|
- $waybill['pick_up_fee']=floor(($waybill->carrier_weight_other/$daily_total_weight)*$param['billing']);
|
|
|
+ $waybill['pick_up_fee']=round(($waybill->carrier_weight_other/$daily_total_weight)*$param['billing']);
|
|
|
$updateParams[] = [
|
|
|
'id' => $waybill->id,
|
|
|
- 'pick_up_fee' => floor(($waybill->carrier_weight_other/$daily_total_weight)*$param['billing']),
|
|
|
+ 'pick_up_fee' => (($waybill->carrier_weight_other/$daily_total_weight)*$param['billing']),
|
|
|
'updated_at' => Carbon::now()->toDateTimeString(),
|
|
|
];
|
|
|
}
|