How Don't let Inventory be negative?

Nuno_PereiraNuno_Pereira Member Posts: 31
How I configure navision to don't let Inventory be negative? Please It's Urgent.

Comments

  • ara3nara3n Member Posts: 9,256
    In CU 22 add the following line

    IF (((ItemLedgEntry."Entry Type" IN
              [ItemLedgEntry."Entry Type"::"Negative Adjmt.",
               ItemLedgEntry."Entry Type"::Consumption]) AND
             ("Source Type" = "Source Type"::Item)) OR
            (ItemLedgEntry."Entry Type" = ItemLedgEntry."Entry Type"::Transfer)) AND
           (ItemLedgEntry.Quantity < 0)
        THEN
          ERROR(Text005,ItemLedgEntry."Item No.");
    
        //Start 001
        if (ItemLedgEntry.Quantity < 0) then
           ERROR(Text005,ItemLedgEntry."Item No.");
        //End 001
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • lubostlubost Member Posts: 623
    I think that situation is not so easy as ara3n wrote, because:
    1. Users can post entries with date preceding last posted entries and inventory shoud not be negative in any date
    2. Revaluation (adjustation) and hours accounting from production module entries deals with quantity too but doesn't cause inventory changes
  • ara3nara3n Member Posts: 9,256
    lubost. Just try it. It works. It's that easy.

    1. You first issue. Item application is not date sensetive, Application is done in fifo, unless you have serial or lot no assigned. At which case you'll get Item tracking error that the item is not in inventory.

    2. Second issue. Reevaluation does not create any Item Ledger Entry. The change in code errors out when item ledger is inserted.




    If you look at the code. It already errors out if let's say you try to post a consumption journal. My code changes basically applies it to any entry type.

    I've done this for a client a year ago. Haven't had any issues, provided when you implement this change that all your inventory is positive.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    Yes, this small change is working, I can confirm that. We are using it nearly for all customers... :-) you can easilly modify it to just not let users to sell into negative nos., or block it in generally...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Lec11Lec11 Member Posts: 91
    I don't get it!
    lubost has a point ... users can post entries with date preceding last posted entries! I mean if I sell in January an item that I produced in February then it's still wrong and further development is needed to prevent that! This small change is correct only if the users enter information in real-time!
Sign In or Register to comment.