diff options
Diffstat (limited to 'httemplate/view/svc_acct/usage.html')
-rw-r--r-- | httemplate/view/svc_acct/usage.html | 27 |
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> |