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

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

View File

@@ -28,6 +28,7 @@ class Bills extends Import
$row['issued_at'] = $row['billed_at'];
$row['category_id'] = $this->getCategoryId($row, 'expense');
$row['contact_id'] = $this->getContactId($row, 'vendor');
$row['currency_code'] = $this->getCurrencyCode($row);
$row['type'] = Model::BILL_TYPE;
$row['contact_country'] = !empty($country) ? $country : null;

View File

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