From d51eca20f092a38dbca65e35a8107a0d4f76dada Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 12 Sep 2022 18:11:48 -0500 Subject: [PATCH] Add min_amt field in Consumables and Accessories imports --- app/Importer/AccessoryImporter.php | 1 + app/Importer/ConsumableImporter.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Importer/AccessoryImporter.php b/app/Importer/AccessoryImporter.php index f9c871fa7c..417075ef31 100644 --- a/app/Importer/AccessoryImporter.php +++ b/app/Importer/AccessoryImporter.php @@ -43,6 +43,7 @@ class AccessoryImporter extends ItemImporter $this->log('No Matching Accessory, Creating a new one'); $accessory = new Accessory(); $this->item['model_number'] = $this->findCsvMatch($row, "model_number"); + $this->item['min_amt'] = $this->findCsvMatch($row, "min_amt"); $accessory->fill($this->sanitizeItemForStoring($accessory)); //FIXME: this disables model validation. Need to find a way to avoid double-logs without breaking everything. diff --git a/app/Importer/ConsumableImporter.php b/app/Importer/ConsumableImporter.php index cc24daa930..b0dea1f514 100644 --- a/app/Importer/ConsumableImporter.php +++ b/app/Importer/ConsumableImporter.php @@ -43,6 +43,7 @@ class ConsumableImporter extends ItemImporter $consumable = new Consumable(); $this->item['model_number'] = $this->findCsvMatch($row, 'model_number'); $this->item['item_no'] = $this->findCsvMatch($row, 'item_number'); + $this->item['min_amt'] = $this->findCsvMatch($row, "min_amt"); $consumable->fill($this->sanitizeItemForStoring($consumable)); //FIXME: this disables model validation. Need to find a way to avoid double-logs without breaking everything. $consumable->unsetEventDispatcher();