]> git.koha-community.org Git - koha.git/commit
Bug 28482: [19.11.x] Refresh line from DB to get stored value
authorNick Clemens <nick@bywatersolutions.com>
Fri, 28 May 2021 12:02:19 +0000 (12:02 +0000)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Thu, 8 Jul 2021 01:55:03 +0000 (01:55 +0000)
commit50c99a360cf2ef962b094bcdfbb90d0971f3e66e
tree96c757a712ec945c7ba0beb71c483c87a881a168
parent86b64a733a582382300831db1ec2b1f78078448f
Bug 28482: [19.11.x] 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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Koha/Account/Line.pm