X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_payment.php;h=12d05480f5dbf4b393e2b70947b296f85fc4879b;hb=0262a2246f9426d154327826cc9bd02c0af3a274;hp=24be2b4356e0ebc065a2a5729ae7aa504d25516b;hpb=dd1a21a371699b6f894d21c6950b668cda0f7b29;p=fa-stable.git diff --git a/gl/gl_payment.php b/gl/gl_payment.php index 24be2b43..12d05480 100644 --- a/gl/gl_payment.php +++ b/gl/gl_payment.php @@ -102,21 +102,25 @@ if (isset($_POST['Process'])) if (!references::is_valid($_POST['ref'])) { display_error( _("You must enter a reference.")); + set_focus('ref'); $input_error = 1; } elseif (!is_new_reference($_POST['ref'], systypes::bank_payment())) { display_error( _("The entered reference is already in use.")); + set_focus('ref'); $input_error = 1; } elseif (!is_date($_POST['date_'])) { display_error(_("The entered date for the payment is invalid.")); + set_focus('date_'); $input_error = 1; } elseif (!is_date_in_fiscalyear($_POST['date_'])) { display_error(_("The entered date is not in fiscal year.")); + set_focus('date_'); $input_error = 1; } @@ -149,18 +153,21 @@ function check_item_data() if (!check_num('amount', 0)) { display_error( _("The amount entered is not a valid number or is less than zero.")); + set_focus('amount'); return false; } if ($_POST['code_id'] == $_POST['bank_account']) { display_error( _("The source and destination accouts cannot be the same.")); + set_focus('code_id'); return false; } if (is_bank_account($_POST['code_id'])) { display_error( _("You cannot make a payment to a bank account. Please use the transfer funds facility for this.")); + set_focus('code_id'); return false; }