RT#42297: Show total usage on Selfservice View my usage page
[freeside.git] / fs_selfservice / FS-SelfService / cgi / view_usage.html
index 07ccfed..2b9eb8b 100644 (file)
       $OUT .= '</TR>';
     }
   }
+  if ((@bytes_svcs > 1) and (grep { $bytes_show{$_.'_used'} } qw(seconds upbytes downbytes totalbytes) )) {
+    $OUT .= '<TR>';
+    $OUT .= '<TH align="left">Total Used</TH>';
+    foreach my $field (@bytes_cols) {
+      if ($bytes_show{$field}) {
+        $OUT .= '<TD ALIGN="right">';
+        $OUT .= $bytes_used_total{$field} || '0' if $field =~ /_used$/;
+        $OUT .= '</TD>';
+      }
+    }
+    $OUT .= '</TR>';
+  }    
 %>
 
 <%= scalar(@bytes_svcs) ? '</TABLE><BR><BR>' : '' %>