projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7ca7fe
)
add ignore_noapply flag to make sure payments are forced in anyway on import
author
ivan
<ivan>
Thu, 9 Jun 2005 00:18:35 +0000
(
00:18
+0000)
committer
ivan
<ivan>
Thu, 9 Jun 2005 00:18:35 +0000
(
00:18
+0000)
FS/FS/cust_pay.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pay.pm
b/FS/FS/cust_pay.pm
index
201ada9
..
ccf991d
100644
(file)
--- a/
FS/FS/cust_pay.pm
+++ b/
FS/FS/cust_pay.pm
@@
-1,7
+1,7
@@
package FS::cust_pay;
use strict;
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;
use Date::Format;
use Business::CreditCard;
use Text::Template;
@@
-15,6
+15,8
@@
use FS::cust_pay_void;
@ISA = qw( FS::Record );
@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;
#ask FS::UID to run this stuff for us later
FS::UID->install_callback( sub {
$conf = new FS::Conf;
@@
-134,8
+136,13
@@
sub insert {
};
$error = $cust_bill_pay->insert;
if ( $error ) {
};
$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";
+ }
}
}
}
}