summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-11-03 01:10:26 +0000
committerivan <ivan>2008-11-03 01:10:26 +0000
commit2620c8c4fb88ce038e075c9213ae4c8a4ce06a77 (patch)
tree75567bc01bfa0723f1a447abaf727906194013b8
parent0dd14cb683e858f490cbd3379e7cafbd78183b83 (diff)
time remaining is more useful to display as hours + minutes than days, hours, minutes from Time::Duration
-rwxr-xr-xhttemplate/view/svc_acct.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index e6d2b690f..ec22bd0bc 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -260,7 +260,10 @@ Service #<B><% $svcnum %></B>
% 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 ? '-' : ''). 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>