From e079902a8db9d5ebdaa8bb7f6c661e72c8a49b95 Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 9 Jan 2006 10:31:36 +0000 Subject: [PATCH] adding date control (expiry after enrollment date) --- koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl | 3 +++ members/memberentry.pl | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl b/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl index fe2dd714bd..c8ecb175ec 100644 --- a/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl @@ -39,6 +39,9 @@ Branch : member should be of the same branch as you
+ + Expiry date BEFORE enrollment date
+
diff --git a/members/memberentry.pl b/members/memberentry.pl index 84274e82cb..08f40dd47a 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -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); -- 2.39.5