shish il y a 4 ans
Parent
commit
074c222830
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      biz-ghs/clear/classes/ClearClass.php

+ 2 - 2
biz-ghs/clear/classes/ClearClass.php

@@ -33,7 +33,7 @@ class ClearClass extends BaseClass
         if (empty($arr)) {
             util::fail('请选择采购单');
         }
-        $purchaseList = PurchaseOrderClass::getAllByCondition(['id' => ['in', $arr]], null, ['id', 'actPrice', 'realPrice', 'debt', 'ghsId'], null, true);
+        $purchaseList = PurchaseOrderClass::getAllByCondition(['id' => ['in', $arr]], null, ['id', 'actPrice', 'realPrice', 'debt', 'ghsId', 'remainDebtPrice'], null, true);
         if (empty($purchaseList)) {
             util::fail('请选择采购单');
         }
@@ -46,7 +46,7 @@ class ClearClass extends BaseClass
             if ($purchase->ghsId != $currentGhsId) {
                 util::fail('请选择同个供应商的订单');
             }
-            $totalPrice = bcadd($totalPrice, $purchase->realPrice, 2);
+            $totalPrice = bcadd($totalPrice, $purchase->remainDebtPrice, 2);
         }
         $ghs = GhsClass::getById($currentGhsId, true);
         if (empty($ghs)) {