diff options
author | Mark Wells <mark@freeside.biz> | 2015-07-03 11:38:23 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-07-03 15:31:10 -0700 |
commit | 32365ef65ca6a40b5262cf166543b1d84c6aa57d (patch) | |
tree | a052352c992beafb27d09a3cdb94533451335089 /httemplate/search/cust_bill.html | |
parent | 53b6529e6a9c3eb3a314d87e4a405b17af4daf45 (diff) |
make new gross sales calculation optional, #25943
Diffstat (limited to 'httemplate/search/cust_bill.html')
-rwxr-xr-x | httemplate/search/cust_bill.html | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index 662673676..017e8298f 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -8,7 +8,7 @@ 'count_addl' => $count_addl, 'redirect' => $link, 'header' => [ emt('Invoice #'), - emt('Gross Amount'), + emt($invoiced ? 'Charged' : 'Gross Amount'), emt('Discount'), emt('Credits'), emt('Net Amount'), @@ -18,7 +18,7 @@ ], 'fields' => [ 'display_invnum', - 'gross', + $invoiced ? 'charged' : 'gross', 'discounted', 'credited', 'net', @@ -28,7 +28,7 @@ ], 'sort_fields' => [ 'COALESCE( agent_invid, invnum )', - 'gross', + $invoiced ? 'charged' : 'gross', 'discounted', 'credited', 'net', @@ -87,6 +87,9 @@ my( $count_query, $sql_query ); my $count_addl = ''; my %search = (); +# show invoiced amount (charged) instead of gross sales +my $invoiced = $cgi->param('invoiced') ? 1 : 0; + if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { my $join_cust_main = FS::UI::Web::join_cust_main('cust_bill'); @@ -132,7 +135,7 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { #scalars for (qw( agentnum custnum cust_status refnum invnum_min invnum_max - open net newest_percust + open net newest_percust invoiced )) { |