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

(-)a/C4/Circulation.pm (+6 lines)
Lines 879-884 sub CanBookBeIssued { Link Here
879
        }
879
        }
880
    }
880
    }
881
881
882
    # Additional Materials Check
883
    my $no_of_parts = $item_object->materials;
884
    if ( $no_of_parts > 0 ) {
885
        $needsconfirmation{additional_materials} = $no_of_parts;
886
    }
887
882
    #
888
    #
883
    # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
889
    # CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
884
    #
890
    #
(-)a/circ/returns.pl (-13 / +26 lines)
Lines 272-289 if ($barcode) { Link Here
272
        my $checkout = $item->checkout;
272
        my $checkout = $item->checkout;
273
        my $biblio   = $item->biblio;
273
        my $biblio   = $item->biblio;
274
        $template->param(
274
        $template->param(
275
            title            => $biblio->title,
275
            title                => $biblio->title,
276
            homebranch       => $item->homebranch,
276
            homebranch           => $item->homebranch,
277
            holdingbranch    => $item->holdingbranch,
277
            holdingbranch        => $item->holdingbranch,
278
            returnbranch     => $returnbranch,
278
            returnbranch         => $returnbranch,
279
            author           => $biblio->author,
279
            author               => $biblio->author,
280
            itembarcode      => $item->barcode,
280
            itembarcode          => $item->barcode,
281
            itemtype         => $item->effective_itemtype,
281
            itemtype             => $item->effective_itemtype,
282
            ccode            => $item->ccode,
282
            ccode                => $item->ccode,
283
            itembiblionumber => $biblio->biblionumber,
283
            itembiblionumber     => $biblio->biblionumber,
284
            biblionumber     => $biblio->biblionumber,
284
            biblionumber         => $biblio->biblionumber,
285
            additional_materials => $materials,
285
            additional_materials => $materials,
286
            issue            => $checkout,
286
            issue                => $checkout,
287
        );
287
        );
288
    } # FIXME else we should not call AddReturn but set BadBarcode directly instead
288
    } # FIXME else we should not call AddReturn but set BadBarcode directly instead
289
289
Lines 295-303 if ($barcode) { Link Here
295
295
296
    my $return_date = $dropboxmode ? $dropboxdate : $return_date_override_dt;
296
    my $return_date = $dropboxmode ? $dropboxdate : $return_date_override_dt;
297
297
298
    # Block return if multi-part and confirm has not been received
299
    my $needs_confirm = 0;
300
    if ( C4::Context->preference("CircConfirmParts") ) {
301
        if ( $item->materials > 0 && !$query->param('multiple_confirm') ) {
302
                $needs_confirm = 1;
303
        }
304
    }
305
298
    # do the return
306
    # do the return
299
    ( $returned, $messages, $issue, $borrower ) =
307
    ( $returned, $messages, $issue, $borrower ) =
300
      AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date );
308
      AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date )
309
      unless $needs_confirm;
301
310
302
    if ($returned) {
311
    if ($returned) {
303
        my $time_now = dt_from_string()->truncate( to => 'minute');
312
        my $time_now = dt_from_string()->truncate( to => 'minute');
Lines 338-350 if ($barcode) { Link Here
338
                );
347
                );
339
            }
348
            }
340
        }
349
        }
341
    } elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} ) {
350
    } elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm ) {
342
        $input{duedate}   = 0;
351
        $input{duedate}   = 0;
343
        $returneditems{0} = $barcode;
352
        $returneditems{0} = $barcode;
344
        $riduedate{0}     = 0;
353
        $riduedate{0}     = 0;
345
        push( @inputloop, \%input );
354
        push( @inputloop, \%input );
346
    }
355
    }
347
    $template->param( privacy => $borrower->{privacy} );
356
    $template->param( privacy => $borrower->{privacy} );
357
358
    if ( $needs_confirm ) {
359
        $template->param( needs_confirm => $needs_confirm );
360
    }
348
}
361
}
349
$template->param( inputloop => \@inputloop );
362
$template->param( inputloop => \@inputloop );
350
363
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +8 lines)
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 %]
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 98-103 Link Here
98
                                    </li>
98
                                    </li>
99
                                [% END %]
99
                                [% END %]
100
100
101
101
                                [% IF ( DEBT ) %]
102
                                [% IF ( DEBT ) %]
102
                                    <li>The patron has a debt of [% DEBT | $Price %].</li>
103
                                    <li>The patron has a debt of [% DEBT | $Price %].</li>
103
                                [% END %]
104
                                [% END %]
Lines 196-201 Link Here
196
                                        [% END %]
197
                                        [% END %]
197
                                    </li>
198
                                    </li>
198
                                [% END %]
199
                                [% END %]
200
201
                                [% IF additional_materials %]
202
                                    <li>
203
                                        Please confirm that the accompanying materials are present: [% additional_materials | html %]
204
                                    </li>
205
                                [% END %]
199
                            </ul>
206
                            </ul>
200
207
201
                            [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
208
                            [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-5 / +31 lines)
Lines 118-128 Link Here
118
                                </div>
118
                                </div>
119
                            [% END %]
119
                            [% END %]
120
120
121
                            [% IF additional_materials %]
121
                            [% IF needs_confirm %]
122
                                <div class="dialog message" id="materials">
122
                                <div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
123
                                    Note about the accompanying materials: <br />
123
                                    <h3>Please confirm checkin</h3>
124
                                    [% additional_materials | html %]
124
                                    <ul>
125
                                        [% IF additional_materials %]
126
                                        <li>
127
                                        Please confirm that the accompanying materials are present: [% additional_materials | html %]
128
                                        </li>
129
                                        [% END %]
130
                                    </ul>
131
132
                                    <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
133
                                        <input type="hidden" name="barcode" value="[% itembarcode | html %]" />
134
135
                                        [% IF additional_materials %]
136
                                        <input type="hidden" name="multiple_confirm" value="1" />
137
                                        [% END %]
138
139
                                        <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, checkin (Y)</button>
140
                                        <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't checkin (N)</button>
141
                                    </form>
142
                                </div>
143
                            [% ELSE %]
144
                                [% IF additional_materials %]
145
                                <div class="dialog alert">
146
                                    <ul>
147
                                        <li>
148
                                        Note about the accompanying materials: [% additional_materials | html %]
149
                                        </li>
150
                                    </ul>
125
                                </div>
151
                                </div>
152
                                [% END %]
126
                            [% END %]
153
                            [% END %]
127
154
128
                            [% IF ( collectionItemNeedsTransferred ) %]
155
                            [% IF ( collectionItemNeedsTransferred ) %]
129
- 

Return to bug 25261