Merge pull request #11811 from inietov/fixes/min_qty_not_importing_consumables

Fixed Mini quantity field values are not importing into Snipe-IT
This commit is contained in:
snipe 2022-09-14 12:12:52 -07:00 committed by GitHub
commit d598f75721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -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.

View file

@ -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();