transactions import/export

This commit is contained in:
denisdulici
2020-01-21 09:10:12 +03:00
parent 9b42e2d127
commit 75f17e5466
11 changed files with 270 additions and 222 deletions

View File

@@ -35,13 +35,7 @@ class InvoiceItemTaxes extends Import
$row['invoice_item_id'] = InvoiceItem::where('item_id', $item_id)->pluck('id')->first();
}
if (empty($row['tax_id']) && !empty($row['tax_name'])) {
$row['tax_id'] = Tax::name($row['tax_name'])->pluck('id')->first();
}
if (empty($row['tax_id']) && !empty($row['tax_rate'])) {
$row['tax_id'] = $this->getTaxIdFromRate($row);
}
$row['tax_id'] = $this->getTaxId($row);
if (empty($row['name']) && !empty($row['item_name'])) {
$row['name'] = $row['item_name'];