[freeside-commits] freeside/httemplate/view/cust_main/packages services.html, 1.14, 1.15
Ivan,,,
ivan at wavetail.420.am
Tue Aug 9 22:22:33 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages
In directory wavetail.420.am:/tmp/cvs-serv18995/httemplate/view/cust_main/packages
Modified Files:
services.html
Log Message:
multiple DID provisioning, RT#13721
Index: services.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/services.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- services.html 23 Jun 2011 09:10:17 -0000 1.14
+++ services.html 10 Aug 2011 05:22:31 -0000 1.15
@@ -73,7 +73,13 @@
<B><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %></B>
% if ( $curuser->access_right('Bulk provision customer service')
% && $part_svc->svcdb eq 'svc_phone' ) {
+% if ( $part_svc->num_avail > 5 ) {
+% $opt{'bulk'} = 1;
+ <BR><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
+% }
+% #XXX if there's orders for this customer {
<BR><A HREF="<%$p%>browse/did_order.html?custnum=<%$cust_pkg->custnum%>"><% mt('Browse Received DID Inventory') |h %></A>
+% #}
% }
</TD>
</TR>
@@ -98,33 +104,38 @@
sub svc_provision_link {
my ($cust_pkg, $part_svc, $opt, $curuser) = @_;
+
( my $svc_nbsp = $part_svc->svc ) =~ s/\s+/ /g;
my $num_avail = $part_svc->num_avail;
- my $pkgnum_svcpart = "pkgnum=". $cust_pkg->pkgnum. ';'.
+
+ my $query = "pkgnum=". $cust_pkg->pkgnum. ';'.
"svcpart=". $part_svc->svcpart;
+ $query .= ';bulk=1' if $opt->{bulk};
+
my $url;
if ( $part_svc->svcdb eq 'svc_external' #could be generalized
&& $opt->{'svc_external-skip_manual'}
) {
- $url = "${p}edit/process/". $part_svc->svcdb. ".cgi?$pkgnum_svcpart";
+ $url = "${p}edit/process/". $part_svc->svcdb. ".cgi?$query";
} else {
$url = svc_url(
'm' => $m,
'action' => 'edit',
'part_svc' => $part_svc,
- 'query' => $pkgnum_svcpart,
+ 'query' => $query,
);
}
+ my $action = $opt->{bulk} ? 'Bulk provision' : 'Provision';
+
my $link = qq!<A CLASS="provision" HREF="$url">!.
- emt("Provision [_1] ([_2])",$svc_nbsp,$num_avail).'</A>';
+ emt("$action [_1] ([_2])",$svc_nbsp,$num_avail).'</A>';
if ( $opt->{'legacy_link'}
&& $curuser->access_right('View/link unlinked services')
)
{
$link .= '<BR>'.
- qq!<A CLASS="provision" HREF="${p}misc/link.cgi?!.
- qq!$pkgnum_svcpart">!.
+ qq!<A CLASS="provision" HREF="${p}misc/link.cgi?$query">!.
emt("Link to legacy [_1] ([_2])",$svc_nbsp,$num_avail).'</A>';
}
$link;
More information about the freeside-commits
mailing list