projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reporting with city taxes, RT#6776
[freeside.git]
/
httemplate
/
search
/
cust_bill_pkg.cgi
diff --git
a/httemplate/search/cust_bill_pkg.cgi
b/httemplate/search/cust_bill_pkg.cgi
index
975a307
..
fd8b04d
100644
(file)
--- a/
httemplate/search/cust_bill_pkg.cgi
+++ b/
httemplate/search/cust_bill_pkg.cgi
@@
-157,6
+157,8
@@
if ( $cgi->param('taxclass')
}
}
+my @loc_param = qw( city county state country );
+
if ( $cgi->param('out') ) {
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql( 'ornull' => 1 );
if ( $cgi->param('out') ) {
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql( 'ornull' => 1 );
@@
-176,10
+178,9
@@
if ( $cgi->param('out') ) {
";
#not linked to by anything, but useful for debugging "out of taxable region"
";
#not linked to by anything, but useful for debugging "out of taxable region"
- if ( grep $cgi->param($_),
qw( county state country )
) {
+ if ( grep $cgi->param($_),
@loc_param
) {
- my %ph = map { $_ => dbh->quote( $cgi->param($_) ) }
- qw( county state country );
+ my %ph = map { $_ => dbh->quote( scalar($cgi->param($_)) ) } @loc_param;
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql;
while ( $loc_sql =~ /\?/ ) { #easier to do our own substitution
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql;
while ( $loc_sql =~ /\?/ ) { #easier to do our own substitution
@@
-204,7
+205,7
@@
if ( $cgi->param('out') ) {
my %ph = ( 'county' => dbh->quote($_),
map { $_ => dbh->quote( $cgi->param($_) ) }
my %ph = ( 'county' => dbh->quote($_),
map { $_ => dbh->quote( $cgi->param($_) ) }
- qw( state country )
+ qw(
city
state country )
);
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql;
);
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql;
@@
-222,8
+223,7
@@
if ( $cgi->param('out') ) {
} else {
} else {
- my %ph = map { $_ => dbh->quote( $cgi->param($_) ) }
- qw( county state country );
+ my %ph = map { $_ => dbh->quote( scalar($cgi->param($_)) ) } @loc_param;
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql;
while ( $loc_sql =~ /\?/ ) { #easier to do our own substitution
my ( $loc_sql, @param ) = FS::cust_pkg->location_sql;
while ( $loc_sql =~ /\?/ ) { #easier to do our own substitution
@@
-274,7
+274,7
@@
if ( $cgi->param('out') ) {
);
my %ph = map { ( $pn{$_} => dbh->quote( $cgi->param($_) || '' ) ) }
);
my %ph = map { ( $pn{$_} => dbh->quote( $cgi->param($_) || '' ) ) }
- qw( c
ounty state city
locationtaxid );
+ qw( c
ity county state
locationtaxid );
push @where,
join( ' AND ', map { "( $_ = $ph{$_} OR $ph{$_} = '' AND $_ IS NULL)" }
push @where,
join( ' AND ', map { "( $_ = $ph{$_} OR $ph{$_} = '' AND $_ IS NULL)" }