POS SALES in Go Pro

albertoalberto Member Posts: 59
edited 2003-11-18 in Navision Attain
Hi,
does anyone know if it's possible to block automaticly the sales of quantity of an item (made by POS) if I haven't enought of it on inventory?

Thanks

Comments

  • eromeineromein Member Posts: 589
    codeunit 22, function InsertItemLedgEntry, second if statement then text005.

    There you have it.

    Thange that if statement just the way you like it.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • albertoalberto Member Posts: 59
    Thanks, but what I have exactly to change to block selling of the excess quantity that I don't have in my inventory?


    WITH ItemJnlLine DO BEGIN
    IF ItemLedgEntry.Open THEN BEGIN
    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.");
  • eromeineromein Member Posts: 589
    I'm not quite sure, but try something like this:
    WITH ItemJnlLine DO BEGIN 
      IF ItemLedgEntry.Open THEN BEGIN 
        (ItemLedgEntry.Quantity < 0) 
      THEN 
        ERROR(Text005,ItemLedgEntry."Item No.");
    

    * Please test carefully!
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
Sign In or Register to comment.