summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-06-30 22:30:56 -0500
committerJonathan Prykop <jonathan@freeside.biz>2015-06-30 22:59:02 -0500
commit346c32b847002357ecf79503d153186d0627aaa1 (patch)
tree62aea367c0227728ae17d139279c93a8125b3ea4
parent02b3110eb22945351c1b840a6686b9ad6541be0b (diff)
RT#20687: Future package change [bug fix]
-rw-r--r--FS/FS/cust_pkg.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 14555dd67..e65672e43 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -2415,8 +2415,9 @@ sub change_later {
$error = $self->replace ||
$err_or_pkg->replace ||
- $change_to->cancel('no_delay_cancel' => 1) ||
- $change_to->delete;
+ (($err_or_pkg->pkgnum == $change_to->pkgnum) ? '' :
+ $change_to->cancel('no_delay_cancel' => 1) ||
+ $change_to->delete);
} else {
$error = $err_or_pkg;
}