Removed unneeded lines
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
8f50e01d18
commit
0d099263e3
1 changed files with 2 additions and 4 deletions
|
@ -28,9 +28,9 @@ class ConsumableImporter extends ItemImporter
|
|||
{
|
||||
$consumable = Consumable::where('name', trim($this->item['name']))->first();
|
||||
if ($consumable) {
|
||||
|
||||
if (! $this->updating) {
|
||||
$this->log('A matching Consumable '.$this->item['name'].' already exists. ');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->log('Updating Consumable');
|
||||
|
@ -39,12 +39,10 @@ class ConsumableImporter extends ItemImporter
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->log('No matching consumable, creating one');
|
||||
$consumable = new Consumable();
|
||||
$consumable->created_by = auth()->id();
|
||||
$this->item['model_number'] = trim($this->findCsvMatch($row, 'model_number'));
|
||||
$this->item['item_no'] = trim($this->findCsvMatch($row, 'item_number'));
|
||||
$this->item['min_amt'] = trim($this->findCsvMatch($row, "min_amt"));
|
||||
$consumable->fill($this->sanitizeItemForStoring($consumable));
|
||||
|
||||
// This sets an attribute on the Loggable trait for the action log
|
||||
|
|
Loading…
Add table
Reference in a new issue