Bug 12976 - Refactor VAT and price calculation - invoice page
Summary: Refactor VAT and price calculation - invoice page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 12969
Blocks: 13001
  Show dependency treegraph
 
Reported: 2014-09-22 15:09 UTC by Jonathan Druart
Modified: 2015-12-03 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 12976: Refactor VAT and price calculation - invoice page (15.93 KB, patch)
2014-09-22 15:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Use the centralize VAT and prices calculation - invoice.pl (15.94 KB, patch)
2014-09-23 09:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Use the centralize VAT and prices calculation - invoice.pl (16.35 KB, patch)
2014-09-25 14:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Use the centralize VAT and prices calculation - invoice.pl (16.87 KB, patch)
2014-10-03 13:12 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12976: Fix the footer if several tax rate exist (1.42 KB, patch)
2014-11-14 14:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Fix some comment in tests (1.54 KB, patch)
2014-11-17 11:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Fix some comment in tests (2.10 KB, patch)
2014-11-17 11:49 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Use the centralize VAT and prices calculation - invoice.pl (16.41 KB, patch)
2015-01-05 09:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Fix the footer if several tax rate exist (1.42 KB, patch)
2015-01-05 09:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12976: Fix some comment in tests (2.10 KB, patch)
2015-01-05 09:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl (16.47 KB, patch)
2015-01-05 23:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12976: Use the centralize VAT and prices calculation - invoice.pl (16.47 KB, patch)
2015-01-05 23:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12976: Fix the footer if several tax rate exist (1.49 KB, patch)
2015-01-05 23:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12976: Fix some comment in tests (2.17 KB, patch)
2015-01-05 23:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-09-22 15:09:57 UTC
Bug 12969 introduces a subroutine to centralize the VAT and price calculation.
The invoice page should use it.
Comment 1 Jonathan Druart 2014-09-22 15:13:51 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-09-23 09:05:58 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-09-25 14:28:40 UTC Comment hidden (obsolete)
Comment 4 Paola Rossi 2014-10-03 13:12:46 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-10-28 22:26:28 UTC
Blocked by bug 12969 currently not applying.
Comment 6 Katrin Fischer 2014-10-28 22:28:22 UTC
More correctly: Blocked by bug 12896 currently not applying. :(
Comment 7 Jonathan Druart 2014-11-14 14:52:08 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2014-11-17 11:46:33 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2014-11-17 11:49:08 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2015-01-04 23:18:47 UTC
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
Comment 11 Jonathan Druart 2015-01-05 09:08:44 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2015-01-05 09:08:48 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2015-01-05 09:08:52 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2015-01-05 09:09:24 UTC
Patches rebased.
Conflicts with bug 12059 fixed.
Comment 15 Katrin Fischer 2015-01-05 23:23:30 UTC Comment hidden (obsolete)
Comment 16 Katrin Fischer 2015-01-05 23:24:03 UTC
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>
Comment 17 Katrin Fischer 2015-01-05 23:24:06 UTC
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>
Comment 18 Katrin Fischer 2015-01-05 23:24:09 UTC
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>
Comment 19 Tomás Cohen Arazi 2015-01-08 00:02:54 UTC
Patches pushed to master.

Thanks Jonathan!
Comment 20 Jonathan Druart 2015-02-19 09:11:50 UTC
Tomas, this is *not* in master yet.
Comment 21 Tomás Cohen Arazi 2015-02-19 12:28:31 UTC
Oh, sorry for that. I think it was a typo using git-bz. Will test right now.
Comment 22 Tomás Cohen Arazi 2015-02-19 13:11:46 UTC
I'm sorry Jonathan. It is now pushed. I might have messed up some of my working branches at some point.