소스 검색

支付加现金

gorden 6 달 전
부모
커밋
479d43b605
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 = '餐厅前台优惠';