System wide (LCY) Amount rounding

We support Navision installations including Vietnam and Japan. In these countries Amounts in local currency do not have decimals (whole numbers are recorded). Examples of fields in whole numbers in these countries are “Amount” in table “G/L Entry” or “Amount (LCY)” in table “Cust. Ledger Entry” to name a few… Fortunatly Navision handles this nicely in the standard system: In table 98 “General Ledger Setup” you have two fields to control the desired behavior (run table to see these): Amount Decimal Places - handles the display without decimals on forms and reports. This field setting overrides all form and report decimal property setting. Amount Rounding Precision - This field setting affects C/SIDE command ROUND. (from what I can tell) Now the madness begins: Somewhere in the system Navision has hardcoded (YES, I come to no other conclusion) which table fields it applies the above settings to. Navision must have a list stored somewhere to know which fields are LCY fields and which ones are not. Navision cannot simply apply the rounding to all decimal fields as these could be weights or other bits of information needing tracking. Our delimma is that we have added additional LCY currency fields (lots of them) to the system and the settings made in table 98 do not apply to these custom fields. In other words: We’re screwed. I have searched everywhere to see where this information might be hidden but have found nothing and am close to giving up (don’t usually do that). If anyone has the missing piece to this puzzle I might consider sending you a good ol American beer (can provide others as well). Otherwise I go back to the dark ages and need to code the field handling individually… form by form, report by report. Am really looking forward to that! Robert

I think you are looking for the ‘AutoFormatType’ and ‘AutoFormatExpr’ properties. In the C/SIDE Reference Guide on-line help you will find the following:

quote:

Amounts AutoFormatType must be 1 and AutoFormatExpr must return a currency code (the blank currency code denotes LCY) in order for the system to format data as amount data. Unit Amounts AutoFormatType must be 2 and AutoFormatExpr must return a currency code (the blank currency code denotes LCY) in order for the system to format data as unit amount data.

Fritz is right, it’s not really hardcoded but it’s a property on the field, which can be set in any object type independently, e.g. have a look at the standard invoice (R206). ‘AutoFormatExpr’ refers to the Currency Code, blank is LCY, any other code that exists in your currency table is valid. In this case, Navision applies the precision and rounding from the currency table (4) otherwise the LCY rounding from General Setup (98). ‘AutoFormatType’ is either 1 or 2 depending which rounding you want to apply. Hope this helps to get the puzzle sorted out. [;)] Saludos Nils

You guys have given me hope again! Makes sense and sounds very promising what you are telling me. For now I will save jumping out the window for another day… Will let you know if this works for me! Thanks again!