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

            Bug ID: 23018
           Summary: Refunding a lost item fee may trigger error if any fee
                    has been written off related to that item
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Circulation
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

If a lost item fee is written off, it creates a writeoff with the same
itemnumber but the amount column is a negative number.

Now, when the lost item is returned, it calls _FixAccountForLostAndReturned
which searchs for all accountlines with an account type of 'L' or 'W'.

Then, if the *first* of those lines has an outstanding balance, a credit is
created and *all* the lines found are passed to $credit->apply. The apply
method then calls is_debit on each line and when it hits the writeoff, it
throws an exception ( Koha::Exceptions::Account::IsNotDebit ).

When this happens, the credit is creating but not applied the the outstanding
lost item fee, and the librarian is presented with an error page.

It seems like the solution is to only fetch the first result since it seems
like that is the only one we should be operating on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to