diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index b9d6d174f..c0c245b2e 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -223,9 +223,12 @@ class FinanceController extends BaseController ->page($page, $row) ->select(); $count = $model->where($map)->count(); - $total = $model->field('sum(pay_amount) as pay_amount,pay_way,sum(if(selle_ratio >= 0,selle_ratio * pay_amount,0)) as income') + $total = $model->field('sum(pay_amount) as pay_amount,sum(if(pay_way > -1,pay_amount,0)) as direct_pay_amount,sum(if(pay_way = -1,pay_amount,0)) as inner_pay_amount,sum(if(selle_ratio >= 0,selle_ratio * pay_amount,0)) as income') ->where($map) ->find(); + $total['direct_pay_amount'] = empty($total['direct_pay_amount']) ? '0.00' : $total['direct_pay_amount']; + $total['inner_pay_amount'] = empty($total['inner_pay_amount']) ? '0.00' : $total['inner_pay_amount']; + $total['income'] = empty($total['income']) ? 0 : $total['income']; $total['income'] = bcdiv($total['income'], 100, 2); //ζηŽ°ηŠΆζ€ diff --git a/Application/Home/View/default/Finance/settlementDtl.html b/Application/Home/View/default/Finance/settlementDtl.html index a62bdff29..bb44b46ef 100644 --- a/Application/Home/View/default/Finance/settlementDtl.html +++ b/Application/Home/View/default/Finance/settlementDtl.html @@ -182,13 +182,8 @@ -- -- {$total.pay_amount} - - 0.00 - {$total.pay_amount} - - {$total.pay_amount} - 0.00 - + {$total.direct_pay_amount} + {$total.inner_pay_amount} -- {$total.income} --