[freeside-commits] branch FREESIDE_4_BRANCH updated. 3f11a5e5c2026eb23eeed1eab780c95279062576
Ivan
ivan at 420.am
Fri Feb 12 10:54:29 PST 2016
The branch, FREESIDE_4_BRANCH has been updated
via 3f11a5e5c2026eb23eeed1eab780c95279062576 (commit)
via 4977f664e214c799a4cfb65dc023daaa0bfd51dc (commit)
from 64cd32971341855c3d5e9dee9bf0a1e149eba740 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3f11a5e5c2026eb23eeed1eab780c95279062576
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Feb 12 10:54:26 2016 -0800
payby upgrade first so other cust_main->replace operations don't error out, RT#32043
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index f0a152b..d6c7754 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -5502,7 +5502,8 @@ sub _upgrade_data { #class method
local(@encrypted_fields) = ();
local($FS::cust_payby::ignore_expired_card) = 1;
- local($FS::cust_payby::ignore_banned_card) = 1;
+ local($FS::cust_payby::ignore_banned_card) = 1;
+ local($FS::cust_payby::ignore_cardtype) = 1;
my @payfields = qw( payby payinfo paycvv paymask
paydate paystart_month paystart_year payissue
@@ -5524,7 +5525,6 @@ sub _upgrade_data { #class method
map { $_ => $cust_main->$_(); } @payfields
};
- local($FS::cust_payby::ignore_cardtype) = 1;
my $error = $cust_payby->insert;
die $error if $error;
commit 4977f664e214c799a4cfb65dc023daaa0bfd51dc
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Feb 12 10:52:49 2016 -0800
payby upgrade first so other cust_main->replace operations don't error out, RT#32043
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 0a76528..f0a152b 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -5496,27 +5496,6 @@ sub _upgrade_data { #class method
local($skip_fuzzyfiles) = 1;
local($import) = 1; #prevent automatic geocoding (need its own variable?)
- FS::cust_main::Location->_upgrade_data(%opts);
-
- unless ( FS::upgrade_journal->is_done('cust_main__trimspaces') ) {
-
- foreach my $cust_main ( qsearch({
- 'table' => 'cust_main',
- 'hashref' => {},
- 'extra_sql' => 'WHERE '.
- join(' OR ',
- map "$_ LIKE ' %' OR $_ LIKE '% ' OR $_ LIKE '% %'",
- qw( first last company )
- ),
- }) ) {
- my $error = $cust_main->replace;
- die $error if $error;
- }
-
- FS::upgrade_journal->set_done('cust_main__trimspaces');
-
- }
-
unless ( FS::upgrade_journal->is_done('cust_main__cust_payby') ) {
#we don't want to decrypt them, just stuff them as-is into cust_payby
@@ -5545,6 +5524,7 @@ sub _upgrade_data { #class method
map { $_ => $cust_main->$_(); } @payfields
};
+ local($FS::cust_payby::ignore_cardtype) = 1;
my $error = $cust_payby->insert;
die $error if $error;
@@ -5582,6 +5562,27 @@ sub _upgrade_data { #class method
FS::upgrade_journal->set_done('cust_main__cust_payby');
}
+ FS::cust_main::Location->_upgrade_data(%opts);
+
+ unless ( FS::upgrade_journal->is_done('cust_main__trimspaces') ) {
+
+ foreach my $cust_main ( qsearch({
+ 'table' => 'cust_main',
+ 'hashref' => {},
+ 'extra_sql' => 'WHERE '.
+ join(' OR ',
+ map "$_ LIKE ' %' OR $_ LIKE '% ' OR $_ LIKE '% %'",
+ qw( first last company )
+ ),
+ }) ) {
+ my $error = $cust_main->replace;
+ die $error if $error;
+ }
+
+ FS::upgrade_journal->set_done('cust_main__trimspaces');
+
+ }
+
$class->_upgrade_otaker(%opts);
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main.pm | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
More information about the freeside-commits
mailing list