Sales Order price being truncated and not rounded

Posted:
Wed Apr 27, 2016 1:46 pm
by Atronics
When there is a debtor discount applicable, the sell price is being truncated to two decimal places. How do I get it to round to two decimals and not truncate. When the client is selling a large number of each (sometimes low unit cost) items this can male a difference. e.g. DefaultPrice = 127.5 with a 3.8% discout --> SellPrice = 122.6550 Currently, Jiwa sets this to 122.65 I want 122.66
Re: Sales Order price being truncated and not rounded 

Posted:
Thu May 12, 2016 10:26 am
by Mike.Sheen
We don't truncate the price - we use Math.Round(Value, DecimalPlaces, MidpointRounding.AwayFromZero)
We calculate the discount amount to the currency decimal places, then subtract that from the price - which is why it appears to be truncated.
3.8% of 127.50 = 4.845. Using our rounding that then turns into 4.85.
127.5 - 4.85 = 122.65
We do it this way because we needed to make the figures reconcile on the screen. If we didn't do it this way, people would ask us why the discount amount on the screen subtracted from the sell price doesn't equal the Ex GST Price.