diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-09-18 15:23:13 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-09-18 15:23:13 -0700 |
commit | 85da1b4d2deb6b0c0ff4031337f6592dfc9aaa3a (patch) | |
tree | badacecc72631f3b136f3de60ea9a59bd74025fc | |
parent | 9dc28fd405e2e60151d9cb372cb645474183c02a (diff) |
fix package change vs. v4 discount refactor, RT#77513, RT#14092
-rw-r--r-- | FS/FS/cust_pkg.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 7b59b328b..b68c4dcae 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2627,9 +2627,9 @@ sub change { foreach my $old_discount ($self->cust_pkg_discount_active) { # don't remove the old discount, we may still need to bill that package. my $new_discount = new FS::cust_pkg_discount { - 'pkgnum' => $cust_pkg->pkgnum, - 'discountnum' => $old_discount->discountnum, - 'months_used' => $old_discount->months_used, + 'pkgnum' => $cust_pkg->pkgnum, + map { $_ => $old_discount->$_() } + qw( discountnum months_used end_date usernum setuprecur ), }; $error = $new_discount->insert; if ( $error ) { |