Bank Transfer: fixed problem with entering transfer between accounts of the same...
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 17 Aug 2013 12:50:38 +0000 (14:50 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 17 Aug 2013 12:50:38 +0000 (14:50 +0200)
gl/bank_transfer.php

index 312d3130c4c31eefbaee7d5da5c03a0318f67b47..6deb5fe2ed1321e69b0fddb3ebdb90e77b987d3f 100644 (file)
@@ -185,13 +185,13 @@ function check_valid_entries()
                return false;
        }
 
-       if (!check_num('target_amount', 0)) 
+       if (isset($_POST['target_amount']) && !check_num('target_amount', 0)) 
        {
                display_error(_("The entered amount is invalid or less than zero."));
                set_focus('target_amount');
                return false;
        }
-       if (input_num('target_amount') == 0) {
+       if (isset($_POST['target_amount']) && input_num('target_amount') == 0) {
                display_error(_("The incomming bank amount cannot be 0."));
                set_focus('target_amount');
                return false;