Merge pull request '金额错误bug修改' (#363) from feature/add_item into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/363
master
廖金灵 4 years ago
commit f568c40e22

@ -166,6 +166,8 @@ class CompanyStatementOfflineController extends ThinkController
->where($map)
->find();
unset($map['c.pay_status']);
$countSuccess = SM("company_statement_info_part","tab_")->alias("c")
->field("IFNULL(SUM(CASE WHEN c.pay_status = 0 THEN c.statement_money ELSE 0 END),0) as statement_money,
IFNULL(SUM(CASE WHEN c.pay_status = 1 THEN c.statement_money ELSE 0 END),0) as success_money")
@ -175,12 +177,18 @@ class CompanyStatementOfflineController extends ThinkController
->where(['i.pay_status'=>['neq',1]])
->find();
if ($_REQUEST['pay_status'] == 1) {
$countSuccess = [];
}
// dump($countPart);
// dump($countSuccess);die();
// dump($count);die();
$count['success_money'] += $countSuccess['success_money'];
$count['statement_money'] -= $countSuccess['success_money'];
$count['error_money'] += $countPart['error_money'];
$params['p'] = $page;
$params['row'] = $row;
$page = set_pagination($count['count'], $row, $params);

Loading…
Cancel
Save