projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix FK upgrade for pkg_referral: remove records referencing non-existant customer...
[freeside.git]
/
httemplate
/
search
/
cust_main.cgi
diff --git
a/httemplate/search/cust_main.cgi
b/httemplate/search/cust_main.cgi
index
76cbe49
..
7439efe
100755
(executable)
--- a/
httemplate/search/cust_main.cgi
+++ b/
httemplate/search/cust_main.cgi
@@
-129,7
+129,10
@@
% 'select' => 'part_svc.*, COUNT(*) AS num_cust_svc',
% 'table' => 'part_svc',
% 'addl_from' => 'LEFT JOIN cust_svc USING ( svcpart )',
% 'select' => 'part_svc.*, COUNT(*) AS num_cust_svc',
% 'table' => 'part_svc',
% 'addl_from' => 'LEFT JOIN cust_svc USING ( svcpart )',
-% 'extra_sql' => 'WHERE pkgnum = ? GROUP BY part_svc.svcpart',
+% 'extra_sql' => 'WHERE pkgnum = ? '.
+% ' GROUP BY '. join(', ',
+% map "part_svc.$_", fields('part_svc')
+% ),
% 'extra_param' => [ [$cust_pkg->pkgnum,'int'] ],
% })
% ) {
% 'extra_param' => [ [$cust_pkg->pkgnum,'int'] ],
% })
% ) {
@@
-330,7
+333,7
@@
die "access denied"
unless $curuser->access_right('List all customers');
my $conf = new FS::Conf;
unless $curuser->access_right('List all customers');
my $conf = new FS::Conf;
-my $maxrecords = $conf->config('maxsearchrecordsperpage');
+my $maxrecords = $conf->config('maxsearchrecordsperpage')
|| 100
;
# summarize more than this many services of the same svcpart
my $large_pkg_size = $conf->config('cust_pkg-large_pkg_size') || 0;
# summarize more than this many services of the same svcpart
my $large_pkg_size = $conf->config('cust_pkg-large_pkg_size') || 0;
@@
-498,7
+501,7
@@
if ( $cgi->param('browse')
);
}
);
}
- @cust_main = grep { $_->
num_ncancelled_pkgs || ! $_->num_pkgs
} @cust_main
+ @cust_main = grep { $_->
status ne 'cancelled'
} @cust_main
if ! $cgi->param('cancelled')
&& (
$cgi->param('showcancelledcustomers') eq '0' #see if it was set by me
if ! $cgi->param('cancelled')
&& (
$cgi->param('showcancelledcustomers') eq '0' #see if it was set by me