[Koha-bugs] [Bug 28432] New: When refunding lost fees we should not include voided payments [20.11 and below]

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 24 12:56:11 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28432

            Bug ID: 28432
           Summary: When refunding lost fees we should not include voided
                    payments [20.11 and below]
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Fines and fees
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: martin.renvoize at ptfs-europe.com
        QA Contact: testopia at bugs.koha-community.org
                CC: martin.renvoize at ptfs-europe.com,
                    nick at bywatersolutions.com,
                    testopia at bugs.koha-community.org
        Depends on: 22435, 27971, 28421

+++ This bug was initially created as a clone of Bug #28421 +++

To recreate:
1 - Mark an item lost
2 - Add a manual lost fee for that barcode to a patron 
    (or checkout before #1 and ensure a fine will be charged when marked lost)
3 - Pay the fee
4 - Void the fee
5 - Pay the fee
6 - Checkin the item
7 - The patron has a credit for twice the fee

The problematic code appears to be in _FixAccountForLostAndReturned:

        my $credits_offsets = Koha::Account::Offsets->search({
            debit_id  => $accountline->id,
            credit_id => { '!=' => undef }, # it is not the debit itself
            type      => { '!=' => 'Writeoff' },
            amount    => { '<'  => 0 } # credits are negative on the DB
        });

We count both the payment and the voided payment


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22435
[Bug 22435] account_offset types should be codes not descriptions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27971
[Bug 27971] The VOID method should be updated to respect double-entry
accounting
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28421
[Bug 28421] When refunding lost fees we should not include voided payments
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list