Fixed a bug that would recreate accounts if they existed had an old account type.

This commit is contained in:
James Cole
2014-09-25 07:41:45 +02:00
parent bb2b71bdc0
commit fc44a52ba5
2 changed files with 8 additions and 5 deletions

View File

@@ -231,6 +231,7 @@ class Transaction implements TransactionInterface
}
if (isset($data['expense_account'])) {
$to = $this->_accounts->findExpenseAccountByName($data['expense_account']);
}
if (isset($data['revenue_account'])) {
$from = $this->_accounts->findRevenueAccountByName($data['revenue_account']);
@@ -243,7 +244,6 @@ class Transaction implements TransactionInterface
$to = $this->_accounts->findAssetAccountById($data['account_to_id']);
}
/*
* Add a custom error when they are the same.
*/