From a46d6ebede6bab9d05b054e82004e07ea8aabbb5 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 10 Mar 2011 09:42:08 +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 c31b7e5d5..2efd4fd87 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