[freeside-commits] freeside/httemplate/misc/process recharge_svc.html, 1.8, 1.9

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Mar 23 16:33:07 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv28271/httemplate/misc/process

Modified Files:
	recharge_svc.html 
Log Message:
more DTRT with usage on service transfer between packages and recharges  RT #2884, #5040 + #4995 fallout

Index: recharge_svc.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/recharge_svc.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- recharge_svc.html	15 Mar 2009 10:34:30 -0000	1.8
+++ recharge_svc.html	23 Mar 2009 23:33:04 -0000	1.9
@@ -1,6 +1,6 @@
 %if ($error) {
 %  $cgi->param('error', $error);
-<% cgi->redirect(popurl(2). "recharge_svc.html?". $cgi->query_string ) %>
+<% $cgi->redirect(popurl(2). "recharge_svc.html?". $cgi->query_string ) %>
 %} else {
 <% header("Package recharged") %>
   <SCRIPT TYPE="text/javascript">
@@ -47,7 +47,7 @@
     $error = $cust_main->recharge_prepay( $prepaid );
   } 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 $amount = $part_pkg->option('recharge_amount', 1);
     my %rhash = map { $_ =~ /^recharge_(.*)$/; $1, $part_pkg->option($_) }
       grep { $part_pkg->option($_, 1) }
       qw ( recharge_seconds recharge_upbytes recharge_downbytes
@@ -63,7 +63,7 @@
                                 $description, $part_pkg->taxclass);
 
     if ($part_pkg->option('recharge_reset', 1)) {
-      $error ||= $svc_acct->set_usage(\%rhash);
+      $error ||= $svc_acct->set_usage(\%rhash, 'null' => 1);
     }else{
       $error ||= $svc_acct->recharge(\%rhash);
     }



More information about the freeside-commits mailing list