Fix check for column roles.

This commit is contained in:
James Cole
2018-01-10 19:06:27 +01:00
parent 91178d2604
commit 61f5ed3874
6 changed files with 106 additions and 58 deletions

View File

@@ -48,6 +48,8 @@ class ImportJournal
public $currency;
/** @var string */
public $description = '';
/** @var ImportCurrency */
public $foreignCurrency;
/** @var string */
public $hash;
/** @var array */
@@ -71,6 +73,8 @@ class ImportJournal
/** @var string */
private $externalId = '';
/** @var array */
private $foreignAmount;
/** @var array */
private $modifiers = [];
/** @var User */
private $user;
@@ -80,12 +84,13 @@ class ImportJournal
*/
public function __construct()
{
$this->asset = new ImportAccount;
$this->opposing = new ImportAccount;
$this->bill = new ImportBill;
$this->category = new ImportCategory;
$this->budget = new ImportBudget;
$this->currency = new ImportCurrency;
$this->asset = new ImportAccount;
$this->opposing = new ImportAccount;
$this->bill = new ImportBill;
$this->category = new ImportCategory;
$this->budget = new ImportBudget;
$this->currency = new ImportCurrency;
$this->foreignCurrency = new ImportCurrency;
}
/**
@@ -190,6 +195,12 @@ class ImportJournal
case 'amount':
$this->amount = $array;
break;
case 'amount_foreign':
$this->foreignAmount = $array;
break;
case 'foreign-currency-code':
$this->foreignCurrency->setId($array);
break;
case 'amount_debit':
$this->amountDebit = $array;
break;