Merge pull request '优化打款浮点计算' (#611) from hotfix/change_offline_pay into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/611
master
廖金灵 3 years ago
commit ab75eb1740

@ -487,8 +487,8 @@ class CompanyStatementOfflineController extends ThinkController
unset($ydata["id"]); unset($ydata["id"]);
$sumUnPayAmount = array_sum(array_column($info,'unpay_amount')); $sumUnPayAmount = array_sum(array_column($info,'unpay_amount'));
// dump($sumUnPayAmount+$sumPartInfo['statement_money']);die();
if (($sumUnPayAmount+$sumPartInfo['statement_money']) > $ydata['statement_money'] ) { if ((int)(($sumUnPayAmount+$sumPartInfo['statement_money'])*100) > (int)($ydata['statement_money']*100) ) {
$this->error("剩余打款金额超过结算金额"); $this->error("剩余打款金额超过结算金额");
} }

Loading…
Cancel
Save