- TextView amount_v = (TextView) row.getChildAt(1);
- String amt = String.valueOf(amount_v.getText());
+ Log.d("submittable", String.format("accounts=%d, accounts_with_values=%s, "
+ + "amounts_with_accounts=%d, amounts=%d, running_total=%1.2f, "
+ + "single_empty_with_acc=%s", accounts, accounts_with_values,
+ amounts_with_accounts, amounts, running_total,
+ (single_empty_amount && single_empty_amount_has_account) ? "true" : "false"));
+
+ if (have_description && (accounts >= 2) && (accounts_with_values >= (accounts - 1)) && (
+ amounts_with_accounts == amounts) && (
+ single_empty_amount && single_empty_amount_has_account || is_zero(
+ running_total)))
+ {
+ if (mSave != null) mSave.setVisible(true);
+ }
+ else if (mSave != null) mSave.setVisible(false);