Lines 870-875
sub CheckReserves {
Link Here
|
870 |
|
870 |
|
871 |
# Find this item in the reserves |
871 |
# Find this item in the reserves |
872 |
my @reserves = _Findgroupreserve( $item->biblionumber, $item->itemnumber, $lookahead_days, $ignore_borrowers); |
872 |
my @reserves = _Findgroupreserve( $item->biblionumber, $item->itemnumber, $lookahead_days, $ignore_borrowers); |
|
|
873 |
# When IndependentBranchesTransfers is activate remove the reserve made from other branches |
874 |
@reserves = _FilterHoldsForIndependentBranches( @reserves ); |
873 |
|
875 |
|
874 |
# $priority and $highest are used to find the most important item |
876 |
# $priority and $highest are used to find the most important item |
875 |
# in the list returned by &_Findgroupreserve. (The lower $priority, |
877 |
# in the list returned by &_Findgroupreserve. (The lower $priority, |
Lines 1778-1783
sub _Findgroupreserve {
Link Here
|
1778 |
return @results; |
1780 |
return @results; |
1779 |
} |
1781 |
} |
1780 |
|
1782 |
|
|
|
1783 |
=head2 _Removereserve |
1784 |
|
1785 |
@reserves = &_Removereserve( @reserves ); |
1786 |
|
1787 |
Check transfers is allowed from system preference and remove the reserves made from other branches |
1788 |
|
1789 |
C<&_Removereserve> returns : |
1790 |
C<@results> is an array of references-to-hash whose keys are mostly |
1791 |
fields from the reserves table of the Koha database, plus |
1792 |
|
1793 |
=cut |
1794 |
|
1795 |
sub _Removereserve { |
1796 |
my ( @reserves) = @_; |
1797 |
if ( C4::Context->preference("IndependentBranchesTransfers") && !C4::Context->IsSuperLibrarian() && scalar @reserves) { |
1798 |
my @results; |
1799 |
foreach my $res (@reserves) { |
1800 |
push( @results, $res ) if ($res->{branchcode} eq C4::Context->userenv->{'branch'}); |
1801 |
} |
1802 |
return @results; |
1803 |
} |
1804 |
return @reserves; |
1805 |
} |
1806 |
|
1781 |
=head2 _koha_notify_reserve |
1807 |
=head2 _koha_notify_reserve |
1782 |
|
1808 |
|
1783 |
_koha_notify_reserve( $hold->reserve_id ); |
1809 |
_koha_notify_reserve( $hold->reserve_id ); |
1784 |
- |
|
|