Merge pull request #298 from Bonno/develop

Fixed wrong conversion to revenue account
This commit is contained in:
James Cole 2016-08-29 14:49:46 +02:00 committed by GitHub
commit ca2301959c

View File

@ -334,7 +334,7 @@ class ImportValidator
}
// amount > 0, but opposing is expense
if ($type == AccountType::EXPENSE && $entry->fields['amount'] < 0) {
if ($type == AccountType::EXPENSE && $entry->fields['amount'] > 0) {
$account = $this->convertAccount($entry->fields['opposing-account'], AccountType::REVENUE);
$entry->fields['opposing-account'] = $account;
Log::debug('Converted expense account to revenue account');