提交 7f201683 authored 作者: chengye's avatar chengye

修复账单缴费余额与结算余额错误

上级 ba9fa5d6
......@@ -41,16 +41,17 @@ class EmInvoice extends Base
->select()
->toarray();
foreach ($data as &$item){
if(number_format($item['payment_balance']) == 0){
$item['paid_amount'] = 0 ;
} else {
$item['paid_amount'] = number_format($item['payment_amount']) - number_format($item['payment_balance']);
}
if(number_format($item['settle_balance']) == 0){
$item['sett_amount'] = 0 ;
} else {
$item['sett_amount'] = number_format($item['settle_amount']) - number_format($item['settle_balance']);
}
echo number_format($item['payment_amount']);
// if(number_format($item['payment_balance']) == 0){
// $item['paid_amount'] = 0 ;
// } else {
// $item['paid_amount'] = number_format($item['payment_amount']) - number_format($item['payment_balance']);
// }
// if(number_format($item['settle_balance']) == 0){
// $item['sett_amount'] = 0 ;
// } else {
// $item['sett_amount'] = number_format($item['settle_amount']) - number_format($item['settle_balance']);
// }
}
return $data;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论