Browse Source

reclamations import

Alexander Musikhin 3 weeks ago
parent
commit
6b4f7e0466
1 changed files with 7 additions and 0 deletions
  1. 7 0
      app/Services/ImportReclamationsService.php

+ 7 - 0
app/Services/ImportReclamationsService.php

@@ -110,6 +110,13 @@ class ImportReclamationsService extends ImportBaseService
                 ->where('order_id', $order->id)
                 ->where('rfid', $rfid)
                 ->first();
+            if(!$productSKU) {
+                $productSKU = ProductSKU::query()
+                    ->where('year', $year)
+                    ->where('product_id', $product->id)
+                    ->where('order_id', $order->id)
+                    ->first();
+            }
             if(!$productSKU) {
                 echo $this->import->log('SKU not found: ' . $r['products.nomenclature_number'], 'WARNING');
                 continue;