[Koha-bugs] [Bug 14591] book drop / drop box mode incorrectly decrements accrued overdue fines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 6 15:10:56 CET 2018


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

--- Comment #4 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Kyle M Hall from comment #3)
> I think the solution is to remove all the dropbox code, and make dropbox
> mode just be a backdated return which backdates to the last day the library
> was previously open.

I think we now have the account offsets, and can rewrite _FixOverduesOnReturn
as I did with _FixAccountForLostAndReturned, to take them into account. We need
to:

- Make sure each 'increment' actually creates an offset (this of course should
be possible with $line->adjust from bug 21727)
- Replace the current code so it doesn't touch 'amount'. It should calculate
the amount to substract, and create a special type of credit. If there was a
writeoff, skip that writeoff amount, if there was a (maybe partial) payment,
refund it with a CR account line. So:

my $amount = calaculate_amount_to_backtrack_skipping_writeoffs({ $fine_line });
$account->add_credit({ amount => $amount, type => 'credit_return' })->apply({
debit => $fine_line });

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list