Cancelling Sales Order (as well as Purchase Order)

knmknm Member Posts: 170
As a test, in my NAV2009 SP1 environment, I've created a Special Order in following condition, and am looking for a way to cancel the Sales Order.

It seems like there is no Function to cancel the order, so I was wondering the best method of doing so.

1. Create new Sale Order (with Purchasing Code of Special Order)
2. Create new Purchase Order and get the line details from above Special Order
3. Post Receipt & Invoice
4. Go back to the Sales Order, and somehow cancel the order.

The sole reason why I'm asking this question is that the client has a situation where their Customer A orders the item, but cancel after the items are received at the client's warehouse (which the client approves of).

And in addition to above, the items that were originally specially ordered by Customer A will be sold to different Customer B.
In this case, is it possible to reuse the Special Order created towards Customer A? Or do I have to re-create a Sales Order from the scratch?

Thank you.

Comments

  • SavatageSavatage Member Posts: 7,142
    I just created a command button to do this - but usually the purchase order isn't posted just received.
    By clearing the related fields the link is broken and you can kill the order.
    OnPush()
    IF NOT DIALOG.CONFIRM('Would you like to Clear the Purchase Order Fields?',TRUE) 
     THEN EXIT ELSE
      SalesLine.RESET;
      SalesLine.SETRANGE("Document Type","Document Type");
      SalesLine.SETRANGE("Document No.","No.");
      IF SalesLine.FIND('-') THEN REPEAT
         CLEAR(SalesLine."Special Order Purchase No.");
         CLEAR(SalesLine."Special Order Purch. Line No.");
         SalesLine.MODIFY(TRUE);
    
      IF Purchline.GET("Document Type",SalesLine."Special Order Purchase No.",SalesLine."Special Order Purch. Line No.") THEN BEGIN
           CLEAR(Purchline."Special Order Sales No.");
           CLEAR(Purchline."Special Order Sales Line No.");
           Purchline.MODIFY(TRUE);
        END;    
    UNTIL SalesLine.NEXT = 0;
    
  • knmknm Member Posts: 170
    Harry,

    Thanks for your response.

    Since you suggested a command in order to achieve my question, does this mean that there is no manual way?

    Also, you mentioned that Purchase Order is received, and not posted. What happens if the Purchase Order is posted, is there something else that I need to be concerned about?

    Thank you.

    Kenji
  • SavatageSavatage Member Posts: 7,142
    I automated the process but if you manually clear the Special order
    purchase header and line fields on the sales line you can break the link. They not be visible by default but you can add them to the sales line so you can see them.
  • knmknm Member Posts: 170
    Thank you :D

    Kenji
  • SavatageSavatage Member Posts: 7,142
    No problem! I guess it worked for you.
  • knmknm Member Posts: 170
    Hi,

    I though everything went OK, but there is some additional questions with regards to this original Topic.

    What if the order is a Drop Shipment and items are partially shipped to Customer, and then Customer requests to Cancel the order? How would I be able to go around cancelling both the PO and SO?

    *********Scenario***********
    1. Create SO, enter item entries using Purchase Code "Drop Ship" (10PCS of Item A)
    2. Create PO, and get the lines from above SO.
    3. Post partial Receipt on 7 out of 10PCS.
    4. Cancel PO and SO for the QTY of 3 and Close PO and SO.
    **************************

    ~UPDATE~
    One other thing that I'd like to find out.
    I've given examples on cancelling the whole Transaction Entry, but is it possible to cancel entries line by line?

    For example, if I have the following line entries;
    Line1 Item A QTY = 10 PCS
    Line2 Item B QTY = 100 KG
    Line3 Item C QTY = 2200 LB

    Can I cancel only Line 2?
    (I was thinking maybe I could enter a negative QTY line entry, but seems like it doesn't help...)

    Thank you!
Sign In or Register to comment.