X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_acct.cgi;h=30480d1e82ac62866436a77dab799307602298f2;hb=b4206f7dd4e3f00b1fac73245ade1d28388f2ad3;hp=e86d43f306d99e7dca7f36ebdde954334b2ddd91;hpb=62e07cc34e38055a59ce160e1c06fcc5edb26927;p=freeside.git
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index e86d43f30..30480d1e8 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -78,6 +78,13 @@ if ( $part_svc->part_export('sqlradius') ) {
my $m = int( ($seconds%3600) / 60 );
my $s = $seconds%60;
+ my $input = $svc_acct->attribute_since_sqlradacct(
+ $last_bill, time, 'AcctInputOctets'
+ ) / 1048576;
+ my $output = $svc_acct->attribute_since_sqlradacct(
+ $last_bill, time, 'AcctOutputOctets'
+ ) / 1048576;
+
if ( $seconds ) {
print "Online $hh $mm $ss";
} else {
@@ -86,11 +93,16 @@ if ( $part_svc->part_export('sqlradius') ) {
if ( $cust_pkg ) {
print ' this billing cycle (since '. time2str("%C", $last_bill). ') - '.
- $plandata{recur_included_hours}. ' total hours in plan
';
+ $plandata{recur_included_hours}. ' total hours in plan
';
} else {
- print ' (no billing cycle available for unaudited account)
';
+ print ' (no billing cycle available for unaudited account)
';
}
+ print 'Input: '. sprintf("%.3f", $input). ' megabytes
';
+ print 'Output: '. sprintf("%.3f", $output). ' megabytes
';
+
+ print '
';
+
}
#print qq!
Send account information!;
@@ -183,7 +195,7 @@ print 'RADIUS groups | '.
print ' |
';
-print join("\n", $conf->config('svc_acct-notes') ). '
'.
+print join("\n", $conf->config('svc_acct-notes') ). '
'.
joblisting({'svcnum'=>$svcnum}, 1). '