round error!who can help me?

ajunshi
ajunshi Member Posts: 15
when I creat a new purchase order,and add a Item No. ,It give me a error information :
The Value of ROUND parameter 2 is outside of the permitted range
The current value is 0.
The permitted range is :from 1 to 2147483647

And I run the Debug ,The time which circulates a this place comes amiss:
table 39 UpdateUnitCost()
"Unit Cost (LCY)" := ROUND("Unit Cost (LCY)",GLSetup."Unit-Amount Rounding Precision",'>');
IF PurchHeader."Currency Code" <> '' THEN
Currency.TESTFIELD("Unit-Amount Rounding Precision");
"Unit Cost" := ROUND("Unit Cost",Currency."Unit-Amount Rounding Precision");

What's wrong with it?And how should I do?

Comments

  • ara3n
    ara3n Member Posts: 9,258
    You need to run general ledger setup table from object designer and make sure the field "Unit-Amount Rounding Precision" is not zero.

    If you are using multiple currency make sure the field is not zero for the given currency.

    Usually they are defaulted to .01.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ajunshi
    ajunshi Member Posts: 15
    ara3n wrote:
    You need to run general ledger setup table from object designer and make sure the field "Unit-Amount Rounding Precision" is not zero.

    If you are using multiple currency make sure the field is not zero for the given currency.

    Usually they are defaulted to .01.
    Thanks for your help!
    But I can't set "Unit-Amount Rounding Precision" to .01.
    When I set "Unit-Amount Rounding Precision" to .01 and system give me a information:
    The field can have a maximum of decimal places !

    why?
  • ara3n
    ara3n Member Posts: 9,258
    I double checked and it and in cronus it's .001. Check a cronus company in chinese version and make sure you have the same value.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kine
    kine Member Posts: 12,562
    This can be problem of "cleared" company, when someone delete all data from CRONUS and use this clean company to setup new one.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ajunshi
    ajunshi Member Posts: 15
    kine wrote:
    This can be problem of "cleared" company, when someone delete all data from CRONUS and use this clean company to setup new one.
    Yes ,you are right.I creat new database,and the error information not appear!