cusorderv2 biz_type != 1 add fines -1 about
This commit is contained in:
@@ -192,6 +192,13 @@ class CusorderV2 extends Wxapp
|
||||
$if_fine && $data['if_fine'] = 1;
|
||||
$main_type && $data['main_type'] = 1;
|
||||
$delry_time && $data['delry_time'] = $delry_time;
|
||||
|
||||
// 服务费为0时要先删除
|
||||
foreach ($fines as $k => $v) {
|
||||
if ($v['id'] == -1 && !$v['price']) {
|
||||
unset($fines[$k]);
|
||||
}
|
||||
}
|
||||
$fines && $data['fines'] = json_encode($fines, JSON_UNESCAPED_UNICODE);
|
||||
$info_json = [];
|
||||
# 20230222 地址的值用身份证上面的地址
|
||||
@@ -495,6 +502,13 @@ class CusorderV2 extends Wxapp
|
||||
$delry_time && $data['delry_time'] = $delry_time;
|
||||
$finance_row && $data['finance_id'] = $finance_row['id'];
|
||||
$data['if_fine'] = $if_fine ? 1 : 0;
|
||||
|
||||
// 服务费为0时要先删除
|
||||
foreach ($fines as $k => $v) {
|
||||
if ($v['id'] == -1 && !$v['price']) {
|
||||
unset($fines[$k]);
|
||||
}
|
||||
}
|
||||
$data['fines'] = json_encode($fines, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$color_arr = json_decode($business_row['colors'], true);
|
||||
@@ -543,6 +557,7 @@ class CusorderV2 extends Wxapp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data['option_ids'] = json_encode($optinos_ids);
|
||||
$money_json['price_options'] = 0;
|
||||
//选装金额
|
||||
@@ -698,6 +713,14 @@ class CusorderV2 extends Wxapp
|
||||
'c_city_id' => $info_json['car_city_id'],
|
||||
'if_local_bill' => $row['if_local_bill'],
|
||||
];
|
||||
|
||||
// 非品牌店,服务费检查,如无强制默认
|
||||
if (!$data['fines']){
|
||||
$biz = $this->biz_model->get(['id' => $row['biz_id']], 'id,city_id,type');
|
||||
if ($biz['type'] != 1){
|
||||
$data['fines'] = [array("id"=>"-1", "txt"=>"服务费", "price"=>"")];
|
||||
}
|
||||
}
|
||||
$data['if_zero_firstpay'] = $if_zero_firstpay;
|
||||
if ($row['main_type']) {
|
||||
$info_json['c_credit'] && $data['credit'] = $info_json['c_credit'];
|
||||
|
||||
Reference in New Issue
Block a user