[Koha-devel] Due Date check in C4::Circulation::CanBookBeIssued?

Michael Hafen mdhafen at tech.washk12.org
Mon Apr 27 23:56:37 CEST 2009


Why didn't I think of checking git for that line.  Thanks for taking
blame there ;)

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?

On Mon, 2009-04-27 at 17:42 -0400, Galen Charlton wrote:
> Hi,
> 
> On Mon, Apr 27, 2009 at 5:26 PM, Michael Hafen <mdhafen at tech.washk12.org> wrote:
> > The Due Date check is commented out in CanBookBeIssued.  I'm planning
> > uncomment and expand it.  Before I do that I want to know why it's
> > commented out.  I seem to recall it being a problem for Offline Circ,
> > but looking at process_koc.pl CanBookBeIssued isn't even called.
> 
> git blame is your friend here.  As far as I can work out, the line was
> commented out with the expectation that any code that calls
> CanBookBeIssued() would have already verified that the due date, in
> this case set via a global due date or a due date specified by the
> operator, is valid.  Note that in this context, the $datedue parameter
> passed to CanBookBeIssued() is allowed to be undef, since most of the
> time you'll be having AddIssue() calculate the due date.
> 
> Regards,
> 
> Galen
-- 
Michael Hafen
Systems Analyst and Programmer
Washington County School District
Utah, USA

for Koha checkout
http://development.washk12.org/gitweb/
or
git://development.washk12.org/koha




More information about the Koha-devel mailing list