Units of Measure decimal places

jannestigjannestig Member Posts: 999
This scenario is a problem throughout all navision version from 4-5 and i know it is probably the end users issue for ussing different UOMs

In this scenario the customer has an item X with 2 UOMs
UOM QTY UOM

CASE 1
PAIR 1/48 = 0.02083

now they break about the case which is the BUOM and take out 2 pairs for samples. They enter the line as 2/48 of a CASE which comes out as 0.04167. So they positive adjust or transfer these 2 pairs and then sell them leaving .00001 on stock.

Should the system automatically remove this rounding issue as this tiny fraction will blow up the average or unit cost.

How should the system handle this rounding error between UOMs

I know the end user should transfer the 2 gloves 2 samples as 2 pairs but this again relies on the end users having self control.

Comments

  • SavatageSavatage Member Posts: 7,142
    I always believe the base UOM should be the lowest possible amount - make life much easier.
    ex/
    Base 1 glove
    Pair 2 gloves
    gross 24 gloves
    case 288 gloves
    pallet 11520 gloves
    truck 115200 gloves

    then rounding wouldn't be a problem.
    I know it's not helpful, just sharing.
  • jannestigjannestig Member Posts: 999
    True , as i didn't implement the system its not really my call there.

    It just frustrating the system lets mathmatics pass it by :cry:

    as they take from one location to another the problem will always exist in potentia of both locations.

    I traced an example where it tried to apply the 00001 but the applied entries still got it wrong :S
  • kinekine Member Posts: 12,562
    How is set the "Rouding Precision" on the item card?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • KowaKowa Member Posts: 918
    It may help to increase the DecimalPlaces property in the UOM Table for the "Qty. per Unit of Measure" field from 0:5 to 0:10 and reenter the fraction 1/48. I have a client who had rounding issuses with very large quantities (>10000) which were solved this way, but I agree with Savatage that it is best to use the smallest UOM as base UOM.
    Kai Kowalewski
  • jannestigjannestig Member Posts: 999
    kine wrote:
    How is set the "Rouding Precision" on the item card?

    HI Kine

    I had a look at this field and tried different settings on the field when posting item journals as the client does. IT seems after looking through the code only to be used when purchasing or creating stock. In the case the client had the field at 0.

    Does anyone know exactly whats this field implications are as the online help is very vague in its descriptions.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Workaround: every evening, generate a phys. inventory journal, filter it for >-0.001&<0.001, zero it out and post it. Or do the same thing in code (not a big deal, just looking at the Inventory flowfield of every Item and generating and posting a journal line)
  • jannestigjannestig Member Posts: 999
    Workaround: every evening, generate a phys. inventory journal, filter it for >-0.001&<0.001, zero it out and post it. Or do the same thing in code (not a big deal, just looking at the Inventory flowfield of every Item and generating and posting a journal line)

    a Good idea but i was thinking more along the lines of zeroing out all inventory remaining where amount < then the smallests unit of measure in this case 1/48 as this would cover all leftover stock that should not be there regardless of what left over rounding values are there. Or as i suggested back to client change over the base unit as savage suggested as they are about to do a stock take.
  • kinekine Member Posts: 12,562
    jannestig wrote:
    kine wrote:
    How is set the "Rouding Precision" on the item card?

    HI Kine

    I had a look at this field and tried different settings on the field when posting item journals as the client does. IT seems after looking through the code only to be used when purchasing or creating stock. In the case the client had the field at 0.

    Does anyone know exactly whats this field implications are as the online help is very vague in its descriptions.

    1) If it is 0, than defualt value will be used. For US it is 0.01, for other countries it can be somethign different. But if you set value in "Amount Rounding Precision" field in the General Ledger Setup, this value will be used. I know, that it seems strange, but this field is used as default rounding when ROUND() function has precision parameter = 0.

    2) The value is used to round all entries for that item. If you will set it to 1, just whole units will be posted to item entries. If you will set it to 0.0001, smalles quantity in inventory will be 0.0001.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • jannestigjannestig Member Posts: 999
    kine wrote:
    jannestig wrote:
    kine wrote:
    How is set the "Rouding Precision" on the item card?

    HI Kine

    1) If it is 0, than defualt value will be used. For US it is 0.01, for other countries it can be somethign different. But if you set value in "Amount Rounding Precision" field in the General Ledger Setup, this value will be used. I know, that it seems strange, but this field is used as default rounding when ROUND() function has precision parameter = 0.

    2) The value is used to round all entries for that item. If you will set it to 1, just whole units will be posted to item entries. If you will set it to 0.0001, smalles quantity in inventory will be 0.0001.

    The amount rounding ledger entries seem to apply to the price and costs of an item not the actual item inventory amount As they all seem to touch upon LCY amount. It may change the invoiced amount shown but the base amount would stay the same it seems

    It is not really an option to use amount rounding precision as there are already posted ledger entries they also have financial rounding issue as well :D

    I have tried setting these rounding points to .00001 etc but still the issue remains :S
  • kinekine Member Posts: 12,562
    The rounding precision from G/L Setup is used everywhere when ROUND function is called with 0 precision as parameter. It is not just about amount. It is by design and it is part of ROUND function definition.

    And if I looked into NDT, it seems that this field is used only in Manufacturing module. :-k
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • jannestigjannestig Member Posts: 999
    kine wrote:
    The rounding precision from G/L Setup is used everywhere when ROUND function is called with 0 precision as parameter. It is not just about amount. It is by design and it is part of ROUND function definition.

    And if I looked into NDT, it seems that this field is used only in Manufacturing module. :-k

    Yes that is what i thought as well and i am suspecting rounding on QTY fields is not affected directly from the round function i am no programmer so i open to correction on that point.

    To provide more information it on the following applied entries line the stock seems to have been left with a remainder

    Entry Type Document No. Item No. Location Code Applied Quantity Quantity Invoiced Quantity Remaining Quantity Open Qty. per Unit of Measure Entry No.
    Positive Adjmt. ITE001903 9202 SAMPLES 0.00001 0.63 0.625 0 No 0.02083 237252
    Positive Adjmt. ITE001977 9202 SAMPLES 0.02082 0.27 0.27083 0.00001 No 0.02083 248566

    The bottom adjustment is later it appears it has tried to add the remaining stock to a single pair being added but it still had a remaining qty of .00001

    it may be early to say it looks buggy weather ours or the programs may be another story but either way it doesn't look right :S
  • darshanmdarshanm Member Posts: 280
    Hi!

    One use of Rounding Precision field i have seen in manufct module,
    while posting the consumption of child Items. If user set it to 1,
    Then consumption of child item is always being rounded nearest
    to rounding precision value.
    Darshan Mungekar
    Senior Consultan
  • jannestigjannestig Member Posts: 999
    darshanm wrote:
    Hi!

    One use of Rounding Precision field i have seen in manufct module,
    while posting the consumption of child Items. If user set it to 1,
    Then consumption of child item is always being rounded nearest
    to rounding precision value.

    HI Darsamn

    The issue is more more how the system deals with rounding between applied item entries involving different UOMs, as Kine pointed out the precision used on the item card seems more to be related to production rather then application of items.
  • maheshmahesh Member Posts: 115
    Hello NAV Implementers,

    I'm also facing the same problem for one of my client.
    Rounding Precision is field used in manufacturing module only for rounding of required consumption.

    Microsoft has written code in Purchase Line, Item journal Line, sales Line....., ...., tables by which "Quantity (Base)" is calculated.
    See below function.
    CalcBaseQty(Qty : Decimal) : Decimal
    IF "Prod. Order No." = '' THEN
    TESTFIELD("Qty. per Unit of Measure");
    EXIT(ROUND(Qty * "Qty. per Unit of Measure",0.00001));

    and "Quantity (Base)" field is used to update inventory afterwards according to system coding.

    Let's say Item X
    Base Unit of Measure = PCS
    Other Unit of Measure = KGS
    where 1 PCS = 95 KGS

    According to system "Qty. per Unit of Measure" for KGS would be 1/95 = 0.01053.

    I created Purchase Order in KG & entered 95. When i receive it, my inventory is 1.00035.
    Because system calculated 0.01053*95 = 1.00035 ] (*,)
    Ideally, PCS can't be in decimal. It has to be rounded by 1. Anyone would laugh at the system.

    I analyzed this problem technically. I suggest to change "CalcBaseQty" function & round the Quantity
    by Rounding Precision instead of 0.00001.

    What do you say abt my solution or any other suggestion you have?
    Answers from MVPs & Functional Experts are most welcome.

    Thanks,
    Mahesh Jain
    Best Regards,
    Mahesh Jain
    mahesh@reliconservices.com
  • ANKIT84150ANKIT84150 Member Posts: 1
    hi mahesh,

    i have facing the same problem with my client .
    here they are using two UOM for FINISHED GOODS

    when they check the stock for FINISHED GOODS then they want to check the stock in QUANTITY and when they sale the FINISHED GOOD then they sale in KG. so for this process I am using two UOM but after this when i check my FINISHED GOODS inventory then it looks like 1198.9999 which are wrong .
    i have seen your function to round off FINISHED GOODS inventory but when i put that code in sales line table i am facing 'syntax error'
    I am a functional consultant.
    so plz help me i think i will be in danger if i cant solve it.

    I am waiting for your reply sir!!!!

    Thanks

    ANKIT SHARMA
Sign In or Register to comment.