4 %print header("Edit tax rates", menubar(
5 % 'Main Menu' => popurl(2),
8 %print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
10 % if $cgi->param('error');
12 %print qq!<FORM ACTION="!, popurl(1),
13 % qq!process/cust_main_county.cgi" METHOD=POST>!, &table(), <<END;
15 % <TH><FONT SIZE=-1>Country</FONT></TH>
16 % <TH><FONT SIZE=-1>State</FONT></TH>
17 % <TH><FONT SIZE=-1>County</FONT></TH>
18 % <TH><FONT SIZE=-1>Taxclass</FONT><BR><FONT SIZE=-2>(per-package classification)</FONT></TH>
21 %if ( dbdef->table('cust_main_county')->column('taxname') ) {
22 % print '<TH><FONT SIZE=-1>Tax name</FONT><BR><FONT SIZE=-2>(printed on invoices)</FONT></TH>';
26 % <TH><FONT SIZE=-1>Tax</FONT></TH>
27 % <TH><FONT SIZE=-1>Exempt<BR>per<BR>month</TH>
30 %if ( dbdef->table('cust_main_county')->column('setuptax') ) {
31 % print '<TH><FONT SIZE=-1>Setup<BR>fee<BR>exempt</TH>';
33 %if ( dbdef->table('cust_main_county')->column('recurtax') ) {
34 % print '<TH><FONT SIZE=-1>Recurring<BR>fee<BR>exempt</TH>';
39 %foreach my $cust_main_county ( sort { $a->country cmp $b->country
40 % or $a->state cmp $b->state
41 % or $a->county cmp $b->county
42 % } qsearch('cust_main_county',{}) ) {
43 % my($hashref)=$cust_main_county->hashref;
46 % <TD BGCOLOR="#ffffff">$hashref->{country}</TD>
49 % print "<TD", $hashref->{state}
50 % ? ' BGCOLOR="#ffffff">'.$hashref->{state}
51 % : ' BGCOLOR="#cccccc">(ALL)'
54 % print "<TD", $hashref->{county}
55 % ? ' BGCOLOR="#ffffff">'. $hashref->{county}
56 % : ' BGCOLOR="#cccccc">(ALL)'
59 % print "<TD", $hashref->{taxclass}
60 % ? ' BGCOLOR="#ffffff">'. $hashref->{taxclass}
61 % : ' BGCOLOR="#cccccc">(ALL)'
64 % print qq!<TD><INPUT TYPE="text" NAME="taxname!, $hashref->{taxnum},
65 % qq!" VALUE="!, $hashref->{taxname}, qq!"></TD>!
66 % if dbdef->table('cust_main_county')->column('taxname');
68 % print qq!<TD><TABLE><TR><TD><INPUT TYPE="text" NAME="tax!, $hashref->{taxnum},
69 % qq!" VALUE="!, $hashref->{tax}, qq!" SIZE=6 MAXLENGTH=6></TD><TD>%</TD></TR></TABLE></TD>!;
70 % print qq!<TD><TABLE><TR><TD>\$</TD><TD><INPUT TYPE="text" NAME="exempt_amount!, $hashref->{taxnum},
71 % qq!" VALUE="!, $hashref->{exempt_amount}||0, qq!" SIZE=6></TD></TR></TABLE></TD>!;
73 % print qq!<TD><INPUT TYPE="checkbox" NAME="setuptax!. $hashref->{taxnum}.
75 % ( $hashref->{setuptax} =~ /^Y$/i ? ' CHECKED' : '' ).
77 % if dbdef->table('cust_main_county')->column('setuptax');
79 % print qq!<TD><INPUT TYPE="checkbox" NAME="recurtax!. $hashref->{taxnum}.
81 % ( $hashref->{recurtax} =~ /^Y$/i ? ' CHECKED' : '' ).
83 % if dbdef->table('cust_main_county')->column('recurtax');
91 % <INPUT TYPE="submit" VALUE="Apply changes">