提交 45ca3744 authored 作者: chengye's avatar chengye

修复账单显示Bug

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