#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 '';
}
}
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) {