summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg_link.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-02-11 22:07:12 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-02-11 22:07:12 -0600
commita98ce69c291c99710fc77a1b06286f44584e1f99 (patch)
tree8cfa8458ded687bd36808a8e0a3e154db3eab12e /FS/FS/part_pkg_link.pm
parent915ae2a5a5cbe3bf70a9be5024ef6323c63f47b0 (diff)
RT#14671: Usage for current day when billing outstanding usage (for cancelling customers) [added part_pkg_link check]
Diffstat (limited to 'FS/FS/part_pkg_link.pm')
-rw-r--r--FS/FS/part_pkg_link.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/part_pkg_link.pm b/FS/FS/part_pkg_link.pm
index aee0131..2460e99 100644
--- a/FS/FS/part_pkg_link.pm
+++ b/FS/FS/part_pkg_link.pm
@@ -260,6 +260,11 @@ sub check {
") must be an integer multiple of main package period.";
}
}
+ if (( $src_pkg->option('delay_cancel',1) && !$dst_pkg->option('delay_cancel',1) ) ||
+ ( $dst_pkg->option('delay_cancel',1) && !$src_pkg->option('delay_cancel',1) )
+ ) {
+ return "Supplemental package must have same value as main package for automatic suspension on cancel.";
+ }
}
$self->SUPER::check;