projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4ceced
)
error on batch insert is returned to user, not fatal, RT#75998
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 30 May 2017 21:56:39 +0000
(14:56 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 30 May 2017 21:56:39 +0000
(14:56 -0700)
FS/FS/cust_main/Billing_Batch.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main/Billing_Batch.pm
b/FS/FS/cust_main/Billing_Batch.pm
index
d8ae3b4
..
38d100e
100644
(file)
--- a/
FS/FS/cust_main/Billing_Batch.pm
+++ b/
FS/FS/cust_main/Billing_Batch.pm
@@
-89,7
+89,7
@@
sub batch_card {
#this needs to handle mysql as well as Pg, like svc_acct.pm
#(make it into a common function if folks need to do batching with mysql)
$dbh->do("LOCK TABLE pay_batch IN SHARE ROW EXCLUSIVE MODE")
#this needs to handle mysql as well as Pg, like svc_acct.pm
#(make it into a common function if folks need to do batching with mysql)
$dbh->do("LOCK TABLE pay_batch IN SHARE ROW EXCLUSIVE MODE")
- or
return
"Cannot lock pay_batch: " . $dbh->errstr;
+ or
die
"Cannot lock pay_batch: " . $dbh->errstr;
my %pay_batch = (
'status' => 'O',
my %pay_batch = (
'status' => 'O',
@@
-157,7
+157,8
@@
sub batch_card {
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
- die $error;
+ #die $error;
+ return $error; # e.g. "Illegal zip" ala RT#75998
}
my $unapplied = $self->total_unapplied_credits
}
my $unapplied = $self->total_unapplied_credits