From 4f253eb015531465e049c858a7520e8c7a71d227 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 25 Sep 2003 11:49:44 +0000 Subject: [PATCH 1/1] UI for multiple named taxes w/setup & recur exemptions 1.4 schema-auto-adjusting backport --- httemplate/browse/cust_main_county.cgi | 16 +++++++++++----- httemplate/edit/cust_main_county.cgi | 35 +++++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi index c2473c4c8..e5827211c 100755 --- a/httemplate/browse/cust_main_county.cgi +++ b/httemplate/browse/cust_main_county.cgi @@ -24,7 +24,7 @@ print '

'. &table(). <Taxclass
(per-package classification) Tax name
(printed on invoices) Tax - Exempt
per
month + Exemption END @@ -54,7 +54,9 @@ END last if $hashref->{country} ne $regions[$i+$j]->country || $hashref->{state} ne $regions[$i+$j]->state || $hashref->{tax} != $regions[$i+$j]->tax - || $hashref->{exempt_amount} != $regions[$i+$j]->exempt_amount; + || $hashref->{exempt_amount} != $regions[$i+$j]->exempt_amount + || $hashref->{setuptax} ne $regions[$i+$j]->setuptax + || $hashref->{recurtax} ne $regions[$i+$j]->recurtax; } my $newsup=0; @@ -121,9 +123,13 @@ END print ""; print "$hashref->{tax}%". - '$'. - sprintf("%.2f", $hashref->{exempt_amount} || 0). ''. - ''; + ''; + print '$'. sprintf("%.2f", $hashref->{exempt_amount} ). + ' per month
' + if $hashref->{exempt_amount}; + print 'Setup fee
' if $hashref->{setuptax} =~ /^Y$/i; + print 'Recurring fee
' if $hashref->{recurtax} =~ /^Y$/i; + print ''; } diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi index f3d28825a..efc12f3e0 100755 --- a/httemplate/edit/cust_main_county.cgi +++ b/httemplate/edit/cust_main_county.cgi @@ -16,12 +16,26 @@ print qq!
"; print qq!!; + qq!" VALUE="!, $hashref->{taxname}, qq!">! + if dbdef->table('cust_main_county')->column('taxname'); + print qq!%!; print qq!\$!; + + print qq!{setuptax} =~ /^Y$/i ? ' CHECKED' : '' ). + '">' + if dbdef->table('cust_main_county')->column('setuptax'); + + print qq!{recurtax} =~ /^Y$/i ? ' CHECKED' : '' ). + '">' + if dbdef->table('cust_main_county')->column('recurtax'); + print ''; } -- 2.11.0