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

(-)a/Koha/UI/Form/Builder/Item.pm (-4 / +8 lines)
Lines 182-191 sub generate_subfield_form { Link Here
182
        if ( $subfield->{authorised_value} eq "LOST" ) {
182
        if ( $subfield->{authorised_value} eq "LOST" ) {
183
            my $ClaimReturnedLostValue =
183
            my $ClaimReturnedLostValue =
184
              C4::Context->preference('ClaimReturnedLostValue');
184
              C4::Context->preference('ClaimReturnedLostValue');
185
            my $item_is_return_claim =
185
            my $claim = Koha::Checkouts::ReturnClaims->find(
186
                 $ClaimReturnedLostValue
186
                {
187
              && exists $item->{itemlost}
187
                    itemnumber => $item->{itemnumber},
188
              && $ClaimReturnedLostValue eq $item->{itemlost};
188
                    resolution => undef,
189
                }
190
            );
191
            my $item_is_return_claim = $ClaimReturnedLostValue
192
                && $claim;
189
            $subfield_data{IS_RETURN_CLAIM} = $item_is_return_claim;
193
            $subfield_data{IS_RETURN_CLAIM} = $item_is_return_claim;
190
194
191
            $subfield_data{IS_LOST_AV} = 1;
195
            $subfield_data{IS_LOST_AV} = 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/modal-claims.inc (-3 / +10 lines)
Lines 26-31 Link Here
26
                            Charge lost fee
26
                            Charge lost fee
27
                            </label>
27
                            </label>
28
                        </div>
28
                        </div>
29
                        <div class="checkbox">
30
                            <label for="claims-returned-refund-lost-fee">
31
                            <input id="claims-returned-refund-lost-fee" type="checkbox" value="1">
32
                            Refund previous lost fee
33
                            </label>
34
                        </div>
29
                        </div>
35
                        </div>
30
                    [% END %]
36
                    [% END %]
31
37
Lines 63-69 Link Here
63
    $(document).on("click", '#claims-returned-modal-btn-submit', function(e){
69
    $(document).on("click", '#claims-returned-modal-btn-submit', function(e){
64
        let itemnumber = $('#claims-returned-itemnumber').val();
70
        let itemnumber = $('#claims-returned-itemnumber').val();
65
        let notes = $('#claims-returned-notes').val();
71
        let notes = $('#claims-returned-notes').val();
66
        let fee = $('#claims-returned-charge-lost-fee').prop('checked') ? true : false;
72
        let charge_lost_fee = $('#claims-returned-charge-lost-fee').prop('checked') ? true : false;
73
        let refund_lost_fee = $('#claims-returned-refund-lost-fee').prop('checked') ? true : false;
67
74
68
        $('#claims-returned-modal').modal('hide');
75
        $('#claims-returned-modal').modal('hide');
69
76
Lines 74-80 Link Here
74
        params = {
81
        params = {
75
            item_id: itemnumber,
82
            item_id: itemnumber,
76
            notes: notes,
83
            notes: notes,
77
            charge_lost_fee: fee,
84
            charge_lost_fee,
85
            refund_lost_fee,
78
            created_by: logged_in_user_borrowernumber,
86
            created_by: logged_in_user_borrowernumber,
79
        };
87
        };
80
88
81
- 

Return to bug 33292