[freeside-commits] branch master updated. 3d17fc79205ac61e8ca5e56bad32ac8a7ebc657e

Ivan ivan at 420.am
Fri Feb 12 10:33:01 PST 2016


The branch, master has been updated
       via  3d17fc79205ac61e8ca5e56bad32ac8a7ebc657e (commit)
      from  163c8c2fc2d03bbeb551a84a757c66ca7cf44cd7 (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 3d17fc79205ac61e8ca5e56bad32ac8a7ebc657e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Feb 12 10:32:56 2016 -0800

    can't upgrade 3.x events in 5.x

diff --git a/FS/FS/part_event_condition.pm b/FS/FS/part_event_condition.pm
index 200049d..16f84fa 100644
--- a/FS/FS/part_event_condition.pm
+++ b/FS/FS/part_event_condition.pm
@@ -1,13 +1,11 @@
 package FS::part_event_condition;
+use base qw( FS::option_Common );
 
 use strict;
-use vars qw( @ISA $DEBUG @SKIP_CONDITION_SQL );
+use vars qw( $DEBUG @SKIP_CONDITION_SQL );
 use FS::UID qw( dbh driver_name );
-use FS::Record qw( qsearch qsearchs );
-use FS::option_Common;
 use FS::part_event; #for order_conditions_sql...
 
- at ISA = qw( FS::option_Common ); # FS::Record );
 $DEBUG = 0;
 
 @SKIP_CONDITION_SQL = ();
@@ -354,45 +352,6 @@ sub order_conditions_sql {
 
 }
 
-sub _upgrade_data { #class method
-  my ($class, %opts) = @_;
-
-  foreach my $part_event_condition (
-    qsearch('part_event_condition', { 'conditionname' => 'payby' } )
-  ) {
-
-    my $payby = $part_event_condition->option('payby');
-
-    if ( scalar( keys %$payby ) == 1 ) {
-
-      if ( $payby->{'CARD'} ) {
-
-        $part_event_condition->conditionname('has_cust_payby_auto');
-
-      } elsif ( $payby->{'CHEK'} ) {
-
-        $part_event_condition->conditionname('has_cust_payby_auto');
-
-      }
-
-    } elsif ( $payby->{'BILL'} && ! $payby->{'CARD'} && ! $payby->{'CHEK'} ) {
-
-      $part_event_condition->conditionname('hasnt_cust_payby_auto');
-
-    } else {
-
-      die 'Unable to automatically convert payby condition for event #'.
-          $part_event_condition->eventpart. "\n";
-
-    }
-
-    my $error = $part_event_condition->replace;
-    die $error if $error;
-
-  }
-
-}
-
 =back
 
 =head1 BUGS

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_event_condition.pm |   45 ++---------------------------------------
 1 file changed, 2 insertions(+), 43 deletions(-)




More information about the freeside-commits mailing list