[Koha-bugs] [Bug 17712] Move availability calculation to the Koha namespace

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 27 17:20:53 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17712

--- Comment #11 from Lari Taskula <lari.taskula at jns.fi> ---
Created attachment 58452
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58452&action=edit
Bug 17712: Biblio availability for hold

Usage:

$holdability = Koha::Availability::Hold->biblio({
  biblio => $biblio,
  patron => $patron,
  to_branch => "CPL",
})->in_opac;
if ($holdability->available) {
  # yup!
  # arrayref of Koha::Item::Availability::Hold -objects:
  # 1. all available items (items may contain confirmations / notes)
  my $item_availabilities = $holdability->item_availabilities;
  # 2. all unavailable items
  my $item_unavailabilities = $holdability->item_unavailabilites;
}

Returns a Koha::Biblio::Availability::Hold -object.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list