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

(-)a/C4/Circulation.pm (-13 / +18 lines)
Lines 2400-2418 sub AddReturn { Link Here
2400
                        my $patron = $issue->patron;
2400
                        my $patron = $issue->patron;
2401
                        $patron_unblessed = $patron->unblessed;
2401
                        $patron_unblessed = $patron->unblessed;
2402
                    }
2402
                    }
2403
                    _CalculateAndUpdateFine(
2403
2404
                        {
2404
                    # Confirm the lost charge came from the most recent patron to return the item
2405
                            issue       => $issue,
2405
                    # and only charge the fine if so
2406
                            item        => $item->unblessed,
2406
                    if ( $message->payload->{patron_id} == $patron_unblessed->{borrowernumber} ) {
2407
                            borrower    => $patron_unblessed,
2407
                        _CalculateAndUpdateFine(
2408
                            return_date => $return_date
2408
                            {
2409
                        }
2409
                                issue       => $issue,
2410
                    );
2410
                                item        => $item->unblessed,
2411
                    _FixOverduesOnReturn(
2411
                                borrower    => $patron_unblessed,
2412
                        $patron_unblessed->{borrowernumber},
2412
                                return_date => $return_date
2413
                        $item->itemnumber, undef, 'RETURNED'
2413
                            }
2414
                    );
2414
                        );
2415
                    $messages->{'LostItemFeeCharged'} = 1;
2415
                        _FixOverduesOnReturn(
2416
                            $patron_unblessed->{borrowernumber},
2417
                            $item->itemnumber, undef, 'RETURNED'
2418
                        );
2419
                        $messages->{'LostItemFeeCharged'} = 1;
2420
                    }
2416
                }
2421
                }
2417
            }
2422
            }
2418
        }
2423
        }
(-)a/Koha/Item.pm (-1 / +2 lines)
Lines 1755-1764 sub _set_found_trigger { Link Here
1755
            }
1755
            }
1756
1756
1757
        } elsif ( $lostreturn_policy eq 'charge' && ( $lost_overdue || $lost_charge ) ) {
1757
        } elsif ( $lostreturn_policy eq 'charge' && ( $lost_overdue || $lost_charge ) ) {
1758
            my $patron_id = $lost_overdue ? $lost_overdue->borrowernumber : $lost_charge->borrowernumber;
1758
            $self->add_message(
1759
            $self->add_message(
1759
                {
1760
                {
1760
                    type    => 'info',
1761
                    type    => 'info',
1761
                    message => 'lost_charge',
1762
                    message => 'lost_charge',
1763
                    payload => { patron_id => $patron_id }
1762
                }
1764
                }
1763
            );
1765
            );
1764
        }
1766
        }
1765
- 

Return to bug 38477