]> git.koha-community.org Git - koha.git/commit
Bug 16202: GetIssuingCharges should return a collectable amount
authorColin Campbell <colin.campbell@ptfs-europe.com>
Tue, 5 Apr 2016 11:56:24 +0000 (12:56 +0100)
committerKatrin Fischer <katrin.fischer.83@web.de>
Tue, 14 Mar 2017 16:34:01 +0000 (17:34 +0100)
commit661e6389c990c603cbc6a0a9444c27ec9d01afe2
treef09ca6b7a3025b18c7e4adf364ba9ba47b7139df
parent8b58728a7c0fa8f03dc86729a62f12fdd3154462
Bug 16202: GetIssuingCharges should return a collectable amount

Charges should not include elements less than a penny/cent
they are not displayed but can be saved to the database
causing "odd" behaviour down the line

Make the routine round the resultant charge to nearest cent,
so consistent values are returned.
Removed the one case where it was rounded post call.
Although the main danger is values generated by the discount
calculation apply the rounding to all returned charges in case
the item charge is defined using the 3rd or 4th decimal
places.

NOTE: prove -v t/db_dependent/Circulation.t triggers the change.
      Though, all the returned amounts are 0.00 only.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d84ed89557e2c921f261b1c620434d432dcbd3f7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/Circulation.pm