Lines 910-915
sub CheckReserves {
Link Here
|
910 |
|
910 |
|
911 |
# Find this item in the reserves |
911 |
# Find this item in the reserves |
912 |
my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber, $lookahead_days, $ignore_borrowers); |
912 |
my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber, $lookahead_days, $ignore_borrowers); |
|
|
913 |
# When IndependentBranchesTransfers is activate remove the reserve made from other branches |
914 |
@reserves = _Removereserve( @reserves ); |
913 |
|
915 |
|
914 |
# $priority and $highest are used to find the most important item |
916 |
# $priority and $highest are used to find the most important item |
915 |
# in the list returned by &_Findgroupreserve. (The lower $priority, |
917 |
# in the list returned by &_Findgroupreserve. (The lower $priority, |
Lines 1844-1849
sub _Findgroupreserve {
Link Here
|
1844 |
return @results; |
1846 |
return @results; |
1845 |
} |
1847 |
} |
1846 |
|
1848 |
|
|
|
1849 |
=head2 _Removereserve |
1850 |
|
1851 |
@reserves = &_Removereserve( @reserves ); |
1852 |
|
1853 |
Check transfers is allowed from system preference and remove the reserves made from other branches |
1854 |
|
1855 |
C<&_Removereserve> returns : |
1856 |
C<@results> is an array of references-to-hash whose keys are mostly |
1857 |
fields from the reserves table of the Koha database, plus |
1858 |
|
1859 |
=cut |
1860 |
|
1861 |
sub _Removereserve { |
1862 |
my ( @reserves) = @_; |
1863 |
if ( C4::Context->preference("IndependentBranchesTransfers") && !C4::Context->IsSuperLibrarian() && scalar @reserves) { |
1864 |
my @results; |
1865 |
foreach my $res (@reserves) { |
1866 |
push( @results, $res ) if ($res->{branchcode} eq C4::Context->userenv->{'branch'}); |
1867 |
} |
1868 |
return @results; |
1869 |
} |
1870 |
return @reserves; |
1871 |
} |
1872 |
|
1847 |
=head2 _koha_notify_reserve |
1873 |
=head2 _koha_notify_reserve |
1848 |
|
1874 |
|
1849 |
_koha_notify_reserve( $hold->reserve_id ); |
1875 |
_koha_notify_reserve( $hold->reserve_id ); |
1850 |
- |
|
|