[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
Wed Feb 15 17:19:15 CET 2017


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

Lari Taskula <lari.taskula at jns.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #60152|0                           |1
        is obsolete|                            |

--- Comment #27 from Lari Taskula <lari.taskula at jns.fi> ---
Created attachment 60263
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60263&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.


More information about the Koha-bugs mailing list