diff options
author | mark <mark> | 2010-09-22 21:22:03 +0000 |
---|---|---|
committer | mark <mark> | 2010-09-22 21:22:03 +0000 |
commit | cb0b8c862de7c7ab68b172faa29167f47894627b (patch) | |
tree | a690eda6f9b6d6e9274094583618962e7b248227 /httemplate | |
parent | 197c503fbe112896332e9ca5f17c9c5a2ea4bb87 (diff) |
customer credit limits, RT#8209
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/edit/cust_main/billing.html | 12 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 4 | ||||
-rw-r--r-- | httemplate/view/cust_main/billing.html | 8 |
3 files changed, 24 insertions, 0 deletions
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 @@ %> </TD> </TR> + <TR> + <TD ALIGN="right" WIDTH="200">Credit limit </TD> + <TD WIDTH="408"> + <SCRIPT TYPE="text/javascript"> +function toggle(obj) { + obj.form.credit_limit.disabled = obj.checked; +} + </SCRIPT> + <INPUT TYPE="text" NAME="credit_limit" VALUE=<% sprintf('"%.2f"', $cust_main->credit_limit) %><% length($cust_main->credit_limit) ? '' : ' DISABLED' %>> + <INPUT TYPE="checkbox" NAME="no_credit_limit" VALUE=1 onclick="toggle(this)"<% length($cust_main->credit_limit) ? '' : ' CHECKED'%>> Unlimited + </TD> + </TR> % if ( $conf->exists('voip-cust_cdr_spools') ) { <TR> 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' ). ')' %> </TD> </TR> +<TR> + <TD ALIGN="right">Credit limit</TD> + <TD BGCOLOR="#ffffff"> + <% length($cust_main->credit_limit) ? + $money_char.sprintf("%.2f", $cust_main->credit_limit) : + 'Unlimited' %> + </TD> +</TR> % if ( $conf->exists('voip-cust_cdr_spools') ) { <TR> |