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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 901-907 sub CanBookBeIssued { Link Here
901
    if ( C4::Context->preference("CircConfirmItemParts")
901
    if ( C4::Context->preference("CircConfirmItemParts")
902
        && $item_object->materials )
902
        && $item_object->materials )
903
    {
903
    {
904
        $needsconfirmation{additional_materials} = $item_object->materials;
904
        $needsconfirmation{ADDITIONAL_MATERIALS} = $item_object->materials;
905
    }
905
    }
906
906
907
    #
907
    #
(-)a/C4/SIP/ILS/Transaction/Checkout.pm (-1 / +1 lines)
Lines 96-102 sub do_checkout { Link Here
96
            } elsif ($confirmation eq 'PREVISSUE') {
96
            } elsif ($confirmation eq 'PREVISSUE') {
97
                $self->screen_msg("This item was previously checked out by you");
97
                $self->screen_msg("This item was previously checked out by you");
98
                last;
98
                last;
99
            } elsif ( $confirmation eq 'additional_materials' ) {
99
            } elsif ( $confirmation eq 'ADDITIONAL_MATERIALS' ) {
100
                $self->screen_msg('Item must be issued at a circulation desk');
100
                $self->screen_msg('Item must be issued at a circulation desk');
101
                $noerror = 0;
101
                $noerror = 0;
102
                last;
102
                last;
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 395-401 if (@$barcodes) { Link Here
395
            my $materials = $item->materials;
395
            my $materials = $item->materials;
396
            my $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.materials', authorised_value => $materials });
396
            my $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.materials', authorised_value => $materials });
397
            $materials = $descriptions->{lib} // $materials;
397
            $materials = $descriptions->{lib} // $materials;
398
            $template_params->{additional_materials} = $materials;
398
            $template_params->{ADDITIONAL_MATERIALS} = $materials;
399
            $template_params->{itemhomebranch} = $item->homebranch;
399
            $template_params->{itemhomebranch} = $item->homebranch;
400
400
401
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
401
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-5 / +5 lines)
Lines 54-62 Link Here
54
                        <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
54
                        <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
55
                    [% END %]
55
                    [% END %]
56
56
57
                    [% IF additional_materials %]
57
                    [% IF ADDITIONAL_MATERIALS %]
58
                        <div id="materials" class="dialog message">Note about the accompanying materials: <br />
58
                        <div id="materials" class="dialog message">Note about the accompanying materials: <br />
59
                        [% additional_materials | html %]
59
                        [% ADDITIONAL_MATERIALS | html %]
60
                        </div>
60
                        </div>
61
                    [% END %]
61
                    [% END %]
62
62
Lines 82-88 Link Here
82
82
83
                    [% IF ( NEEDSCONFIRMATION ) %]
83
                    [% IF ( NEEDSCONFIRMATION ) %]
84
                        <div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
84
                        <div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
85
                            [% IF CAN_user_circulate_force_checkout or additional_materials %]
85
                            [% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %]
86
                                <h3>Please confirm checkout</h3>
86
                                <h3>Please confirm checkout</h3>
87
                            [% ELSE %]
87
                            [% ELSE %]
88
                              <h3>Cannot check out</h3>
88
                              <h3>Cannot check out</h3>
Lines 198-206 Link Here
198
                                    </li>
198
                                    </li>
199
                                [% END %]
199
                                [% END %]
200
200
201
                                [% IF additional_materials %]
201
                                [% IF ADDITIONAL_MATERIALS %]
202
                                    <li>
202
                                    <li>
203
                                        Please confirm that the accompanying materials are present: [% additional_materials | html %]
203
                                        Please confirm that the accompanying materials are present: [% ADDITIONAL_MATERIALS | html %]
204
                                    </li>
204
                                    </li>
205
                                [% END %]
205
                                [% END %]
206
                            </ul>
206
                            </ul>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-1 / +1 lines)
Lines 83-89 Link Here
83
                                    Your contact information seems to be incomplete.
83
                                    Your contact information seems to be incomplete.
84
                                [% ELSIF ( circ_error_INVALID_DATE ) %]
84
                                [% ELSIF ( circ_error_INVALID_DATE ) %]
85
                                    Due date is not valid.
85
                                    Due date is not valid.
86
                                [% ELSIF ( circ_error_additional_materials ) %]
86
                                [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %]
87
                                    Item must be issued at a circulation desk.
87
                                    Item must be issued at a circulation desk.
88
                                [% END %]
88
                                [% END %]
89
                                Please see a member of the library staff.
89
                                Please see a member of the library staff.
(-)a/opac/sco/sco-main.pl (-1 / +1 lines)
Lines 150-156 elsif ( $patron && ( $op eq 'checkout' ) ) { Link Here
150
    );
150
    );
151
    my $issue_error;
151
    my $issue_error;
152
    if ( $confirm_required = scalar keys %$needconfirm ) {
152
    if ( $confirm_required = scalar keys %$needconfirm ) {
153
        for my $error ( qw( UNKNOWN_BARCODE max_loans_allowed ISSUED_TO_ANOTHER NO_MORE_RENEWALS NOT_FOR_LOAN DEBT WTHDRAWN RESTRICTED RESERVED ITEMNOTSAMEBRANCH EXPIRED DEBARRED CARD_LOST GNA INVALID_DATE UNKNOWN_BARCODE TOO_MANY DEBT_GUARANTEES USERBLOCKEDOVERDUE PATRON_CANT PREVISSUE NOT_FOR_LOAN_FORCING ITEM_LOST additional_materials) ) {
153
        for my $error ( qw( UNKNOWN_BARCODE max_loans_allowed ISSUED_TO_ANOTHER NO_MORE_RENEWALS NOT_FOR_LOAN DEBT WTHDRAWN RESTRICTED RESERVED ITEMNOTSAMEBRANCH EXPIRED DEBARRED CARD_LOST GNA INVALID_DATE UNKNOWN_BARCODE TOO_MANY DEBT_GUARANTEES USERBLOCKEDOVERDUE PATRON_CANT PREVISSUE NOT_FOR_LOAN_FORCING ITEM_LOST ADDITIONAL_MATERIALS) ) {
154
            if ( $needconfirm->{$error} ) {
154
            if ( $needconfirm->{$error} ) {
155
                $issue_error = $error;
155
                $issue_error = $error;
156
                $confirmed = 0;
156
                $confirmed = 0;
(-)a/t/db_dependent/Circulation.t (-2 / +1 lines)
Lines 3559-3565 subtest 'CanBookBeIssued & CircConfirmItemParts' => sub { Link Here
3559
    my $dt_due = dt_from_string->add( days => 3 );
3559
    my $dt_due = dt_from_string->add( days => 3 );
3560
3560
3561
    my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, $dt_due, undef, undef, undef );
3561
    my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, $dt_due, undef, undef, undef );
3562
    is_deeply( $needsconfirmation, { additional_materials => 'includes DVD' }, 'Item needs confirmation of additional parts' );
3562
    is_deeply( $needsconfirmation, { ADDITIONAL_MATERIALS => 'includes DVD' }, 'Item needs confirmation of additional parts' );
3563
};
3563
};
3564
3564
3565
subtest 'Do not return on renewal (LOST charge)' => sub {
3565
subtest 'Do not return on renewal (LOST charge)' => sub {
3566
- 

Return to bug 25261