X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fui%2Fgl_bank_ui.inc;h=5c262eaf83c945e4707503d814bf4fa3ebc8f6dd;hb=50339ff6ffe3cbb2a6237cc6a922a98481c7a41f;hp=1ac37eb7a2812509f82940558c85c2662ced1c61;hpb=fc22d9b45c8e6b3e4ce3e96ccd191231ebf56441;p=fa-stable.git diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 1ac37eb7..5c262eaf 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; + } } //---------------------------------------------------------------------------------