X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcust_main_dayranges.html;fp=httemplate%2Fsearch%2Felements%2Fcust_main_dayranges.html;h=91e039d285b0c513fcca778cb5a6151e0d85b554;hp=9b8b08f4752b574ef373b41f9e687af493e7f077;hb=12acbe5a4071314fe87b949ffac478f132f5d305;hpb=ed8ba09ae208a58242d16b36c6dfa04d9cd75414 diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html index 9b8b08f47..91e039d28 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+)$/ ) {