View | Details | Raw Unified | Return to bug 24860
Collapse All | Expand All

(-)a/C4/Reserves.pm (-4 / +9 lines)
Lines 875-880 sub CheckReserves { Link Here
875
                # See if this item is more important than what we've got so far
875
                # See if this item is more important than what we've got so far
876
                if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) {
876
                if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) {
877
                    $item ||= Koha::Items->find($itemnumber);
877
                    $item ||= Koha::Items->find($itemnumber);
878
                    next if $res->{volume_id} && ( !$item->volume || $item->volume->id != $res->{volume_id} );
878
                    next if $res->{itemtype} && $res->{itemtype} ne $item->effective_itemtype;
879
                    next if $res->{itemtype} && $res->{itemtype} ne $item->effective_itemtype;
879
                    $patron ||= Koha::Patrons->find( $res->{borrowernumber} );
880
                    $patron ||= Koha::Patrons->find( $res->{borrowernumber} );
880
                    my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed );
881
                    my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed );
Lines 1683-1689 sub _Findgroupreserve { Link Here
1683
               reserves.itemnumber          AS itemnumber,
1684
               reserves.itemnumber          AS itemnumber,
1684
               reserves.reserve_id          AS reserve_id,
1685
               reserves.reserve_id          AS reserve_id,
1685
               reserves.itemtype            AS itemtype,
1686
               reserves.itemtype            AS itemtype,
1686
               reserves.non_priority        AS non_priority
1687
               reserves.non_priority        AS non_priority,
1688
               reserves.volume_id           AS volume_id
1687
        FROM reserves
1689
        FROM reserves
1688
        JOIN biblioitems USING (biblionumber)
1690
        JOIN biblioitems USING (biblionumber)
1689
        JOIN hold_fill_targets USING (reserve_id)
1691
        JOIN hold_fill_targets USING (reserve_id)
Lines 1719-1734 sub _Findgroupreserve { Link Here
1719
               reserves.itemnumber          AS itemnumber,
1721
               reserves.itemnumber          AS itemnumber,
1720
               reserves.reserve_id          AS reserve_id,
1722
               reserves.reserve_id          AS reserve_id,
1721
               reserves.itemtype            AS itemtype,
1723
               reserves.itemtype            AS itemtype,
1722
               reserves.non_priority        AS non_priority
1724
               reserves.non_priority        AS non_priority,
1725
               reserves.volume_id           AS volume_id
1723
        FROM reserves
1726
        FROM reserves
1724
        JOIN biblioitems USING (biblionumber)
1727
        JOIN biblioitems USING (biblionumber)
1725
        JOIN hold_fill_targets USING (reserve_id)
1728
        JOIN hold_fill_targets USING (reserve_id)
1729
        LEFT JOIN volume_items ON ( volume_items.itemnumber = hold_fill_targets.itemnumber )
1726
        WHERE found IS NULL
1730
        WHERE found IS NULL
1727
        AND priority > 0
1731
        AND priority > 0
1728
        AND item_level_request = 0
1732
        AND item_level_request = 0
1729
        AND hold_fill_targets.itemnumber = ?
1733
        AND hold_fill_targets.itemnumber = ?
1730
        AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY)
1734
        AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY)
1731
        AND suspend = 0
1735
        AND suspend = 0
1736
        AND reserves.volume_id = volume_items.volume_id
1732
        ORDER BY priority
1737
        ORDER BY priority
1733
    };
1738
    };
1734
    $sth = $dbh->prepare($title_level_target_query);
1739
    $sth = $dbh->prepare($title_level_target_query);
Lines 1754-1760 sub _Findgroupreserve { Link Here
1754
               reserves.itemnumber                 AS itemnumber,
1759
               reserves.itemnumber                 AS itemnumber,
1755
               reserves.reserve_id                 AS reserve_id,
1760
               reserves.reserve_id                 AS reserve_id,
1756
               reserves.itemtype                   AS itemtype,
1761
               reserves.itemtype                   AS itemtype,
1757
               reserves.non_priority        AS non_priority
1762
               reserves.non_priority               AS non_priority,
1763
               reserves.volume_id                  AS volume_id
1758
        FROM reserves
1764
        FROM reserves
1759
        WHERE reserves.biblionumber = ?
1765
        WHERE reserves.biblionumber = ?
1760
          AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?)
1766
          AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?)
1761
- 

Return to bug 24860