X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fview_usage.html;h=b492102ce02b96c2b05eea80fb96d93640d4ca92;hb=116ae8901c51a8e491de6c69d3e55d65369166d5;hp=b78f9975b3e29ffed5218d9e9c75b9d2c35323e4;hpb=8e219ac3d60ba254c9bbc40adfeb2ebe40fd2b5f;p=freeside.git
diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html
index b78f9975b..b492102ce 100644
--- a/fs_selfservice/FS-SelfService/cgi/view_usage.html
+++ b/fs_selfservice/FS-SelfService/cgi/view_usage.html
@@ -1,24 +1,30 @@
-
MyAccount
-MyAccount
-<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('myaccount_menu') %>
-
-
-Service usage
+<%= $url = "$selfurl?session=$session_id;action=";
+ @svc_acct = grep { $_->{svcdb} eq 'svc_acct' } @svcs;
+ @svc_phone = grep { $_->{svcdb} eq 'svc_phone' } @svcs;
+ '';
+%>
+<%= include('header') %>
<%= if ( $error ) {
$OUT .= qq!$error
!;
} ''; %>
-
-
- Account |
- Time remaining |
- Upload remaining |
- Download remaining |
- Total remaining |
-
-<%= foreach my $svc ( @svcs ) {
+<%= if ( @svc_acct ) {
+ $OUT.= 'Account usage
+
+
+ Account |
+ Time remaining |
+ Upload remaining |
+ Download remaining |
+ Total remaining |
+ ';
+ } else {
+ $OUT .= '';
+ }
+%>
+
+<%= foreach my $svc ( @svc_acct ) {
my $link = "${url}view_usage_details;".
"svcnum=$svc->{'svcnum'};beginning=0;ending=0";
$OUT .= '';
@@ -48,11 +54,33 @@
$OUT .= $svc->{'recharge_totalbytes'} if $svc->{'recharge_totalbytes'};
$OUT .= ' | ';
}
- } %>
+ }
+%>
-
-
+<%= scalar(@svc_acct) ? '
' : '' %>
- |
+<%= if ( @svc_phone ) {
+ $OUT.= 'Call usage
+
+
+ Number | '; #"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 .= '';
+ $OUT .= qq!!. $svc_phone->{'label'}. ': '. $svc_phone->{'value'}.'';
+ $OUT .= ' |
';
+ }
+%>
+
+<%= scalar(@svc_phone) ? '
' : '' %>
+
+
<%= include('footer') %>