projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3560f41
)
UI enhancements to phone_avail report, RT10464
author
levinse
<levinse>
Tue, 28 Dec 2010 17:20:15 +0000
(17:20 +0000)
committer
levinse
<levinse>
Tue, 28 Dec 2010 17:20:15 +0000
(17:20 +0000)
FS/FS/phone_avail.pm
patch
|
blob
|
history
httemplate/search/phone_avail.html
patch
|
blob
|
history
diff --git
a/FS/FS/phone_avail.pm
b/FS/FS/phone_avail.pm
index
967d717
..
92286ab
100644
(file)
--- a/
FS/FS/phone_avail.pm
+++ b/
FS/FS/phone_avail.pm
@@
-162,6
+162,17
@@
sub cust_svc {
qsearchs('cust_svc', { 'svcnum' => $self->svcnum });
}
qsearchs('cust_svc', { 'svcnum' => $self->svcnum });
}
+=item part_export
+
+=cut
+
+sub part_export {
+ my $self = shift;
+ return '' unless $self->exportnum;
+ qsearchs('part_export', { 'exportnum' => $self->exportnum });
+}
+
+
sub process_batch_import {
my $job = shift;
sub process_batch_import {
my $job = shift;
diff --git
a/httemplate/search/phone_avail.html
b/httemplate/search/phone_avail.html
index
0ca0946
..
8dec7b2
100644
(file)
--- a/
httemplate/search/phone_avail.html
+++ b/
httemplate/search/phone_avail.html
@@
-31,23
+31,33
@@
},
sub { shift->get('name') },
'availbatch',
},
sub { shift->get('name') },
'availbatch',
- 'exportnum', #XXX
- #sub { },
- 'svcnum', #XXX
+ sub {
+ my $pa = shift;
+ return '' unless $pa->part_export;
+ $pa->part_export->exportname;
+ },
+ sub {
+ my $pa = shift;
+ return '' unless $pa->cust_svc;
+ my($label,$value) = $pa->cust_svc->label;
+ $label . ": " . $value;
+ },
\&FS::UI::Web::cust_fields,
\&FS::UI::Web::cust_fields,
+ '',
],
],
- 'align' => 'rllllll'.FS::UI::Web::cust_aligns(),
+ 'align' => 'rllllll
c
'.FS::UI::Web::cust_aligns(),
'links' => [
'',
'',
'',
'',
'',
'links' => [
'',
'',
'',
'',
'',
- '', #XXX #$export_link
- '', #XXX #$svc_link
+ '', #XXX #$export_link
- to what exactly?
+ $svc_link,
( map { $_ ne 'Cust. Status' ? $link_cust : '' }
FS::UI::Web::cust_header()
),
( map { $_ ne 'Cust. Status' ? $link_cust : '' }
FS::UI::Web::cust_header()
),
+ '',
],
'color' => [
'',
],
'color' => [
'',
@@
-58,6
+68,7
@@
'',
'',
FS::UI::Web::cust_colors(),
'',
'',
FS::UI::Web::cust_colors(),
+ '',
],
'style' => [
'',
],
'style' => [
'',
@@
-68,6
+79,7
@@
'',
'',
FS::UI::Web::cust_styles(),
'',
'',
FS::UI::Web::cust_styles(),
+ '',
],
)
%>
],
)
%>
@@
-129,4
+141,13
@@
my $link_cust = sub {
'';
};
'';
};
+my $svc_link = sub {
+ my $phone_avail = shift;
+ my $cust_svc = $phone_avail->cust_svc;
+ if ( $cust_svc ) {
+ return [ "${p}view/svc_phone.cgi?", 'svcnum'];
+ }
+ '';
+};
+
</%init>
</%init>