From faadb1bcccbbdfee91afffded23dfebb89ebafe0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 8 May 2012 15:34:37 -0700 Subject: separate tax exemption numbers for individual exemptions w/tax-cust_exempt-groups, RT#17658 --- httemplate/edit/cust_main/billing.html | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'httemplate/edit/cust_main') diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index ddc6cc2a7..f280e3a68 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -117,6 +117,15 @@ //why? select.selectedIndex = 0; } } + + function tax_changed(what) { + var num = document.getElementById(what.id + '_num'); + if ( what.checked ) { + num.disabled = false; + } else { + num.disabled = true; + } + } @@ -437,14 +446,25 @@ % my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); - - tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %> - +% if ( $conf->exists('tax-cust_exempt-groups-require_individual_nums') ) { + + + +% } else { + + + tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %> + + +% } % foreach my $exempt_group ( @exempt_groups ) { -% #escape $exempt_group for NAME +% my $cust_main_exemption = $cust_main->tax_exemption($exempt_group); +% #escape $exempt_group for NAME etc. +% my $checked = ($cust_main_exemption || $cgi->param("tax_$exempt_group")); -   tax_exemption($exempt_group) ? 'CHECKED' : '' %>> Tax Exempt (<% $exempt_group %> taxes) +    onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes) + - Exemption number exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>> % } -- cgit v1.2.1