summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorjeff <jeff>2007-12-23 22:05:54 +0000
committerjeff <jeff>2007-12-23 22:05:54 +0000
commita35faaccc20e2214d91876744c45322a3a220bb5 (patch)
tree8a4a092bb292b71d59a194c6e4cccfa47630602c /httemplate
parenta6ae5144ce937bf2a86734543f4ea396758e07fb (diff)
add a reset feature to manual recharges (#1858)
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/misc/process/recharge_svc.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/httemplate/misc/process/recharge_svc.html b/httemplate/misc/process/recharge_svc.html
index bc916e5da..e540c385c 100755
--- a/httemplate/misc/process/recharge_svc.html
+++ b/httemplate/misc/process/recharge_svc.html
@@ -40,7 +40,8 @@
% } elsif ( $payby =~ /^(CARD|DCRD|CHEK|DCHK|LECB|BILL|COMP)$/ ) {
% my $part_pkg = $svc_acct->cust_svc->cust_pkg->part_pkg;
% $amount = $part_pkg->option('recharge_amount', 1);
-% my %rhash = map { $_ =~ /^recharge_(.*)$/; $1, $part_pkg->option($_, 1) }
+% my %rhash = map { $_ =~ /^recharge_(.*)$/; $1, $part_pkg->option($_) }
+% grep { $part_pkg->option($_, 1) }
% qw ( recharge_seconds recharge_upbytes recharge_downbytes
% recharge_totalbytes );
%
@@ -53,7 +54,11 @@
% $error = $cust_main->charge($amount, "Recharge " . $svc_acct->label,
% $description, $part_pkg->taxclass);
%
-% $error ||= $svc_acct->recharge(\%rhash);
+% if ($part_pkg->option('recharge_reset', 1)) {
+% $error ||= $svc_acct->set_usage(\%rhash);
+% }else{
+% $error ||= $svc_acct->recharge(\%rhash);
+% }
%
% my $old_balance = $cust_main->balance;
% $error ||= $cust_main->bill;