summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authormark <mark>2010-09-07 23:31:25 +0000
committermark <mark>2010-09-07 23:31:25 +0000
commit5f0e69f660d8500395f3a8653b34ae2a39a31b0c (patch)
tree87fe59a005f7e5a57bd288db77abed5fc5598afa /httemplate/search/elements
parent7479ebeef980e574a231441693d724c5c2d7d9c7 (diff)
Option to include customers with credit balances in aging report, RT#9834
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r--httemplate/search/elements/cust_main_dayranges.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html
index ee68fc1fa..fa93540c6 100644
--- a/httemplate/search/elements/cust_main_dayranges.html
+++ b/httemplate/search/elements/cust_main_dayranges.html
@@ -145,8 +145,12 @@ unless ( $cgi->param('all_customers') ) {
$days = $1;
}
+ # If this is set, allow cust_main records with nonzero balances
+ my $negative = $cgi->param('negative') || 0;
+
push @where,
- call_range_sub($range_sub, $days, 0, 'offset' => $offset, 'no_as'=>1). ' > 0'; # != 0';
+ call_range_sub($range_sub, $days, 0, 'offset' => $offset, 'no_as'=>1).
+ ($negative ? ' != 0' : ' > 0');
}
if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {