summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_acct/usage.html
diff options
context:
space:
mode:
authorivan <ivan>2010-02-20 22:34:58 +0000
committerivan <ivan>2010-02-20 22:34:58 +0000
commit7c4c6e090b363b84c2b01e7c7d49c6823d5d376f (patch)
tree1ab97f6d29de66b25360a0cf07120ac5701e38b4 /httemplate/view/svc_acct/usage.html
parentd8ec509e462ab968884b87ebd2c12cc357542299 (diff)
communigate pro provisioning, RT#7083
Diffstat (limited to 'httemplate/view/svc_acct/usage.html')
-rw-r--r--httemplate/view/svc_acct/usage.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/view/svc_acct/usage.html b/httemplate/view/svc_acct/usage.html
new file mode 100644
index 000000000..9758d8332
--- /dev/null
+++ b/httemplate/view/svc_acct/usage.html
@@ -0,0 +1,27 @@
+% my %ulabel = ( seconds => 'Time',
+% upbytes => 'Upload bytes',
+% downbytes => 'Download bytes',
+% totalbytes => 'Total bytes',
+% );
+% foreach my $uf ( keys %ulabel ) {
+% my $tf = $uf . "_threshold";
+% if ( $svc_acct->$uf ne '' ) {
+% my $v = $uf eq 'seconds'
+% #? (($svc_acct->$uf < 0 ? '-' : ''). duration_exact($svc_acct->$uf) )
+% ? ($svc_acct->$uf < 0 ? '-' : '').
+% int(abs($svc_acct->$uf)/3600). "hr ".
+% sprintf("%02d",(abs($svc_acct->$uf)%3600)/60). "min"
+% : FS::UI::bytecount::display_bytecount($svc_acct->$uf);
+ <TR>
+ <TD ALIGN="right"><% $ulabel{$uf} %> remaining</TD>
+ <TD BGCOLOR="#ffffff"><% $v %></TD>
+ </TR>
+
+% }
+% }
+<%init>
+
+my %opt = @_;
+my $svc_acct = $opt{'svc_acct'};
+
+</%init>