X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fui%2Fgl_bank_ui.inc;h=5c262eaf83c945e4707503d814bf4fa3ebc8f6dd;hb=50339ff6ffe3cbb2a6237cc6a922a98481c7a41f;hp=5a0124f656215e1e8582c8d4e70434b4725cc716;hpb=66a8ddac71c0fafa8e3f2a24fd99b7f3c433f023;p=fa-stable.git diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 5a0124f6..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 : @@ -93,7 +105,7 @@ function display_bank_header(&$order) table_section(3, "33%"); - if (!list_updated('bank_account')) + if (!$order->order_id && !list_updated('bank_account')) { if ($_POST['PayType'] == PT_CUSTOMER) $_POST['bank_account'] = get_default_customer_bank_account($_POST['person_id']); @@ -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; + } } //---------------------------------------------------------------------------------