X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fservices.html;h=bb676e8ab27d627bcbe5c7b2390889f18fb50368;hb=71b86f3f89e8fdeb7142fa82cdbe3e3afce7a903;hp=c0a56d0f3e093a829aba3cac0e1926cf2d24805d;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index c0a56d0f3..bb676e8ab 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -10,13 +10,15 @@ function clearhint_search_cust_svc(obj, str) { } -% foreach my $part_svc ( $cust_pkg->part_svc( -% 'summarize_size' => $opt{'cust_pkg-large_pkg_size'} -% ) ) -% { - +% 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 % @@ -24,7 +26,7 @@ function clearhint_search_cust_svc(obj, str) { % my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart. % ";pkgnum=".$cust_pkg->pkgnum; - <% $part_svc->svc %> + <% $part_svc->svc |h %> (<% mt("view all [_1]", $num_cust_svc) |h %>) @@ -74,9 +76,21 @@ function clearhint_search_cust_svc(obj, str) { - <% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %> + + +% 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) %> +% } + + % 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;
<% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %> @@ -104,8 +118,6 @@ my $cust_pkg = $opt{'cust_pkg'}; 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) = @_;