shish 4 жил өмнө
parent
commit
9872f771ef

+ 3 - 3
biz-hd/purchase/classes/PurchaseClearClass.php

@@ -137,7 +137,7 @@ class PurchaseClearClass extends BaseClass
             util::fail('没有找到客户信息');
         }
 
-        \bizHd\ghs\classes\GhsClass::clearDebtAmountReduce($ghs, $custom, $order->remainDebtPrice, $order);
+        \bizHd\ghs\classes\GhsClass::clearDebtAmountReduce($ghs, $custom, $order->actPrice, $order);
 
         $shopId = $ghs->shopId;
         $shop = ShopClass::getLockById($shopId);
@@ -149,7 +149,7 @@ class PurchaseClearClass extends BaseClass
             ShopClass::customClearAddBalance($shop, $order);
         }
         //供应商的门店应收客户款减少
-        $currentGathering = bcsub($shop->mayGathering, $order->remainDebtPrice, 2);
+        $currentGathering = bcsub($shop->mayGathering, $order->actPrice, 2);
         $shop->mayGathering = $currentGathering;
         $shop->save();
 
@@ -177,7 +177,7 @@ class PurchaseClearClass extends BaseClass
         OrderClass::updateByIds($saleIds, ['debt' => OrderClass::DEBT_NO, 'clearId' => $clearId, 'remainDebtPrice' => 0]);
 
         //客户付供应商款减少
-        CustomClass::clearDebtAmountReduce($custom, $ghs, $order->remainDebtPrice, $order);
+        CustomClass::clearDebtAmountReduce($custom, $ghs, $order->actPrice, $order);
 
         if (isset($order->customShopAdminId) && !empty($order->customShopAdminId)) {
             WxMessageClass::clearInform($shop, $order, $custom);