RT#30705: Change contract end date when changing packages [got rid of chronology...
authorJonathan Prykop <jonathan@freeside.biz>
Tue, 30 Jun 2015 10:29:49 +0000 (05:29 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Tue, 30 Jun 2015 10:29:49 +0000 (05:29 -0500)
FS/FS/cust_pkg.pm
httemplate/edit/process/change-cust_pkg.html

index 5bd307b..8e88728 100644 (file)
@@ -1986,9 +1986,6 @@ sub _check_change {
       #option shouldn't be passed, throw error if it's non-empty
       return "Cannot add contract end date when changing packages " . $self->pkgnum;
     }
-    if ($opt->{'start_date'} && ($opt->{'contract_end'} < $opt->{'start_date'})) {
-      return "Contract end date is before change date";
-    }
   }
   return '';
 }
index c066ff5..046a979 100644 (file)
@@ -41,15 +41,9 @@ if ( $cgi->param('locationnum') == -1 ) {
 }
 
 my $error;
-my $contract_end;
 my $now = time;
 if (defined($cgi->param('contract_end'))) {
-  $contract_end = parse_datetime($cgi->param('contract_end'));
-  if ($contract_end < $now) {
-    $error = "Contract end ".$cgi->param('contract_end')." is in the past.";
-  } else {
-    $change{'contract_end'} = $contract_end;
-  }
+  $change{'contract_end'} = parse_datetime($cgi->param('contract_end'));
 }
 
 unless ($error) {