|
Lines 113-119
if ( $op eq 'cud-move' ) {
Link Here
|
| 113 |
elsif ( $op eq 'cud-cancel' ) { |
113 |
elsif ( $op eq 'cud-cancel' ) { |
| 114 |
my $reserve_id = $input->param('reserve_id'); |
114 |
my $reserve_id = $input->param('reserve_id'); |
| 115 |
my $cancellation_reason = $input->param("cancellation-reason"); |
115 |
my $cancellation_reason = $input->param("cancellation-reason"); |
|
|
116 |
my $transfer = $input->param("transfer-cancel") ? "1" : "0"; |
| 116 |
my $hold = Koha::Holds->find($reserve_id); |
117 |
my $hold = Koha::Holds->find($reserve_id); |
|
|
118 |
|
| 119 |
if( $transfer ) { |
| 120 |
warn($hold->item()->get_transfer); |
| 121 |
$hold->item()->get_transfer->cancel( { reason => 'Manual', 'force' => '1' } ); |
| 122 |
} |
| 117 |
$hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold; |
123 |
$hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold; |
| 118 |
} |
124 |
} |
| 119 |
elsif ( $op eq 'cud-setLowestPriority' ) { |
125 |
elsif ( $op eq 'cud-setLowestPriority' ) { |
|
Lines 627-632
if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
Link Here
|
| 627 |
$reserve{'found'} = $res->is_found(); |
633 |
$reserve{'found'} = $res->is_found(); |
| 628 |
$reserve{'inprocessing'} = $res->is_in_processing(); |
634 |
$reserve{'inprocessing'} = $res->is_in_processing(); |
| 629 |
$reserve{'intransit'} = $res->is_in_transit(); |
635 |
$reserve{'intransit'} = $res->is_in_transit(); |
|
|
636 |
$reserve{'transfer'} = $res->item()->get_transfer() ? '1' : '0'; |
| 630 |
} |
637 |
} |
| 631 |
elsif ( $res->priority() > 0 ) { |
638 |
elsif ( $res->priority() > 0 ) { |
| 632 |
if ( my $item = $res->item() ) { |
639 |
if ( my $item = $res->item() ) { |
| 633 |
- |
|
|