[Bug 28627] New: Revert the order receive page to display 'Actual cost' as ecost_tax_included/ecost_tax_excluded if unitprice not set
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Bug ID: 28627 Summary: Revert the order receive page to display 'Actual cost' as ecost_tax_included/ecost_tax_excluded if unitprice not set Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org Currently, the order receive page (orderreceive.tt) displays unitprice_tax_included/unitprice_tax_excluded in the 'Actual cost' field. However, if the user has not set a unitprice previously in the acquisitions workflow then the 'Actual cost' is displayed with a value of 0.000 In Koha 20.05.x the 'Actual cost' was displayed as ecost_tax_included/ecost_tax_excluded if unitprice was not defined. Like in Bug 25750 , Koha should fallback to using ecost_tax_included and ecost_tax_excluded if unitprice is not defined. -- 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=28627 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 122380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122380&action=edit Bug 28627: Fallback to displaying ecost_tax_included, ecost_tax_excluded in orderreceive.pl Test plan: 1. Create a basket and adding items to it. Set the 'Vendor price' to '20', do not add an 'Actual cost' 2. Close the basket 3. Select 'Receive shipment' 4. Set a value for vendor invoice 5. Receive the order you created 6. Observe 'Actual cost' is = 0.00 7. Apply patch 8. Refresh the order receival page, and confirm the 'Actual cost' = 20.00 Sponsored-By: South Taranaki District Council, NZ -- 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=28627 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |alexbuckley@catalyst.net.nz |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=28627 Ray Delahunty <r.delahunty@arts.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.delahunty@arts.ac.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Janet McGowan <janet.mcgowan@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janet.mcgowan@ptfs-europe.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 jmbroust <jean-manuel.broust@univ-lyon2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jean-manuel.broust@univ-lyo | |n2.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Julien Sicot (Univ. Rennes 2) <julien.sicot@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Signed Off CC| |julien.sicot@univ-rennes2.f | |r --- Comment #2 from Julien Sicot (Univ. Rennes 2) <julien.sicot@univ-rennes2.fr> --- Hi Alex, Thank you this patch, I just tested it (master and 20.11), everything applies well and fixes the issue. Thank you Julien Sicot Systems Librarian Université Rennes 2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 --- Comment #3 from Donna <bwsdonna@gmail.com> --- This is not working for me. 1. Create a basket 2. Add item. Set Vendor price to 20, retail price to 30, and replacement price to 40 3. Close basket 4. View the Ordered items in /cgi-bin/koha/acqui/ordered.pl for the Fund you assigned the item to. Note the Estimated cost is 30, which is the retail price, not the vendor price 4. Receive the item. The Retail price is correct (30), the replacement price is correct (40), but the Budgeted cost is wrong (30, should be 20), and the actual cost is wrong (30, should be 20). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Donna <bwsdonna@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |bwsdonna@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff Depends on| |23376 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23376 [Bug 23376] Cleanup order receive page code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 127592 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127592&action=edit Bug 28627: [alternate] Calculate unitprice if not set On bug 23376 the developer was too clever by half. Instead of passing values to the template we moved to simply passing the order object. The calculations that populated the unitprice, however, were simply dropped. This patch restores the behaviour of setting unitprice to the estimated cost by default. We do this conditionally in the template To test: 1 - Create a basket and adding items to it. Set the 'Vendor price' to '20', do not add an 'Actual cost' 2 - Close the basket 3 - Select 'Receive shipment' 4 - Set a value for vendor invoice 5 - Receive the order you created 6 - Observe 'Actual cost' is = 0.00 7 - Apply patch 8 - Refresh the order receival page, and confirm the 'Actual cost' = 20.00 9 - Cancel receipt - reopen basket - edit order - add an actual cost - close 10 - Receive the order again 11 - Confirm the actual price is used 12 - Repeat this whole plan, but ensure the vendor has a different value for Invoice prices: Include tax -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Alex Buckley from comment #1)
Created attachment 122380 [details] [review] Bug 28627: Fallback to displaying ecost_tax_included, ecost_tax_excluded in orderreceive.pl
I think the logic here is was backward IF (order.unitprice_tax_included == 0.00000) THEN order.unitprice_tax_included ELSE order.ecost_tax_included I submitted an alternate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Nathan Walker <nathan.walker@citruslibraries.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nathan.walker@citruslibrari | |es.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=28627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127592|0 |1 is obsolete| | --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 127597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127597&action=edit Bug 28627: [alternate] Calculate unitprice if not set On bug 23376 the developer was too clever by half. Instead of passing values to the template we moved to simply passing the order object. The calculations that populated the unitprice, however, were simply dropped. This patch restores the behaviour of setting unitprice to the estimated cost by default. We do this conditionally in the template To test: 1 - Create a basket and adding items to it. Set the 'Vendor price' to '20', do not add an 'Actual cost' 2 - Close the basket 3 - Select 'Receive shipment' 4 - Set a value for vendor invoice 5 - Receive the order you created 6 - Observe 'Actual cost' is = 0.00 7 - Apply patch 8 - Refresh the order receival page, and confirm the 'Actual cost' = 20.00 9 - Cancel receipt - reopen basket - edit order - add an actual cost - close 10 - Receive the order again 11 - Confirm the actual price is used 12 - Repeat this whole plan, but ensure the vendor has a different value for Invoice prices: Include tax Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127597|0 |1 is obsolete| | --- Comment #7 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 127604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127604&action=edit Bug 28627: [alternate] Calculate unitprice if not set On bug 23376 the developer was too clever by half. Instead of passing values to the template we moved to simply passing the order object. The calculations that populated the unitprice, however, were simply dropped. This patch restores the behaviour of setting unitprice to the estimated cost by default. We do this conditionally in the template To test: 1 - Create a basket and adding items to it. Set the 'Vendor price' to '20', do not add an 'Actual cost' 2 - Close the basket 3 - Select 'Receive shipment' 4 - Set a value for vendor invoice 5 - Receive the order you created 6 - Observe 'Actual cost' is = 0.00 7 - Apply patch 8 - Refresh the order receival page, and confirm the 'Actual cost' = 20.00 9 - Cancel receipt - reopen basket - edit order - add an actual cost - close 10 - Receive the order again 11 - Confirm the actual price is used 12 - Repeat this whole plan, but ensure the vendor has a different value for Invoice prices: Include tax Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Attachment #122380|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Sonia Bouis <sonia.bouis@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sonia.bouis@univ-lyon3.fr --- Comment #9 from Sonia Bouis <sonia.bouis@univ-lyon3.fr> --- Sorry, but I found a problem with this patch. I have just tried and compared with a master from this morning. The preference system AcqCreateItem is on "placing an order" If I tried to save an order with this patch with an item where all mandatory item are filled, I have the message : "Form not submitted because of the following problem(s): - 4 item mandatory fields empty". If I tried the same on a master branch, my order is saved normally. Can you reproduce this issue ? Sonia -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Sonia Bouis from comment #9)
Sorry, but I found a problem with this patch.
I have just tried and compared with a master from this morning. The preference system AcqCreateItem is on "placing an order"
If I tried to save an order with this patch with an item where all mandatory item are filled, I have the message : "Form not submitted because of the following problem(s): - 4 item mandatory fields empty".
If I tried the same on a master branch, my order is saved normally.
Can you reproduce this issue ? Sonia
I don't recreate Sonia. This patch only touches the template on the receiving page. Can you provide a few more steps, or a screenshot? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Koha Team University Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr --- Comment #11 from Koha Team University Lyon 3 <koha@univ-lyon3.fr> --- Hi Nick, The issue exists but I can reproduce it on the master git branch dating from yesterday (I don't understand why it has worked yesterday.. damn cache..) and on a sandbox. So, it's not linked to this patch, sorry for the wrong alert. I'm going to open a new BZ. (By the way, I haven't managed to have the sandbox provided on the bywatersolutions sandbox system) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- For the record, Sonia reported on bug 29496. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.05 released in| | CC| |kyle@bywatersolutions.com --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00,21.05.05 |21.11.00,21.05.05,20.11.12 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Pushed to oldstable --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Bug 28627 depends on bug 23376, which changed state. Bug 23376 Summary: Cleanup order receive page code https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23376 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28627 Bug 28627 depends on bug 23376, which changed state. Bug 23376 Summary: Cleanup order receive page code https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23376 What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org