+ else {
+ int balanceReceiversCount = itemsWithAccountAndEmptyAmount.size();
+ if (balanceReceiversCount != 1) {
+ Logger.debug("submittable", (balanceReceiversCount == 0) ?
+ "Transaction not submittable: non-zero balance " +
+ "with no empty amounts with accounts" :
+ "Transaction not submittable: non-zero balance " +
+ "with multiple empty amounts with accounts");
+ submittable = false;
+ }
+
+ // suggest off-balance amount to a row and remove hints on other rows
+ Item receiver = null;
+ if (!itemsWithAccountAndEmptyAmount.isEmpty())
+ receiver = itemsWithAccountAndEmptyAmount.get(0);
+ else if (!itemsWithEmptyAmount.isEmpty())
+ receiver = itemsWithEmptyAmount.get(0);