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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 2 Jan 2019 09:23:04 +0000 (10:23 +0100)
commitd2d640a55a78c5edc9eb1230f626525f0a775afa
treeab049aad9b221454a5421480c1677ca2e8460982
parente2e7dc62202957428fc0170573af8e347cbf5e58
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>
(cherry picked from commit a2b5407ba5c74f826c1665c1a2ef1ff6d52689fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff3d3776a4d9b52da49b6ad4b2a1dde1da9425ee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 56cbc940acba33003cb49f3edc964976dd2e0340)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Circulation.pm