3 # $Id: cust_main_county.cgi,v 1.1 2001-07-30 07:36:03 ivan Exp $
5 # ivan@sisd.com 97-dec-13
7 # Changes to allow page to work at a relative position in server
8 # bmccane@maxbaud.net 98-apr-3
10 # lose background, FS::CGI ivan@sisd.com 98-sep-2
12 # $Log: cust_main_county.cgi,v $
13 # Revision 1.1 2001-07-30 07:36:03 ivan
16 # Revision 1.7 1999/04/09 04:22:34 ivan
19 # Revision 1.6 1999/04/09 03:52:55 ivan
20 # explicit & for table/itable/ntable
22 # Revision 1.5 1999/01/19 05:13:26 ivan
23 # for mod_perl: no more top-level my() variables; use vars instead
24 # also the last s/create/new/;
26 # Revision 1.4 1999/01/18 09:41:16 ivan
27 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
30 # Revision 1.3 1998/12/17 05:25:18 ivan
31 # fix visual and other bugs
33 # Revision 1.2 1998/11/18 09:01:34 ivan
38 use vars qw( $cgi $p $cust_main_county );
40 use CGI::Carp qw(fatalsToBrowser);
41 use FS::UID qw(cgisuidsetup swapuid);
42 use FS::Record qw(qsearch qsearchs);
43 use FS::CGI qw(header menubar popurl table);
44 use FS::cust_main_county;
52 print $cgi->header( '-expires' => 'now' ), header("Tax Rate Listing", menubar(
54 'Edit tax rates' => $p. "edit/cust_main_county.cgi",
56 Click on <u>expand country</u> to specify a country's tax rates by state.
57 <BR>Click on <u>expand state</u> to specify a state's tax rates by county.
60 print &table(), <<END;
62 <TH><FONT SIZE=-1>Country</FONT></TH>
63 <TH><FONT SIZE=-1>State</FONT></TH>
65 <TH><FONT SIZE=-1>Tax</FONT></TH>
69 foreach $cust_main_county ( qsearch('cust_main_county',{}) ) {
70 my($hashref)=$cust_main_county->hashref;
73 <TD>$hashref->{country}</TD>
75 print "<TD>", $hashref->{state}
77 : qq!(ALL) <FONT SIZE=-1>!.
78 qq!<A HREF="${p}edit/cust_main_county-expand.cgi?!. $hashref->{taxnum}.
79 qq!">expand country</A></FONT>!
82 if ( $hashref->{county} ) {
83 print $hashref->{county};
86 if ( $hashref->{state} ) {
87 print qq!<FONT SIZE=-1>!.
88 qq!<A HREF="${p}edit/cust_main_county-expand.cgi?!. $hashref->{taxnum}.
89 qq!">expand state</A></FONT>!;
95 <TD>$hashref->{tax}%</TD>