Lines 162-168
BEGIN {
Link Here
|
162 |
itemnumber => $itemnumber, |
162 |
itemnumber => $itemnumber, |
163 |
found => $found, |
163 |
found => $found, |
164 |
itemtype => $itemtype, |
164 |
itemtype => $itemtype, |
165 |
item_gorup_id => $item_group_id |
165 |
item_group_id => $item_group_id |
166 |
} |
166 |
} |
167 |
); |
167 |
); |
168 |
|
168 |
|
Lines 957-962
sub CheckReserves {
Link Here
|
957 |
# See if this item is more important than what we've got so far |
957 |
# See if this item is more important than what we've got so far |
958 |
if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) { |
958 |
if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) { |
959 |
$item ||= Koha::Items->find($itemnumber); |
959 |
$item ||= Koha::Items->find($itemnumber); |
|
|
960 |
next if $res->{item_group_id} && ( !$item->item_group || $item->item_group->id != $res->{item_group_id} ); |
960 |
next if $res->{itemtype} && $res->{itemtype} ne $item->effective_itemtype; |
961 |
next if $res->{itemtype} && $res->{itemtype} ne $item->effective_itemtype; |
961 |
$patron ||= Koha::Patrons->find( $res->{borrowernumber} ); |
962 |
$patron ||= Koha::Patrons->find( $res->{borrowernumber} ); |
962 |
my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed ); |
963 |
my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed ); |
Lines 1749-1755
sub _Findgroupreserve {
Link Here
|
1749 |
reserves.itemnumber AS itemnumber, |
1750 |
reserves.itemnumber AS itemnumber, |
1750 |
reserves.reserve_id AS reserve_id, |
1751 |
reserves.reserve_id AS reserve_id, |
1751 |
reserves.itemtype AS itemtype, |
1752 |
reserves.itemtype AS itemtype, |
1752 |
reserves.non_priority AS non_priority |
1753 |
reserves.non_priority AS non_priority, |
|
|
1754 |
reserves.item_group_id AS item_group_id |
1753 |
FROM reserves |
1755 |
FROM reserves |
1754 |
JOIN biblioitems USING (biblionumber) |
1756 |
JOIN biblioitems USING (biblionumber) |
1755 |
JOIN hold_fill_targets USING (reserve_id) |
1757 |
JOIN hold_fill_targets USING (reserve_id) |
Lines 1785-1800
sub _Findgroupreserve {
Link Here
|
1785 |
reserves.itemnumber AS itemnumber, |
1787 |
reserves.itemnumber AS itemnumber, |
1786 |
reserves.reserve_id AS reserve_id, |
1788 |
reserves.reserve_id AS reserve_id, |
1787 |
reserves.itemtype AS itemtype, |
1789 |
reserves.itemtype AS itemtype, |
1788 |
reserves.non_priority AS non_priority |
1790 |
reserves.non_priority AS non_priority, |
|
|
1791 |
reserves.item_group_id AS item_group_id |
1789 |
FROM reserves |
1792 |
FROM reserves |
1790 |
JOIN biblioitems USING (biblionumber) |
1793 |
JOIN biblioitems USING (biblionumber) |
1791 |
JOIN hold_fill_targets USING (reserve_id) |
1794 |
JOIN hold_fill_targets USING (reserve_id) |
|
|
1795 |
LEFT JOIN item_group_items ON ( item_group_items.item_id = hold_fill_targets.itemnumber ) |
1792 |
WHERE found IS NULL |
1796 |
WHERE found IS NULL |
1793 |
AND priority > 0 |
1797 |
AND priority > 0 |
1794 |
AND item_level_request = 0 |
1798 |
AND item_level_request = 0 |
1795 |
AND hold_fill_targets.itemnumber = ? |
1799 |
AND hold_fill_targets.itemnumber = ? |
1796 |
AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY) |
1800 |
AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY) |
1797 |
AND suspend = 0 |
1801 |
AND suspend = 0 |
|
|
1802 |
AND reserves.item_group_id = item_group_items.item_group_id |
1798 |
ORDER BY priority |
1803 |
ORDER BY priority |
1799 |
}; |
1804 |
}; |
1800 |
$sth = $dbh->prepare($title_level_target_query); |
1805 |
$sth = $dbh->prepare($title_level_target_query); |
Lines 1820-1826
sub _Findgroupreserve {
Link Here
|
1820 |
reserves.itemnumber AS itemnumber, |
1825 |
reserves.itemnumber AS itemnumber, |
1821 |
reserves.reserve_id AS reserve_id, |
1826 |
reserves.reserve_id AS reserve_id, |
1822 |
reserves.itemtype AS itemtype, |
1827 |
reserves.itemtype AS itemtype, |
1823 |
reserves.non_priority AS non_priority |
1828 |
reserves.non_priority AS non_priority, |
|
|
1829 |
reserves.item_group_id AS item_group_id |
1824 |
FROM reserves |
1830 |
FROM reserves |
1825 |
WHERE reserves.biblionumber = ? |
1831 |
WHERE reserves.biblionumber = ? |
1826 |
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?) |
1832 |
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?) |
1827 |
- |
|
|