Bug 19301: (QA follow-up) Add POD, use statements and correct typo

Add POD for new sub in Koha/IssuingRules.pm.
Adding use Koha::IssuingRules to opac-detail and opac-MARCdetail.
Adding use Koha::Items to opac-detail and opac-MARCdetail.
Correct typo $items => $item in opac-MARCdetail.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2017-12-22 09:07:50 +01:00 committed by Jonathan Druart
parent c06bc6422f
commit 149cb50149
3 changed files with 11 additions and 1 deletions

View File

@ -100,6 +100,12 @@ sub get_opacitemholds_policy {
return $issuing_rule ? $issuing_rule->opacitemholds : undef;
}
=head3 get_onshelfholds_policy
my $on_shelf_holds = Koha::IssuingRules->get_onshelfholds_policy({ item => $item, patron => $patron });
=cut
sub get_onshelfholds_policy {
my ( $class, $params ) = @_;
my $item = $params->{item};

View File

@ -58,6 +58,8 @@ use C4::Acquisition;
use C4::Koha;
use List::MoreUtils qw( any uniq );
use Koha::Biblios;
use Koha::IssuingRules;
use Koha::Items;
use Koha::Patrons;
use Koha::RecordProcessor;
@ -132,7 +134,7 @@ if(my $cart_list = $query->cookie("bib_list")){
my $allow_onshelf_holds;
my $patron = Koha::Patrons->find( $loggedinuser );
for my $itm (@all_items) {
my $items = Koha::Items->find( $itm->{itemnumber} );
my $item = Koha::Items->find( $itm->{itemnumber} );
$allow_onshelf_holds = Koha::IssuingRules->get_onshelfholds_policy( { item => $item, patron => $patron } );
last if $allow_onshelf_holds;
}

View File

@ -52,6 +52,8 @@ use C4::CourseReserves qw(GetItemCourseReservesInfo);
use Koha::Biblios;
use Koha::RecordProcessor;
use Koha::AuthorisedValues;
use Koha::IssuingRules;
use Koha::Items;
use Koha::ItemTypes;
use Koha::Acquisition::Orders;
use Koha::Virtualshelves;