>
<% $cust_main->display_custnum %>
|
>
- <% ucfirst($status) %>
+ <% $status_label %>
|
>
- <% "$last, $first" %>
+ <% "$last, $first" |h %>
|
>
<% $pcompany %>
@@ -233,7 +233,7 @@
% my $pkgnum = $_->pkgnum;
% my $part_pkg = $_->part_pkg;
%
-% my $pkg_comment = $part_pkg->pkg_comment(nopkgpart => 1);
+% my $pkg_comment = $part_pkg->pkg_comment( cust_pkg=>$_, nopkgpart=>1 );
% my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
% ? ''
% : ';show=packages';
@@ -244,7 +244,7 @@
% my $pkg_rowspan = shift @pkg_rowspans;
<% $n1 %> |
- <% $pkg_comment %>
+ <% $pkg_comment |h %>
|
% my $n2 = '';
@@ -341,7 +341,12 @@ if ( $cgi->param('browse')
if ( $query eq 'custnum' ) {
if ( $conf->exists('cust_main-default_agent_custid') ) {
$sortby=\*display_custnum_sort;
- $orderby = "ORDER BY CASE WHEN agent_custid IS NOT NULL AND agent_custid != '' THEN CAST(agent_custid AS BIGINT) ELSE custnum END";
+ $orderby = "ORDER BY CASE WHEN agent_custid IS NOT NULL
+ AND agent_custid != ''
+ AND agent_custid ". regexp_sql. " '^[0-9]+\$'
+ THEN CAST(agent_custid AS BIGINT)
+ ELSE custnum
+ END";
} else {
$sortby=\*custnum_sort;
$orderby = "ORDER BY custnum";
@@ -393,6 +398,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');
@@ -470,7 +476,6 @@ if ( $cgi->param('browse')
$orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )";
push @cust_main, smart_search(
'search' => scalar($cgi->param('search_cust')),
- 'no_fuzzy_on_exact' => ! $curuser->option('enable_fuzzy_on_exact'),
);
}