ROUNDOFF

can anybody say is there any roundoff function available in navision.

i need to calculate the number of quarters in a year.For example if there is 4 months ,to get the quarter im dividing by 3.So it comes to 1.1.But i need to get the quarter as 2.How is this possible.

The function is called ROUND and this is the information of the online help: [:)]

ROUND (Numbers)
Use this function to round the value of a number variable.

NewNumber := ROUND(Number [, Precision] [, Direction])
NewNumber

Data type: decimal

The rounded result.

Number

Data type: decimal

The number you want to round.

Precision

Data type: decimal

This optional parameter determines the precision used when rounding. The default value is 0.01 for the US version. In other countries/regions, other default values may be used. Note that the default value is only used when you have not specified the rounding precision in the Amount Rounding Precision field in the General Ledger Setup table.

Direction

Data type: text or code

This optional parameter tells the system how to round Number. The default rounding method is ‘=’. There are three different options for rounding.

Enter this…
To round…

‘=’
To the nearest value (default)

‘>’
Up

‘<’
Down

So in your case it would be:

Result := ROUND(4/3,1,’>’);