diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-02-25 21:52:33 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-02-25 21:52:33 -0800 |
commit | b6c0ce19ea154eeec1f992a528c5c7e3ef877e81 (patch) | |
tree | 3ae67219e9201f481ca901d5ba934e2cabe6e8d2 /httemplate/search/sales_commission.html | |
parent | 47a277c86e3b7c298bf15ad4e803085b9ce2bb31 (diff) |
fix agent selection on sales commission report, RT#27818
Diffstat (limited to 'httemplate/search/sales_commission.html')
-rw-r--r-- | httemplate/search/sales_commission.html | 7 |
1 files changed, 6 insertions, 1 deletions
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 { |