|
|
|
@ -207,7 +207,7 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
//获取基本信息
|
|
|
|
|
$infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select();
|
|
|
|
|
//获取母单
|
|
|
|
|
$pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status')->where("id={$id}")->find();
|
|
|
|
|
$pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment')->where("id={$id}")->find();
|
|
|
|
|
$statement_num = $pool_info['statement_num'];
|
|
|
|
|
$this->assign("title",$statement_num);
|
|
|
|
|
$this->assign("pool_status",$pool_info['verify_status']);
|
|
|
|
@ -226,12 +226,12 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$infolist =array_merge($infolist,$lack_info);
|
|
|
|
|
}
|
|
|
|
|
$this->viewPuPool($infolist,$is_export);
|
|
|
|
|
$this->viewPuPool($infolist,$is_export,$pool_info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//个人汇总结算查看
|
|
|
|
|
public function viewPuPool(&$infolist,$is_export){
|
|
|
|
|
public function viewPuPool(&$infolist,$is_export,$pool_info){
|
|
|
|
|
// dd($infolist);
|
|
|
|
|
$line = 1;
|
|
|
|
|
$count = [];
|
|
|
|
@ -260,26 +260,19 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
}else{
|
|
|
|
|
$va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
|
|
|
|
|
}
|
|
|
|
|
$count['sum_money_exp'] .= "O{$line}+";
|
|
|
|
|
$count['platform_amount_exp'] .= "J{$line}+";
|
|
|
|
|
}else{
|
|
|
|
|
$count['platform_amount'] += $va['pay_amount'];
|
|
|
|
|
$count['sum_money'] += $va['sum_money'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$v['statement_count'] = count($v['statement_info']);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if($is_export){
|
|
|
|
|
$platform_amount_exp = trim($count["platform_amount_exp"],"+");
|
|
|
|
|
$sum_money_exp = trim($count["sum_money_exp"],"+");
|
|
|
|
|
if(empty($platform_amount_exp)){ $platform_amount_exp = 0;}
|
|
|
|
|
if(empty($sum_money_exp)){ $sum_money_exp = 0;}
|
|
|
|
|
|
|
|
|
|
$count["platform_amount"] = "=".$platform_amount_exp;
|
|
|
|
|
$count["sum_money"] = "=".$sum_money_exp;
|
|
|
|
|
$count["platform_amount"] = "=SUM(J2:J".$line.")";
|
|
|
|
|
$count["sum_money"] = "=SUM(O2:O".$line.")";
|
|
|
|
|
}
|
|
|
|
|
$this->assign("data",$infolist);
|
|
|
|
|
$this->assign("is_payment",$pool_info['is_payment']);
|
|
|
|
|
$this->assign("count",$count);
|
|
|
|
|
$this->assign("is_export",$is_export);
|
|
|
|
|
$this->display("CompanyStatementPool/viewPuPool");
|
|
|
|
|