From 378fc3c26eff1e53422284cb49fb21b3cd9c3e33 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 3 Nov 2008 01:10:25 +0000 Subject: [PATCH] time remaining is more useful to display as hours + minutes than days, hours, minutes from Time::Duration --- httemplate/view/svc_acct.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 #<% $svcnum %> % 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); <% $ulabel{$uf} %> remaining -- 2.11.0