summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/misc/recharge_svc.html22
1 files changed, 19 insertions, 3 deletions
diff --git a/httemplate/misc/recharge_svc.html b/httemplate/misc/recharge_svc.html
index 9373b825c..634be0600 100755
--- a/httemplate/misc/recharge_svc.html
+++ b/httemplate/misc/recharge_svc.html
@@ -69,15 +69,31 @@ die "No such service: $svcnum" unless $cust_svc;
$payby = $cust_svc->cust_pkg->cust_main->payby unless $payby;
$part_pkg = $cust_svc->cust_pkg->part_pkg;
$amount = $part_pkg->option('recharge_amount', 1) || 0;
+
my $recharge_label = "Charge $money_char$amount for ";
+
$recharge_label .= $part_pkg->option('recharge_seconds', 1) . 's '
if $part_pkg->option('recharge_seconds', 1);
-$recharge_label .= $part_pkg->option('recharge_upbytes', 1) . ' up '
+
+
+$recharge_label .= FS::UI::bytecount::display_bytecount(
+ $part_pkg->option('recharge_upbytes', 1) )
+ . ' up '
if $part_pkg->option('recharge_upbytes', 1);
-$recharge_label .= $part_pkg->option('recharge_downbytes', 1) . ' down '
+
+
+$recharge_label .= FS::UI::bytecount::display_bytecount(
+ $part_pkg->option('recharge_downbytes', 1) )
+ . ' down '
if $part_pkg->option('recharge_downbytes', 1);
-$recharge_label .= $part_pkg->option('recharge_totalbytes', 1) . ' total '
+
+
+$recharge_label .= FS::UI::bytecount::display_bytecount(
+ $part_pkg->option('recharge_totalbytes', 1) )
+ . ' total '
if $part_pkg->option('recharge_totalbytes', 1);
+
+
$recharge_label = ''
unless ($recharge_label ne "Charge $money_char$amount for ");