From: ivan Date: Thu, 10 Mar 2011 09:42:09 +0000 (+0000) Subject: prevent all-too-common mistake of editing package dates manually to have a start... X-Git-Tag: freeside_2_1_2~16 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=c8dfaad7b60190936903f01307f7054e75f5132c prevent all-too-common mistake of editing package dates manually to have a start date and a setup date, RT#11937 --- diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 968441d03..8b62cf721 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -598,6 +598,9 @@ sub check { ; return $error if $error; + return "A package with both start date (future start) and setup date (already started) will never bill" + if $self->start_date && $self->setup; + $self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum; if ( $self->dbdef_table->column('manual_flag') ) {