summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2007-12-06 16:51:31 +0000
committerjeff <jeff>2007-12-06 16:51:31 +0000
commitd129793270ce86edc3ae9c1428db4a6cfdaa3a6d (patch)
treee33ab40007b565a1678c0a7d3a8525fbef6a1177
parent110dc3294595ace9851918241d20c70fa24d1114 (diff)
support display of negative time
-rwxr-xr-xhttemplate/view/svc_acct.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index 971c6a4ae..8326818d6 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -253,8 +253,9 @@ Service #<B><% $svcnum %></B>
% foreach my $uf ( keys %ulabel ) {
% my $tf = $uf . "_threshold";
% if ( $svc_acct->$uf ne '' ) {
-% my $v = $uf eq 'seconds' ? duration_exact($svc_acct->$uf)
-% : FS::UI::bytecount::display_bytecount($svc_acct->$uf);
+% my $v = $uf eq 'seconds'
+% ? (($svc_acct->$uf < 0 ? '-' : ''). duration_exact($svc_acct->$uf) )
+% : FS::UI::bytecount::display_bytecount($svc_acct->$uf);
<TR>
<TD ALIGN="right"><% $ulabel{$uf} %> remaining</TD>
<TD BGCOLOR="#ffffff"><% $v %></TD>