summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorjeff <jeff>2007-04-26 04:47:16 +0000
committerjeff <jeff>2007-04-26 04:47:16 +0000
commit90734757a4a92e52ddf4775a79c7ba5446863e93 (patch)
tree8d744910ff803aa604a2fa7a997ca5e254572635 /FS
parentdfd4fb813a9a127b84b8dab517ff9b03d43fc5af (diff)
more datavolume format (backport)
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm12
-rw-r--r--FS/FS/svc_acct.pm8
2 files changed, 12 insertions, 8 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index ad73aaf55..c24917749 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -580,14 +580,14 @@ sub list_svcs {
'username' => $svc_x->username,
'email' => $svc_x->email,
'seconds' => $svc_x->seconds,
- 'upbytes' => $svc_x->upbytes,
- 'downbytes' => $svc_x->downbytes,
- 'totalbytes'=> $svc_x->totalbytes,
+ 'upbytes' => FS::UI::bytecount::display_bytecount($svc_x->upbytes),
+ 'downbytes' => FS::UI::bytecount::display_bytecount($svc_x->downbytes),
+ 'totalbytes'=> FS::UI::bytecount::display_bytecount($svc_x->totalbytes),
'recharge_amount' => $part_pkg->option('recharge_amount', 1),
'recharge_seconds' => $part_pkg->option('recharge_seconds', 1),
- 'recharge_upbytes' => $part_pkg->option('recharge_upbytes', 1),
- 'recharge_downbytes' => $part_pkg->option('recharge_downbytes', 1),
- 'recharge_totalbytes' => $part_pkg->option('recharge_totalbytes', 1),
+ 'recharge_upbytes' => FS::UI::bytecount::display_bytecount($part_pkg->option('recharge_upbytes', 1)),
+ 'recharge_downbytes' => FS::UI::bytecount::display_bytecount($part_pkg->option('recharge_downbytes', 1)),
+ 'recharge_totalbytes' => FS::UI::bytecount::display_bytecount($part_pkg->option('recharge_totalbytes', 1)),
# more...
};
}
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 015a9a474..135700d81 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -2317,8 +2317,12 @@ sub reached_threshold {
'last' => $cust_main->getfield('last'),
'pkg' => $cust_pkg->part_pkg->pkg,
'column' => $opt{'column'},
- 'amount' => $svc_acct->getfield($opt{'column'}),
- 'threshold' => $threshold,
+ 'amount' => $opt{'column'} =~/bytes/
+ ? FS::UI::bytecount::display_bytecount($svc_acct->getfield($opt{'column'}))
+ : $svc_acct->getfield($opt{'column'}),
+ 'threshold' => $opt{'column'} =~/bytes/
+ ? FS::UI::bytecount::display_bytecount($threshold)
+ : $threshold,
} );