X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_bank.php;h=8dd950f1d703722641f2b50ce14ce4e130299603;hb=61692f1ac4949f172017fcefc7b191bc7e3d3968;hp=5ed202e7c2c43814556ce38e039e3ec051300633;hpb=46c5f7a65a7659a44ae8254c63152074363d3987;p=fa-stable.git diff --git a/gl/gl_bank.php b/gl/gl_bank.php index 5ed202e7..8dd950f1 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -224,6 +224,15 @@ if (isset($_POST['Process'])) $input_error = 1; } + $limit = get_bank_account_limit($_POST['bank_account'], $_POST['date_']); + + if ($limit != null && ($limit < $_SESSION['pay_items']->gl_items_total())) + { + display_error(sprintf(_("The total bank amount exceeds allowed limit (%s)."), price_format($limit))); + set_focus('code_id'); + $input_error = 1; + } + if (!$Refs->is_valid($_POST['ref'])) { display_error( _("You must enter a reference.")); @@ -247,7 +256,7 @@ if (isset($_POST['Process'])) display_error(_("The entered date is not in fiscal year.")); set_focus('date_'); $input_error = 1; - } + } if (get_post('PayType')==PT_CUSTOMER && (!get_post('person_id') || !get_post('PersonDetailID'))) { display_error(_("You have to select customer and customer branch."));