Tuesday, January 4, 2022

Round off in D365 FO X++

Round off to 3 decimals: return decRound(total, 3);



More examples are below:

decRound(1234.6574,2) returns the value 1234.66.

decRound(1234.6574,0) returns the value 1235.

decRound(1234.6574,-2) returns the value 1200.

decRound(12345.6789,1) returns the value 12345.70.

decRound(12345.6789,-1) returns the value 12350.00.