Rounding and Nav 4.0 SP3

frede
frede Member Posts: 80
I've just experienced an interesting upgrade problem which I want to share with you...

I had an old 1.30 codebase running on 4.0 with hotfix - but no SP.

Now I've upgraded to 4.0 SP3 - and the ROUND-function stopped working!

When using ROUND(amount) <> amount - Navision made an error, if Amount was for instance 2550.55!

This was because the standard ROUND was now no decimals - just because of the SP update.

I found that in CU1 there is a function called ReadRounding (No. 14) and here I just have use the exit value 0.01 - then everything works fine again!

But it gave me a head ache for a while - and this on a monday...

I've tried to find this documented somewhere - maybe in SP2 - but I couldn't...So therefore I write this note for all of you out there maybe about to experience the same problem (I've looked at a 2.65 and the ReadRounding is also "missing" in that version)..So be carefull out there..

...Thank You MBS! - Always a pleasure!
Regards,

Henrik Frederiksen, Denmark

Comments

  • kine
    kine Member Posts: 12,562
    Source of your problems is the sentence in the on-line help for ROUND function:
    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, 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.
    This "In other countries, other default values may be used" is what can you lead to some function, which will decide which default will be used. And where you can find such a function? Just in CU1... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.