|
Lines 892-897
sub CheckReserves {
Link Here
|
| 892 |
|
892 |
|
| 893 |
# Find this item in the reserves |
893 |
# Find this item in the reserves |
| 894 |
my @reserves = _Findgroupreserve( $item->biblionumber, $item->itemnumber, $lookahead_days, $ignore_borrowers); |
894 |
my @reserves = _Findgroupreserve( $item->biblionumber, $item->itemnumber, $lookahead_days, $ignore_borrowers); |
|
|
895 |
# When IndependentBranchesTransfers is activate remove the reserve made from other branches |
| 896 |
@reserves = _FilterHoldsForIndependentBranches( @reserves ); |
| 895 |
|
897 |
|
| 896 |
# $priority and $highest are used to find the most important item |
898 |
# $priority and $highest are used to find the most important item |
| 897 |
# in the list returned by &_Findgroupreserve. (The lower $priority, |
899 |
# in the list returned by &_Findgroupreserve. (The lower $priority, |
|
Lines 1786-1791
sub _Findgroupreserve {
Link Here
|
| 1786 |
return @results; |
1788 |
return @results; |
| 1787 |
} |
1789 |
} |
| 1788 |
|
1790 |
|
|
|
1791 |
=head2 _Removereserve |
| 1792 |
|
| 1793 |
@reserves = &_Removereserve( @reserves ); |
| 1794 |
|
| 1795 |
Check transfers is allowed from system preference and remove the reserves made from other branches |
| 1796 |
|
| 1797 |
C<&_Removereserve> returns : |
| 1798 |
C<@results> is an array of references-to-hash whose keys are mostly |
| 1799 |
fields from the reserves table of the Koha database, plus |
| 1800 |
|
| 1801 |
=cut |
| 1802 |
|
| 1803 |
sub _Removereserve { |
| 1804 |
my ( @reserves) = @_; |
| 1805 |
if ( C4::Context->preference("IndependentBranchesTransfers") && !C4::Context->IsSuperLibrarian() && scalar @reserves) { |
| 1806 |
my @results; |
| 1807 |
foreach my $res (@reserves) { |
| 1808 |
push( @results, $res ) if ($res->{branchcode} eq C4::Context->userenv->{'branch'}); |
| 1809 |
} |
| 1810 |
return @results; |
| 1811 |
} |
| 1812 |
return @reserves; |
| 1813 |
} |
| 1814 |
|
| 1789 |
=head2 _koha_notify_reserve |
1815 |
=head2 _koha_notify_reserve |
| 1790 |
|
1816 |
|
| 1791 |
_koha_notify_reserve( $hold->reserve_id ); |
1817 |
_koha_notify_reserve( $hold->reserve_id ); |
| 1792 |
- |
|
|