From 3b99d1cc9d5257d065285bb0cb2964ee9f03d028 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 19 May 2005 22:12:00 +0000 Subject: [PATCH] * better management of joining & expiry dates : - dates can be manually typed when adding a borrower. - Empty fields are automatically calculated (joining = today & expiry date calculated from borrower category) - Expiry date can be modified * checking expiry date when trying to issue a book & forbidding issuing when expiry date reached. ** IMPORTANT ** This check was not done before. Thus, you may be unable to issue books where you could before. You can update your database borrower by borrower or with the following SQL command on the server : "update borrowers set expiry='2005-31-12'". You can limit the update to a borrower category with "update borrowers set expiry='2005-31-12' where categorycode='A'" (all SQL commands must be typed without any ") --- C4/Circulation/Circ2.pm | 3 +++ koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl | 3 +++ 2 files changed, 6 insertions(+) diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index 14a9e46573..fc1972cbf1 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -698,6 +698,9 @@ sub canbookbeissued { if ($borrower->{flags}->{'DBARRED'}) { $issuingimpossible{DEBARRED} = 1; } + if (&Date_Cmp(&ParseDate($borrower->{expiry}),&ParseDate("today"))<0) { + $issuingimpossible{EXPIRED} = 1; + } # # BORROWER STATUS # diff --git a/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl index f9399c308e..f1494e6002 100644 --- a/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl @@ -183,6 +183,9 @@

No more renewals possible

+ +

Borrower card expired

+
-- 2.39.5