优化上游结算

master
chenzhi 4 years ago
parent 16a3bea172
commit 8e77f3ed4d

@ -143,7 +143,7 @@ class CompanyStatementSetController extends Controller {
$cp_id = implode(",",array_flip(array_flip(array_keys($cpList)))); $cp_id = implode(",",array_flip(array_flip(array_keys($cpList))));
$js_id = implode(",",array_unique($js_id)); $js_id = implode(",",array_unique($js_id));
//获取cp公司 //获取cp公司
$tmpp = M("Partner","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank,channel_rate,invoice_rate,company_type,ali_user,ali_account,has_advance_charge,has_server_fee")->where(["id"=>['in',$cp_id]])->select(); $tmpp = M("Partner","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank,channel_rate,invoice_rate,company_type,ali_user,ali_account,has_advance_charge,has_server_fee,server_fee")->where(["id"=>['in',$cp_id]])->select();
$cp =[]; $cp =[];
foreach ($tmpp as $v) { foreach ($tmpp as $v) {
$cp[$v['id']]=$v; $cp[$v['id']]=$v;
@ -336,8 +336,9 @@ class CompanyStatementSetController extends Controller {
$add_data['pay_amount'] -= $fine_count;; $add_data['pay_amount'] -= $fine_count;;
} }
//获取服务器费用 //获取服务器费用
if($v['has_server_fee'] == 1 && $v['server_fee'] >0){ $tmp_company_info= $cp[$add_data['company_id']];
$server_count = $v['server_fee']; if($tmp_company_info['has_server_fee'] == 1 && $tmp_company_info['server_fee'] >0){
$server_count = $tmp_company_info['server_fee'];
$add_data['statement_info'][] = array( $add_data['statement_info'][] = array(
"statement_begin_time"=>$statement_begin_time, "statement_begin_time"=>$statement_begin_time,
"statement_end_time"=>$statement_end_time, "statement_end_time"=>$statement_end_time,

Loading…
Cancel
Save