close #2923 Enhancement: Missing document item description import/export excel

This commit is contained in:
Cüneyt Şentürk
2023-03-09 16:45:20 +03:00
parent a1da29d908
commit dfda25562a
5 changed files with 10 additions and 2 deletions

View File

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

View File

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