[freeside-commits] freeside/FS/FS pay_batch.pm,1.31,1.32

Mark Wells mark at wavetail.420.am
Wed Feb 9 22:08:32 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv18301

Modified Files:
	pay_batch.pm 
Log Message:
fix batch payment recording again

Index: pay_batch.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/pay_batch.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -w -d -r1.31 -r1.32
--- pay_batch.pm	9 Feb 2011 23:08:41 -0000	1.31
+++ pay_batch.pm	10 Feb 2011 06:08:30 -0000	1.32
@@ -354,14 +354,14 @@
 
     &{$hook}(\%hash, $cust_pay_batch->hashref);
 
-    my $new_cust_pay_batch = new FS::cust_pay_batch { 
-      $cust_pay_batch->hash, 
-      %hash 
-    };
+    my $new_cust_pay_batch = new FS::cust_pay_batch { $cust_pay_batch->hash };
 
     my $error = '';
     if ( &{$approved_condition}(\%hash) ) {
 
+      foreach ('paid', '_date', 'payinfo') {
+        $new_cust_pay_batch->$_($hash{$_}) if $hash{$_};
+      }
       $error = $new_cust_pay_batch->approve($hash{'paybatch'} || $self->batchnum);
       $total += $hash{'paid'};
 



More information about the freeside-commits mailing list