|
@@ -264,12 +264,12 @@ Class CommodityService
|
|
|
return $barcodes;
|
|
return $barcodes;
|
|
|
})();
|
|
})();
|
|
|
//
|
|
//
|
|
|
- $commodities=$this->get_([$ownerId],[$sku],[],true);
|
|
|
|
|
- if ($commodities->first()){
|
|
|
|
|
- $commodity=$commodities->first();
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+// $commodities=$this->get_([$ownerId],[$sku],[],true);
|
|
|
|
|
+// if ($commodities->first()){
|
|
|
|
|
+// $commodity=$commodities->first();
|
|
|
|
|
+// }else{
|
|
|
$commodity = $this->firstOrCreate(['owner_id' => $ownerId, 'sku' => $sku]);
|
|
$commodity = $this->firstOrCreate(['owner_id' => $ownerId, 'sku' => $sku]);
|
|
|
- }
|
|
|
|
|
|
|
+// }
|
|
|
$commodityBarcodes = $commodity['barcodes'] ?? new Collection();
|
|
$commodityBarcodes = $commodity['barcodes'] ?? new Collection();
|
|
|
|
|
|
|
|
|
|
|