[freeside-commits] branch FREESIDE_4_BRANCH updated. 21ffa4e5b853d777c0956dfa9b8f4984e619a43f
Ivan
ivan at 420.am
Fri Feb 12 10:30:03 PST 2016
The branch, FREESIDE_4_BRANCH has been updated
via 21ffa4e5b853d777c0956dfa9b8f4984e619a43f (commit)
from 1d4f9b2a53e1a352e3df0ceb1665d8a90d449aa0 (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 21ffa4e5b853d777c0956dfa9b8f4984e619a43f
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Feb 12 10:30:00 2016 -0800
deal with upgrading 3.x payby events better, RT#32043
diff --git a/FS/FS/part_event_condition.pm b/FS/FS/part_event_condition.pm
index 200049d..e855071 100644
--- a/FS/FS/part_event_condition.pm
+++ b/FS/FS/part_event_condition.pm
@@ -363,17 +363,12 @@ sub _upgrade_data { #class method
my $payby = $part_event_condition->option('payby');
- if ( scalar( keys %$payby ) == 1 ) {
+ if ( scalar( keys %$payby ) == 1 && ( $payby->{CARD} || $payby->{CHEK} )
+ or scalar( keys %$payby ) == 2 && ( $payby->{CARD} && $payby->{CHEK} )
+ )
+ {
- if ( $payby->{'CARD'} ) {
-
- $part_event_condition->conditionname('has_cust_payby_auto');
-
- } elsif ( $payby->{'CHEK'} ) {
-
- $part_event_condition->conditionname('has_cust_payby_auto');
-
- }
+ $part_event_condition->conditionname('has_cust_payby_auto');
} elsif ( $payby->{'BILL'} && ! $payby->{'CARD'} && ! $payby->{'CHEK'} ) {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_event_condition.pm | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
More information about the freeside-commits
mailing list