summaryrefslogtreecommitdiff
path: root/httemplate/browse/cust_main_county.cgi
diff options
context:
space:
mode:
authormark <mark>2012-01-13 10:13:56 +0000
committermark <mark>2012-01-13 10:13:56 +0000
commit5e76ae4e7a11bd28478ed68eef8124fb7ff0767c (patch)
tree958bb1b1e855c3e4204fc23d76f1f81f5fa00cf9 /httemplate/browse/cust_main_county.cgi
parentf5d62095722c3756c897db1903bddb1a9aad3a06 (diff)
sales tax districts, #15089
Diffstat (limited to 'httemplate/browse/cust_main_county.cgi')
-rwxr-xr-xhttemplate/browse/cust_main_county.cgi34
1 files changed, 26 insertions, 8 deletions
diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi
index c6484cacd..dfbe11917 100755
--- a/httemplate/browse/cust_main_county.cgi
+++ b/httemplate/browse/cust_main_county.cgi
@@ -10,7 +10,7 @@
'table' => 'cust_main_county',
'hashref' => $hashref,
'order_by' =>
- 'ORDER BY country, state, county, city, taxclass',
+ 'ORDER BY country, state, county, city, district, taxclass',
},
'count_query' => $count_query,
'header' => \@header,
@@ -440,11 +440,12 @@ if ( $taxclass ) {
$cell_style = '';
-my @header = ( 'Country', 'State/Province', 'County', 'City' );
-my @header2 = ( '', '', '', '', );
-my @links = ( '', '', '', '', );
-my @link_onclicks = ( '', '', '', '', );
-my $align = 'llll';
+my @header = ( 'Country', 'State/Province', 'County', 'City', '' );
+# last column is 'district', but usually unused
+my @header2 = ( '', '', '', '', '' );
+my @links = ( '', '', '', '', '' );
+my @link_onclicks = ( '', '', '', '', '' );
+my $align = 'lllll';
my %seen_country = ();
my %seen_state = ();
@@ -532,7 +533,8 @@ my @fields = (
my $r = shift;
if ( $r->city ) {
- if ( $r->taxclass ) { #but if it has a taxclass, can't remove
+ if ( $r->taxclass #but if it has a taxclass, can't remove
+ or $r->district ) { # or a district
$r->city;
} else {
$r->city. '&nbsp;'.
@@ -551,6 +553,21 @@ my @fields = (
);
}
},
+
+ #district
+ sub {
+ my $r = shift;
+ if ( $r->district ) {
+ $r->district . '&nbsp;'.
+ remove_link( col => 'district',
+ label=> 'remove&nbsp;district',
+ row => $r,
+ cgi => $cgi,
+ );
+ }
+ # manually editing districts is not exactly intended
+ },
+
);
my @color = (
@@ -607,7 +624,8 @@ my $cb_sub = sub {
my $cust_main_county = shift;
if ( $cb_oldrow ) {
- if ( $cb_oldrow->city ne $cust_main_county->city
+ if ( $cb_oldrow->district ne $cust_main_county->district
+ || $cb_oldrow->city ne $cust_main_county->city
|| $cb_oldrow->county ne $cust_main_county->county
|| $cb_oldrow->state ne $cust_main_county->state
|| $cb_oldrow->country ne $cust_main_county->country