projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove "failed billing events" report, and add "completed with an error" status searc...
[freeside.git]
/
httemplate
/
search
/
svc_phone.cgi
diff --git
a/httemplate/search/svc_phone.cgi
b/httemplate/search/svc_phone.cgi
index
f3a0564
..
4c0b654
100644
(file)
--- a/
httemplate/search/svc_phone.cgi
+++ b/
httemplate/search/svc_phone.cgi
@@
-9,6
+9,7
@@
'Country code',
'Phone number',
@header,
'Country code',
'Phone number',
@header,
+ emt('Pkg. Status'),
FS::UI::Web::cust_header($cgi->param('cust_fields')),
],
'fields' => [ 'svcnum',
FS::UI::Web::cust_header($cgi->param('cust_fields')),
],
'fields' => [ 'svcnum',
@@
-16,6
+17,11
@@
'countrycode',
'phonenum',
@fields,
'countrycode',
'phonenum',
@fields,
+ sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
+ $cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
+ },
\&FS::UI::Web::cust_fields,
],
'links' => [ $link,
\&FS::UI::Web::cust_fields,
],
'links' => [ $link,
@@
-23,12
+29,14
@@
$link,
$link,
( map '', @header ),
$link,
$link,
( map '', @header ),
+ '', # pkg status
( map { $_ ne 'Cust. Status' ? $link_cust : '' }
FS::UI::Web::cust_header($cgi->param('cust_fields'))
),
],
'align' => 'rlrr'.
join('', map 'r', @header).
( map { $_ ne 'Cust. Status' ? $link_cust : '' }
FS::UI::Web::cust_header($cgi->param('cust_fields'))
),
],
'align' => 'rlrr'.
join('', map 'r', @header).
+ 'r'.
FS::UI::Web::cust_aligns(),
'color' => [
'',
FS::UI::Web::cust_aligns(),
'color' => [
'',
@@
-36,6
+44,12
@@
'',
'',
( map '', @header ),
'',
'',
( map '', @header ),
+ sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
+ my $c = FS::cust_pkg::statuscolors;
+ $c->{$cust_pkg_cache{$_[0]->svcnum}->status };
+ }, # pkg status
FS::UI::Web::cust_colors(),
],
'style' => [
FS::UI::Web::cust_colors(),
],
'style' => [
@@
-44,6
+58,7
@@
'',
'',
( map '', @header ),
'',
'',
( map '', @header ),
+ 'b',
FS::UI::Web::cust_styles(),
],
FS::UI::Web::cust_styles(),
],
@@
-53,6
+68,8
@@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('List services');
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('List services');
+my %cust_pkg_cache;
+
my $conf = new FS::Conf;
my @select = ();
my $conf = new FS::Conf;
my @select = ();
@@
-132,6
+149,9
@@
if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) {
} elsif ( $cgi->param('svcpart') =~ /^(\d+)$/ ) {
$search_hash{'svcpart'} = [ $1 ];
} elsif ( $cgi->param('svcpart') =~ /^(\d+)$/ ) {
$search_hash{'svcpart'} = [ $1 ];
+ if ( defined($cgi->param('cancelled')) ) {
+ $search_hash{'cancelled'} = $cgi->param('cancelled') ? 1 : 0;
+ }
} else {
$cgi->param('phonenum') =~ /^([\d\- ]+)$/;
my $phonenum = $1;
} else {
$cgi->param('phonenum') =~ /^([\d\- ]+)$/;
my $phonenum = $1;