Bug 18468

Summary: When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
Product: Koha Reporter: Nick Clemens <nick>
Component: AcquisitionsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jean-manuel.broust, jonathan.druart, katrin.fischer, kyle
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19165
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15503    
Bug Blocks:    
Attachments: Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

Description Nick Clemens 2017-04-21 01:36:32 UTC
Discounts are not stored in $orderinfo before passing to populate prices
Comment 1 Nick Clemens 2017-04-21 01:39:30 UTC
Created attachment 62512 [details] [review]
Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

To test:
1 - Setup a vendor with a discount
2 - Stage a file
3 - Create a basket
4 - Order from staged file
5 - Add a price but no discount
6 - Save order
7 - Note ecost is not discounted
8 - Apply patch
9 - Repeate 2-6
10 - Note ecost is discounted
Comment 2 Alex Buckley 2017-04-23 21:41:49 UTC
Created attachment 62578 [details] [review]
Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

To test:
1 - Setup a vendor with a discount
2 - Stage a file
3 - Create a basket
4 - Order from staged file
5 - Add a price but no discount
6 - Save order
7 - Note ecost is not discounted
8 - Apply patch
9 - Repeate 2-6
10 - Note ecost is discounted

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 3 Jonathan Druart 2017-04-24 17:00:50 UTC
Created attachment 62618 [details] [review]
Bug 18468 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

To test:
1 - Setup a vendor with a discount
2 - Stage a file
3 - Create a basket
4 - Order from staged file
5 - Add a price but no discount
6 - Save order
7 - Note ecost is not discounted
8 - Apply patch
9 - Repeate 2-6
10 - Note ecost is discounted

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Kyle M Hall 2017-04-24 17:16:49 UTC
Pushed to master for 17.05, thanks Nick!
Comment 5 jmbroust 2017-05-05 09:42:49 UTC
Hello, I'm into testing Koha 16.11.06 and i noticed the same problem. Can this patch be backported to 16.11 or shall I open a new bug ? Thanx.
Comment 6 Jonathan Druart 2017-05-05 13:13:43 UTC
(In reply to jmbroust from comment #5)
> Hello, I'm into testing Koha 16.11.06 and i noticed the same problem. Can
> this patch be backported to 16.11 or shall I open a new bug ? Thanx.

Ccing Katrin, Rmaint 16.11.
Comment 7 Katrin Fischer 2017-05-13 11:43:09 UTC
Dependency is not in 16.11.x.
Comment 8 Katrin Fischer 2017-05-14 12:02:21 UTC
Just noticed the earlier comments - checking.
Comment 9 Katrin Fischer 2017-05-14 12:04:42 UTC
The patch from master doesn't apply cleanly on 16.11.x and I am not sure how to resolve the conflict. Can someone take a look and provide a patch for 16.11.x?
Comment 10 Katrin Fischer 2017-07-16 12:51:49 UTC
The conflict in acqui/addorderiso2709.pl is quite confusing, need some help to resolve that.
Comment 11 Jonathan Druart 2017-07-17 14:02:07 UTC
This patch is a follow-up for bug 15503, that is not in 16.11.x
What is raised on comment 5 must be reported on another bug report as it is certainly not fixed by this patch.