X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fview_usage.html;h=69437632b8395087cbceb789c021652e49350449;hp=40aec7bcfed65f5cde38d7c4a8b97ed2912bf3ea;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=dbb388836b7951a3db49deda05a1ff9ba5125c17 diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html index 40aec7bcf..69437632b 100644 --- a/fs_selfservice/FS-SelfService/cgi/view_usage.html +++ b/fs_selfservice/FS-SelfService/cgi/view_usage.html @@ -1,32 +1,33 @@ -MyAccount -MyAccount

-<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> - - -Service usage

- -
- - - - - - - - - - -<%= foreach my $svc ( @svcs ) { - my $totalbytes = ''; - if ( ($svc->{'upbytes'} + 0) eq $svc->{'upbytes'} - || ($svc->{'downbytes'} + 0) eq $svc->{'downbytes'} ) { - - $totalbytes = $svc->{'upbytes'} + $svc->{'downbytes'}; +<%= $url = "$selfurl?session=$session_id;action="; + @svc_acct = grep { $_->{svcdb} eq 'svc_acct' } @svcs; + @svc_phone = grep { $_->{svcdb} eq 'svc_phone' } @svcs; + ''; +%> +<%= include('header', 'Account usage') %> + +<%= if ( $error ) { + $OUT .= qq!$error

!; +} ''; %> + +<%= if ( @svc_acct ) { + $OUT.= '
AccountTime remainingUpload remainingDownload remainingTotal remaining
+ + + + + + + '; + } else { + $OUT .= ''; } +%> +<%= foreach my $svc ( @svc_acct ) { + my $link = "${url}view_usage_details;". + "svcnum=$svc->{'svcnum'};beginning=0;ending=0"; $OUT .= ''; - } %> + if ( $svc->{'recharge_amount'} ) { + my $link = "${url}process_order_recharge;". + "svcnum=$svc->{'svcnum'}"; + $OUT .= ''; + } + } +%> + +<%= scalar(@svc_acct) ? '
AccountTime remainingUpload remainingDownload remainingTotal remaining
'; - $OUT .= $svc->{'label'}. ': '. $svc->{'value'}; + $OUT .= qq!!. $svc->{'label'}. ': '. $svc->{'value'}.''; $OUT .= ''; $OUT .= $svc->{'seconds'}; $OUT .= ''; @@ -34,16 +35,51 @@ $OUT .= ''; $OUT .= $svc->{'downbytes'}; $OUT .= ''; - $OUT .= $totalbytes; + $OUT .= $svc->{'totalbytes'}; $OUT .= '
'; + $OUT .= qq!!.'Recharge for $'; + $OUT .= $svc->{'recharge_amount'} . ' with'; + $OUT .= ''; + $OUT .= $svc->{'recharge_seconds'} if $svc->{'recharge_seconds'}; + $OUT .= ''; + $OUT .= $svc->{'recharge_upbytes'} if $svc->{'recharge_upbytes'}; + $OUT .= ''; + $OUT .= $svc->{'recharge_downbytes'} if $svc->{'recharge_downbytes'}; + $OUT .= ''; + $OUT .= $svc->{'recharge_totalbytes'} if $svc->{'recharge_totalbytes'}; + $OUT .= '


' : '' %> - -
+<%= if ( @svc_phone ) { + $OUT.= 'Call usage

+ + + '; #"Account" ? + #what else? + $OUT .= ''; + } else { + $OUT .= ''; + } +%> + +<%= foreach my $svc_phone ( @svc_phone ) { + my $link = "${url}view_cdr_details;". + "svcnum=$svc_phone->{'svcnum'};beginning=0;ending=0"; + $OUT .= ''; + } +%> - +<%= scalar(@svc_phone) ? '
Number
'; + $OUT .= qq!!. $svc_phone->{'label'}. ': '. $svc_phone->{'value'}.''; + $OUT .= '


' : '' %> -
-powered by freeside - +<%= include('footer') %>