create new if import has no currency code

This commit is contained in:
Cihan Şentürk
2022-07-19 12:09:04 +03:00
parent 03b5b1f673
commit 494c2ac1d5
9 changed files with 56 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ class Customers extends Import
$row['type'] = 'customer';
$row['country'] = !empty($country) ? $country : null;
$row['currency_code'] = $this->getCurrencyCode($row);
$row['user_id'] = null;
return $row;

View File

@@ -25,6 +25,7 @@ class InvoiceTransactions extends Import
$row['account_id'] = $this->getAccountId($row);
$row['category_id'] = $this->getCategoryId($row, 'income');
$row['contact_id'] = $this->getContactId($row, 'customer');
$row['currency_code'] = $this->getCurrencyCode($row);
$row['document_id'] = $this->getDocumentId($row);
$row['number'] = $row['transaction_number'];

View File

@@ -28,6 +28,7 @@ class Invoices extends Import
$row['issued_at'] = $row['invoiced_at'];
$row['category_id'] = $this->getCategoryId($row, 'income');
$row['contact_id'] = $this->getContactId($row, 'customer');
$row['currency_code'] = $this->getCurrencyCode($row);
$row['type'] = Model::INVOICE_TYPE;
$row['contact_country'] = !empty($country) ? $country : null;