|
Lines 112-118
if ( $op eq 'cud-move' ) {
Link Here
|
| 112 |
} elsif ( $op eq 'cud-cancel' ) { |
112 |
} elsif ( $op eq 'cud-cancel' ) { |
| 113 |
my $reserve_id = $input->param('reserve_id'); |
113 |
my $reserve_id = $input->param('reserve_id'); |
| 114 |
my $cancellation_reason = $input->param("cancellation-reason"); |
114 |
my $cancellation_reason = $input->param("cancellation-reason"); |
|
|
115 |
my $transfer = $input->param("transfer-cancel") ? "1" : "0"; |
| 115 |
my $hold = Koha::Holds->find($reserve_id); |
116 |
my $hold = Koha::Holds->find($reserve_id); |
|
|
117 |
|
| 118 |
if( $transfer ) { |
| 119 |
warn($hold->item()->get_transfer); |
| 120 |
$hold->item()->get_transfer->cancel( { reason => 'Manual', 'force' => '1' } ); |
| 121 |
} |
| 116 |
$hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold; |
122 |
$hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold; |
| 117 |
} elsif ( $op eq 'cud-setLowestPriority' ) { |
123 |
} elsif ( $op eq 'cud-setLowestPriority' ) { |
| 118 |
my $reserve_id = $input->param('reserve_id'); |
124 |
my $reserve_id = $input->param('reserve_id'); |
|
Lines 641-646
if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
Link Here
|
| 641 |
$reserve{'found'} = $res->is_found(); |
647 |
$reserve{'found'} = $res->is_found(); |
| 642 |
$reserve{'inprocessing'} = $res->is_in_processing(); |
648 |
$reserve{'inprocessing'} = $res->is_in_processing(); |
| 643 |
$reserve{'intransit'} = $res->is_in_transit(); |
649 |
$reserve{'intransit'} = $res->is_in_transit(); |
|
|
650 |
$reserve{'transfer'} = $res->item()->get_transfer() ? '1' : '0'; |
| 644 |
} elsif ( $res->priority() > 0 ) { |
651 |
} elsif ( $res->priority() > 0 ) { |
| 645 |
if ( my $item = $res->item() ) { |
652 |
if ( my $item = $res->item() ) { |
| 646 |
$reserve{'itemnumber'} = $item->id(); |
653 |
$reserve{'itemnumber'} = $item->id(); |
| 647 |
- |
|
|