浏览代码

退回商品为未知的为差异退回

loustwo 3 年之前
父节点
当前提交
ae15492aea
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      app/Services/OrderRejectingStatusService.php

+ 7 - 3
app/Services/OrderRejectingStatusService.php

@@ -139,12 +139,16 @@ class OrderRejectingStatusService
 
     public function isDiffReject(array $rejected_bill_item_map): bool
     {
+        // 只要有残次 正品 未知 都属于 差异退回
+        $count = 0;
         foreach ($rejected_bill_item_map as $key => $map) {
-            if( (isset($map['残次']) && $map['残次'] >0) || (isset($map['正品']) && $map['正品'] > 0 )){
-                return false;
+            if( (isset($map['残次']) && $map['残次'] >0)
+                || (isset($map['正品']) && $map['正品'] > 0 )
+                || (isset($map['未知']) && $map['未知'] > 0 )){
+                $count ++ ;
             }
         }
-        return true;
+        return $count != 0;
     }
 
 }