fixed item import
This commit is contained in:
@@ -4,13 +4,17 @@ namespace App\Imports\Common\Sheets;
|
||||
|
||||
use App\Abstracts\Import;
|
||||
use App\Http\Requests\Common\ItemTax as Request;
|
||||
use App\Models\Common\Item;
|
||||
use App\Models\Common\ItemTax as Model;
|
||||
|
||||
class ItemTaxes extends Import
|
||||
{
|
||||
public function model(array $row)
|
||||
{
|
||||
// @todo remove after laravel-excel 3.2 release
|
||||
if ($row['item_name'] === $this->empty_field) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Model($row);
|
||||
}
|
||||
|
||||
@@ -18,6 +22,7 @@ class ItemTaxes extends Import
|
||||
{
|
||||
$row = parent::map($row);
|
||||
|
||||
$row['item_id'] = $this->getItemIdFromName($row);
|
||||
$row['tax_id'] = $this->getTaxId($row);
|
||||
|
||||
return $row;
|
||||
|
||||
Reference in New Issue
Block a user