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

(-)a/members/paycollect.pl (-1 / +30 lines)
Lines 184-189 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
184
                    cash_register => $registerid
184
                    cash_register => $registerid
185
                }
185
                }
186
            );
186
            );
187
188
            # Return lost items when paid for
189
            if (   $payment_type ne 'WRITEOFF'
190
                && $line->debit_type_code eq 'LOST'
191
                && $line->amountoutstanding == 0 
192
                && C4::Context->preference('MarkLostItemsAsReturned') =~ m|OnPayment| )
193
            {
194
                    C4::Circulation::ReturnLostItem( $borrowernumber,
195
                        $line->itemnumber );
196
197
            }
187
            print $input->redirect(
198
            print $input->redirect(
188
                "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber&payment_id=$payment_id&change_given=$change_given");
199
                "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber&payment_id=$payment_id&change_given=$change_given");
189
        } else {
200
        } else {
Lines 208-213 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
208
                            cash_register => $registerid
219
                            cash_register => $registerid
209
                        }
220
                        }
210
                      );
221
                      );
222
            
223
                    # Return lost items when paid for
224
                    if (
225
                        C4::Context->preference('MarkLostItemsAsReturned') =~
226
                        m|OnPayment| )
227
                    {
228
229
                        for my $debit ( @selected_accountlines ){
230
                            $debit->get_from_storage;
231
                            if (   $debit->amountoutstanding == 0
232
                                && $debit->itemnumber
233
                                && $debit->debit_type_code
234
                                && ( $debit->debit_type_code eq 'LOST' ) )
235
                            {
236
                                C4::Circulation::ReturnLostItem(
237
                                    $borrowernumber, $debit->itemnumber );
238
                            }
239
                        }
240
                    }
211
                }
241
                }
212
            }
242
            }
213
            else {
243
            else {
214
- 

Return to bug 24474