[Koha-bugs] [Bug 26593] Rental discounts are applied in wrong precedence order
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Dec 21 14:06:45 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593
Victor Grousset/tuxayo <victor at tuxayo.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #113823|0 |1
is obsolete| |
--- Comment #3 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
Created attachment 114552
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114552&action=edit
Bug 26593: Remove _get_discount_from_rule
This patch remove the private sub used in GetIssuingCharges in favor
of get_effective_rule
It corrects the wrong precedence for rules and adds tests to cover this
subroutine
NOTE: the 'branch' for the discount will be determined by the signed in branch,
this is a bug to be fixed in the future
To test:
1 - Define a rentalcharge for an itemtype
2 - Define a 10% discount for library A, category A, all itemtypes
3 - Define a 50% discount for all libraries, category A, same itemtype
4 - Attempt to checkout an item from library A of the matching itemtype
5 - The 50% discount is applied
6 - Apply patches
7 - Attempt to checkout an item from library A of the matching itemtype
8 - The 10% discount is applied
prove -v t/db_dependent/Circulation.t
Signed-off-by: Victor Grousset/tuxayo <victor at tuxayo.net>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list