summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-03-27 11:54:03 -0700
committerMark Wells <mark@freeside.biz>2013-03-27 11:55:56 -0700
commit3ee7348febaf61d9662b463aad3053210593b06b (patch)
tree518c09ed67cd98966fed5ffc1db5e6b8654fe8b6
parent546fd20829df7ab53dd60b6f7589058789acd77f (diff)
keep waive_setup flag when changing package, #613
-rw-r--r--FS/FS/cust_pkg.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 374cf7a12..9e188afe8 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1781,6 +1781,12 @@ sub change {
# (i.e. customer default location)
$opt->{'locationnum'} = $self->locationnum if !exists($opt->{'locationnum'});
+ # usually this doesn't matter. the two cases where it does are:
+ # 1. unused_credit_change + pkgpart change + setup fee on the new package
+ # and
+ # 2. (more importantly) changing a package before it's billed
+ $hash{'waive_setup'} = $self->waive_setup;
+
# Create the new package.
my $cust_pkg = new FS::cust_pkg {
custnum => $self->custnum,