NAV default rounding

txerifftxeriff Member Posts: 480
edited 2022-01-26 in NAV Three Tier
Hi All,

Hope someone can help.
it looks like NAV saves the decimal data as follows:
tu7zsls9feo1.png

but then it's shown as:
uj1xsqsg0a0c.png

This is a bespoke table, no decimal places or any rounding defined in the table or page.

I suppose this has to do with some NAV's general setup.

I ended doing some formatting like:
format(Pricing."UK C. Sell Price (g)", 0, '<Precision,2:2><Sign><Integer Thousand><Decimals>)

and this seems to match nav default rounding.

I was just curious, probably its a general setup and you can't change behaviour.
thanks

Answers

  • bbrownbbrown MAMember Posts: 3,213
    The first problem is no decimal places\rounding defined on the table. Data needs to be saved to the tables using the same formatting to which it will be display and used by the application. Decimal fields are typically set to a maximum of 5 decimal places. Data being saved to the DB should respect this.
    There are no bugs - only undocumented features.
  • txerifftxeriff Member Posts: 480
    edited 2022-01-27
    bbrown wrote: »
    The first problem is no decimal places\rounding defined on the table. Data needs to be saved to the tables using the same formatting to which it will be display and used by the application. Decimal fields are typically set to a maximum of 5 decimal places. Data being saved to the DB should respect this.

    Hi thanks but that doesn't answer anything:
    -The table was there before I started with it.
    -decimalPlaces property is not the issue: Check NAV standard unit cost in SO lines for example, go to SQL table and then compare how it is shown in nav page.
    -I know general ledger setup LCY controls this on SO lines etc (by autoformat expresion, currency exp. etc) but for a bespoke table I can't see where. However I managed to round it as NAV does.
  • bbrownbbrown MAMember Posts: 3,213
    Sounds like you have a problem with "Unit Cost" also. You should not be seeing more than 5 decimal places there either.

    There are no bugs - only undocumented features.
Sign In or Register to comment.