Bug 12969 introduces a subroutine to centralize the VAT and price calculation. The invoice page should use it.
Created attachment 31812 [details] [review] Bug 12976: Refactor VAT and price calculation - invoice page Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/invoice.pl script. Test plan: 0/ Don't apply the patch 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Receive the items and create an invoice 4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX 5/ Verify you don't see any difference before and after applying the patch on the invoice details table. Note: The only different you should see is the price formating for "Total tax exc.". Before this patch "432.10" was displayed "432.1".
Created attachment 31823 [details] [review] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/invoice.pl script. Test plan: 0/ Don't apply the patch 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Receive the items and create an invoice 4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX 5/ Verify you don't see any difference before and after applying the patch on the invoice details table. Note: The only different you should see is the price formating for "Total tax exc.". Before this patch "432.10" was displayed "432.1".
Created attachment 31880 [details] [review] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/invoice.pl script. Test plan: 0/ Don't apply the patch 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Receive the items and create an invoice 4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX 5/ Verify you don't see any difference before and after applying the patch on the invoice details table. Note: The only different you should see is the price formating for "Total tax exc.". Before this patch "432.10" was displayed "432.1".
Created attachment 31983 [details] [review] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl I've applied the patch against master 3.17.00.025 Firstly I've applied: 5342 (2), 12852 (3), 12844 (4), 12830 (2), 12896 (1), 12969 (2) I've tested setting pref currencyformat either on FR or US. As required, I've seen on invoice.pl: CONF I 0-0 10B) invoice after receiving (invoice.pl) gst_rate = 0.05 gstvalue = 7.38 total_tax_exc = 147.60 total_tax_inc = 154.98 ------------------ CONF II 1-1 10B) invoice after receiving (invoice.pl) gst_rate = 0.05 gstvalue = 7.02 total_tax_exc = 140.58 total_tax_inc = 147.60 ------------------ CONF III 1-0 10B) invoice after receiving (invoice.pl) gst_rate = 0.05 gstvalue = 7.02 total_tax_exc = 140.58 total_tax_inc = 147.60 ------------------- CONF IV 0-1 10B) invoice after receiving (invoice.pl) gst_rate = 0.05 gstvalue = 7.38 total_tax_exc = 147.60 total_tax_inc = 154.98 ------------------- I pass the patch to "Signed Off" status.
Blocked by bug 12969 currently not applying.
More correctly: Blocked by bug 12896 currently not applying. :(
Created attachment 33573 [details] [review] Bug 12976: Fix the footer if several tax rate exist If more that 1 tax rate exist, 1 total ligne should be display in the footer.
Created attachment 33612 [details] [review] Bug 12976: Fix some comment in tests Previous comments were wrong. Actually the main part of price values is correct. Only some rounding and tax values are badly calculated.
Created attachment 33613 [details] [review] Bug 12976: Fix some comment in tests Previous comments were wrong. Actually the main part of price values is correct. Only some rounding and tax values are badly calculated.
If I see the dependencies correctly, this should be next - but it doesn't apply: Jonathan, can you check what's missing? Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 12976: Use the centralize VAT and prices calculation - invoice.pl fatal: sha1 information is lacking or useless (C4/Acquisition.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 12976: Use the centralize VAT and prices calculation - invoice.pl The copy of the patch that failed is found in: /home/katrin/kohaclone/.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/Bug-12976-Use-the-centralize-VAT-and-prices-calcul-H4QMVv.patch
Created attachment 34933 [details] [review] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/invoice.pl script. Test plan: 0/ Don't apply the patch 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Receive the items and create an invoice 4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX 5/ Verify you don't see any difference before and after applying the patch on the invoice details table. Note: The only different you should see is the price formating for "Total tax exc.". Before this patch "432.10" was displayed "432.1". Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Created attachment 34934 [details] [review] Bug 12976: Fix the footer if several tax rate exist If more that 1 tax rate exist, 1 total ligne should be display in the footer.
Created attachment 34935 [details] [review] Bug 12976: Fix some comment in tests Previous comments were wrong. Actually the main part of price values is correct. Only some rounding and tax values are badly calculated.
Patches rebased. Conflicts with bug 12059 fixed.
Created attachment 34969 [details] [review] [PASSED QA] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/invoice.pl script. Test plan: 0/ Don't apply the patch 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Receive the items and create an invoice 4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX 5/ Verify you don't see any difference before and after applying the patch on the invoice details table. Note: The only different you should see is the price formating for "Total tax exc.". Before this patch "432.10" was displayed "432.1". Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 34970 [details] [review] [PASSED QA] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/invoice.pl script. Test plan: 0/ Don't apply the patch 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Receive the items and create an invoice 4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX 5/ Verify you don't see any difference before and after applying the patch on the invoice details table. Note: The only different you should see is the price formating for "Total tax exc.". Before this patch "432.10" was displayed "432.1". Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 34971 [details] [review] [PASSED QA] Bug 12976: Fix the footer if several tax rate exist If more that 1 tax rate exist, 1 total ligne should be display in the footer. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 34972 [details] [review] [PASSED QA] Bug 12976: Fix some comment in tests Previous comments were wrong. Actually the main part of price values is correct. Only some rounding and tax values are badly calculated. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patches pushed to master. Thanks Jonathan!
Tomas, this is *not* in master yet.
Oh, sorry for that. I think it was a typo using git-bz. Will test right now.
I'm sorry Jonathan. It is now pushed. I might have messed up some of my working branches at some point.