From dbb388836b7951a3db49deda05a1ff9ba5125c17 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 30 Nov 2006 02:27:57 +0000 Subject: prepaid download/upload tracking --- httemplate/view/cust_main/packages.html | 34 ++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index f93a0764b..0a386f265 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -343,17 +343,31 @@ Current packages % foreach my $service (@{$svcpart->{services}}) { - <%svc_link($svcpart,$service)%> + <%svc_link($svcpart,$service)%> <%svc_label_link($svcpart,$service)%> -% if ( $curuser->access_right('Unprovision customer service') ) { - - ( <%svc_unprovision_link($service)%> ) - + -% } +% if ( $curuser->access_right('Recharge customer service') +% && ($svcpart->{'svcdb'} eq 'svc_acct') +% && ($service->{seconds} ne '' +% || $service->{upbytes} ne '' +% || $service->{downbytes} ne '' +% || $service->{totalbytes} ne '' ) +% ) { + ( <%svc_recharge_link($service)%> ) +% } + + + + +% if ( $curuser->access_right('Unprovision customer service') ) { + ( <%svc_unprovision_link($service)%> ) +% } + + % } % if ( ! $pkg->{'cancel'} @@ -371,7 +385,6 @@ Current packages % } - % } #end display packages @@ -440,6 +453,7 @@ Current packages % my $svc = { % 'svcnum' => $cust_svc->svcnum, % 'label' => ($cust_svc->label)[1], +% $cust_svc->svc_x->hash, % }; % % #false laziness with above, to catch extraneous services. whole @@ -516,6 +530,12 @@ Current packages % qq!'Permanently unprovision and delete this service?')">Unprovision!; %} % +%sub svc_recharge_link { +% my $svc = shift or return ''; +% +% qq!Recharge!; +%} +% %# This should be generalized to use config options to determine order. %sub pkgsort_pkgnum_cancel { % if ($a->{cancel} and $b->{cancel}) { -- cgit v1.2.1