Merged changes up to version 2.3.4 into unstable.
[fa-stable.git] / gl / bank_transfer.php
index 482539f4c9605044a5f404abe1148f438ea71397..14e49248967c3e9220ee0b463c2d2d30796c6420 100644 (file)
@@ -65,6 +65,8 @@ function gl_payment_controls()
 
        bank_accounts_list_row(_("From Account:"), 'FromBankAccount', null, true);
 
+       bank_balance_row($_POST['FromBankAccount']);
+
     bank_accounts_list_row(_("To Account:"), 'ToBankAccount', null, true);
 
     date_row(_("Transfer Date:"), 'DatePaid', '', null, 0, 0, 0, null, true);
@@ -122,6 +124,11 @@ function check_valid_entries()
                set_focus('amount');
                return false;
        }
+       if (input_num('amount') == 0) {
+               display_error(_("The total bank amount cannot be 0."));
+               set_focus('amount');
+               return false;
+       }
 
        $limit = get_bank_account_limit($_POST['FromBankAccount'], $_POST['DatePaid']);