[Koha] API for circulation interfaces
Tonnesen Steve
tonnesen at cmsd.bc.ca
Fri Jan 12 06:23:28 NZDT 2001
On Fri, 12 Jan 2001, Chris Cormack wrote:
> > ====================
> > getpatroninformation
> > ====================
> I think maybe this might need to return reference to a hash of flags also.
> For example if the borrower owes a substantial amount of money, or a has a
> note on his/card a warning should be displayed.
> Depending on the flag different actions should be taken also.
> The flags could be included in patroninformation though I guess,
> eg $patroninformation->{'flags'}=\%flags;
Right. Missed the flags. Okay, looking for flags currently being used to
get an idea for what is needed here:
CHARGES -- Accounts::checkaccount() returns $amount > 0
LOST -- card reported as lost
NOTES -- displays contents of borrowers->borrowernotes field
ODUES -- checkoverdues() returns > 0
WAITING -- Main::checkwaiting() returns nowaiting>0
Some of these can be handled with a simple message returned that the
interface module must display to the user (ie Patron owes $6.40, Patron's
card reported lost, Patron Note: _____). Overdues and Waiting might need
to be treated more carefully. In tk-perl, I like displaying item
information in a table format, so returning a simple message with a list
of overdues or reserves would be less than ideal. It might be sufficient
to have the flags display interface be capable of showing a message and an
optional list of items? That doesn't quite work. For reserves,
holdingbranch is important, but not for overdues. Could return an array
listing which fields of the item should be displayed for the message.
> > =========
> > issuebook
> > =========
> Yeah this looks like a good way to do it, i think that maybe we could pass
> to issuebook the patroninformation, rather than the borrowernumber.
> That way we wouldnt have to check certain flags again like the borrower
> owing more than x dollars, which prohibits issues.
> That is assuming that u call getpatroninformation before issuebook.
> Just a thought.
Makes good sense. The interface code will certainly want to call
getpatroninformation before starting issuing books.
> The other things contained in circ like renewals, and payments are there
> because of speed issues.
Aren't renewals handled by the issuebooks() call? If the book is already
issued to the user, it will get renewed.
Steve.
More information about the Koha
mailing list