Small wishlist idea here. We used to have a legacy script for this, but sadly lost it. Discussed on IRC recently and many thought it was a good idea, so I'm filing this.
The general idea is that we would like the ability to "trim" loan periods when the expiration date of the card is drawing close.
So, lets say my card expires 9/12/2012 and I check out an item for 21 days on 9/5/2012. My due date should not be anytime after 9/12/2012 since my privileges are revoked on 9/12.
The optimal solution here is a YAOUS to toggle this behavior on/off as institutions wish. I imagine this will involve custom programming for the in-db circulation feature. It would also be awesome to have a legacy way of enabling this via the circ JavaScripts for stragglers (like us!).
We have implemented this on Sitka. Here's what it would look like in trunk:
http:// git.sitka. bclibraries. ca/gitweb/ ?p=sitka/ evergreen. git;a=commitdif f;h=c5060b26495 7707b12f03fe806 c6adfa35d7a155
This adds two new org settings and some corresponding new behavior in Circulate.pm to handle circs where the patron's expiry date falls before the due date: the 'circ.limit_ to_patron_ expire_ date' setting silently adjusts the due date to the patron's expiry date, while 'circ.warn_ on_limit_ by_expire_ date' throws an error -- which means staff have to edit the patron's expiry date before proceeding.
As it stands, this doesn't allow you to throw a warning (or force a staff override) and proceed with the checkout anyway. So it doesn't really cover all cases. But it works for us.