Bug 19165

Summary: [16.11.x] When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
Product: Koha Reporter: Christophe Croullebois <christophe.croullebois>
Component: AcquisitionsAssignee: Christophe Croullebois <christophe.croullebois>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: alexbuckley, christophe.croullebois, david.bourgault, fridolin.somers, julian.maurice, katrin.fischer
Version: 16.11   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18468
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Discounts are not stored in $orderinfo before passing to populate prices
new rebased patch
Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

Description Christophe Croullebois 2017-08-23 07:47:12 UTC
Discounts are not stored in $orderinfo before passing to populate prices
Comment 1 Christophe Croullebois 2017-08-23 11:48:41 UTC
Created attachment 66380 [details] [review]
Discounts are not stored in $orderinfo before passing to populate prices

This patch is the same than Bug 18468, just for 16.11.

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-09-09 02:02:15 UTC
Hi Christophe

Your patch cannot be successfully applied (see below), could you please fix this up and I will be happy to test again:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
fatal: sha1 information is lacking or useless (acqui/addorderiso2709.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Discounts-are-not-stored-in-orderinfo-before-passi-WXlSlx.patch
Comment 3 Christophe Croullebois 2017-09-12 07:32:36 UTC
Hi Alex,
thx for your attempt, I'll try to rebase it this morning.
Best regards.
Comment 4 Christophe Croullebois 2017-09-12 12:19:57 UTC
Created attachment 67078 [details] [review]
new rebased patch

Now it must be ok Alex, thx
Comment 5 Alex Buckley 2017-09-13 07:39:24 UTC
Sorry Christophe unfortunately it still cannot apply correctly on up to date master branch.

Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

67078 - new rebased patch

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
fatal: sha1 information is lacking or useless (acqui/addorderiso2709.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/new-rebased-patch-iCks9Z.patch
Comment 6 Christophe Croullebois 2017-09-13 07:55:59 UTC
Hello Alex,
ok I understand, in fact this patch is the same than Bug 18468, and in this one people asked to create a new bug report for 16.11.x.
I have done that and to test you have to use a branch 16.11.x to apply it not the master.
Normally it must be ok on a branch 16.11.x.
Thx again.
Comment 7 David Bourgault 2017-09-22 20:07:45 UTC
Created attachment 67335 [details] [review]
Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

Signed-off-by: Your Name <david.bourgault@inlibro.com>
Comment 8 David Bourgault 2017-09-22 20:10:09 UTC
Oops, forgot to change a line in that git alias.

Tested working on Koha v16.11.10
Comment 9 Katrin Fischer 2017-10-14 12:49:10 UTC
Assuming that this is for 16.11.x only?

This patch has been pushed to 16.11.x and will be in 16.11.13.
Comment 10 Julian Maurice 2017-10-27 14:07:02 UTC
Hi Katrin,

should we change the status to Pushed to Stable ?
Comment 11 Katrin Fischer 2017-10-27 14:31:11 UTC
Hm, guess I messed up a bit here. Changing status.