Parcourir la source

支付加现金

gorden il y a 6 mois
Parent
commit
479d43b605
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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'];
                 $params['order_discount_amount'] = $params['order_amount_total'] - $params['order_amount_pay'];
                 $couponClassifyDesc = $couponClassify = '抹零';
                 $couponClassifyDesc = $couponClassify = '抹零';
             } else if (!empty($params['preferential']) && $params['preferential'] == 'custom') {
             } 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("餐厅前台优惠后实际支付金额错误");
                     throw new BusinessException("餐厅前台优惠后实际支付金额错误");
                 }
                 }
                 $couponClassifyDesc = $couponClassify = '餐厅前台优惠';
                 $couponClassifyDesc = $couponClassify = '餐厅前台优惠';