- if (single_empty_amount) {
- empty_amount.setAmountHint(String.format(Locale.US, "%1.2f",
- Misc.isZero(running_total) ? 0f : -running_total));
+ for (NewTransactionModel.Item item : items) {
+
+ final LedgerTransactionAccount acc = item.getAccount();
+ if (acc.isAmountSet())
+ continue;
+
+ if (single_empty_amount) {
+ if (item.equals(empty_amount)) {
+ empty_amount.setAmountHint(Misc.isZero(running_total) ? null
+ : String.format(
+ "%1.2f",
+ -running_total));
+ continue;
+ }
+ }
+ else {
+ // no single empty account and this account's amount is not set
+ // => hint should be '0.00'
+ item.setAmountHint(null);
+ }
+