projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#71969: High-priority: Add reason to cancellations details for Reports -> Packages...
[freeside.git]
/
httemplate
/
search
/
cust_tax_exempt_pkg.cgi
diff --git
a/httemplate/search/cust_tax_exempt_pkg.cgi
b/httemplate/search/cust_tax_exempt_pkg.cgi
index
7e1a239
..
41b7b91
100644
(file)
--- a/
httemplate/search/cust_tax_exempt_pkg.cgi
+++ b/
httemplate/search/cust_tax_exempt_pkg.cgi
@@
-1,4
+1,4
@@
-<
% include( 'elements/search.html'
,
+<
& elements/search.html
,
'title' => 'Tax exemptions',
'name' => 'tax exemptions',
'query' => $query,
'title' => 'Tax exemptions',
'name' => 'tax exemptions',
'query' => $query,
@@
-77,8
+77,7
@@
'',
FS::UI::Web::cust_styles(),
],
'',
FS::UI::Web::cust_styles(),
],
- )
-%>
+&>
<%once>
my $join_cust = "
<%once>
my $join_cust = "
@@
-119,6
+118,12
@@
if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
push @where, "cust_main.custnum = $1";
}
push @where, "cust_main.custnum = $1";
}
+if ( $cgi->param('classnum') eq '0' ) {
+ push @where, "part_pkg.classnum IS NULL";
+} elsif ( $cgi->param('classnum') =~ /^(\d+)$/ ) {
+ push @where, "part_pkg.classnum = $1";
+}
+
if ( $cgi->param('out') ) {
# wtf? how would you ever get exemptions on a non-taxable package location?
if ( $cgi->param('out') ) {
# wtf? how would you ever get exemptions on a non-taxable package location?
@@
-158,6
+163,10
@@
if ( $cgi->param('out') ) {
}
}
+# no reason ever to show the negative exemptions created by credits.
+# they'll just confuse people.
+push @where, "creditbillpkgnum IS NULL";
+
my $where = scalar(@where) ? 'WHERE '.join(' AND ', @where) : '';
my $count_query = "SELECT COUNT(*), SUM(amount)".
my $where = scalar(@where) ? 'WHERE '.join(' AND ', @where) : '';
my $count_query = "SELECT COUNT(*), SUM(amount)".