From: jeff Date: Thu, 6 Dec 2007 16:51:31 +0000 (+0000) Subject: support display of negative time X-Git-Tag: freeside_1_7_3rc1~219 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=d129793270ce86edc3ae9c1428db4a6cfdaa3a6d;p=freeside.git support display of negative time --- 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 #<% $svcnum %> % 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); <% $ulabel{$uf} %> remaining <% $v %>