[Bug 19780] New: Actual price is not updated after it has been amended post receiving an order
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Bug ID: 19780 Summary: Actual price is not updated after it has been amended post receiving an order Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: alexbuckley@catalyst.net.nz Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org The steps to replicate this bug are as follows: 1. Create an order and set the actual price to 9.00 2. Receieve the order changing the actual price value to 10.00. This is to represent the librarian accidentally entering in a different actual price value at receival. 3. Modify the actual value by clicking on the order line. The order page will appear and notice the actual price of 10.00 is displayed. Change this actual price value to 9.00 and save. 4.View invoices and notice that the actual price displayed for the order is still 10.00 (set in step 2) when it should be 9.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 69622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69622&action=edit Bug 19780 - Updating the invoice costs after updating of the actual value post receiving of the order This invoice will update the invoice values if the order actual price value is modified after the order has been received. Test plan: 1. Create an order with the vendor price: 10.00 and actual price of 12.00 2. Close the order and receive the shipment. Change the actual price in the receival page to 14.00 3. View the invoices and notice that 14.00 is the value displayed 4. Go back to the order and click on the order line to modify the order. Change the actual price to 15.00 5. View the invoice now and notice that 14.00 is still the value being displayed 6. Apply patch 7. Repeat steps 1,2,3,4 and 5 and notice that 15.00 is the value displayed in the invoice 8. Now repeat steps 1. View the aqorders database table and notice after step 1 is completed the order has unitprice:12.00 and unitprice_tax_included and unitprice_tax_excluded values of NULL 9. Now before closing the order modify it and set the actual price to 14.00 10. Check the aqorders table again and notice that the unitprice is 14.00 and the unitprice_tax_included and unitprice_tax_excluded both equal NULL. This means the unitprice_tax_included and unitprice_tax_excluded values are not being updated before the order has been receieved by they are being correctly updated if the order has been received and the actual price is changed. Sponsored-by: Horowhenua Distircit Council -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Jon Knight <J.P.Knight@lboro.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |J.P.Knight@lboro.ac.uk --- Comment #2 from Jon Knight <J.P.Knight@lboro.ac.uk> --- I applied this patch but in step 7 I still seem to have 14.00 shown in the invoice. I wonder if this patch would benefit from a test script too? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 --- Comment #3 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 73359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73359&action=edit Bug 19780 - Updating the invoice costs after updating the actual cost of an order following the receival of the order This patch builds on the previous patch attached to the bug report 19780. The purpose of this patch is to fix the current bug in Koha which is if you have accidently written in the incorrect value into an order receival form then try to correct the value by clicking on the order line link and writing in a new value into the actual value input field of the order and then save the form and go and view the invoice you notice that the invoice amount has not been updated to match the newly entered actual value of the order. This bug was reported by Horowhenua District Library Now with this patch after clicking on the order line link and writing in a new actual value for a received order the database is correctly updated with the new actual value and if you now view the appropriate invoice for that order you will notice that the invoice amount has been updated. To make the testing of this patch easier I have made a before and after screencast video to compliment the test plan. Updated test plan: 1. Create an order with the vendor price: 10.00 and actual price of 12.00 2. Close the order and receive the shipment. Change the actual price in the receival page to 14.00 3. Open a new tab and view the invoice for the newly received order and notice that 14.00 is the value displayed 4. In your first tab now click on the order line link to modify the order. Change the actual price to 15.00 5. View the invoice now and notice that 14.00 is still the value being displayed 6. Apply patch 7. Repeat steps 1,2,3,4 and 5 and notice that 15.00 is the value displayed in the invoice Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- When testing this I can email the videos of the test plan before and after applying the patches because they are too large to attach to this bug report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr --- Comment #5 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- Hello Alex, I can't reproduce this part : 4. In your first tab now click on the order line link to modify the order. Change the actual price to 15.00 When I'm clicking on the title, it goes to biblio record. To change my actual price, I have to cancel receipt and redo it but then if I change the actual price, it is correctly updated. Perhaps, I haven't the same value in AcqCreateItem preference system : I have : " "Create an item when placing an order..." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #6 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I get several conflicts when trying to apply koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt acqui/neworderempty.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|alexbuckley@catalyst.net.nz |hayleymapley@catalyst.net.n | |z -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69622|0 |1 is obsolete| | --- Comment #7 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Created attachment 87696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87696&action=edit Fixed merge conflicts - Bug 19780 - Updating the invoice costs after updating of the actual value post receiving of the order This invoice will update the invoice values if the order actual price value is modified after the order has been received. Test plan: 1. Create an order with the vendor price: 10.00 and actual price of 12.00 2. Close the order and receive the shipment. Change the actual price in the receival page to 14.00 3. View the invoices and notice that 14.00 is the value displayed 4. Go back to the order and click on the order line to modify the order. Change the actual price to 15.00 5. View the invoice now and notice that 14.00 is still the value being displayed 6. Apply patch 7. Repeat steps 1,2,3,4 and 5 and notice that 15.00 is the value displayed in the invoice 8. Now repeat steps 1. View the aqorders database table and notice after step 1 is completed the order has unitprice:12.00 and unitprice_tax_included and unitprice_tax_excluded values of NULL 9. Now before closing the order modify it and set the actual price to 14.00 10. Check the aqorders table again and notice that the unitprice is 14.00 and the unitprice_tax_included and unitprice_tax_excluded both equal NULL. This means the unitprice_tax_included and unitprice_tax_excluded values are not being updated before the order has been receieved by they are being correctly updated if the order has been received and the actual price is changed. Sponsored-by: Horowhenua Distircit Council -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23522 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr Status|Needs Signoff |Patch doesn't apply --- Comment #8 from Séverine Queune <severine.queune@bulac.fr> --- Some problems occurred applying patches from bug 19780: <h1>Something went wrong !</h1>Applying: Bug 19780 - Updating the invoice costs after updating the actual cost of an order following the receival of the order fatal: sha1 information is lacking or useless (acqui/addorder.pl). error: could not build fake ancestor Patch failed at 0001 Bug 19780 - Updating the invoice costs after updating the actual cost of an order following the receival of the order The copy of the patch that failed is found in: .git/rebase-apply/patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Attachment #73359|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=19780 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think there went something wrong when Hayley rebased it, so old and new patch were both on the bug, but even after obsoleting the older, this won't apply: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 19780 - Updating the invoice costs after updating of the actual value post receiving of the order Using index info to reconstruct a base tree... M acqui/neworderempty.pl M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt Auto-merging acqui/neworderempty.pl CONFLICT (content): Merge conflict in acqui/neworderempty.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 19780 - Updating the invoice costs after updating of the actual value post receiving of the order The copy of the patch that failed is found in: .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/Fixed-merge-conflicts---zTWP_q.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19780 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Adds a : +use Data::Dumper; This was for debug I bet. +my $modify = $input->param('modifying'); This looks strange to me. We usually use a param named "op" with "edit". For example acqui/orderreceive.pl -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org