[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
Thu Nov 19 16:54:03 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26593

--- Comment #2 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 113823
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113823&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

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list