X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_bank.php;h=2d220c4fd25fbca9bfa4a2b19eb580ba54cd1bec;hb=1723f5fc5b851f20ae52da2e4a0104437f1a97b4;hp=2d44653179c3e0e72c54c914a610f727a0663081;hpb=81cf63e685242cab99edd3ba2815ab3fb4a4abda;p=fa-stable.git diff --git a/gl/gl_bank.php b/gl/gl_bank.php index 2d446531..2d220c4f 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -216,7 +216,7 @@ function create_cart($type, $trans_no) function check_trans() { - global $Refs; + global $Refs, $systypes_array; $input_error = 0; @@ -244,10 +244,12 @@ function check_trans() } if ($trans = check_bank_account_history($amnt_chg, $_POST['bank_account'], $_POST['date_'])) { - display_error(sprintf(_("The bank transaction would result in exceed of authorized overdraft limit for transaction: %s #%s on %s."), - $systypes_array[$trans['type']], $trans['trans_no'], sql2date($trans['trans_date']))); - set_focus('amount'); - $input_error = 1; + if (isset($trans['trans_no'])) { + display_error(sprintf(_("The bank transaction would result in exceed of authorized overdraft limit for transaction: %s #%s on %s."), + $systypes_array[$trans['type']], $trans['trans_no'], sql2date($trans['trans_date']))); + set_focus('amount'); + $input_error = 1; + } } if (!check_reference($_POST['ref'], $_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id)) {