X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fcust_main_county.cgi;h=9e3feb8f3bc773376e6a44ea7d731cac0cf5eb86;hp=1e0e0880c69ce380a39b31519f1609dfc7f87dca;hb=2c757d7db4cb6a7b9655de13206fcc84fb7ce61f;hpb=bfe2b53779bd76e03aa8deaca07ba916da6b3f5b diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi index 1e0e0880c..9e3feb8f3 100755 --- a/httemplate/browse/cust_main_county.cgi +++ b/httemplate/browse/cust_main_county.cgi @@ -1,33 +1,34 @@ - -<% +<%= include('/elements/header.html', "Tax Rate Listing", menubar( + 'Edit tax rates' => $p. "edit/cust_main_county.cgi", +)) %> + + Click on expand country to specify a country's tax rates by state. +
Click on expand state to specify a state's tax rates by county. +<% my $conf = new FS::Conf; my $enable_taxclasses = $conf->exists('enable_taxclasses'); -print header("Tax Rate Listing", menubar( - 'Main Menu' => $p, - 'Edit tax rates' => $p. "edit/cust_main_county.cgi", -)),<expand country to specify a country's tax rates by state. -
Click on expand state to specify a state's tax rates by county. -END +if ( $enable_taxclasses ) { %> -if ( $enable_taxclasses ) { - print '
Click on expand taxclasses to specify tax classes'; -} +
Click on expand taxclasses to specify tax classes -print '

'. &table(). < - Country - State - County - Taxclass
(per-package classification) - Tax name
(printed on invoices) - Tax - Exemption - -END +<% } %> + +

+<%= table() %> + + + Country + State + County + Taxclass
(per-package classification) + Tax name
(printed on invoices) + Tax + Exemption + +<% my @regions = sort { $a->country cmp $b->country or $a->state cmp $b->state or $a->county cmp $b->county @@ -39,10 +40,12 @@ my $sup=0; for ( my $i=0; $i<@regions; $i++ ) { my $cust_main_county = $regions[$i]; my $hashref = $cust_main_county->hashref; - print < - $hashref->{country} -END + <%= $hashref->{country} %> + + <% my $j; if ( $sup ) { @@ -74,69 +77,73 @@ END $j = 1; } - print "{state} + %> + + <%= + $hashref->{state} ? ' BGCOLOR="#ffffff">'. $hashref->{state} : qq! BGCOLOR="#cccccc">(ALL) !. qq!expand country!; - - print qq! collapse state! if $j>1; - - print ""; - } - -# $sup=$newsup; - - print "{county} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{county}; - } else { - print ' BGCOLOR="#cccccc">(ALL)'; - if ( $hashref->{state} ) { - print qq!!. - qq!expand state!; - } - } - print ""; - - print "{taxclass} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{taxclass}; - } else { - print ' BGCOLOR="#cccccc">(ALL)'; - if ( $enable_taxclasses ) { - print qq!!. - qq!expand taxclasses!; - } - - } - print ""; - - print "{taxname} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{taxname}; - } else { - print ' BGCOLOR="#cccccc">Tax'; - } - print ""; - - print "$hashref->{tax}%". - ''; - print '$'. sprintf("%.2f", $hashref->{exempt_amount} ). - ' per month
' - if $hashref->{exempt_amount} > 0; - print 'Setup fee
' if $hashref->{setuptax} =~ /^Y$/i; - print 'Recurring fee
' if $hashref->{recurtax} =~ /^Y$/i; - print ''; - -} - -print < - - -END - -%> + qq!">expand country
! + %> + <% if ( $j>1 ) { %> + collapse state + <% } %> + + + <% } %> + +<% # $sup=$newsup; %> + + {county} ) { + %> BGCOLOR="#ffffff"><%= $hashref->{county} %> + <% } else { + %> BGCOLOR="#cccccc">(ALL) + <% if ( $hashref->{state} ) { %> + expand state + <% } %> + <% } %> + + + {taxclass} ) { + %> BGCOLOR="#ffffff"><%= $hashref->{taxclass} %> + <% } else { + %> BGCOLOR="#cccccc">(ALL) + <% if ( $enable_taxclasses ) { %> + expand taxclasses + <% } %> + <% } %> + + + {taxname} ) { + %> BGCOLOR="#ffffff"><%= $hashref->{taxname} %> + <% } else { + %> BGCOLOR="#cccccc">Tax + <% } %> + + + <%= $hashref->{tax} %>% + + + + <% if ( $hashref->{exempt_amount} > 0 ) { %> + $<%= sprintf("%.2f", $hashref->{exempt_amount} ) %> per month
+ <% } %> + + <% if ( $hashref->{setuptax} =~ /^Y$/i ) { %> + Setup fee
+ <% } %> + + <% if ( $hashref->{recurtax} =~ /^Y$/i ) { %> + Recurring fee
+ <% } %> + + + + + +<% } %> + + + +<%= include('/elements/footer.html') %>