% unless ( $custnum ) {
- <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
-
- <& /elements/tr-title.html, value => mt('Customer search options') &>
+ <FONT CLASS="fsinnerbox-title"><% emt('Customer search options') %></FONT>
+ <TABLE CLASS="fsinnerbox">
<& /elements/tr-select-agent.html,
'curr_value' => scalar( $cgi->param('agentnum') ),
% }
- <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
-
- <& /elements/tr-title.html, value => mt('Package search options') &>
+<FONT CLASS="fsinnerbox-title"><% emt('Package search options') %></FONT>
+<TABLE CLASS="fsinnerbox">
<& /elements/tr-select-sales.html,
'label' => 'Package sales person',
'onchange' => 'status_changed(this);',
&>
+ <& /elements/tr-select-reason.html,
+ 'field' => 'reasonnum',
+ 'reason_class' => 'S',
+ 'label' => 'Suspended Reason',
+ 'label_id' => 'reasonnum_label',
+ 'hide_addnew' => '1',
+ 'hide_onload' => '1',
+ 'cgi' => $cgi,
+ 'control_button' => 'confirm_suspend_cust_button',
+ 'pre_options' => [ 0 => 'all' ],
+ &>
+
<SCRIPT TYPE="text/javascript">
function status_changed(what) {
+ if (what.options[what.selectedIndex].value == 'suspended') {
+ document.getElementById('reasonnum_row').style.visibility = 'visible';
+ }
+ else {
+ document.getElementById('reasonnum_row').style.visibility = 'collapse';
+ }
+
% foreach my $status ( '', FS::cust_pkg->statuses() ) {
if ( what.options[what.selectedIndex].value == '<% $status %>' ) {
what.form.<% $field %>_beginning_text.disabled = true;
what.form.<% $field %>_ending_text.disabled = true;
+ what.form.<% $field %>_null.disabled = true;
what.form.<% $field %>_beginning_text.style.backgroundColor = '#dddddd';
what.form.<% $field %>_ending_text.style.backgroundColor = '#dddddd';
% } else {
- what.form.<% $field %>_beginning_text.disabled = false;
- what.form.<% $field %>_ending_text.disabled = false;
- what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff';
- what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff';
+ what.form.<% $field %>_null.disabled = false;
- what.form.<% $field %>_beginning_button.style.display = '';
- what.form.<% $field %>_ending_button.style.display = '';
- what.form.<% $field %>_beginning_disabled.style.display = 'none';
- what.form.<% $field %>_ending_disabled.style.display = 'none';
+ if ( ! what.form.<% $field %>_null.checked ) {
+
+ what.form.<% $field %>_beginning_text.disabled = false;
+ what.form.<% $field %>_ending_text.disabled = false;
+ what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff';
+ what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff';
+
+ what.form.<% $field %>_beginning_button.style.display = '';
+ what.form.<% $field %>_ending_button.style.display = '';
+ what.form.<% $field %>_beginning_disabled.style.display = 'none';
+ what.form.<% $field %>_ending_disabled.style.display = 'none';
+
+ }
% }
% }
}
+% foreach my $field (@date_fields) {
+
+ function <% $field %>_null_changed(what) {
+
+ if ( what.checked ) {
+ what.form.<% $field %>_beginning_text.disabled = true;
+ what.form.<% $field %>_ending_text.disabled = true;
+ what.form.<% $field %>_beginning_text.style.backgroundColor = '#dddddd';
+ what.form.<% $field %>_ending_text.style.backgroundColor = '#dddddd';
+ what.form.<% $field %>_beginning_button.style.display = 'none';
+ what.form.<% $field %>_ending_button.style.display = 'none';
+ what.form.<% $field %>_beginning_disabled.style.display = '';
+ what.form.<% $field %>_ending_disabled.style.display = '';
+
+ } else {
+ what.form.<% $field %>_beginning_text.disabled = false;
+ what.form.<% $field %>_ending_text.disabled = false;
+ what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff';
+ what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff';
+
+ what.form.<% $field %>_beginning_button.style.display = '';
+ what.form.<% $field %>_ending_button.style.display = '';
+ what.form.<% $field %>_beginning_disabled.style.display = 'none';
+ what.form.<% $field %>_ending_disabled.style.display = 'none';
+
+ }
+
+ }
+
+% }
+
</SCRIPT>
<& /elements/tr-select-pkg_class.html,
<TD></TD>
<TD>From date <i>(m/d/y)</i></TD>
<TD>To date <i>(m/d/y)</i></TD>
+ <TD>Empty date</TD>
</TR>
% my $noinit = 0;
% foreach my $field (@date_fields) {
</TD>
% $noinit = 1;
% }
+ <TD ALIGN="center">
+ <& /elements/checkbox.html,
+ 'field' => $field.'_null',
+ 'value' => 'Y',
+ 'onchange' => $field.'_null_changed',
+ &>
+ </TD>
</TR>
% } #foreach $field
</TABLE>
<& /elements/tr-selectmultiple-part_pkg.html &>
- <& /elements/tr-title.html, value => mt('Location search options') &>
+</TABLE>
+<BR>
+
+<FONT CLASS="fsinnerbox-title"><% emt('Location search options') %></FONT>
+<TABLE CLASS="fsinnerbox">
% my @location_options = qw(cust nocust census nocensus);
% if ( $conf->config('tax_data_vendor') eq 'cch' ) {
'nogeocode'=> 'has an implicit tax location',
'geocode' => 'has a hardcoded tax location',
},
- 'value' => { map { $_ => 1 } @location_options },
+ 'value' => { map { $_ => 0 } @location_options },
&>
- <& /elements/tr-title.html, value => mt('Display options') &>
+</TABLE>
+<BR>
+
+<FONT CLASS="fsinnerbox-title"><% emt('Display options') %></FONT>
+<TABLE CLASS="fsinnerbox">
<& /elements/tr-select-cust-fields.html &>