From: ivan Date: Thu, 25 Sep 2003 11:49:45 +0000 (+0000) Subject: UI for multiple named taxes w/setup & recur exemptions X-Git-Tag: freeside_1_4_2beta1~485 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=d61540138c3396a2bbcef51059f7af81ae2dd7e0;p=freeside.git UI for multiple named taxes w/setup & recur exemptions 1.4 schema-auto-adjusting backport --- diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi index 991606087..e5827211c 100755 --- a/httemplate/browse/cust_main_county.cgi +++ b/httemplate/browse/cust_main_county.cgi @@ -21,9 +21,10 @@ print '

'. &table(). <Country State County - Taxclass + Taxclass
(per-package classification) + Tax name
(printed on invoices) Tax - Exempt
per
month + Exemption END @@ -53,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; @@ -111,10 +114,22 @@ END } print ""; + print "{taxname} ) { + print ' BGCOLOR="#ffffff">'. $hashref->{taxname}; + } else { + print ' BGCOLOR="#cccccc">Tax'; + } + 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 7ef37a48d..efc12f3e0 100755 --- a/httemplate/edit/cust_main_county.cgi +++ b/httemplate/edit/cust_main_county.cgi @@ -15,12 +15,27 @@ print qq!
(ALL)' , ""; + print 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 ''; }