projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
686ecf5
)
fix warnings on upgrade, #22121
author
Mark Wells
<mark@freeside.biz>
Fri, 22 Mar 2013 21:52:14 +0000
(14:52 -0700)
committer
Mark Wells
<mark@freeside.biz>
Fri, 22 Mar 2013 21:52:14 +0000
(14:52 -0700)
FS/FS/cust_pay.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pay.pm
b/FS/FS/cust_pay.pm
index
fa5672c
..
6d09f89
100644
(file)
--- a/
FS/FS/cust_pay.pm
+++ b/
FS/FS/cust_pay.pm
@@
-1033,13
+1033,17
@@
sub _upgrade_data { #class method
# not only cust_pay, but also voided and refunded payments
if (!FS::upgrade_journal->is_done('cust_pay__parse_paybatch_1')) {
# not only cust_pay, but also voided and refunded payments
if (!FS::upgrade_journal->is_done('cust_pay__parse_paybatch_1')) {
+ local $FS::Record::nowarn_classload=1;
# really inefficient, but again, only has to run once
foreach my $table (qw(cust_pay cust_pay_void cust_refund)) {
# really inefficient, but again, only has to run once
foreach my $table (qw(cust_pay cust_pay_void cust_refund)) {
+ my $and_batchnum_is_null =
+ ( $table =~ /^cust_pay/ ? ' AND batchnum IS NULL' : '' );
foreach my $object ( qsearch({
table => $table,
extra_sql => "WHERE payby IN('CARD','CHEK') ".
"AND (paybatch IS NOT NULL ".
foreach my $object ( qsearch({
table => $table,
extra_sql => "WHERE payby IN('CARD','CHEK') ".
"AND (paybatch IS NOT NULL ".
- "OR (paybatch IS NULL AND auth IS NULL) )",
+ "OR (paybatch IS NULL AND auth IS NULL
+ $and_batchnum_is_null ) )",
}) )
{
if ( $object->paybatch eq '' ) {
}) )
{
if ( $object->paybatch eq '' ) {