X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=48114079317c93195e8d3834cae875c8bb5578d9;hb=992573160bf2fc89b1d957973109e03d2abf0a47;hp=2c09c692cd03e1a000bf27d7a4721106116fc43d;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 2c09c692c..481140793 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -150,15 +150,15 @@ % ? qq!!. encode_entities($company). '' % : ' '; % -% my $status = $cust_main->status; -% my $statuscol = $cust_main->statuscolor; +% my $status_label = $cust_main->status_label; +% my $statuscolor = $cust_main->statuscolor; > <% $cust_main->display_custnum %> > - <% ucfirst($status) %> + <% $status_label %> > <% "$last, $first" |h %> @@ -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'; @@ -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'), ); }