X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_pkg.html;h=556177c8a27db35e23762da8bddada722548b696;hb=992c6d61adaaf658a52d1bdcc87b6e1780663a64;hp=e75a0985be612d4b5dafe419da2bcdecd88daf46;hpb=7427b3722522f049c9ebdb4ba3780a91b88c414f;p=freeside.git diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html index e75a0985b..556177c8a 100755 --- a/httemplate/search/report_cust_pkg.html +++ b/httemplate/search/report_cust_pkg.html @@ -80,6 +80,7 @@ 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'; @@ -90,15 +91,21 @@ % } 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'; + + } % } % } @@ -109,6 +116,37 @@ } +% 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'; + + } + + } + +% } + <& /elements/tr-select-pkg_class.html, @@ -135,6 +173,7 @@ From date (m/d/y) To date (m/d/y) + Empty date % my $noinit = 0; % foreach my $field (@date_fields) { @@ -152,6 +191,13 @@ % $noinit = 1; % } + + <& /elements/checkbox.html, + 'field' => $field.'_null', + 'value' => 'Y', + 'onchange' => $field.'_null_changed', + &> + % } #foreach $field @@ -190,7 +236,7 @@ <& /elements/tr-title.html, value => mt('Location search options') &> % my @location_options = qw(cust nocust census nocensus); -% if ( $conf->exists('enable_taxproducts') ) { +% if ( $conf->config('tax_data_vendor') eq 'cch' ) { % push @location_options, 'geocode', 'nogeocode'; % } <& /elements/tr-checkbox-multiple.html, @@ -204,7 +250,7 @@ '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') &> @@ -260,7 +306,8 @@ my @date_fields = keys %label; #false laziness w/cust_pkg.cgi my %disable = ( 'all' => {}, - 'not yet billed' => { 'setup'=>1, 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, }, + 'on hold' => { 'setup'=>1, 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'expire'=>1, 'cancel'=>1, 'dundate'=> 1, }, + 'not yet billed' => { 'setup'=>1, 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, 'dundate'=>1, }, 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, 'contract_end'=>1, 'dundate'=>1, }, 'active' => { 'susp'=>1, 'cancel'=>1 }, 'suspended' => { 'cancel'=>1, 'dundate'=>1, },