Skip to content

Firefly III: a personal finances manager

Fixed wrong conversion to revenue account

Bonno Nachtegaal-Karels3285fae7f05d
diff --git a/app/Import/ImportValidator.php b/app/Import/ImportValidator.php
index 672d5b99a2..0c148b0c20 100644
--- a/app/Import/ImportValidator.php
+++ b/app/Import/ImportValidator.php
@@ -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');