Bug 4831 - Actual Price being ignored after receive
Summary: Actual Price being ignored after receive
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) critical (vote)
Assignee: Srdjan Jankovic
QA Contact: Bugs List
: 5796 (view as bug list)
Depends on:
Blocks: 959
  Show dependency treegraph
Reported: 2010-05-27 16:56 UTC by Nicole C. Engard
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:

actual price receipt (32.78 KB, image/png)
2010-05-27 16:56 UTC, Nicole C. Engard
amount encumbered on main acq page doesn't match (35.21 KB, image/png)
2010-05-27 16:57 UTC, Nicole C. Engard
patch (884 bytes, patch)
2011-09-07 04:06 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received" (1.19 KB, patch)
2011-09-18 20:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2010-05-27 16:56:59 UTC
Created attachment 2180 [details]
actual price receipt

See attached.  I changed the actual price to very high numbers and saved.  When I see the receipt of my payments it shows the right actual price, but when I look at the amount encumbered on the main acq page it is not showing the right amount.
Comment 1 Nicole C. Engard 2010-05-27 16:57:19 UTC
Created attachment 2181 [details]
amount encumbered on main acq page doesn't match
Comment 2 Nicole C. Engard 2011-08-02 21:33:37 UTC
How is it that no one else finds this a problem? Reported over a year ago and still no comments ... anyone have any ideas??
Comment 3 Katrin Fischer 2011-08-02 21:40:22 UTC
Hi Nicole, 
I agree with you this is an evil bug. It's on my personal list of things I would really love to see fixed.
Comment 4 Nicole C. Engard 2011-08-02 23:43:25 UTC
A bit of testing has found that 'budgeted cost' is what's used - but actual cost is shown on the list of 'already received' items.  If that helps solve the problem at all.
Comment 5 Srdjan Jankovic 2011-09-07 04:06:23 UTC Comment hidden (obsolete)
Comment 6 Nicole C. Engard 2011-09-13 11:48:47 UTC
*** Bug 5796 has been marked as a duplicate of this bug. ***
Comment 7 Katrin Fischer 2011-09-18 20:29:46 UTC
Created attachment 5453 [details] [review]
bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received"

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

To test:
- add new fund for an active budget
- order item, price 8.00
- check funds page and acq home: committed amount should be 8.00
- receive item, enter actual price 10.00
- check funds page and acq home: spent amount should be 10.00
Comment 8 Ian Walls 2011-09-22 01:59:52 UTC
Modifies SQL query to take the first non-NULL value of (unitprice, ecost); if unitprice is NULL, then proceed as before.  However, if unitprice is set, use that value instead.

Easy to read, marking as Passed QA.
Comment 9 Chris Cormack 2011-09-22 15:49:44 UTC
Pushed, please test
Comment 10 Katrin Fischer 2011-10-26 15:45:44 UTC
Tested on 3.6/current master.

The actual price given when receiving an item is now correctly used for calculation of the spent values for budgets on the acquisition start page and funds page.