From c8dfaad7b60190936903f01307f7054e75f5132c Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 10 Mar 2011 09:42:09 +0000 Subject: [PATCH] prevent all-too-common mistake of editing package dates manually to have a start date and a setup date, RT#11937 --- FS/FS/cust_pkg.pm | 3 +++ 1 file changed, 3 insertions(+) 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') ) { -- 2.11.0