X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fui%2Fgl_bank_ui.inc;h=5425edfbaa605af1d5e1b89083e2019f5febddff;hb=e9782c04faf09dd040dbc0c908cdb6e6d4f0dcfc;hp=1ac37eb7a2812509f82940558c85c2662ced1c61;hpb=d23fa06617d0ea628c14a02d08e8b85d711444a5;p=fa-stable.git diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 1ac37eb7..5425edfb 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -14,6 +14,7 @@ function display_bank_header(&$order) global $Ajax, $Refs; $payment = $order->trans_type == ST_BANKPAYMENT; + $customer_error = false; div_start('pmt_header'); start_outer_table(TABLESTYLE2, "width=90%"); // outer table @@ -74,6 +75,17 @@ function display_bank_header(&$order) $_POST['PersonDetailID'] = ANY_NUMERIC; hidden('PersonDetailID'); } + $trans = get_customer_habit($_POST['person_id']); // take care of customers on hold + if ($trans['dissallow_invoices'] != 0) + { + if ($payment) + { + $customer_error = true; + display_error(_("This customer account is on hold.")); + } + else + display_warning(_("This customer account is on hold.")); + } break; case PT_QUICKENTRY : @@ -114,6 +126,12 @@ function display_bank_header(&$order) end_outer_table(1); // outer table div_end(); + if ($customer_error) + { + end_form(); + end_page(); + exit; + } } //---------------------------------------------------------------------------------