[Bug 32167] New: When adding an order from a a staged file without item fields we only add price if there is a vendor discount
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Bug ID: 32167 Summary: When adding an order from a a staged file without item fields we only add price if there is a vendor discount Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org In addorderis02907.pl: my $c = $c_discount ? $c_discount : $bookseller->discount; $orderinfo{discount} = $c; if ( $c ) { $orderinfo{ecost} = $c_price * ( 1 - $c / 100 ); $orderinfo{rrp} = $c_price; } $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate; IF there is no discount, we don't set the price fields! This combines with 32166 to end up importing blank order records -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14680 Status|NEW |Needs Signoff Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14680 [Bug 14680] When creating orders from a staged file discounts supplied in the form are added -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 143703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143703&action=edit Bug 32167: (bug 14860 follow-up) Populate price fields even if no discount on vendor On bug 14860 an 'else' was removed, assuming the price fields were set before discount, this was incorrect. This patch renames the variable and always set the price, only discounting ecost if a discount, but setting the values even if not To test: 0 - Have a vendor with a discount of 0% specified (no discount) 1 - Export a record from your Koha 2 - Stage the record for import and match on biblionumber 3 - Add to a basket in acq from the staged file 4 - Select the title, and set order price to $10 and do not fill the discount field 5 - Add the order - note $0 order line 6 - Repeat with another vendor with a 10% discount and confirm that is correct 7 - Apply patch 8 - Repeat 2-4 9 - Add the order and confirm $10 price 10 - Repeat with discounted vendor, confirm prices are set discounted correctly https://bugs.koha-community.org/show_bug.cgi?id=14680 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143703|0 |1 is obsolete| | --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 143704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143704&action=edit Bug 32167: (bug 14860 follow-up) Populate price fields even if no discount on vendor On bug 14860 an 'else' was removed, assuming the price fields were set before discount, this was incorrect. This patch renames the variable and always set the price, only discounting ecost if a discount, but setting the values even if not To test: 0 - Have a vendor with a discount of 0% specified (no discount) 1 - Export a record from your Koha 2 - Stage the record for import and match on biblionumber 3 - Add to a basket in acq from the staged file 4 - Select the title, and set order price to $10 and do not fill the discount field 5 - Add the order - note $0 order line 6 - Repeat with another vendor with a 10% discount and confirm that is correct 7 - Apply patch 8 - Repeat 2-4 9 - Add the order and confirm $10 price 10 - Repeat with discounted vendor, confirm prices are set discounted correctly https://bugs.koha-community.org/show_bug.cgi?id=14680 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143704|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 144077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144077&action=edit Bug 32167: (bug 14860 follow-up) Populate price fields even if no discount on vendor On bug 14860 an 'else' was removed, assuming the price fields were set before discount, this was incorrect. This patch renames the variable and always set the price, only discounting ecost if a discount, but setting the values even if not To test: 0 - Have a vendor with a discount of 0% specified (no discount) 1 - Export a record from your Koha 2 - Stage the record for import and match on biblionumber 3 - Add to a basket in acq from the staged file 4 - Select the title, and set order price to $10 and do not fill the discount field 5 - Add the order - note $0 order line 6 - Repeat with another vendor with a 10% discount and confirm that is correct 7 - Apply patch 8 - Repeat 2-4 9 - Add the order and confirm $10 price 10 - Repeat with discounted vendor, confirm prices are set discounted correctly https://bugs.koha-community.org/show_bug.cgi?id=14680 Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144077|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144162 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144162&action=edit Bug 32167: (bug 14860 follow-up) Populate price fields even if no discount on vendor On bug 14860 an 'else' was removed, assuming the price fields were set before discount, this was incorrect. This patch renames the variable and always set the price, only discounting ecost if a discount, but setting the values even if not To test: 0 - Have a vendor with a discount of 0% specified (no discount) 1 - Export a record from your Koha 2 - Stage the record for import and match on biblionumber 3 - Add to a basket in acq from the staged file 4 - Select the title, and set order price to $10 and do not fill the discount field 5 - Add the order - note $0 order line 6 - Repeat with another vendor with a 10% discount and confirm that is correct 7 - Apply patch 8 - Repeat 2-4 9 - Add the order and confirm $10 price 10 - Repeat with discounted vendor, confirm prices are set discounted correctly Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as expected, code is clear. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply cleanly to 22.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 144208 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144208&action=edit Bug 32167: [22.05.x] (bug 14860 follow-up) Populate price fields even if no discount on vendor On bug 14860 an 'else' was removed, assuming the price fields were set before discount, this was incorrect. This patch renames the variable and always set the price, only discounting ecost if a discount, but setting the values even if not To test: 0 - Have a vendor with a discount of 0% specified (no discount) 1 - Export a record from your Koha 2 - Stage the record for import and match on biblionumber 3 - Add to a basket in acq from the staged file 4 - Select the title, and set order price to $10 and do not fill the discount field 5 - Add the order - note $0 order line 6 - Repeat with another vendor with a 10% discount and confirm that is correct 7 - Apply patch 8 - Repeat 2-4 9 - Add the order and confirm $10 price 10 - Repeat with discounted vendor, confirm prices are set discounted correctly Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Thanks Nick! This fix is backported to 22.05.x for upcoming 22.05.07 release! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 144212 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144212&action=edit Bug 32167: [21.11.x] (bug 14860 follow-up) Populate price fields even if no discount on vendor On bug 14860 an 'else' was removed, assuming the price fields were set before discount, this was incorrect. This patch renames the variable and always set the price, only discounting ecost if a discount, but setting the values even if not To test: 0 - Have a vendor with a discount of 0% specified (no discount) 1 - Export a record from your Koha 2 - Stage the record for import and match on biblionumber 3 - Add to a basket in acq from the staged file 4 - Select the title, and set order price to $10 and do not fill the discount field 5 - Add the order - note $0 order line 6 - Repeat with another vendor with a 10% discount and confirm that is correct 7 - Apply patch 8 - Repeat 2-4 9 - Add the order and confirm $10 price 10 - Repeat with discounted vendor, confirm prices are set discounted correctly Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32167 Bug 32167 depends on bug 14680, which changed state. Bug 14680 Summary: When creating orders from a staged file discounts supplied in the form are added https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14680 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org