فهرست منبع

收货预期数修改

eric2h 4 سال پیش
والد
کامیت
6b74746e54
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      app/Services/HandInStorageService.php

+ 3 - 3
app/Services/HandInStorageService.php

@@ -648,7 +648,8 @@ sql;
         $actTransactionLogQty = OracleActTransactionLog::query()->where('docno', $info['asnno'])
             ->where('status','99')->where('transactiontype','IN')//事务状态,类型限定
             ->where('doclineno', $info['asnlineno'])->where('fmsku', $info['sku'])->count('fmqty');
-        if ((int)($info['amount'] + $actTransactionLogQty) > (int)$asnDetail['expectedqty']) return false;
+        $expectedQty = (int)($asnDetail['expectedqty']??$asnDetail['expectedqty_each']);
+        if ((int)($info['amount'] + $actTransactionLogQty) > $expectedQty) return false;
         return true;
     }
 
@@ -675,8 +676,7 @@ sql;
 
         $receivedQty = (int)($asnDetail['receivedqty']??$asnDetail['receivedqty_each']);  // 已收货数量
         $amount = (int) $info['amount'];                    // 当前收货数量
-        $expectedQty = (int)$asnDetail['expectedqty'];     // 预期数量
-
+        $expectedQty = (int)($asnDetail['expectedqty']??$asnDetail['expectedqty_each']);     // 预期数量
         if ($receivedQty+$amount>$expectedQty)return 1; //超收
         if ($receivedQty + $amount < $expectedQty) {
             // 已收货数量+当前收货数量 < 预期数量