Fixed wrong conversion to revenue account

This commit is contained in:
Bonno Nachtegaal-Karels 2016-08-28 14:24:05 +02:00
parent 312079657b
commit 3285fae7f0

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');