Summary: | Actual price is not updated after it has been amended post receiving an order | ||
---|---|---|---|
Product: | Koha | Reporter: | Alex Buckley <alexbuckley> |
Component: | Acquisitions | Assignee: | Hayley Pelham <hayleypelham> |
Status: | Patch doesn't apply --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, fridolin.somers, J.P.Knight, koha, severine.queune |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23522 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 19780 - Updating the invoice costs after updating of the actual value post receiving of the order
Bug 19780 - Updating the invoice costs after updating the actual cost of an order following the receival of the order Fixed merge conflicts - |
Description
Alex Buckley
2017-12-07 20:38:14 UTC
Created attachment 69622 [details] [review] 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 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? Created attachment 73359 [details] [review] 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 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 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..." 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 Created attachment 87696 [details] [review] 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 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 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 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 |