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

(-)a/circ/circulation.pl (-27 / +26 lines)
Lines 438-443 if (@$barcodes && $op eq 'cud-checkout') { Link Here
438
438
439
    delete $needsconfirmation->{'DEBT'} if ($debt_confirmed);
439
    delete $needsconfirmation->{'DEBT'} if ($debt_confirmed);
440
440
441
    if ( $item && C4::Context->preference('ClaimReturnedLostValue') ) {
442
        my $autoClaimReturnCheckout = C4::Context->preference('AutoClaimReturnStatusOnCheckout');
443
444
        my $claims = Koha::Checkouts::ReturnClaims->search(
445
            {
446
                itemnumber => $item->id,
447
            }
448
        );
449
        if ( $claims->count ) {
450
            if ($autoClaimReturnCheckout) {
451
                my $claim = $claims->next;
452
453
                my $patron_id  = $patron->borrowernumber;
454
                my $resolution = $autoClaimReturnCheckout;
455
456
                $claim->resolve(
457
                    {
458
                        resolution  => $resolution,
459
                        resolved_by => $patron_id,
460
                    }
461
                );
462
                $template_params->{CLAIM_RESOLUTION} = $claim;
463
            }
464
        }
465
    }
466
441
    if( $item and ( !$blocker or $force_allow_issue ) ){
467
    if( $item and ( !$blocker or $force_allow_issue ) ){
442
        my $confirm_required = 0;
468
        my $confirm_required = 0;
443
        unless($issueconfirmed){
469
        unless($issueconfirmed){
Lines 497-528 if (@$barcodes && $op eq 'cud-checkout') { Link Here
497
        }
523
        }
498
    }
524
    }
499
525
500
    if ( C4::Context->preference('ClaimReturnedLostValue') ) {
501
        my $autoClaimReturnCheckout = C4::Context->preference('AutoClaimReturnStatusOnCheckout');
502
503
        my $claims = Koha::Checkouts::ReturnClaims->search(
504
            {
505
                itemnumber => $item->id,
506
            }
507
        );
508
        if ( $claims->count ) {
509
            if ($autoClaimReturnCheckout) {
510
                my $claim = $claims->next;
511
512
                my $patron_id  = $patron->borrowernumber;
513
                my $resolution = $autoClaimReturnCheckout;
514
515
                $claim->resolve(
516
                    {
517
                        resolution  => $resolution,
518
                        resolved_by => $patron_id,
519
                    }
520
                );
521
                $template_params->{CLAIM_RESOLUTION} = $claim;
522
            }
523
        }
524
    }
525
526
    if ($needsconfirmation->{RESERVE_WAITING} or $needsconfirmation->{RESERVED} or $needsconfirmation->{TRANSFERRED} or $needsconfirmation->{PROCESSING}){
526
    if ($needsconfirmation->{RESERVE_WAITING} or $needsconfirmation->{RESERVED} or $needsconfirmation->{TRANSFERRED} or $needsconfirmation->{PROCESSING}){
527
        $template->param(
527
        $template->param(
528
            reserveborrowernumber => $needsconfirmation->{'resborrowernumber'},
528
            reserveborrowernumber => $needsconfirmation->{'resborrowernumber'},
529
- 

Return to bug 27753