From: Ivan Kohler Date: Sat, 22 Oct 2016 11:19:53 +0000 (-0700) Subject: 4.x style advanced customer search X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2d2ba7d543ab88f52a245a8f274950f443c7c3df 4.x style advanced customer search --- diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 041b76c10..cb195a059 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -129,6 +129,7 @@ if ( -e $addl_handler_use_file ) { midnight_sql regexp_sql ); use FS::Conf; + use FS::ConfDefaults; use FS::CGI qw(header menubar table itable ntable idiot eidiot myexit http_header); use FS::UI::Web qw(svc_url random_id diff --git a/httemplate/elements/tr-input-lessthan_greaterthan.html b/httemplate/elements/tr-input-lessthan_greaterthan.html index 16c2ed9fc..961be5b61 100644 --- a/httemplate/elements/tr-input-lessthan_greaterthan.html +++ b/httemplate/elements/tr-input-lessthan_greaterthan.html @@ -1,10 +1,10 @@ - <% $opt{label} %> less than: + <% $opt{label} %> less than: - <% $opt{label} %> greater than: + <% $opt{label} %> greater than: diff --git a/httemplate/elements/tr-select-cust-fields.html b/httemplate/elements/tr-select-cust-fields.html index 80562fe3d..dd8513316 100644 --- a/httemplate/elements/tr-select-cust-fields.html +++ b/httemplate/elements/tr-select-cust-fields.html @@ -1,15 +1,11 @@ -% -% my( $cust_fields, %opt ) = @_; -% -% use FS::ConfDefaults; -% $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ]; -% -% - - - <% $opt{'label'} || 'Customer fields' %> - - <% include( '/elements/select-cust-fields.html', $cust_fields, %opt ) %> - + <% $opt{'label'} || mt('Customer fields') |h %> + <& /elements/select-cust-fields.html, $cust_fields, %opt &> +<%init> + +my( $cust_fields, %opt ) = @_; + +$opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ]; + + diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index ba7c99a45..8fac84501 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -3,11 +3,8 @@
- - - - - + <% emt('Basic search options') %> +
<% mt('Basic search options') |h %>
<& /elements/tr-select-agent.html, 'curr_value' => scalar($cgi->param('agentnum')), @@ -19,6 +16,7 @@ 'pre_options' => [ '' => 'all', 0 => '(none)', ], 'disable_empty' => 1, + 'th' => 1, &> <& /elements/tr-select-cust_main-status.html, @@ -40,7 +38,7 @@ &> - +
<% mt('Signup date') |h %><% mt('Signup date') |h %> <& /elements/tr-input-beginning_ending.html, @@ -53,7 +51,7 @@ % if ( $conf->exists('cust_main-enable_birthdate') ) { - +
<% mt('Date of Birth') |h %><% mt('Date of Birth') |h %> <& /elements/tr-input-beginning_ending.html, @@ -67,7 +65,7 @@ % if ( $conf->exists('cust_main-enable_spouse_birthdate') ) { - + - - + <% emt('Billing search options') %> +
<% mt('Spouse Date of Birth') |h %><% mt('Spouse Date of Birth') |h %> <& /elements/tr-input-beginning_ending.html, @@ -81,7 +79,7 @@ % if ( $conf->exists('cust_main-enable_anniversary_date') ) { - + - - + <% emt('Location search options') %> +
<% mt('Anniversary Date') |h %><% mt('Anniversary Date') |h %> <& /elements/tr-input-beginning_ending.html, @@ -94,7 +92,7 @@ % } - + - + - - - +
TagsTags <& /elements/select-cust_tag.html, 'cgi' => $cgi, @@ -110,7 +108,7 @@
With package of classWith package of class <& /elements/select-pkg_class.html, 'field' => 'pkg_classnum', @@ -126,21 +124,19 @@
 
+
-
<% mt('Location search options') |h %>
- + - + - + - + - + - + - - - +
<% mt('Address') |h %><% mt('Address') |h %>
<% mt('City') |h %><% mt('City') |h %> <& /elements/city.html, disable_empty => 0, @@ -151,7 +147,7 @@
<% mt('County') |h %><% mt('County') |h %> <& /elements/select-county.html, disable_empty => 0, @@ -161,7 +157,7 @@
<% mt('State') |h %><% mt('State') |h %> <& /elements/select-state.html, disable_empty => 0, @@ -171,12 +167,12 @@
<% mt('Zip') |h %><% mt('Zip') |h %>
<% mt('Country') |h %><% mt('Country') |h %> <& /elements/select-country.html, disable_empty => 0, @@ -186,25 +182,23 @@
 
+
-
<% mt('Billing search options') |h %>
% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); % unless ( @exempt_groups ) { % #falze laziness with With/Without postal mail invoices - + - + @@ -223,7 +217,7 @@ % } - + - + - + - + @@ -268,22 +262,21 @@ } - - - +
<% mt('Tax exempt') |h %><% mt('Tax exempt') |h %>
<% mt('Not tax exempt') |h %><% mt('Not tax exempt') |h %>
<% mt('Invoice terms') |h %><% mt('Invoice terms') |h %> % my @agentnums = $FS::CurrentUser::CurrentUser->agentnums; % my $agentnum = scalar(@agentnums) == 1 ? $agentnums[0] : ''; @@ -241,17 +235,17 @@ &>
<% mt('With invoicing email address(es)') |h %><% mt('With invoicing email address(es)') |h %>
<% mt('With postal mail invoices') |h %><% mt('With postal mail invoices') |h %>
<% mt('Without postal mail invoices') |h %><% mt('Without postal mail invoices') |h %>
 
+
+ + <% emt('Display options') %> + - - - <& /elements/tr-select-cust-fields.html &> - + - +
<% mt('Display options') |h %>
<% mt('Add package columns') |h %><% mt('Add package columns') |h %>
<% mt('Include cancelled packages') |h %><% mt('Include cancelled packages') |h %>