Ben Ball Posted July 10, 2006 Posted July 10, 2006 This must be simple... I am doing a very basic calculation within an invoice table. The figures Net Total: Calculates all the total prices. I show this as 2 decimal places. The tax is calclated.... also shown as 2 decimal places... but when I add The net total + tax .... the sum is rounded up from the actual figures up to 4 decimal places which results in what looks like an incorrect calculation.... in terms of 2 decimal places. for example: I want to show: 255.22 + 44.66 = 299.88 instead I am getting 255.22 + 44.66 = [color:red]299.89 obviously because the calculation is adding three or four decimals and rounding the figure up?? Is there any way of adding just the two decimals as per the format.
IdealData Posted July 10, 2006 Posted July 10, 2006 Try this Gross_Amount = Round(Nett_Amount;2) + Round(VAT_Amount;2)
IdealData Posted July 10, 2006 Posted July 10, 2006 or possibly... Nett_Round = Round(Nett;2) VAT_Round = Round(VAT;2) Gross = Nett_Round + VAT_Round
Ben Ball Posted July 10, 2006 Author Posted July 10, 2006 Perfect... thanks very much.. both work fine Ben
Recommended Posts
This topic is 6773 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now