projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
missing commit from nms auto-addition fixes, RT#15536
[freeside.git]
/
httemplate
/
search
/
phone_avail.html
diff --git
a/httemplate/search/phone_avail.html
b/httemplate/search/phone_avail.html
index
9f28762
..
1335379
100644
(file)
--- a/
httemplate/search/phone_avail.html
+++ b/
httemplate/search/phone_avail.html
@@
-3,7
+3,7
@@
'name_singular' => 'phone number',
'query' => {
'table' => 'phone_avail',
'name_singular' => 'phone number',
'query' => {
'table' => 'phone_avail',
- 'hashref' =>
{}
,
+ 'hashref' =>
$hashref
,
'select' => join(', ',
'phone_avail.*',
'cust_main.custnum',
'select' => join(', ',
'phone_avail.*',
'cust_main.custnum',
@@
-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,13
+79,15
@@
'',
'',
FS::UI::Web::cust_styles(),
'',
'',
FS::UI::Web::cust_styles(),
+ '',
],
)
%>
<%init>
die "access denied"
],
)
%>
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Import');
+ unless ( $FS::CurrentUser::CurrentUser->access_right('List inventory')
+ );
my @search = ();
my @search = ();
@@
-116,6
+129,9
@@
my $addl_from = ' LEFT JOIN cust_svc USING ( svcnum ) '.
my $count_query = "SELECT COUNT(*) FROM phone_avail $search"; #$addl_from?
my $count_query = "SELECT COUNT(*) FROM phone_avail $search"; #$addl_from?
+my $hashref = {};
+$hashref->{'ordernum'} = $1 if $cgi->param('ordernum') =~ /^(\d+)$/;
+
my $link_cust = sub {
my $phone_avail = shift;
if ( $phone_avail->svcnum ) {
my $link_cust = sub {
my $phone_avail = shift;
if ( $phone_avail->svcnum ) {
@@
-128,4
+144,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>