tr = profile.loadTransaction(transactionId);
ArrayList<LedgerTransactionAccount> accounts = tr.getAccounts();
NewTransactionModel.Item firstNegative = null;
+ NewTransactionModel.Item firstPositive = null;
boolean singleNegative = false;
+ boolean singlePositive = false;
int negativeCount = 0;
for (int i = 0; i < accounts.size(); i++) {
LedgerTransactionAccount acc = accounts.get(i);
else
singleNegative = false;
}
+ else {
+ if (firstPositive == null) {
+ firstPositive = item;
+ singlePositive = true;
+ }
+ else
+ singlePositive = false;
+ }
}
else
item.getAccount()
firstNegative.getAccount()
.resetAmount();
}
+ else if (singlePositive) {
+ firstPositive.getAccount()
+ .resetAmount();
+ }
}
model.checkTransactionSubmittable(this);
model.setFocusedItem(1);