Hi, On Mon, Apr 27, 2009 at 5:56 PM, Michael Hafen <mdha...@tech.washk12.org> wrote: > Let me explain what I'm working on, and see if it makes sense. I'm > looking at having circulation.pl issue an error if the ceilingDueDate is > in the past. My thought is that this is best done in CanBookBeIssued. > > On a side note I'm planning to move ReturnBeforeExpiry and > ceilingDueDate into CalcDateDue() so that the renewal due date catches > those also. > > So my plan is to reintroduce the date due check to CanBookBeIssued for > the case of the date due not being given using a call to CalcDateDue. > How's that sound?
I think there will have to be a bit more reorganization of the code. CalcDateDue() is currently called by AddIssue() and AddRenewal(), but the client code that calls CanBookBeIssued() currently doesn't always have access to the projected due date. I think it would be a good idea to have one function call that calculates the due date, taking into account all of the parameters and sysprefs that can affect it. But once you do that, you have a choice between taking the calls to CalcDateDue() out of AddIssue() and AddRenewal() or adding an error return value to those too functions. Regards, Galen -- Galen Charlton VP, Research & Development, LibLime galen.charl...@liblime.com p: 1-888-564-2457 x709 skype: gmcharlt _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel