From: mark Date: Tue, 7 Sep 2010 23:31:14 +0000 (+0000) Subject: Option to include customers with credit balances in aging report, RT#9834 X-Git-Tag: TORRUS_1_0_9~325 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=12acbe5a4071314fe87b949ffac478f132f5d305 Option to include customers with credit balances in aging report, RT#9834 --- 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+)$/ ) { diff --git a/httemplate/search/report_receivables.html b/httemplate/search/report_receivables.html index 912ef26b4..e85d78697 100755 --- a/httemplate/search/report_receivables.html +++ b/httemplate/search/report_receivables.html @@ -20,8 +20,23 @@ Customers - All customers (even those without an outstanding balance)
- Customers with a balance over days old + + + + + + + + +
All customers (even those without an outstanding balance)
Customers with a balance over days old
 Including customers with credit balances
<% include( '/elements/tr-input-date-field.html', {