summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_acct.cgi
diff options
context:
space:
mode:
authorjeff <jeff>2007-12-06 16:51:47 +0000
committerjeff <jeff>2007-12-06 16:51:47 +0000
commit5ca1a5271823c4e3ffbd2f53a0dff62692619d2b (patch)
tree2721b6787d157f7ce9fc73cac33908b25b1a7b93 /httemplate/view/svc_acct.cgi
parent9e9708b5e98d5e5071bee9b3b51ea2de22f05179 (diff)
support display of negative time
Diffstat (limited to 'httemplate/view/svc_acct.cgi')
-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 971c6a4..8326818 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>