[freeside-commits] freeside/httemplate/browse cust_main_county.cgi, 1.35, 1.35.2.1
Mark Wells
mark at wavetail.420.am
Fri Jan 13 02:14:19 PST 2012
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv18020/httemplate/browse
Modified Files:
Tag: FREESIDE_2_3_BRANCH
cust_main_county.cgi
Log Message:
sales tax districts, #15089
Index: cust_main_county.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/cust_main_county.cgi,v
retrieving revision 1.35
retrieving revision 1.35.2.1
diff -u -w -d -r1.35 -r1.35.2.1
--- cust_main_county.cgi 11 Apr 2011 20:40:42 -0000 1.35
+++ cust_main_county.cgi 13 Jan 2012 10:14:17 -0000 1.35.2.1
@@ -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 @@
$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 $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. ' '.
@@ -551,6 +553,21 @@
);
}
},
+
+ #district
+ sub {
+ my $r = shift;
+ if ( $r->district ) {
+ $r->district . ' '.
+ remove_link( col => 'district',
+ label=> 'remove district',
+ row => $r,
+ cgi => $cgi,
+ );
+ }
+ # manually editing districts is not exactly intended
+ },
+
);
my @color = (
@@ -607,7 +624,8 @@
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
More information about the freeside-commits
mailing list