优化打款浮点计算

master
chenzhi 3 years ago
parent 5cc92744eb
commit b44105bbf7

@ -487,8 +487,8 @@ class CompanyStatementOfflineController extends ThinkController
unset($ydata["id"]);
$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("剩余打款金额超过结算金额");
}

Loading…
Cancel
Save