X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fview_usage_details.html;h=74a4c3d12c8596a412dcd4f554c240f3d68a9aae;hb=b023b9a96799ee2ad11abc0c23fcaf33a8bf12ca;hp=9067755b08440e35144acf6fd9a73c2839c7435d;hpb=66bf9d2b3998894588d73a10a459aa1453283ef1;p=freeside.git
diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html
index 9067755b0..74a4c3d12 100644
--- a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html
+++ b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html
@@ -4,7 +4,10 @@
<%= include('myaccount_menu') %>
-Service usage details
+Service usage details for
+<%= Date::Format::time2str('%b %o %Y', $beginning) %> -
+<%= Date::Format::time2str('%b %o %Y', $ending) %>
+
<%= if ( $error ) {
$OUT .= qq!$error
!;
@@ -35,8 +38,12 @@
| Account |
Start Time |
Duration |
+ Upload |
+ Download |
<%= my $total = 0;
+ my $utotal = 0;
+ my $dtotal = 0;
foreach my $usage ( @usage ) {
$OUT .= '';
$OUT .= $usage->{'username'};
@@ -49,13 +56,26 @@
my $m = sprintf("%02d", int(($duration % 3600) / 60));
my $s = sprintf("%02d", $duration % 60);
$OUT .= "$h:$m:$s";
+ $OUT .= ' | ';
+ $OUT .= Number::Format::format_bytes($usage->{'acctinputoctets'}, precision => 2);
+ $utotal += $usage->{'acctinputoctets'};
+ $OUT .= ' | ';
+ $OUT .= Number::Format::format_bytes($usage->{'acctoutputoctets'}, precision => 2);
+ $dtotal += $usage->{'acctoutputoctets'};
$OUT .= ' |
';
}
my $h = int($total/3600);
my $m = sprintf("%02d", int(($total % 3600) / 60));
my $s = sprintf("%02d", $total % 60);
- $OUT .= qq! | | ======== |
!;
- $OUT .= qq! | | $h:$m:$s |
!; %>
+ $OUT .= qq! | | !;
+ $OUT .= qq!
| ! x 3;
+ $OUT .= qq!
!;
+ $OUT .= qq! | | $h:$m:$s | !;
+ $OUT .= qq!!;
+ $OUT .= Number::Format::format_bytes($utotal, precision => 2). qq! | !;
+ $OUT .= qq!!;
+ $OUT .= Number::Format::format_bytes($dtotal, precision => 2). qq! | !;
+ $OUT .= qq!
!; %>