summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorjeff <jeff>2007-04-26 04:46:32 +0000
committerjeff <jeff>2007-04-26 04:46:32 +0000
commit4e35589e637aa3a3615a780d4086085c5ecb1782 (patch)
tree53598725c2a675a654474b8d427fd4af2c8c16b4 /FS
parenteb78293f2d7bda5e3a59b110b0a813a244e2fce9 (diff)
more datavolume format
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 1e34ff03c..d94673b88 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -2485,8 +2485,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,
} );