|
Lines 729-760
sub GetOtherReserves {
Link Here
|
| 729 |
my $item = Koha::Items->find($itemnumber); |
729 |
my $item = Koha::Items->find($itemnumber); |
| 730 |
my ( undef, $checkreserves, undef ) = CheckReserves($item); |
730 |
my ( undef, $checkreserves, undef ) = CheckReserves($item); |
| 731 |
if ($checkreserves) { |
731 |
if ($checkreserves) { |
|
|
732 |
|
| 733 |
#step 2a : case of a reservation at a different branch, return 'transfert' message |
| 732 |
if ( $item->holdingbranch ne $checkreserves->{'branchcode'} ) { |
734 |
if ( $item->holdingbranch ne $checkreserves->{'branchcode'} ) { |
| 733 |
$messages->{'transfert'} = $checkreserves->{'branchcode'}; |
735 |
$messages->{'transfert'} = $checkreserves->{'branchcode'}; |
| 734 |
#minus priorities of others reservs |
|
|
| 735 |
ModReserveMinusPriority( |
| 736 |
$itemnumber, |
| 737 |
$checkreserves->{'reserve_id'}, |
| 738 |
); |
| 739 |
|
| 740 |
#launch the subroutine dotransfer |
| 741 |
C4::Items::ModItemTransfer( |
| 742 |
$itemnumber, |
| 743 |
$item->holdingbranch, |
| 744 |
$checkreserves->{'branchcode'}, |
| 745 |
'Reserve' |
| 746 |
), |
| 747 |
; |
| 748 |
} |
736 |
} |
| 749 |
|
737 |
|
| 750 |
#step 2b : case of a reservation on the same branch, set the waiting status |
738 |
#step 2b : case of a reservation on the same branch, return 'waiting' message |
| 751 |
else { |
739 |
else { |
| 752 |
$messages->{'waiting'} = 1; |
740 |
$messages->{'waiting'} = 1; |
| 753 |
ModReserveMinusPriority( |
|
|
| 754 |
$itemnumber, |
| 755 |
$checkreserves->{'reserve_id'}, |
| 756 |
); |
| 757 |
ModReserveStatus($itemnumber,'W'); |
| 758 |
} |
741 |
} |
| 759 |
|
742 |
|
| 760 |
$nextreservinfo = $checkreserves; |
743 |
$nextreservinfo = $checkreserves; |
| 761 |
- |
|
|