Lines 859-864
sub CheckReserves {
Link Here
|
859 |
# See if this item is more important than what we've got so far |
859 |
# See if this item is more important than what we've got so far |
860 |
if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) { |
860 |
if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) { |
861 |
$item ||= Koha::Items->find($itemnumber); |
861 |
$item ||= Koha::Items->find($itemnumber); |
|
|
862 |
next if $res->{volume_id} && ( !$item->volume || $item->volume->id != $res->{volume_id} ); |
862 |
next if $res->{itemtype} && $res->{itemtype} ne $item->effective_itemtype; |
863 |
next if $res->{itemtype} && $res->{itemtype} ne $item->effective_itemtype; |
863 |
$patron ||= Koha::Patrons->find( $res->{borrowernumber} ); |
864 |
$patron ||= Koha::Patrons->find( $res->{borrowernumber} ); |
864 |
my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed ); |
865 |
my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed ); |
Lines 1658-1664
sub _Findgroupreserve {
Link Here
|
1658 |
biblioitems.biblioitemnumber AS biblioitemnumber, |
1659 |
biblioitems.biblioitemnumber AS biblioitemnumber, |
1659 |
reserves.itemnumber AS itemnumber, |
1660 |
reserves.itemnumber AS itemnumber, |
1660 |
reserves.reserve_id AS reserve_id, |
1661 |
reserves.reserve_id AS reserve_id, |
1661 |
reserves.itemtype AS itemtype |
1662 |
reserves.itemtype AS itemtype, |
|
|
1663 |
reserves.volume_id AS volume_id |
1662 |
FROM reserves |
1664 |
FROM reserves |
1663 |
JOIN biblioitems USING (biblionumber) |
1665 |
JOIN biblioitems USING (biblionumber) |
1664 |
JOIN hold_fill_targets USING (biblionumber, borrowernumber, itemnumber) |
1666 |
JOIN hold_fill_targets USING (biblionumber, borrowernumber, itemnumber) |
Lines 1693-1708
sub _Findgroupreserve {
Link Here
|
1693 |
biblioitems.biblioitemnumber AS biblioitemnumber, |
1695 |
biblioitems.biblioitemnumber AS biblioitemnumber, |
1694 |
reserves.itemnumber AS itemnumber, |
1696 |
reserves.itemnumber AS itemnumber, |
1695 |
reserves.reserve_id AS reserve_id, |
1697 |
reserves.reserve_id AS reserve_id, |
1696 |
reserves.itemtype AS itemtype |
1698 |
reserves.itemtype AS itemtype, |
|
|
1699 |
reserves.volume_id AS volume_id |
1697 |
FROM reserves |
1700 |
FROM reserves |
1698 |
JOIN biblioitems USING (biblionumber) |
1701 |
JOIN biblioitems USING (biblionumber) |
1699 |
JOIN hold_fill_targets USING (biblionumber, borrowernumber) |
1702 |
JOIN hold_fill_targets USING (biblionumber, borrowernumber) |
|
|
1703 |
LEFT JOIN volume_items ON ( volume_items.itemnumber = hold_fill_targets.itemnumber ) |
1700 |
WHERE found IS NULL |
1704 |
WHERE found IS NULL |
1701 |
AND priority > 0 |
1705 |
AND priority > 0 |
1702 |
AND item_level_request = 0 |
1706 |
AND item_level_request = 0 |
1703 |
AND hold_fill_targets.itemnumber = ? |
1707 |
AND hold_fill_targets.itemnumber = ? |
1704 |
AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY) |
1708 |
AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY) |
1705 |
AND suspend = 0 |
1709 |
AND suspend = 0 |
|
|
1710 |
AND reserves.volume_id = volume_items.volume_id |
1706 |
ORDER BY priority |
1711 |
ORDER BY priority |
1707 |
}; |
1712 |
}; |
1708 |
$sth = $dbh->prepare($title_level_target_query); |
1713 |
$sth = $dbh->prepare($title_level_target_query); |
Lines 1727-1733
sub _Findgroupreserve {
Link Here
|
1727 |
reserves.timestamp AS timestamp, |
1732 |
reserves.timestamp AS timestamp, |
1728 |
reserves.itemnumber AS itemnumber, |
1733 |
reserves.itemnumber AS itemnumber, |
1729 |
reserves.reserve_id AS reserve_id, |
1734 |
reserves.reserve_id AS reserve_id, |
1730 |
reserves.itemtype AS itemtype |
1735 |
reserves.itemtype AS itemtype, |
|
|
1736 |
reserves.volume_id AS volume_id |
1731 |
FROM reserves |
1737 |
FROM reserves |
1732 |
WHERE reserves.biblionumber = ? |
1738 |
WHERE reserves.biblionumber = ? |
1733 |
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?) |
1739 |
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?) |
1734 |
- |
|
|