[Bug 27203] New: Order unitprice is not set anymore and totals are 0.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Bug ID: 27203 Summary: Order unitprice is not set anymore and totals are 0. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: didier.gautheron@biblibre.com Reporter: didier.gautheron@biblibre.com QA Contact: testopia@bugs.koha-community.org After 23294 commit unitprice is not undefined or equal to '' but is 0. and it's not set to ecost in acqui/addorder.pl. Either set uniprice to '' or if 0. use ecost. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #1 from Didier Gautheron <didier.gautheron@biblibre.com> --- Created attachment 114342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114342&action=edit Bug 27203: (Bug 23294 follow up) set unitprice to ecost if it's 0. Test plan: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, pre 23294 behaviour is back columns are set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz Depends on| |23294 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23294 [Bug 23294] Restore actual cost input field on order page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114476&action=edit Bug 27203: [alternate] Calculate tax based on ecost if unitprice not set There is code in populate_order_with_prices that is intended to use ecost over unitprice, it just doens't seem to be working. Making it more explicit seems to take care of the issue. To test: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, GST is calculated correctly, unitprice remains 0. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114342|0 |1 is obsolete| | --- Comment #3 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 120051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120051&action=edit Bug 27203: (Bug 23294 follow up) set unitprice to ecost if it's 0. Test plan: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, pre 23294 behaviour is back columns are set. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114476|0 |1 is obsolete| | --- Comment #4 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 120052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120052&action=edit Bug 27203: [alternate] Calculate tax based on ecost if unitprice not set There is code in populate_order_with_prices that is intended to use ecost over unitprice, it just doens't seem to be working. Making it more explicit seems to take care of the issue. To test: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, GST is calculated correctly, unitprice remains 0. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #5 from Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> --- Created attachment 120053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120053&action=edit sandbox_ecost -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|aleisha@catalyst.net.nz | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Needs Signoff |Signed Off --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Looks signed-off Should the choice between the two alternatives be done now? Or is it for QA to make it? Maybe there was talk about this ticket elsewhere? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Wait, IIUC sandboxes don't allow to apply only one patch. Retest results coming. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120051|0 |1 is obsolete| | --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 120249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120249&action=edit Bug 27203: (Bug 23294 follow up) set unitprice to ecost if it's 0. Test plan: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, pre 23294 behaviour is back columns are set. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120052|0 |1 is obsolete| | --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 120250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120250&action=edit Bug 27203: [alternate] Calculate tax based on ecost if unitprice not set There is code in populate_order_with_prices that is intended to use ecost over unitprice, it just doens't seem to be working. Making it more explicit seems to take care of the issue. To test: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, GST is calculated correctly, unitprice remains 0. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Both patches do what they advertise. Including the difference on step 7 (I missed it the first when testing) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Order unitprice is not set |Order unitprice is not set |anymore and totals are 0. |anymore and totals are 0 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Nick, can you confirm your patch is independent from the first one? Tests are missing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120249|0 |1 is obsolete| | Attachment #120250|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120551&action=edit Bug 27203: Adjust unit tests It seems the issue here is that the price passed in is a string, and not a number, so the tax value is not calculated when no unitprice is provided -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120552&action=edit Bug 27203: [alternate] Calculate tax based on ecost if unitprice not set There is code in populate_order_with_prices that is intended to use ecost over unitprice, it just doens't seem to be working. Making it more explicit seems to take care of the issue. To test: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, GST is calculated correctly, unitprice remains 0. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #11)
Nick, can you confirm your patch is independent from the first one?
Tests are missing.
They are independent, I obsoleted the first and added tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
unitprice remains 0.
More like 'Actual cost tax inc.' right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120551|0 |1 is obsolete| | --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 120724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120724&action=edit Bug 27203: Adjust unit tests It seems the issue here is that the price passed in is a string, and not a number, so the tax value is not calculated when no unitprice is provided Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120552|0 |1 is obsolete| | --- Comment #17 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 120725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120725&action=edit Bug 27203: [alternate] Calculate tax based on ecost if unitprice not set There is code in populate_order_with_prices that is intended to use ecost over unitprice, it just doens't seem to be working. Making it more explicit seems to take care of the issue. To test: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, GST is calculated correctly, unitprice remains 0. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #18 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Still works. Tests work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but I fail to understand the problem here :( I assume that we are looking at the basket summary page. Correct? I created 2 orders, one pre-patch and one post-patch, actual cost was left empty. The "Actual cost" (incl. or excl.) look exactly the same to me, both showing 0.00. Can you please help me figure this one out? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #20 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
The "Actual cost" (incl. or excl.) look exactly the same to me, both showing 0.00.
IIUC it's what the patch does. It's different from the 1st patch which not only made the GST to be set but also the Actual cost tax inc. === Something I'm not sure is:
7 - Display all columns, GST is calculated correctly, unitprice remains 0.
unitprice? I expected "Actual cost tax inc." to be mentioned instead. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- To me the table with the prices (basket summary) looks exactly the same with and without patch...so that's why I am confused. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #22 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120765&action=edit Changes after the patch Existing orders are not affected - the 'Actual cost/unitprice' is not affected (0 is correct) GST is not calculated before patch, but is correct after patch, based on the 'Budgeted cost/ecost' an is correct in totals Orders before the patch are not affected, but will correctly calculate on receipt or edit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #23 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Katrin Fischer from comment #21)
To me the table with the prices (basket summary) looks exactly the same with and without patch...so that's why I am confused.
Confusing indeed. When testing I had the new orders having GST calculated with the patch. That was the difference. comment 22: yep, that's what I had. (didn't tested receipt or edit) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. That is the line that realy confused me. I kept looking at the Actual cost columns, but you actually need to look at the GST column! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120724|0 |1 is obsolete| | --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 120814 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120814&action=edit Bug 27203: Adjust unit tests It seems the issue here is that the price passed in is a string, and not a number, so the tax value is not calculated when no unitprice is provided Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120725|0 |1 is obsolete| | --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 120815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120815&action=edit Bug 27203: [alternate] Calculate tax based on ecost if unitprice not set There is code in populate_order_with_prices that is intended to use ecost over unitprice, it just doens't seem to be working. Making it more explicit seems to take care of the issue. To test: 1 - Create a basket 2 - Add an order line, don't set 'Actual cost: ', but use vendor price and a discount. 3 - Save 4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set. 5 - Apply batch 6 - Redo 1,2, 3 7 - Display all columns, GST is calculated correctly, unitprice remains 0. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 --- Comment #27 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks for the test and QA :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.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=27203 --- Comment #28 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.05, 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=27203 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #29 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.06 |21.05.00,20.11.06,20.05.12 released in| | --- Comment #30 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|21.05.00,20.11.06,20.05.12 |21.05.00,20.11.06,20.05.12, released in| |19.11.18 --- Comment #31 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 19.11.x branch for 19.11.18 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27203 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org