I have an issue with rounding on a simple invoice form. I want to calculate a sales tax on a line-by-line basis, to two decimal places, and then add up each of these values and pass them to my parent form. My approach so far has been to calculate the tax on individual invoice lines, and I can display them to two decimal places, however the 'SUM' calculation which you have to put in the child form footer (to pass to the parent form) will not actually sum my rounded values, it recalculates on the base data and then rounds itself.
For example (tax rate = 17.5%)
1 X Item 1 @ £15 + Tax gives a tax of £2.63 when rounded.
1 X Item 2 @ £15 + Tax gives a tax of £2.63 when rounded.
1 X Item 3 @ £15 + Tax gives a tax of £2.63 when rounded.
The tax on the invoice should therefore be £7.89 (3 X £2.63)
However, the SUM at the bottom of my child form gives a tax due of £7.88, which is passed to my main form.
Should I use a field for my line tax, and then sum the contents of my field, or should I stick with a calculated control...?
How can I simply pass the correct sum of the line tax on my child form to the parent form?
My 'price each' field is set to currency / 2dp. My calculated controls are too. The display as a currency to 2dp but when you click into a box that reads £2.63 it shows the underlying figure of 2.625.