From cb0b8c862de7c7ab68b172faa29167f47894627b Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 22 Sep 2010 21:22:03 +0000 Subject: customer credit limits, RT#8209 --- httemplate/edit/cust_main/billing.html | 12 ++++++++++++ httemplate/edit/process/cust_main.cgi | 4 ++++ httemplate/view/cust_main/billing.html | 8 ++++++++ 3 files changed, 24 insertions(+) (limited to 'httemplate') diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index ad83778ca..aeb67b662 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -417,6 +417,18 @@ %> + + Credit limit + + + credit_limit) %><% length($cust_main->credit_limit) ? '' : ' DISABLED' %>> + credit_limit) ? '' : ' CHECKED'%>> Unlimited + + % if ( $conf->exists('voip-cust_cdr_spools') ) { diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 3158d7bbf..e2238bd67 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -73,6 +73,10 @@ if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { ); } +if ( $cgi->param('no_credit_limit') ) { + $new->setfield('credit_limit', ''); +} + $new->tagnum( [ $cgi->param('tagnum') ] ); my %usedatetime = ( 'birthdate' => 1 ); diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 54c180bdd..dd195236a 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -206,6 +206,14 @@ Billing information <% $cust_main->invoice_terms || 'Default ('. ( $conf->config('invoice_default_terms') || 'Payable upon receipt' ). ')' %> + + Credit limit + + <% length($cust_main->credit_limit) ? + $money_char.sprintf("%.2f", $cust_main->credit_limit) : + 'Unlimited' %> + + % if ( $conf->exists('voip-cust_cdr_spools') ) { -- cgit v1.2.1