Bug 25115 - Use get_effective_rule for getting rental discount
Summary: Use get_effective_rule for getting rental discount
Status: RESOLVED DUPLICATE of bug 26593
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-11 20:23 UTC by Lari Taskula
Modified: 2022-07-15 14:34 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 25115: Use get_effective_rule for getting rental discount (1.81 KB, patch)
2020-04-11 20:32 UTC, Lari Taskula
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2022-07-15 14:34:41 UTC

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