Number series skipping

vijayandersonvijayanderson Member Posts: 207
edited 2009-01-28 in Navision Financials
Hi Friends,

When I post the Sales Invoice from order (Partial invoicing) , the Posted invoice number is getting skipped. The reason being is that ,the posted invoice number is getting populated in posting no in sales order Header even before posting.

The field gets populated when following error occurs
We have a Item tracking for the items, so when the user forgets to give the Item track number, it throws an error, at that time the posting number gets stored in the Sales Header.

Can someone suggest a solution for this.

Thanks & Regards,
Vijay

Comments

  • DenSterDenSter Member Posts: 8,304
    I don't think it's supposed to actually populate a number, just the numbering series.
  • ara3nara3n Member Posts: 9,256
    It actually does get a number for shipment and sales invoice.
      IF Ship AND ("Shipping No." = '') THEN
        IF ("Document Type" = "Document Type"::Order) OR
           (("Document Type" = "Document Type"::Invoice) AND SalesSetup."Shipment on Invoice")
        THEN BEGIN
          TESTFIELD("Shipping No. Series");
          "Shipping No." := NoSeriesMgt.GetNextNo("Shipping No. Series","Posting Date",TRUE);
          ModifyHeader := TRUE;
        END;
    
      IF Receive AND ("Return Receipt No." = '') THEN
        IF ("Document Type" = "Document Type"::"Return Order") OR
           (("Document Type" = "Document Type"::"Credit Memo") AND SalesSetup."Return Receipt on Credit Memo")
        THEN BEGIN
          TESTFIELD("Return Receipt No. Series");
          "Return Receipt No." := NoSeriesMgt.GetNextNo("Return Receipt No. Series","Posting Date",TRUE);
          ModifyHeader := TRUE;
        END;
    
      IF Invoice AND ("Posting No." = '') THEN BEGIN
        IF ("No. Series" <> '') OR
           ("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
        THEN
          TESTFIELD("Posting No. Series");
        IF ("No. Series" <> "Posting No. Series") OR
           ("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
        THEN BEGIN
          "Posting No." := NoSeriesMgt.GetNextNo("Posting No. Series","Posting Date",TRUE);
          ModifyHeader := TRUE;
        END;
      END;
    
    


    You can comment the commit
      IF ModifyHeader THEN BEGIN
        MODIFY;
        COMMIT;
      END;
    

    but this will cause longer locking of the tables so anybody creating orders items, etc will be locked until the SO is posted.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    The Numbers do not get skipped, you just haven't posted the order yet, once you post the order they will retain the number they posted on first time.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • vijayandersonvijayanderson Member Posts: 207
    Hi Aran,

    What you are saying is correct, only after posting the SO is complete but, the shipment is done by warehouse department, so they assign the lot number. once the error occurs Invoice department will not post the corresponding order , which would be posted at later date. so the Order gets posted after series of number have been posted.

    So Client feel as tough number is getting skipped.

    if possible suggest a remedy

    Regards,
    Vijay
  • ara3nara3n Member Posts: 9,256
    It's how nav works, One solution is to comment out the commits as I mentioned but it has drawbacks.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • vijayandersonvijayanderson Member Posts: 207
    Can u tell wohat would be the draw backs
Sign In or Register to comment.