Browse Source

支付加现金

gorden 6 months ago
parent
commit
479d43b605
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/admin/controller/order/WholeController.php

+ 1 - 1
app/admin/controller/order/WholeController.php

@@ -1231,7 +1231,7 @@ class WholeController extends Curd
                 $params['order_discount_amount'] = $params['order_amount_total'] - $params['order_amount_pay'];
                 $couponClassifyDesc = $couponClassify = '抹零';
             } else if (!empty($params['preferential']) && $params['preferential'] == 'custom') {
-                if ($params['order_amount_total'] - $params['order_discount_amount'] != $params['order_amount_pay']) {
+                if (sprintf("%.2f",$params['order_amount_total']-$params['order_discount_amount']) != sprintf("%.2f",$params['order_amount_pay'])) {
                     throw new BusinessException("餐厅前台优惠后实际支付金额错误");
                 }
                 $couponClassifyDesc = $couponClassify = '餐厅前台优惠';