[freeside-commits] freeside/FS/FS/cust_main Billing.pm,1.35,1.36

Erik Levinson levinse at wavetail.420.am
Tue Jul 5 21:15:38 PDT 2011


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

Modified Files:
	Billing.pm 
Log Message:
modify backdated payment application behaviour, RT11870

Index: Billing.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Billing.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -w -d -r1.35 -r1.36
--- Billing.pm	10 Jun 2011 03:33:43 -0000	1.35
+++ Billing.pm	6 Jul 2011 04:15:36 -0000	1.36
@@ -2147,11 +2147,14 @@
 
     my $amount = min( $payment->unapplied, $owed );
 
-    my $cust_bill_pay = new FS::cust_bill_pay ( {
+    my $cbp = {
       'paynum' => $payment->paynum,
       'invnum' => $cust_bill->invnum,
       'amount' => $amount,
-    } );
+    };
+    $cbp->{_date} = $payment->_date 
+        if $options{'manual'} && $options{'backdate_application'};
+    my $cust_bill_pay = new FS::cust_bill_pay($cbp);
     $cust_bill_pay->pkgnum( $payment->pkgnum )
       if $conf->exists('pkg-balances') && $payment->pkgnum;
     my $error = $cust_bill_pay->insert(%options);



More information about the freeside-commits mailing list