Bug 25115

Summary: Use get_effective_rule for getting rental discount
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: Fines and feesAssignee: Lari Taskula <lari.taskula>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, lari.taskula, nick
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 25115: Use get_effective_rule for getting rental discount

Description Lari Taskula 2020-04-11 20:23:46 UTC
We have this logic for searching rentaldiscount rule https://github.com/Koha-Community/Koha/blob/6ac037f817def256c85706413036bee3f78ed40e/C4/Circulation.pm#L3304-L3326

Why? This is against documentation on sorting order of circulation rules in the user interface.

Use Koha::CirculationRules->get_effective_rule() instead.
Comment 1 Lari Taskula 2020-04-11 20:32:33 UTC
Created attachment 102769 [details] [review]
Bug 25115: Use get_effective_rule for getting rental discount
Comment 2 Lari Taskula 2020-04-11 20:33:21 UTC
Added a proposed patch if this Bug is valid.

GetIssuingCharges() seems to have no unit test, could someone generate one for this? :)
Comment 3 Aleisha Amohia 2021-01-19 21:39:42 UTC
Can you please provide a test plan for the patch?
Comment 4 Nick Clemens (kidclamp) 2022-07-15 14:34:41 UTC

*** This bug has been marked as a duplicate of bug 26593 ***