X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_acct.cgi;h=2ad9b8ef9339174a3eafc5b47478d91f462b7f6a;hb=0dd05e9ff98263d2d42b419b1e278a5a3bc594b2;hp=86478681c8e4f6c716198d7cfdca8688270c5e1b;hpb=b611f02e479f4a7f9840f59f773d282b1c13b62f;p=freeside.git diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 86478681c..2ad9b8ef9 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -245,17 +245,19 @@ Service #<% $svcnum %> % } -% my %ulabel = ( seconds => 'Seconds', +% my %ulabel = ( seconds => 'Time', % upbytes => 'Upload bytes', % downbytes => 'Download bytes', % totalbytes => 'Total bytes', % ); % foreach my $uf ( keys %ulabel ) { % my $tf = $uf . "_threshold"; -% if ( $svc_acct->$tf ne '' ) { +% if ( $svc_acct->$uf ne '' ) { +% my $v = $uf eq 'seconds' ? duration_exact($svc_acct->$uf) +% : FS::UI::Web::display_bytecount($svc_acct->$uf); <% $ulabel{$uf} %> remaining - <% $svc_acct->$uf %> + <% $v %> % } @@ -286,13 +288,6 @@ Service #<% $svcnum %> RADIUS groups <% join('
', $svc_acct->radius_groups) %> -% if ( $svc_acct->seconds =~ /^\d+$/ ) { - - - Prepaid time - <% duration_exact($svc_acct->seconds) %> - -% } % %# Can this be abstracted further? Maybe a library function like %# widget('HTML', 'view', $svc_acct) ? It would definitely make UI