Bug 5708 - Incorrect Discount applied to rental charge at checkout
Summary: Incorrect Discount applied to rental charge at checkout
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Colin Campbell
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-07 17:22 UTC by Colin Campbell
Modified: 2012-10-25 23:04 UTC (History)
2 users (show)

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


Attachments
Proposed patch (5.23 KB, patch)
2011-02-07 17:46 UTC, Colin Campbell
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2011-02-07 17:22:00 UTC
An incorrect discount can be applied to the rental charge at checkout.

Seems to be two causes 
1 code does not take account of the branch where the transaction occurs. 
2 code assumes that only a single value may be returned from the db which is not the case
Comment 1 Colin Campbell 2011-02-07 17:46:39 UTC
Created attachment 3086 [details] [review]
Proposed patch
Comment 2 MJ Ray (software.coop) 2011-03-04 10:26:51 UTC
This bug is mentioned in:
Bug 5708 : Get Correct Discount when levying	rentalcharge http://lists.koha-community.org/pipermail/koha-patches/2011-February/013776.html
Comment 3 Owen Leonard 2011-03-29 14:00:34 UTC
Signing off based on this testing procedure:

1. Set up rental charges for item types, set up a discount for a patron category at a specific library.
2. Observed that before patching, the rental discount was applied to that patron category even when logged in to a different library.
3. Post-patch, rental discount was correctly applied for that patron category at the logged-in branch.
Comment 4 Chris Cormack 2011-03-30 07:02:57 UTC
Patch pushed, please test
Comment 5 Colin Campbell 2011-03-30 10:38:36 UTC
Tested in Production