edit-liche-admin_list
This commit is contained in:
@@ -368,6 +368,7 @@ class Ordersv2List
|
||||
$fields['over_time'] = $val['over_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['over_time'])) : '';
|
||||
$fields['refund_time'] = $val['refund_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['refund_time'])) : '';
|
||||
$fields['vin'] = $items[$val['item_id']] ? $items[$val['item_id']] : '';
|
||||
$fields['vin'] && $fields['car_name'] = $fields['car_name']."<br>".$fields['vin'];
|
||||
|
||||
if($size>1000){
|
||||
$user_info = '';
|
||||
|
||||
@@ -371,6 +371,9 @@ class Biz extends HD_Controller
|
||||
$profix_fine = $cb;
|
||||
}
|
||||
$settle_money_json['out']['biz_price'] = $profix_fine;
|
||||
//拖车费
|
||||
$truck_row = $this->biz_trucking_model->get(['auto_b_id'=>$val['brand_id'],'biz_id'=>$val['biz_id'],'status'=>1]);
|
||||
$price_trucking = $truck_row['money'] ? $truck_row['money'] : 0;
|
||||
$add_data = [
|
||||
'biz_id' => $val['biz_id'],
|
||||
'o_id' => $val['id'],
|
||||
@@ -378,6 +381,7 @@ class Biz extends HD_Controller
|
||||
'profix_insure' => $profix_insuer,
|
||||
'profix_loan' => $profix_loan,
|
||||
'profix_carno' => $profix_carno,
|
||||
'price_trucking' => $price_trucking,
|
||||
'profix_fine' => $money_json['price_fine_select'] - $profix_fine,
|
||||
'money_json' => json_encode($settle_money_json,JSON_UNESCAPED_UNICODE),
|
||||
'year' => date('Y',strtotime($val['bill_time'])),
|
||||
@@ -422,6 +426,7 @@ class Biz extends HD_Controller
|
||||
'biz_id' => $val['biz_id'],
|
||||
'profix_car' => $val['profix_car'],
|
||||
'price_all' => $price_all,
|
||||
'price_trucking' => $val['price_trucking'],
|
||||
'year' => $val['year'],
|
||||
'month' => $val['month'],
|
||||
'c_time' => time()
|
||||
@@ -452,6 +457,7 @@ class Biz extends HD_Controller
|
||||
$data = [
|
||||
'profix_car' => $static_row['profix_car'] + $val['profix_car'],
|
||||
'price_all' => $static_row['price_all'] + $price_all,
|
||||
'price_trucking' => $static_row['price_trucking'] + $val['price_trucking'],
|
||||
];
|
||||
$res = $this->biz_settle_static_model->update($data,['id'=>$static_row['id']]);
|
||||
if($res){
|
||||
|
||||
@@ -49,9 +49,14 @@ class Biz_settle_price_model extends HD_Model
|
||||
$jsondata = json_decode($jsondata,true);
|
||||
$res = 0;
|
||||
if($jsondata){
|
||||
$key_filter = ['num','base_employees'];
|
||||
foreach ($jsondata as $key=>$val) {
|
||||
$res += $val;
|
||||
if(!in_array($key,$key_filter)){
|
||||
$res += $val;
|
||||
}
|
||||
}
|
||||
$base_employees = $jsondata['base_employees'] * $jsondata['num'];
|
||||
$res += $base_employees;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user