提交 aca139bd authored 作者: chengye's avatar chengye

修复缴费金额为0显示的bug

上级 71044cfb
...@@ -51,8 +51,11 @@ class EmInvoice extends Base ...@@ -51,8 +51,11 @@ class EmInvoice extends Base
if($item['payment_balance'] == 0){ if($item['payment_balance'] == 0){
$item['paid_amount'] = $item['payment_amount'] ; $item['paid_amount'] = $item['payment_amount'] ;
} else { } else {
$temp = $item['payment_amount'] - $item['payment_balance']; if(!is_numeric($item['payment_amount']) || !is_numeric($item['payment_balance'])){
$item['paid_amount'] = $temp == 0 ? $temp : round($item['payment_amount'] - $item['payment_balance'],3); $item['payment_amount'] = (float)$item['payment_amount'];
$item['payment_balance'] = (float)$item['payment_balance'];
}
$item['paid_amount'] = round($item['payment_amount'] - $item['payment_balance'],3);
} }
if($item['settle_balance'] == 0){ if($item['settle_balance'] == 0){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论