30,997
edits
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
We have 2 ways to calculate the total of invoice: making a sum of rounding lines or rounding the sum of lines. | We have 2 ways to calculate the total of invoice: making a sum of rounding lines or rounding the sum of lines. | ||
1) If we choose to make the sum of lines after rounding lines, we get: | 1) If we choose to make the sum of lines after rounding (on 2 decimals) lines, we get: | ||
* Total without tax: 1.24(E1) + 1.24(E2) = '''2.48''' | * Total without tax: 1.24(E1) + 1.24(E2) = '''2.48''' | ||
* Total tax 10%: 0.12(G1) + 0.12(G2) = '''0.24''' (we sum the rounded values of tax on each line) | * Total tax 10%: 0.12(G1) + 0.12(G2) = '''0.24''' (we sum the rounded values of tax on each line) | ||
| Line 22: | Line 22: | ||
Note that if we sum rounded price inc tax on each line, we get: 1.36(I1) + 1.36(I2) = '''2.72''' (same result than previous line so we know there is no error) | Note that if we sum rounded price inc tax on each line, we get: 1.36(I1) + 1.36(I2) = '''2.72''' (same result than previous line so we know there is no error) | ||
2) If we choose to round amount that is sum of all lines, we get: | 2) If we choose to round (on 2 decimals) amount that is sum of all lines, we get: | ||
* Total without tax: 1.24(E1) + 1.24(E2) = '''2.48''' (same than in method 1) | * Total without tax: 1.24(E1) + 1.24(E2) = '''2.48''' (same than in method 1) | ||
* Total tax 10%: (1.24(E1) + 1.24(E2)) * 10% = 0.124 + 0.124 = 0.248 rounded to nearest to have a total on 2 decimals give '''0.25''' (we sum amount without tax for each lines, calculate vat rate on this and after we round value on 2 decimals) | * Total tax 10%: (1.24(E1) + 1.24(E2)) * 10% = 0.124 + 0.124 = 0.248 rounded to nearest to have a total on 2 decimals give '''0.25''' (we sum amount without tax for each lines, calculate vat rate on this and after we round value on 2 decimals) | ||