% ###
<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
- <TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
+ <TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH="100%">
<SCRIPT TYPE="text/javascript">
function clearhint_search_cust_svc(obj, str) {
if (obj.value == str) obj.value = '';
}
</SCRIPT>
-% foreach my $part_svc ( $cust_pkg->part_svc ) {
-
+% foreach my $part_svc (
+% $cust_pkg->part_svc(
+% 'summarize_size' => $opt{'cust_pkg-large_pkg_size'},
+% 'hide_discontinued' => $opt{'cust_pkg-hide_discontinued-part_svc'},
+% )
+% ) {
+%
% my $num_cust_svc = $cust_pkg->num_cust_svc( $part_svc->svcpart );
-
+%
% if ( $opt{'cust_pkg-large_pkg_size'} > 0 and
-% $opt{'cust_pkg-large_pkg_size'} <= $num_cust_svc ) {
-% # summarize
+% $opt{'cust_pkg-large_pkg_size'} <= $num_cust_svc ) { # summarize
+%
<TR>
<TD ALIGN="right" VALIGN="top">
% my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart.
% ";pkgnum=".$cust_pkg->pkgnum;
- <A HREF="<% $href %>"><% $part_svc->svc %></A>
+ <A HREF="<% $href %>"><% $part_svc->svc |h %></A>
</TD>
<TD ALIGN="left" VALIGN="top">
<A HREF="<% $href %>"><B>(<% mt("view all [_1]", $num_cust_svc) |h %>)</B></A>
</TD>
</TR>
% } #$hint
-% }
-% else { # don't summarize
+%
+% } else { # don't summarize
+%
% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) {
% if ( $cust_pkg->getfield('cancel') > 0 ) {
<& /elements/tr-cust_svc_cancel.html,
<TR>
<TD COLSPAN=3 ALIGN="center" STYLE="padding-bottom:4px;padding-top:0px">
- <B><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %></B>
+
+ <B>
+% if ( $opt{no_links} ) {
+ <% $part_svc->svc |h %>: <% $part_svc->num_avail %>
+ <% mt('Available') |h %>
+% } else {
+ <% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
+% }
+ </B>
+
% if ( $curuser->access_right('Bulk provision customer service')
-% && $part_svc->svcdb eq 'svc_phone' ) {
+% && $part_svc->svcdb eq 'svc_phone'
+% && ! $opt{no_links}
+% )
+% {
% if ( $part_svc->num_avail > 5 ) {
% local $opt{'bulk'} = 1;
<BR><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
my $part_pkg = $opt{'part_pkg'};
my $curuser = $FS::CurrentUser::CurrentUser;
-my $conf = new FS::Conf;
-
sub svc_provision_link {
my ($cust_pkg, $part_svc, $opt, $curuser) = @_;