shish před 5 roky
rodič
revize
8664edeb3f
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      biz-ghs/clear/classes/ClearClass.php

+ 4 - 0
biz-ghs/clear/classes/ClearClass.php

@@ -79,6 +79,10 @@ class ClearClass extends BaseClass
             if ($modifyPrice > $totalPrice) {
                 util::fail('实收金额不能大于订单金额');
             }
+            if ($modifyPrice < $totalPrice) {
+                $data['discountAmount'] = bcsub($totalPrice, $modifyPrice, 2);
+                $data['discountType'] = dict::getDict('discountType', 'discount');
+            }
             $realPrice = $modifyPrice;
         }
         $data['actPrice'] = $realPrice;