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

(-)a/circ/circulation.pl (-11 / +10 lines)
Lines 317-325 if (@$barcodes) { Link Here
317
        };
317
        };
318
318
319
        # always check for blockers on issuing
319
        # always check for blockers on issuing
320
        my ( $error, $question, $alerts, $messages );
320
        my ( $error, $needsconfirmation, $alerts, $messages );
321
        try {
321
        try {
322
            ( $error, $question, $alerts, $messages ) = CanBookBeIssued(
322
            ( $error, $needsconfirmation, $alerts, $messages ) = CanBookBeIssued(
323
                $patron,
323
                $patron,
324
                $barcode, $datedue,
324
                $barcode, $datedue,
325
                $inprocess,
325
                $inprocess,
Lines 403-409 if (@$barcodes) { Link Here
403
        }
403
        }
404
    }
404
    }
405
405
406
    delete $question->{'DEBT'} if ($debt_confirmed);
406
    delete $needsconfirmation->{'DEBT'} if ($debt_confirmed);
407
407
408
    if( $item and ( !$blocker or $force_allow_issue ) ){
408
    if( $item and ( !$blocker or $force_allow_issue ) ){
409
        my $confirm_required = 0;
409
        my $confirm_required = 0;
Lines 416-430 if (@$barcodes) { Link Here
416
            $template_params->{itemhomebranch} = $item->homebranch;
416
            $template_params->{itemhomebranch} = $item->homebranch;
417
417
418
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
418
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
419
            foreach my $needsconfirmation ( keys %$question ) {
419
            foreach my $needsconfirmation_key ( keys %$needsconfirmation ) {
420
                $template_params->{$needsconfirmation} = $$question{$needsconfirmation};
420
                $template_params->{$needsconfirmation_key} = $needsconfirmation->{$needsconfirmation_key};
421
                $template_params->{getTitleMessageIteminfo} = $biblio->title;
421
                $template_params->{getTitleMessageIteminfo} = $biblio->title;
422
                $template_params->{getBarcodeMessageIteminfo} = $item->barcode;
422
                $template_params->{getBarcodeMessageIteminfo} = $item->barcode;
423
                $template_params->{NEEDSCONFIRMATION} = 1;
423
                $template_params->{NEEDSCONFIRMATION} = 1;
424
                $confirm_required = 1;
424
                $confirm_required = 1;
425
                if ( $needsconfirmation eq 'BOOKED_TO_ANOTHER' ) {
425
                if ( $needsconfirmation eq 'BOOKED_TO_ANOTHER' ) {
426
                    my $reduceddue =
426
                    my $reduceddue =
427
                        dt_from_string( $$question{$needsconfirmation}->start_date )->subtract( days => 1 );
427
                        dt_from_string( $$needsconfirmation{$needsconfirmation_key}->start_date )->subtract( days => 1 );
428
                    $template_params->{reduceddue} = $reduceddue;
428
                    $template_params->{reduceddue} = $reduceddue;
429
                }
429
                }
430
            }
430
            }
Lines 445-451 if (@$barcodes) { Link Here
445
            }
445
            }
446
446
447
            # If booked (alerts or confirmation) update datedue to end of booking
447
            # If booked (alerts or confirmation) update datedue to end of booking
448
            if ( my $booked = $question->{BOOKED_EARLY} // $alerts->{BOOKED} ) {
448
            if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) {
449
                $datedue = $booked->end_date;
449
                $datedue = $booked->end_date;
450
            }
450
            }
451
            my $issue = AddIssue(
451
            my $issue = AddIssue(
Lines 464-473 if (@$barcodes) { Link Here
464
        }
464
        }
465
    }
465
    }
466
466
467
    if ($question->{RESERVE_WAITING} or $question->{RESERVED} or $question->{TRANSFERRED} or $question->{PROCESSING}){
467
    if ($needsconfirmation->{RESERVE_WAITING} or $needsconfirmation->{RESERVED} or $needsconfirmation->{TRANSFERRED} or $needsconfirmation->{PROCESSING}){
468
        $template->param(
468
        $template->param(
469
            reserveborrowernumber => $question->{'resborrowernumber'},
469
            reserveborrowernumber => $needsconfirmation->{'resborrowernumber'},
470
            reserve_id => $question->{reserve_id},
470
            reserve_id => $needsconfirmation->{reserve_id},
471
        );
471
        );
472
    }
472
    }
473
473
474
- 

Return to bug 35216