]> git.koha-community.org Git - koha.git/commit
Bug 28482: Refresh line from DB to get stored value
authorNick Clemens <nick@bywatersolutions.com>
Fri, 28 May 2021 12:02:19 +0000 (12:02 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 22 Jun 2021 00:43:50 +0000 (02:43 +0200)
commitf42e2194d7484fdd52155b43307b71248121ab62
tree81fff7512913eef39ff2d83dbc7204fae847f374
parent244698daa0986c561ffcc2509b695f8670ba9700
Bug 28482: Refresh line from DB to get stored value

Before checking if the amount is 0 we get the stored value from the DB. This
ensures any amounts beyond the 6 digit precision we store will be removed.

To test:
1 - Add a processing fee of 15 to an itemtype
2 - Add an item of that type, set the replacement fee to 12.63
3 - Set MarkLostItemsAsReturned to 'On payment' only
4 - Set  WhenLostChargeReplacementFee to 'Charge'
5 - Checkout the item to a patron
6 - Mark the item lost
7 - Reload patron and confirm they are charged 27.63
8 - Go to accounting, pay amount, pay 27.63
9 - Item is still lost and not returned
10 - Apply patch
11 - Checkin the item
12 - Checkout to another patron
13 - Mark lost
14 - Patron charged 27.63
15 - Pay amount, 27.63
16 - Item returned!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c4e2f4c7180a1c4c287d11d2f2d8c635de81df38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1739543148e910a8c8d9a488a1d2b8ed304d67f0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/Account/Line.pm