]> git.koha-community.org Git - koha.git/commit
Bug 21849: Two useless Koha::Account::Offset->new calls need attention
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 16 Nov 2018 12:01:39 +0000 (07:01 -0500)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 11 Dec 2018 19:18:07 +0000 (19:18 +0000)
commita2b5407ba5c74f826c1665c1a2ef1ff6d52689fd
treea593509ccc4e3755babd2d1d30b52fb51a403582
parent2dbaaa300877ff6d96ae84b5a703753d97b6c340
Bug 21849: Two useless Koha::Account::Offset->new calls need attention

Came across those calls in bug 20598 in _FixOverduesOnReturn

        Koha::Account::Offset->new(
            {
                debit_id => $accountline->id,
                type => 'Forgiven',
                amount => $amountoutstanding * -1,
            }
        );

This does nothing if you don't store data.

Test Plan:
1) Apply this patch
2) Set up 2 items with overdue fines
3) Return one with dropbox mode
4) Note the dropbox account offset is created
5) Return one with full fine forgiveness
6) Note the forgiven account offset is created

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Circulation.pm