From: Ivan Kohler Date: Wed, 26 Feb 2014 05:52:31 +0000 (-0800) Subject: fix agent selection on sales commission report, RT#27818 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0393defb3dee145a4bedee761de25cfd1ac503e0 fix agent selection on sales commission report, RT#27818 --- diff --git a/httemplate/search/sales_commission.html b/httemplate/search/sales_commission.html index e74f3792e..57b6cdcd5 100644 --- a/httemplate/search/sales_commission.html +++ b/httemplate/search/sales_commission.html @@ -33,7 +33,12 @@ my $date_format = $conf->config('date_format') || '%m/%d/%Y'; my %query = ( 'table' => 'sales' ); my $count_query = "SELECT COUNT(*) FROM sales"; -my $salesnum; +if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { + $query{hashref}->{agentnum} = $1; + $count_query .= " WHERE agentnum = $1"; +} + +my $salesnum = ''; if ( $cgi->param('salesnum') =~ /^(\d+)$/ ) { $salesnum = $1; } else {