提交 8fdf2b25 authored 作者: chengye's avatar chengye

修复invoice浮点数据的计算bug

上级 aca139bd
...@@ -269,6 +269,7 @@ class Invoice extends Base ...@@ -269,6 +269,7 @@ class Invoice extends Base
$settle_amount = 0; $settle_amount = 0;
foreach ($data as $v){ foreach ($data as $v){
$v->settle_amount = $v->settle_amount ?:0; $v->settle_amount = $v->settle_amount ?:0;
$v->payment_amount = is_numeric($v->payment_amount) ?: (float)$v->payment_amount;
$payment_amount += $v->payment_amount; $payment_amount += $v->payment_amount;
$settle_amount += $v->settle_amount; $settle_amount += $v->settle_amount;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论