web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

We experience a bug in standard cost calculation (rounding problem)

(0) ShareShare
ReportReport
Posted on by 5

Business Central 14 (14.0.29530.0)

Issue

There is minimal difference between the Calc. Standard Cost and the total of the BOM cost shares. This is probably caused bij the set up rounding precision the item. The rounding precision is set to 5 decimal places.  De Calc. Standard Cost uses a different rounding method.

For example in this document (available by email)  we will use Item 010024

  • Standard Cost = 87,12324
  • BOM Cost Shares total = 87,12839
  • Stand Cost Worksheet = 87,12324

 

Difference = 0,00515

This is almost nothing but with large quantities it will become a problem, 

Does anyone have an idea if there is a fix?

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    If you do not get further traction on this one, then you may want to consider raising a support ticket to Microsoft support via your CSP.

    Thanks.

  • Renger Profile Picture
    5 on at

    We raised a support ticket, this is the answer from MS:

    I ran a test in W1 and got the result of 350,594 which is then consistently presented in the BOM Cost Share page as well as in the Standard Cost worksheet. However, it doesn’t really matter in the sense that I’ve met this situation some years ago and had development team to investigate it.

    To summarize the conclusions of that investigation, the BOM Cost Shares report calculations of cost amounts and quantities are separated from each other. The algorithm first traverses the BOM structure and fills a buffer table with quantities, then rolls up cost amounts. Quantities placed into the table in the first step, are rounded, and these rounded values are further used in cost calculation. To achieve the expected result, the rounding needs to be removed from the first part of the process and unrounded values stored in the buffer table. However, then there are discrepancies within a line.
    In the analysis of moving the rounding and store unrounded values in the BOM buffer table and its consequences to the line calculation as mentioned, the task was growing extensively as the table is in the core of availability calculation as well. Therefore, it was established that this issue is outside the scope of a hotfix and needs to be further investigated. If it will be changed, it can be released in relation to a new major release.

    As of today, it has not been prioritized to pursue such a change.

    I therefore encourage you to raise a new product suggestion, describing your scenario, at the Ideas site to make current functionality and improvement request visible to others. They can vote for it and as votes increase the Product team will use this information for planning and prioritization of improving this functionality in upcoming releases.

     

    For your information, the established scenario in previous investigation was as follows:

     

    1. Items. Create the following new Items:
    2. Item No.=50000, Description=Product A, Base Unit of Measure=PCS, Item Category Code=MISC, Replenishment System=Prod. Order. 
      Set up a UOM conversion with 1 BOX=585.8 PCS,
    3. Item No.=50001, Description=Component 1, Base Unit of Measure=PCS, Item Category Code=MISC, Costing Method = FIFO, Unit Cost = FIFO, Unit Cost = 31,23, Rounding Precision=0.00001,
    4. Item No.=50002, Description=Product B, Base Unit of Measure=PCS, Rounding Precision=0.00001, , Item Category Code=MISC, Replenishment System=Prod. Order.
    5. Item No. 50002-2, , Description=Component 2, Base Unit of Measure=PCS, Item Category Code=MISC, Costing Method = FIFO, Unit Cost = FIFO, Unit Cost = 11,00 Rounding Precision=0.00001,


    6. Create a new Prod. BOMs, as follows:
    7. No.=50002, Description=Prod. BOM, UOM Code=PCS. 
      Add 1 lines, as follows, then set Status=Certified:
      ii) Type=Item, No.=50002-2, Quantity Per=579.9, UOM=PCS.
    8. No.=50000, Description=Prod. BOM, UOM Code=BOX. Add  lines, as follows, then set Status=Certified:
      i) Type=Item, No.=50001, Quantity Per=5.9, UOM=PCS, and 
      ii) Type=Production BOM, No.=50002, Quantity Per=7.235, UOM=PCS, 


    9. Items.
    10. Edit Item No.=50000 and set Production BOM No.=50000.
    11. Edit Item No.=50002 and set Production BOM No.=50002. 


    12. Edit Item 500002
    13. Run Navigate – Production – Calculate Standard Cost – All levels
      Result = 6378,90


    14. Run Standard Cost worksheet
      Run Function – Roll up Standard Cost: Item 50000
      Result: New Standard cost = 79,09798
    15. Open Item card 50000
      Run Navigate – Cost Shares in the Assembly/Production section
      Result: Rolled Up Material Cost = 79,09792 (there is only material in this setup)

    ACTUAL RESULT: 
    Cost Shares - Rolled Up Material Cost = 79,09792

     

    EXPECTED RESULT:
    Cost Shares - Rolled Up Material Cost = 79,09798

    Comments to numbers:
    In the repro, Qty. per Top Item for the “Component 1” item is 5.9 / 585.8 which is rounded to 5 decimal places as 0.01007. Cost amount, therefore, is 0.01007 * 31.23 = 0,314486, while unrounded amount should be 0,314539.
    To remove rounding from the first part of the process and store unrounded values in the buffer table we’ll have discrepancies within a line. Total amount in this case would be calculated exactly as expected, but now if we multiply “Qty. per Parent” by the unit cost, we won’t have the material cost for the same line: 0.01007 * 31.23009 = 0.31449, while the report shows 0.31454.

    So finally it boils down to a well-known problem — precision of the product is lower than the precision of its multipliers. We cannot have quantity, unit cost, and rolled-up cost, all rounded to 5 decimal places and make the results match up to the last digit.

    ---------------------------------------------------------------------

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Okay, thank you for sharing. If you have written the ideas, you can share it in this forum and if possible can vote for it to raise the priority of it.

    You will have my vote. I do appreciate any possible product improvement. Again, thank you for sharing.

    Thanks.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans