[freeside-commits] freeside/httemplate/misc/process recharge_svc.html, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Wed Apr 11 19:27:39 PDT 2007
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.44.2.2, 1.44.2.3 cust_svc.pm, 1.66, 1.66.2.1 svc_acct.pm, 1.217.2.4, 1.217.2.5 svc_Common.pm, 1.39, 1.39.2.1 cust_pkg.pm, 1.73.2.1, 1.73.2.2
- Next message: [freeside-commits] freeside/httemplate/misc/process recharge_svc.html, 1.2.2.1, 1.2.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail:/tmp/cvs-serv4369
Modified Files:
recharge_svc.html
Log Message:
remove 'backend-realtime' flag required for recharges, want that just for signups, running recharges right away by default is fine. also fix the 'fatal error - unknown payby' error that'll probably never be reached
Index: recharge_svc.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/recharge_svc.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- recharge_svc.html 9 Apr 2007 23:38:27 -0000 1.3
+++ recharge_svc.html 12 Apr 2007 02:27:36 -0000 1.4
@@ -28,7 +28,8 @@
%
%unless ($error) {
%
-%my ($amount, $seconds, $up, $down, $total) = (0, 0, 0, 0, 0);
+% my ($amount, $seconds, $up, $down, $total) = (0, 0, 0, 0, 0);
+% #should probably use payby.pm but whatever
% if ($payby eq 'PREP') {
% $error = $cust_main->get_prepay($prepaid, \$amount, \$seconds, \$up, \$down, \$total)
% || $svc_acct->increment_seconds($seconds)
@@ -36,7 +37,7 @@
% || $svc_acct->increment_downbytes($down)
% || $svc_acct->increment_totalbytes($total)
% || $cust_main->insert_cust_pay_prepay( $amount, $prepaid );
-% }elsif ($payby =~ /^(CARD|DCRD|CHEK|DCHK|LECB|BILL|COMP)$/) {
+% } 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) }
@@ -54,17 +55,16 @@
%
% $error ||= $svc_acct->recharge(\%rhash);
%
-% if ($conf->exists('backend-realtime')) {
-% my $old_balance = $cust_main->balance;
-% $error ||= $cust_main->bill;
-% $cust_main->apply_payments_and_credits unless $error;
-% my $bill_error = $cust_main->collect('realtime' => 1) unless $error;
-% $error ||= "Failed to collect - $bill_error"
-% if ($cust_main->balance > $old_balance && $cust_main->balance > 0
-% && $payby ne 'BILL');
-% }
-% }else{
-$ $error "fatal error - unknown payby: $payby";
+% my $old_balance = $cust_main->balance;
+% $error ||= $cust_main->bill;
+% $cust_main->apply_payments_and_credits unless $error;
+% my $bill_error = $cust_main->collect('realtime' => 1) unless $error;
+% $error ||= "Failed to collect - $bill_error"
+% if $cust_main->balance > $old_balance && $cust_main->balance > 0
+% && $payby ne 'BILL';
+%
+% } else {
+% $error = "fatal error - unknown payby: $payby";
% }
%}
%
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.44.2.2, 1.44.2.3 cust_svc.pm, 1.66, 1.66.2.1 svc_acct.pm, 1.217.2.4, 1.217.2.5 svc_Common.pm, 1.39, 1.39.2.1 cust_pkg.pm, 1.73.2.1, 1.73.2.2
- Next message: [freeside-commits] freeside/httemplate/misc/process recharge_svc.html, 1.2.2.1, 1.2.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list