removed <!-- $Id$ --> from all files to fix any redirects, whew
[freeside.git] / httemplate / edit / cust_main_county.cgi
1 <%
2
3 print header("Edit tax rates", menubar(
4   'Main Menu' => popurl(2),
5 ));
6
7 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
8       "</FONT>"
9   if $cgi->param('error');
10
11 print qq!<FORM ACTION="!, popurl(1),
12     qq!process/cust_main_county.cgi" METHOD=POST>!, &table(), <<END;
13       <TR>
14         <TH><FONT SIZE=-1>Country</FONT></TH>
15         <TH><FONT SIZE=-1>State</FONT></TH>
16         <TH>County</TH>
17         <TH><FONT SIZE=-1>Tax</FONT></TH>
18       </TR>
19 END
20
21 foreach my $cust_main_county ( sort {    $a->country cmp $b->country
22                                       or $a->state   cmp $b->state
23                                       or $a->county  cmp $b->county
24                                     } qsearch('cust_main_county',{}) ) {
25   my($hashref)=$cust_main_county->hashref;
26   print <<END;
27       <TR>
28         <TD>$hashref->{country}</TD>
29 END
30
31   print "<TD>", $hashref->{state}
32       ? $hashref->{state}
33       : '(ALL)'
34     , "</TD>";
35
36   print "<TD>", $hashref->{county}
37       ? $hashref->{county}
38       : '(ALL)'
39     , "</TD>";
40
41   print qq!<TD><INPUT TYPE="text" NAME="tax!, $hashref->{taxnum},
42         qq!" VALUE="!, $hashref->{tax}, qq!" SIZE=6 MAXLENGTH=6>%</TD></TR>!;
43 END
44
45 }
46
47 print <<END;
48     </TABLE>
49     <INPUT TYPE="submit" VALUE="Apply changes">
50     </FORM>
51     </CENTER>
52   </BODY>
53 </HTML>
54 END
55
56 %>