close #2923 Enhancement: Missing document item description import/export excel
This commit is contained in:
@@ -34,6 +34,8 @@ class BillItems extends Import
|
||||
$row['name'] = $row['item_name'];
|
||||
}
|
||||
|
||||
$row['description'] = !empty($row['item_description']) ? $row['item_description'] : '';
|
||||
|
||||
$row['tax'] = (double) $row['tax'];
|
||||
$row['tax_id'] = 0;
|
||||
$row['type'] = Document::BILL_TYPE;
|
||||
|
||||
@@ -28,12 +28,14 @@ class InvoiceItems extends Import
|
||||
|
||||
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
||||
|
||||
if (empty($row['item_id']) && !empty($row['item_name'])) {
|
||||
if (empty($row['item_id']) && ! empty($row['item_name'])) {
|
||||
$row['item_id'] = $this->getItemIdFromName($row);
|
||||
|
||||
$row['name'] = $row['item_name'];
|
||||
}
|
||||
|
||||
$row['description'] = !empty($row['item_description']) ? $row['item_description'] : '';
|
||||
|
||||
$row['tax'] = (double) $row['tax'];
|
||||
$row['tax_id'] = 0;
|
||||
$row['type'] = Document::INVOICE_TYPE;
|
||||
|
||||
Reference in New Issue
Block a user