- <TR>
- <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
- </TR>
- <% include( '/elements/tr-select-agent.html',
- $cgi->param('agentnum'),
- )
- %>
-
- <% include( '/elements/tr-select-cust_pkg-status.html', '',
+ <FONT CLASS="fsinnerbox-title"><% emt('Customer search options') %></FONT>
+ <TABLE CLASS="fsinnerbox">
+
+ <& /elements/tr-select-agent.html,
+ 'curr_value' => scalar( $cgi->param('agentnum') ),
+ 'disable_empty' => 0,
+ 'onchange' => 'agent_changed(this)',
+ &>
+
+ <& /elements/tr-select-cust_main-status.html,
+ 'label' => 'Customer status',
+ 'field' => 'cust_status',
+ &>
+
+ <SCRIPT TYPE="text/javascript">
+
+ function agent_changed(what) {
+% # update sales dropdowns
+ salesnum_agentnum_changed(what);
+ cust_main_salesnum_agentnum_changed(what);
+ }
+
+ <&| /elements/onload.js &>
+ agent_changed(document.getElementById('agentnum'))
+ </&>
+
+ </SCRIPT>
+
+ <& /elements/tr-select-sales.html,
+ 'label' => 'Customer sales person',
+ 'element_name' => 'cust_main_salesnum',
+ 'id' => 'cust_main_salesnum',
+ 'curr_value' => scalar($cgi->param('cust_main_salesnum')),
+ 'pre_options' => [ '' => 'all',
+ 0 => '(none)', ],
+ 'disable_empty' => 1,
+ &>
+
+ </TABLE>
+ <BR>
+
+% }
+
+<FONT CLASS="fsinnerbox-title"><% emt('Package search options') %></FONT>
+<TABLE CLASS="fsinnerbox">
+
+ <& /elements/tr-select-sales.html,
+ 'label' => 'Package sales person',
+ 'curr_value' => scalar($cgi->param('salesnum')),
+ 'pre_options' => [ '' => 'all',
+ 0 => '(none)', ],
+ 'disable_empty' => 1,
+ &>
+
+ <& /elements/tr-select-cust_pkg-status.html,
+ 'label' => 'Package status',