Skip to content
Snippets Groups Projects
Commit 61df2fa6 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#724 - mark transaction as expenditure depending on amount

parent 4f5b4a5a
No related branches found
No related tags found
No related merge requests found
...@@ -285,7 +285,7 @@ public class TransactionImportController extends BaseController ...@@ -285,7 +285,7 @@ public class TransactionImportController extends BaseController
newTransaction.setName(csvTransaction.getName()); newTransaction.setName(csvTransaction.getName());
newTransaction.setDescription(csvTransaction.getDescription()); newTransaction.setDescription(csvTransaction.getDescription());
newTransaction.setAmount(csvTransaction.getAmount()); newTransaction.setAmount(csvTransaction.getAmount());
newTransaction.setIsExpenditure(true); newTransaction.setIsExpenditure(csvTransaction.getAmount() <= 0);
newTransaction.setAccount(helpers.getCurrentAccountOrDefault()); newTransaction.setAccount(helpers.getCurrentAccountOrDefault());
newTransaction.setCategory(categoryService.findByType(CategoryType.NONE)); newTransaction.setCategory(categoryService.findByType(CategoryType.NONE));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment