View | Details | Raw Unified | Return to bug 19814
Collapse All | Expand All

(-)a/circ/returns.pl (-1 / +14 lines)
Lines 342-349 if ( $batch_barcodes && $op eq 'cud-checkin' ) { Link Here
342
342
343
            # Do the actual return unless confirmation needed
343
            # Do the actual return unless confirmation needed
344
            unless ( $needs_confirm || $bundle_confirm ) {
344
            unless ( $needs_confirm || $bundle_confirm ) {
345
346
                # Call AddReturn, check if we want to confirm a transfer automatically
347
                my $original_override = $ENV{"OVERRIDE_SYSPREF_AutomaticItemReturn"};
348
                $ENV{"OVERRIDE_SYSPREF_AutomaticItemReturn"} = 1 if $query->param('confirm_transfer');
345
                my ( $batch_returned, $batch_messages, $batch_issue, $batch_borrower ) =
349
                my ( $batch_returned, $batch_messages, $batch_issue, $batch_borrower ) =
346
                    AddReturn( $batch_barcode, $userenv_branch, $exemptfine, $return_date );
350
                    AddReturn( $batch_barcode, $userenv_branch, $exemptfine, $return_date );
351
                $ENV{"OVERRIDE_SYSPREF_AutomaticItemReturn"} = $original_override || q{};
347
352
348
                $batch_result{success}  = $batch_returned;
353
                $batch_result{success}  = $batch_returned;
349
                $batch_result{messages} = $batch_messages;
354
                $batch_result{messages} = $batch_messages;
Lines 365-370 if ( $batch_barcodes && $op eq 'cud-checkin' ) { Link Here
365
                        not_returned   => 1,
370
                        not_returned   => 1,
366
                    };
371
                    };
367
                }
372
                }
373
374
                # Confirm a hold?
375
                my $resFound = $batch_messages->{ResFound};
376
                if ( $query->param('confirm_hold') && $resFound ) {
377
                    my $hold = Koha::Holds->find( $resFound->{reserve_id} );    # TODO Not found
378
                    my $diffBranchSend;
379
                    $diffBranchSend = $resFound->{branchcode} if $userenv_branch ne $resFound->{branchcode};
380
                    confirm_hold( $batch_item, $hold, $diffBranchSend, $desk_id ) if $hold;
381
                }
368
            } else {
382
            } else {
369
                $batch_result{needs_confirm}  = $needs_confirm;
383
                $batch_result{needs_confirm}  = $needs_confirm;
370
                $batch_result{bundle_confirm} = $bundle_confirm;
384
                $batch_result{bundle_confirm} = $bundle_confirm;
371
- 

Return to bug 19814