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

(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (+11 lines)
Lines 130-135 $(document).ready(function() { Link Here
130
            }, "json")
130
            }, "json")
131
        });
131
        });
132
132
133
        $(".confirm:checked:visible").each(function() {
134
            itemnumber = $(this).val();
135
            id = "#checkin_" + itemnumber;
136
            materials = $(this).data('materials');
137
138
            $(this).replaceWith("<span class='confirm' id='checkin_" + itemnumber + "'>" + __("Confirm") + " (<span>" + materials + "</span>): <input type='checkbox' class='checkin' name='checkin' value='" + itemnumber +"'></input></span>");
139
            $(id).parent().parent().addClass('warn');
140
        });
141
133
        $(".renew:checked:visible").each(function() {
142
        $(".renew:checked:visible").each(function() {
134
            var override_limit = $("#override_limit").is(':checked') ? 1 : 0;
143
            var override_limit = $("#override_limit").is(':checked') ? 1 : 0;
135
144
Lines 543-548 $(document).ready(function() { Link Here
543
                    "mDataProp": function ( oObj ) {
552
                    "mDataProp": function ( oObj ) {
544
                        if ( oObj.can_renew_error == "on_reserve" ) {
553
                        if ( oObj.can_renew_error == "on_reserve" ) {
545
                            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + __("On hold") + "</a>";
554
                            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + __("On hold") + "</a>";
555
                        } else if ( oObj.materials ) {
556
                            return "<input type='checkbox' class='confirm' id='confirm_" + oObj.itemnumber + "' name='confirm' value='" + oObj.itemnumber + "' data-materials='" + oObj.materials.escapeHtml() + "'></input>";
546
                        } else {
557
                        } else {
547
                            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
558
                            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
548
                        }
559
                        }
(-)a/svc/checkouts (-1 / +8 lines)
Lines 104-109 my $sql = ' Link Here
104
        items.damaged,
104
        items.damaged,
105
        items.location,
105
        items.location,
106
        items.enumchron,
106
        items.enumchron,
107
        items.materials,
107
108
108
        DATEDIFF( issues.issuedate, CURRENT_DATE() ) AS not_issued_today,
109
        DATEDIFF( issues.issuedate, CURRENT_DATE() ) AS not_issued_today,
109
110
Lines 139-144 $sth->execute(@parameters); Link Here
139
140
140
my $item_level_itypes = C4::Context->preference('item-level_itypes');
141
my $item_level_itypes = C4::Context->preference('item-level_itypes');
141
my $claims_returned_lost_value = C4::Context->preference('ClaimReturnedLostValue');
142
my $claims_returned_lost_value = C4::Context->preference('ClaimReturnedLostValue');
143
my $confirm_parts_required = C4::Context->preference("CircConfirmItemParts");
142
144
143
my $itemtypes = { map { $_->{itemtype} => $_->{translated_description} } @{ Koha::ItemTypes->search_with_localization->unblessed } };
145
my $itemtypes = { map { $_->{itemtype} => $_->{translated_description} } @{ Koha::ItemTypes->search_with_localization->unblessed } };
144
146
Lines 194-199 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
194
            { kohafield => 'items.damaged', authorised_value => $c->{damaged} } );
196
            { kohafield => 'items.damaged', authorised_value => $c->{damaged} } );
195
        $damaged = $av->{lib} ? $av->{lib} : '';
197
        $damaged = $av->{lib} ? $av->{lib} : '';
196
    }
198
    }
199
    my $materials;
200
    if ( $c->{materials} && $confirm_parts_required ) {
201
        my $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => '', kohafield =>'items.materials', authorised_value => $c->{materials} });
202
        $materials = $descriptions->{lib} // $c->{materials};
203
    }
197
    my @subtitles = split(/ \| /, $c->{'subtitle'} // '' );
204
    my @subtitles = split(/ \| /, $c->{'subtitle'} // '' );
198
    my $checkout = {
205
    my $checkout = {
199
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
206
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
Lines 256-261 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
256
        lost    => $lost,
263
        lost    => $lost,
257
        claims_returned => $claims_returned,
264
        claims_returned => $claims_returned,
258
        damaged => $damaged,
265
        damaged => $damaged,
266
        materials => $materials,
259
        borrower => {
267
        borrower => {
260
            surname    => $c->{surname},
268
            surname    => $c->{surname},
261
            firstname  => $c->{firstname},
269
            firstname  => $c->{firstname},
262
- 

Return to bug 25261