[freeside-commits] branch FREESIDE_3_BRANCH updated. b92a75f9fc39d2ebb4572d270536216ca632f0aa
Ivan
ivan at 420.am
Sat Oct 19 23:24:22 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via b92a75f9fc39d2ebb4572d270536216ca632f0aa (commit)
from 834cf80d6b08bd0b9bf3a6330c3a1ecb639fc781 (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 b92a75f9fc39d2ebb4572d270536216ca632f0aa
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Oct 19 23:24:21 2013 -0700
ignore setup+start date on upgrade, RT#25516, RT#21464
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 21dda09..d70c874 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -132,6 +132,9 @@ sub upgrade {
local $FS::UID::AutoCommit = 0;
local $FS::UID::AutoCommit = 0;
+ local $FS::cust_pkg::upgrade = 1; #go away after setup+start dates cleaned up for old customers
+
+
foreach my $table ( keys %$data ) {
my $class = "FS::$table";
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 682b11b..75d790e 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -4,7 +4,7 @@ use base qw( FS::otaker_Mixin FS::cust_main_Mixin FS::Sales_Mixin
FS::m2m_Common FS::option_Common );
use strict;
-use vars qw($disable_agentcheck $DEBUG $me);
+use vars qw( $disable_agentcheck $DEBUG $me $upgrade );
use Carp qw(cluck);
use Scalar::Util qw( blessed );
use List::Util qw(min max);
@@ -54,6 +54,8 @@ $me = '[FS::cust_pkg]';
$disable_agentcheck = 0;
+$upgrade = 0; #go away after setup+start dates cleaned up for old customers
+
sub _cache {
my $self = shift;
my ( $hashref, $cache ) = @_;
@@ -656,7 +658,7 @@ sub check {
return $error if $error;
return "A package with both start date (future start) and setup date (already started) will never bill"
- if $self->start_date && $self->setup;
+ if $self->start_date && $self->setup && ! $upgrade;
return "A future unsuspend date can only be set for a package with a suspend date"
if $self->resume and !$self->susp and !$self->adjourn;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Upgrade.pm | 3 +++
FS/FS/cust_pkg.pm | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list