summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_main_county.cgi
diff options
context:
space:
mode:
authorivan <ivan>2003-09-25 11:49:44 +0000
committerivan <ivan>2003-09-25 11:49:44 +0000
commit4f253eb015531465e049c858a7520e8c7a71d227 (patch)
tree75a0f7d199e901b1a18c498ebf539012df542d22 /httemplate/edit/cust_main_county.cgi
parent694627660388e33e0bab01a5571e660c930cb140 (diff)
UI for multiple named taxes w/setup & recur exemptions
1.4 schema-auto-adjusting backport
Diffstat (limited to 'httemplate/edit/cust_main_county.cgi')
-rwxr-xr-xhttemplate/edit/cust_main_county.cgi35
1 files changed, 32 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi
index f3d28825a..efc12f3e0 100755
--- a/httemplate/edit/cust_main_county.cgi
+++ b/httemplate/edit/cust_main_county.cgi
@@ -16,12 +16,26 @@ print qq!<FORM ACTION="!, popurl(1),
<TH><FONT SIZE=-1>State</FONT></TH>
<TH><FONT SIZE=-1>County</FONT></TH>
<TH><FONT SIZE=-1>Taxclass</FONT><BR><FONT SIZE=-2>(per-package classification)</FONT></TH>
- <TH><FONT SIZE=-1>Tax name</FONT><BR><FONT SIZE=-2>(printed on invoices)</FONT></TH>
+END
+
+if ( dbdef->table('cust_main_county')->column('taxname') ) {
+ print '<TH><FONT SIZE=-1>Tax name</FONT><BR><FONT SIZE=-2>(printed on invoices)</FONT></TH>';
+}
+
+print <<END;
<TH><FONT SIZE=-1>Tax</FONT></TH>
<TH><FONT SIZE=-1>Exempt<BR>per<BR>month</TH>
- </TR>
END
+if ( dbdef->table('cust_main_county')->column('setuptax') ) {
+ print '<TH><FONT SIZE=-1>Setup<BR>fee<BR>exempt</TH>';
+}
+if ( dbdef->table('cust_main_county')->column('recurtax') ) {
+ print '<TH><FONT SIZE=-1>Recurring<BR>fee<BR>exempt</TH>';
+}
+
+print '</TR>';
+
foreach my $cust_main_county ( sort { $a->country cmp $b->country
or $a->state cmp $b->state
or $a->county cmp $b->county
@@ -48,11 +62,26 @@ END
, "</TD>";
print qq!<TD><INPUT TYPE="text" NAME="taxname!, $hashref->{taxnum},
- qq!" VALUE="!, $hashref->{taxname}, qq!"></TD>!;
+ qq!" VALUE="!, $hashref->{taxname}, qq!"></TD>!
+ if dbdef->table('cust_main_county')->column('taxname');
+
print qq!<TD><INPUT TYPE="text" NAME="tax!, $hashref->{taxnum},
qq!" VALUE="!, $hashref->{tax}, qq!" SIZE=6 MAXLENGTH=6>%</TD>!;
print qq!<TD>\$<INPUT TYPE="text" NAME="exempt_amount!, $hashref->{taxnum},
qq!" VALUE="!, $hashref->{exempt_amount}||0, qq!" SIZE=6></TD>!;
+
+ print qq!<TD><INPUT TYPE="checkbox" NAME="setuptax!. $hashref->{taxnum}.
+ '" VALUE="Y"'.
+ ( $hashref->{setuptax} =~ /^Y$/i ? ' CHECKED' : '' ).
+ '"></TD>'
+ if dbdef->table('cust_main_county')->column('setuptax');
+
+ print qq!<TD><INPUT TYPE="checkbox" NAME="recurtax!. $hashref->{taxnum}.
+ '" VALUE="Y"'.
+ ( $hashref->{recurtax} =~ /^Y$/i ? ' CHECKED' : '' ).
+ '"></TD>'
+ if dbdef->table('cust_main_county')->column('recurtax');
+
print '</TR>';
}