X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fservices.html;h=f10bec47b9846df9ddbc7389cd4d6cead5b686c6;hb=636f7647b10e49d62d0b5244b8a233ed46a8630a;hp=f46afb9267f89b52ef1bf0c28c855fdeea0be638;hpb=2b8ffc98529637ffddfe7cbf6b4f9b8deb90f0fa;p=freeside.git
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index f46afb926..f10bec47b 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -4,50 +4,57 @@
+
-% #foreach my $svcpart (sort {$a->{svcpart} <=> $b->{svcpart}} @{$pkg->{svcparts}}) {
% foreach my $part_svc ( $cust_pkg->part_svc ) {
-% #foreach my $service (@{$svcpart->{services}}) {
-% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) {
-
-
- <% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %> |
- <% FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc) %> |
- <% FS::UI::Web::svc_export_links($m, $part_svc, $cust_svc) %> |
-
-
+% if ( $opt{'cust_pkg-large_pkg_size'} > 0 and
+% $opt{'cust_pkg-large_pkg_size'} <= $cust_pkg->num_svcs ) {
+% # summarize
-
-
- <% $cust_svc->overlimit ? "Overlimit: ". time2str('%b %o %Y' . ($conf->exists('cust_pkg-display_times') ? ' %l:%M %P' : ''), $cust_svc->overlimit) : '' %>
- |
+
+% my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart.
+% ";pkgnum=".$cust_pkg->pkgnum;
+ <% $part_svc->svc %>
+ (<% mt("view all [_1]", $cust_pkg->num_svcs) |h %>)
+% my $hint = $hints{$part_svc->svcdb};
+% if ( $hint ) {
+
+
+% } #$hint
+ |
-
-
-
-
-% if ( $curuser->access_right('Recharge customer service')
-% && $part_svc->svcdb eq 'svc_acct'
-% && ( $cust_svc->svc_x->seconds ne ''
-% || $cust_svc->svc_x->upbytes ne ''
-% || $cust_svc->svc_x->downbytes ne ''
-% || $cust_svc->svc_x->totalbytes ne ''
-% )
-% ) {
- ( <%svc_recharge_link($cust_svc)%> )
-% }
- |
-
-
-
-% if ( $curuser->access_right('Unprovision customer service') ) {
- ( <%svc_unprovision_link($cust_svc)%> )
-% }
- |
-
-% }
-
+% }
+% 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,
+ %opt,
+ 'part_svc' => $part_svc,
+ 'cust_svc' => $cust_svc,
+ 'cust_pkg' => $cust_pkg,
+ &>
+% }
+% else {
+ <& /elements/tr-cust_svc.html,
+ %opt,
+ 'part_svc' => $part_svc,
+ 'cust_svc' => $cust_svc,
+ 'cust_pkg' => $cust_pkg,
+ &>
+% } #if cancel > 0
+% } #foreach $cust_svc
+% } #if summarizing
% if ( ! $cust_pkg->get('cancel')
% && $curuser->access_right('Provision customer service')
% && $part_svc->num_avail
@@ -55,7 +62,11 @@
- <% svc_provision_link($cust_pkg, $part_svc, $conf, $curuser) %>
+ <% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
+% if ( $curuser->access_right('Bulk provision customer service')
+% && $part_svc->svcdb eq 'svc_phone' ) {
+ <% mt('Browse Received DID Inventory') |h %>
+% }
|
@@ -74,17 +85,18 @@ my $bgcolor = $opt{'bgcolor'};
my $cust_pkg = $opt{'cust_pkg'};
my $part_pkg = $opt{'part_pkg'};
my $curuser = $FS::CurrentUser::CurrentUser;
-my $conf = new FS::Conf;
+
+my $conf = new FS::Conf;
sub svc_provision_link {
- my ($cust_pkg, $part_svc, $conf, $curuser) = @_;
- ( my $svc_nbsp = $part_svc->svc ) =~ s/\s+/ /g;
+ 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. ';'.
"svcpart=". $part_svc->svcpart;
my $url;
if ( $part_svc->svcdb eq 'svc_external' #could be generalized
- && $conf->exists('svc_external-skip_manual')
+ && $opt->{'svc_external-skip_manual'}
) {
$url = "${p}edit/process/". $part_svc->svcdb. ".cgi?$pkgnum_svcpart";
} else {
@@ -94,27 +106,29 @@ sub svc_provision_link {
'part_svc' => $part_svc,
'query' => $pkgnum_svcpart,
);
- #$url = "${p}edit/$svcpart->{svcdb}.cgi?$pkgnum_svcpart";
}
my $link = qq!!.
- "Provision $svc_nbsp ($num_avail)";
- if ( $conf->exists('legacy_link')
+ emt("Provision [_1] ([_2])",$svc_nbsp,$num_avail).'';
+ if ( $opt->{'legacy_link'}
&& $curuser->access_right('View/link unlinked services')
)
{
$link .= ' '.
qq!!.
- "Link to legacy $svc_nbsp ($num_avail)";
+ emt("Link to legacy [_1] ([_2])",$svc_nbsp,$num_avail).'';
}
$link;
}
-sub svc_unprovision_link {
- my $cust_svc = shift or return '';
- qq!Unprovision!;
-}
+my %hints = (
+svc_acct => emt('(user or email)'),
+svc_domain => emt('(domain)'),
+svc_broadband => emt('(ip or mac)'),
+svc_forward => emt('(email)'),
+svc_phone => emt('(phone)'),
+svc_pbx => emt('(phone)'),
+);
%init>
|