Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How can i change the number of decimal places to three for Price and Quantity

Posted on by Microsoft Employee

Hi All,

One of our clients wanted higher precision on their quantity and pricing. Currently in Ax it is rounding off after two digits we wanted to move to 3 decimal places. This is important for the client because they deal with copper in tonnes, so an accuracy level of two digits could mean they will loose copper in Kg's.

Also similarly for the price a accuracy of 3 decimal places will give my client a better profit.

I did look around for existing options..but there wasn't any clear direction.

1. Changing the regional settings will affect the number of decimals.

    Yes but it's effect is limited. The date format, currency grouping and separators come from the regional settings but not the number of decimal places. This is not true completely because i can see the fields that Extend amountMST are having decimal places based on the regional settings.

If you look at the RealBase EDT, it says "Auto" for number of decimals where is the value for this AUTO picked up from ?

2. Is it ok to change the realbase edt to have the required number of decimals ? Does this have any impact on the business logic ?

So i'm not sure what is the approach to take here. I hope this is a very common scenario in implementations. What is the general approach here ? any body has done this before ?

Thanks in advance for help.

Regards

Kamal

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How can i change the number of decimal places to three for Price and Quantity

    Hello,

    I want to ask few things regarding Microsoft Ax Dynamics.

    I want open purchase order like we don’t want to lock the quantities. While issuing purchase order I want to put only unit and rate per unit against issuing the purchase order I want partial receiving in ax

  • Sajjad_00 Profile Picture
    Sajjad_00 475 on at
    RE: How can i change the number of decimal places to three for Price and Quantity

    Hi I am also agree with steven what he write it. I did this in ax 2009 and came into a problem where I contact Microsoft and they even don't have a solution for it. the only solution is do it at your own risk. I am not getting why this feature is so much complicated to them. it should be a simple setup in company setup and the same should work across the system. ok I admit that due to a shared concept then put this on global and effect the complete system instead of company to company.

  • GeorgeB Profile Picture
    GeorgeB 345 on at
    RE: How can i change the number of decimal places to three for Price and Quantity

    Historically, the precision on a Unit of Measure had impact on the value of Cost calculated at top level.  This meant that we needed to hold more decimal places for a Unit of Measure than we really wanted to.  

    For example, I am trying to verify a costing which has "Each" to zero decimal places about 4 levels down in a Bill of Materials.

    I am about to start some work in the area, any prior information most gratefully received.

  • David Keding Profile Picture
    David Keding on at
    RE: How can i change the number of decimal places to three for Price and Quantity

    I do agree that you can get a lot of mileage by using price unit, but it will confuse some of the end users.

  • Suggested answer
    Brandon Wiese Profile Picture
    Brandon Wiese 17,786 on at
    RE: How can i change the number of decimal places to three for Price and Quantity

    I have made this change in many environments.  However, you do have to go searching for some problems in the code for it to work properly.  I'll describe some of our changes.  Do this AT YOUR OWN RISK and test everything fully.  This post is for educational purposes and discussion only.

    First, NEVER change the RealBase EDT.  The effect is far too wide spread.

    Your original question seems to just be interested in Quantity and Price precision, not Amount precision.  These are all 3 very distinct concepts in AX, and the EDT structure is relatively well constructed to allow for some of this.

    Under General ledger, Setup, Currency, Currencies, expand the Rounding rules fast tab to locate where the precision is setup for prices.  Leave the General rounding rule at 0.01.  We have our Sales orders, Purchase order, and Prices rules setup at 0.000001.

    Under Organization, Setup, Units, Units, each unit of measure defines its own precision.  We use 6 for all of them.

    For pricing precision, the EDTs Price and PriceCur are the foundation of much of the system.  We have the NoOfDecimals for these set to 6.  Also PriceRoundOff and RoundOff.

    For quantity precision, the problem is largely one of display in many places, and built-in rounding in a few.  The EDT BOMQty, for example, we have set to 6, as well as BOMMeasureDimension.

    Then there are places where the schema is just messed up.  In table PriceDiscTable, the Amount field (which is where your unit price is stored when you create trade agreements) has the EDT of AmountCur, but since the field typically holds unit prices and not extended currency amounts, it should be PriceCur in my opinion.  

    I can't imagine a case where someone would use a lower precision for pricing than for currency.

    In any case, you can get a lot of mileage out of using the "Price unit" fields (which act as a scale modifier), so 0.0015 becomes 15.00 per 10,000, without making any changes to the system.  Unfortunately in my experience this tends to seriously confuse a lot of entry clerks.

  • David Keding Profile Picture
    David Keding on at
    RE: How can i change the number of decimal places to three for Price and Quantity

    We hit the three decimal issue in Qatar, Oman and Bahrain - and since Microsoft is not officially supporting AX in any of these countries we had to come up with something.

    But for me there is no straight answer here, the question of using three or two decimals becomes really interesting when you mix 2 decimal and three decimal countries in the same production environment.

    Technically everything is possible - the question is if you want to pay for it. If you do you may end up having issues elsewhere. If you have operations only in three decimal countries I think this is a no brainer, but when you mix in another 30 countries in the same production environment - well it isn't so straightforward anymore!

  • Karen Hanley Profile Picture
    Karen Hanley 815 on at
    Re: How can i change the number of decimal places to three for Price and Quantity

    If it is not difficult, then why can't MS make this change?  The threads I have read seem to put the fear into us about making this change. Does anyone have a canned solution for this that can be purchased?  Having more decimal places on the puchase unit price and cost of an item should be standard.  I am ok with the ledger amount rounding to 2.  One prospect stated they lose over $26000 per year in revenue b/c their current system only allows 3 decimals and they want 5.  Having every partner out there making this customization on their own seems silly.  

  • Suggested answer
    Weaveriski Profile Picture
    Weaveriski 23,616 on at
    Re: How can i change the number of decimal places to three for Price and Quantity

    Hi Maurice

    I felt the thread had experience but no one had mentioned what Microsoft state which is the other side, and as you say the safest answer. My intention was not to make it a big deal but when you are sat in front of a client you need to balance your experience with the official line, if you do not give it then any liability is yours.

    Being careful and understanding, as you say, is the key. I have been involved in this change in the past and currently, the change is not generally as big as Microsoft state, but the biggest issue is getting the client to pay for the work!

  • Maurice Cohen Profile Picture
    Maurice Cohen 185 on at
    Re: How can i change the number of decimal places to three for Price and Quantity

    I don't want appear condescending but you're making this a bigger deal than it is.  Microsoft is always going to give the safest answer because of possible liability.  I've been implementing dynamics AX for 14 years and have done this change countless times with no issues and many other consultants have done it too.  You just have to be a little careful and have a good  understanding of this matter. I suggest that you get help from an experienced Ax developper who has done it before. One thing to look for is regardelss of the how many decimals you choose to use for cost, purchasing etc, do NOT change the decimal precisisoin for the ledger transactions. Ledger transacations must remain at 2 and let the rounding mechaninsm handle it.

  • Weaveriski Profile Picture
    Weaveriski 23,616 on at
    Re: How can i change the number of decimal places to three for Price and Quantity

    I have spoken to Microsoft about this and there are no current plans to change they could tell me of. The response I received was basically as follows:

    1. Change this at your own risk - it depends upon the critical nature of the field and how you rate the importance of this field (whenever asked it is usually price or quantity, so fairly difficult).

    2. The advice is then to get developers to trace every use and calculation of the field to ensure the integrity of the rounding is consistent in all areas. I was told even with the release of AX2012 Microsoft were still uncovering fundamental base issues from before they purchased the product. Anyway an estimate for the price field assessment was 1 or 2 developers of 2 or 1 man months.

    3. Parallel trialling, replicate everything you do in the new system. The recommended time for mirroring and validating is 6 months.

    I asked the question KJ_AXConsultant asked and my response was that it does handle more than 2 decimal places, and you can turn it on very quickly. I pointed out that they had just told me to test this for 8 months and how was this "quick" and was told that these were recommendations on the critical nature of the field, in reality you could switch it on and run with it tomorrow dealing with any issues as they arise, but they may of course not arise. The system is also written with a price unit as stated above, and whilst confusing Microsoft argue it still then delivers to the requirement (it does not however when you have UOM conversions tonne to 25kg etc because it rounds in teh calculation, but that is another discussion)

    Telling a client that a change to 3 decimal places when it holds it to this in the database anyway will take 8 months is an impossible sell, my only consolation being my hands are tied as well.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans