From: Jonathan Prykop Date: Thu, 12 Feb 2015 04:07:12 +0000 (-0600) Subject: RT#14671: Usage for current day when billing outstanding usage (for cancelling custom... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a98ce69c291c99710fc77a1b06286f44584e1f99 RT#14671: Usage for current day when billing outstanding usage (for cancelling customers) [added part_pkg_link check] --- diff --git a/FS/FS/part_pkg_link.pm b/FS/FS/part_pkg_link.pm index aee0131d2..2460e995d 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;