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:
parent
c06bc6422f
commit
149cb50149
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue