summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-03-10 09:42:09 +0000
committerivan <ivan>2011-03-10 09:42:09 +0000
commitc8dfaad7b60190936903f01307f7054e75f5132c (patch)
tree1fa8844c74db0ea5f4d99851b77e318144e553dd
parent6e00b43b652a25417996a3651b5f29b0371c1813 (diff)
prevent all-too-common mistake of editing package dates manually to have a start date and a setup date, RT#11937
-rw-r--r--FS/FS/cust_pkg.pm3
1 files changed, 3 insertions, 0 deletions
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') ) {