projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
361f46c
)
fix package change vs. v4 discount refactor, RT#77513, RT#14092
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 18 Sep 2017 22:23:11 +0000
(15:23 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 18 Sep 2017 22:23:11 +0000
(15:23 -0700)
FS/FS/cust_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
b256dae
..
c70a679
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-2622,9
+2622,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 {
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 ) {
};
$error = $new_discount->insert;
if ( $error ) {