freeside/FS/FS cust_pay.pm,1.39,1.40
Ivan Kohler
ivan at pouncequick.420.am
Wed Jun 8 17:18:38 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv19950
Modified Files:
cust_pay.pm
Log Message:
add ignore_noapply flag to make sure payments are forced in anyway on import
Index: cust_pay.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- cust_pay.pm 3 May 2005 09:56:41 -0000 1.39
+++ cust_pay.pm 9 Jun 2005 00:18:35 -0000 1.40
@@ -1,7 +1,7 @@
package FS::cust_pay;
use strict;
-use vars qw( @ISA $conf $unsuspendauto );
+use vars qw( @ISA $conf $unsuspendauto $ignore_noapply );
use Date::Format;
use Business::CreditCard;
use Text::Template;
@@ -15,6 +15,8 @@
@ISA = qw( FS::Record );
+$ignore_noapply = 0;
+
#ask FS::UID to run this stuff for us later
FS::UID->install_callback( sub {
$conf = new FS::Conf;
@@ -134,8 +136,13 @@
};
$error = $cust_bill_pay->insert;
if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return "error inserting $cust_bill_pay: $error";
+ if ( $ignore_noapply ) {
+ warn "warning: error inserting $cust_bill_pay: $error ".
+ "(ignore_noapply flag set; inserting cust_pay record anyway)\n";
+ } else {
+ $dbh->rollback if $oldAutoCommit;
+ return "error inserting $cust_bill_pay: $error";
+ }
}
}
More information about the freeside-commits
mailing list