[freeside-commits] branch master updated. 6c298097f93537b6533ccd50f87a11c1ce1d50b8
Ivan
ivan at 420.am
Thu Feb 13 14:02:29 PST 2014
The branch, master has been updated
via 6c298097f93537b6533ccd50f87a11c1ce1d50b8 (commit)
from 2b0b1cf5e74a29114bd7dd683240a3be9c9ab2a1 (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 6c298097f93537b6533ccd50f87a11c1ce1d50b8
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Feb 13 13:59:10 2014 -0800
don't process date options (start_1st, expire_months/adjourn_months/contract_end_months, free_days, delay_setup) on changes, RT#27511
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 8ee11a4..392bab3 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -268,7 +268,8 @@ The following options are available:
=item change
If set true, supresses actions that should only be taken for new package
-orders. (Currently this includes: intro periods when delay_setup is on.)
+orders. (Currently this includes: intro periods when delay_setup is on,
+auto-adding a 1st start date, auto-adding expiration/adjourn/contract_end dates)
=item options
@@ -301,7 +302,8 @@ sub insert {
my $part_pkg = $self->part_pkg;
- if (! $import) {
+ if ( ! $import && ! $options{'change'} ) {
+
# if the package def says to start only on the first of the month:
if ( $part_pkg->option('start_1st', 1) && !$self->start_date ) {
my ($sec,$min,$hour,$mday,$mon,$year) = (localtime(time) )[0,1,2,3,4,5];
@@ -320,11 +322,11 @@ sub insert {
}
}
- # if this package has "free days" and delayed setup fee, tehn
+ # if this package has "free days" and delayed setup fee, then
# set start date that many days in the future.
# (this should have been set in the UI, but enforce it here)
if ( ! $options{'change'}
- && ( my $free_days = $part_pkg->option('free_days',1) )
+ && $part_pkg->option('free_days', 1)
&& $part_pkg->option('delay_setup',1)
#&& ! $self->start_date
)
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_pkg.pm | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list