diff --git a/admin/controllers/biz/Settle.php b/admin/controllers/biz/Settle.php index 80bb2437..5eebaf75 100644 --- a/admin/controllers/biz/Settle.php +++ b/admin/controllers/biz/Settle.php @@ -403,7 +403,8 @@ class Settle extends HD_Controller } $car_total = $this->biz_settle_model->count(['stic_id'=>$row['id']]); $biz_info = $this->biz_info_model->get(['biz_id'=>$row['biz_id']]); - $type_config = $this->biz_type[$biz_info['type']]; + $partner_rate = $biz_info['rate']/100; + $liche_rate = (100-$biz_info['rate'])/100; $update = [ 'rent' => $biz_info['rent'], 'wat_ele' => $biz_info['wat_ele'], @@ -435,8 +436,8 @@ class Settle extends HD_Controller $price_need = $update['rent'] + $update['wat_ele'] + $update['employee_wage'] + $update['manager_wage'] + $update['commission'] + $update['price_trucking']; $price_ml = $row['price_total'] - $price_need - $all_other; - $update['profix_liche'] = $price_ml*$type_config['liche']-$liche_other; - $update['profix_partner'] = $price_ml*$type_config['partner']-$partner_other; + $update['profix_liche'] = $price_ml*$liche_rate-$liche_other; + $update['profix_partner'] = $price_ml*$partner_rate-$partner_other; $this->biz_settle_static_model->update($update,['id'=>$row['id']]); return $this->show_json(SYS_CODE_SUCCESS, '操作成功');