[freeside-commits] freeside/FS/FS pay_batch.pm,1.26.2.5,1.26.2.6

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


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

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	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.26.2.5
retrieving revision 1.26.2.6
diff -u -w -d -r1.26.2.5 -r1.26.2.6
--- pay_batch.pm	9 Feb 2011 23:09:06 -0000	1.26.2.5
+++ pay_batch.pm	10 Feb 2011 06:08:38 -0000	1.26.2.6
@@ -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