<% mt('#') |h %> |
<% mt('Status') |h %> |
- <% mt('(bill) name') |h %> |
- <% mt('company') |h %> |
-
-%if ( defined dbdef->table('cust_main')->column('ship_last') ) {
- <% mt('(service) name') |h %> |
- <% mt('company') |h %> |
-%}
+ <% mt('Name') |h %> |
+ <% mt('Company') |h %> |
%foreach my $addl_header ( @addl_headers ) {
<% $addl_header %> |
@@ -152,7 +147,7 @@
% $view = $p. 'view/cust_main.cgi?'. $custnum;
% }
% my $pcompany = $company
-% ? qq!$company!
+% ? qq!!. encode_entities($company). ''
% : ' ';
%
% my $status = $cust_main->status;
@@ -166,31 +161,12 @@
<% ucfirst($status) %>
>
- <% "$last, $first" %>
+ <% "$last, $first" |h %>
|
>
<% $pcompany %>
|
-% if ( defined dbdef->table('cust_main')->column('ship_last') ) {
-% my($ship_last,$ship_first,$ship_company)=(
-% $cust_main->ship_last || $cust_main->getfield('last'),
-% $cust_main->ship_last ? $cust_main->ship_first : $cust_main->first,
-% $cust_main->ship_last ? $cust_main->ship_company : $cust_main->company,
-% );
-% my $pship_company = $ship_company
-% ? qq!$ship_company!
-% : ' ';
-%
-
- >
- <% "$ship_last, $ship_first" %>
- |
- >
- <% $pship_company %>
- |
-% }
-%
% foreach my $addl_col ( @addl_cols ) {
% if ( $addl_col eq 'tickets' ) {
% if ( @custom_priorities ) {
@@ -268,7 +244,7 @@
% my $pkg_rowspan = shift @pkg_rowspans;
<% $n1 %>
- <% $pkg_comment %>
+ <% $pkg_comment |h %>
|
% my $n2 = '';
@@ -417,6 +393,7 @@ if ( $cgi->param('browse')
push @qual, FS::cust_main->cancel_sql if $cgi->param('cancelled');
push @qual, FS::cust_main->prospect_sql if $cgi->param('prospect');
+ push @qual, FS::cust_main->ordered_sql if $cgi->param('ordered');
push @qual, FS::cust_main->active_sql if $cgi->param('active');
push @qual, FS::cust_main->inactive_sql if $cgi->param('inactive');
push @qual, FS::cust_main->susp_sql if $cgi->param('suspended');
@@ -492,9 +469,12 @@ if ( $cgi->param('browse')
if ( $cgi->param('search_cust') ) {
$sortby = \*company_sort;
$orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )";
- push @cust_main, smart_search( 'search' => scalar($cgi->param('search_cust')),
- 'no_fuzzy_on_exact' => 1, #pref?
- );
+ push @cust_main, smart_search(
+ 'search' => scalar($cgi->param('search_cust')),
+ 'no_fuzzy_on_exact' => ! ( $curuser->option('enable_fuzzy_on_exact')
+ || $conf->exists('enable_fuzzy_on_exact')
+ ),
+ );
}
@cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main