Browse Source

销单问题

shish 1 year ago
parent
commit
627b26f714

+ 7 - 0
app-hd/controllers/OrderController.php

@@ -535,6 +535,13 @@ class OrderController extends BaseController
             $post['sendType'] = dict::getDict('sendType', 'shopGet');
         }
 
+        $forward = $post['forward'] ?? 1;
+        if ($forward == 1) {
+            if ($hasPay != 1) {
+                util::fail('负数订单只能线下转账');
+            }
+        }
+
         $productJson = $post['product'] ?? '';
         $productList = [];
         if (!empty($productJson)) {

+ 0 - 2
biz-hd/recharge/classes/RechargeClass.php

@@ -243,8 +243,6 @@ class RechargeClass extends BaseClass
                             $lastClearOrderAmount = bcsub($getBalance, $lastRemainDebtAmount, 2);
                             if ($lastClearOrderAmount > 0) {
                                 //销订单部分的欠款!!!
-                                $order->remainDebtPrice = bcsub($order->remainDebtPrice, $lastClearOrderAmount, 2);
-                                $order->save();
                                 $lastClearOrderId = $orderId;
                                 $needClearIdMap[] = ['orderId' => $lastClearOrderId, 'clearAmount' => $lastClearOrderAmount, 'orderSn' => $orderSn];
                             }