1 % my %ulabel = ( seconds => 'Time',
2 % upbytes => 'Upload bytes',
3 % downbytes => 'Download bytes',
4 % totalbytes => 'Total bytes',
6 % foreach my $uf ( keys %ulabel ) {
7 % my $tf = $uf . "_threshold";
8 % if ( $svc_acct->$uf ne '' ) {
9 % my $v = $uf eq 'seconds'
10 % #? (($svc_acct->$uf < 0 ? '-' : ''). duration_exact($svc_acct->$uf) )
11 % ? ($svc_acct->$uf < 0 ? '-' : '').
12 % int(abs($svc_acct->$uf)/3600). "hr ".
13 % sprintf("%02d",(abs($svc_acct->$uf)%3600)/60). "min"
14 % : FS::UI::bytecount::display_bytecount($svc_acct->$uf);
16 <TD ALIGN="right"><% $ulabel{$uf} %> remaining</TD>
17 <TD BGCOLOR="#ffffff"><% $v %></TD>
25 my $svc_acct = $opt{'svc_acct'};