Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorIvan Kohler <ivan@freeside.biz>
Thu, 12 Feb 2015 04:24:53 +0000 (20:24 -0800)
committerIvan Kohler <ivan@freeside.biz>
Thu, 12 Feb 2015 04:24:53 +0000 (20:24 -0800)
FS/FS/part_pkg_link.pm

index aee0131..2460e99 100644 (file)
@@ -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;