adding date control (expiry after enrollment date)
This commit is contained in:
parent
b81a08e8b7
commit
e079902a8d
|
|
@ -39,6 +39,9 @@
|
|||
<!-- TMPL_IF NAME="ERROR_branch" -->
|
||||
Branch : member should be of the same branch as you<br>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="ERROR_date" -->
|
||||
Expiry date BEFORE enrollment date<br>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<form action="/cgi-bin/koha/members/memberentry.pl" method="post">
|
||||
|
|
|
|||
|
|
@ -117,6 +117,11 @@ if ($op eq 'add' or $op eq 'modify') {
|
|||
}
|
||||
}
|
||||
}
|
||||
warn "==> ".format_date_in_iso($data{'joining'})." > ".format_date_in_iso($data{'expiry'});
|
||||
if ($data{'expiry'} && format_date_in_iso($data{'joining'}) > format_date_in_iso($data{'expiry'})) {
|
||||
push @errors, "ERROR_date";
|
||||
warn "ERROR DATE";
|
||||
}
|
||||
if ($nok) {
|
||||
foreach my $error (@errors) {
|
||||
$template->param( $error => 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue