diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-09-10 21:25:15 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-09-10 21:25:15 -0700 |
| commit | a3371bd505dfc1b7791cfe681aa33afb1f77e063 (patch) | |
| tree | 8dd5774b8c1493003687b16da85f7e2778aef743 /httemplate/elements/tr-select-sales.html | |
| parent | 493a5911544a638665eab5096425fd6785e9fe0b (diff) | |
fix order package UI layout when there aren't any sales people for an agent, RT#24955
Diffstat (limited to 'httemplate/elements/tr-select-sales.html')
| -rw-r--r-- | httemplate/elements/tr-select-sales.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/httemplate/elements/tr-select-sales.html b/httemplate/elements/tr-select-sales.html index c29e0d70c..956a9d159 100644 --- a/httemplate/elements/tr-select-sales.html +++ b/httemplate/elements/tr-select-sales.html @@ -155,8 +155,11 @@ my $salesnum = $opt{'curr_value'} || $opt{'value'}; my $field = $opt{'element_name'} || $opt{'field'} || 'salesnum'; my $id = $opt{'id'} || $opt{'field'} || 'salesnum'; -my @sales = qsearch({ 'table' => 'sales', - 'hashref' => { 'disabled' => '' }, +my $hashref = { disabled => '' }; +$hashref->{agentnum} = $opt{agentnum} if $opt{agentnum}; + +my @sales = qsearch({ 'table' => 'sales', + 'hashref' => $hashref, 'extra_sql' => ' AND '. $curuser->agentnums_sql, 'order_by' => 'ORDER BY salesperson', }); |
