Close a partially received PO

user123user123 Member Posts: 22
If there is a situation where you frequently receive less than the PO quantity, is there a way to close the PO?

Comments

  • navuser1navuser1 Member Posts: 1,329
    user123 wrote:
    If there is a situation where you frequently receive less than the PO quantity, is there a way to close the PO?


    close means remove from PO not from the Base Table ??
    Now or Never
  • DeepDeep Member Posts: 569
    Archive the PO and change the PO "QUantity" to "Quantity Received". You will not be able to receive any more units against that PO.

    viewtopic.php?f=23&t=30546
    Regards,

    Deep
    India
  • user123user123 Member Posts: 22
    navuser1 wrote:
    user123 wrote:
    If there is a situation where you frequently receive less than the PO quantity, is there a way to close the PO?


    close means remove from PO not from the Base Table ??

    Close means to remove the PO as it get deleted when the total amount is received and invoiced. The main purpose of this requirement is to prevent open POs getting piled up unnecessarily for stock not to be received for ever..

    Thanks
  • user123user123 Member Posts: 22
    Deep wrote:
    Archive the PO and change the PO "QUantity" to "Quantity Received". You will not be able to receive any more units against that PO.

    viewtopic.php?f=23&t=30546

    But still, the PO remains, it will not get deleted as it does when you receive and invoice the total amount..

    Thanks
  • DeepDeep Member Posts: 569
    Use "Delete Invoiced Purchase Return Order" report in IT Administration > Data Deletion.
    Regards,

    Deep
    India
  • MindieMindie Member Posts: 124
    Ever have an instance where the "Delete Invoice Purchase Orders" doesn't delete the purchase order? I have one client that is having this problem. The Qty is the same as the Qty Received and Qty Invoiced. Nothing is oustanding.

    Any ideas?
  • navuser1navuser1 Member Posts: 1,329
    Mindie wrote:
    Ever have an instance where the "Delete Invoice Purchase Orders" doesn't delete the purchase order? I have one client that is having this problem. The Qty is the same as the Qty Received and Qty Invoiced. Nothing is oustanding.

    Any ideas?


    You should debug the Code to get the Reason.
    Now or Never
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Mindie wrote:
    Ever have an instance where the "Delete Invoice Purchase Orders" doesn't delete the purchase order? I have one client that is having this problem. The Qty is the same as the Qty Received and Qty Invoiced. Nothing is oustanding.

    Any ideas?

    yes I have seen this often.

    The problem is that the code in the "Delete Invoice Purchase Orders" function is not the same as the code used to determine if an order can actually be deleted or not. It done this way to make it a bit faster, but I really would prefer the code to be rewritten so it tests everything the same as in the ondelete triggers. The code does things like filter on a couple of fields and do a find to see if it can delete that sometimes fails, BUT luckily it fails by not deleting, I haven't seen the other way of it deleting something it shouldn't.
    David Singleton
  • praveenbilagipraveenbilagi Member Posts: 1
    user123 wrote:
    If there is a situation where you frequently receive less than the PO quantity, is there a way to close the PO?

    After receiving & invoicing the partial quantity, archieve the PO and delete the PO from pending PO list.

    Praveen
  • MindieMindie Member Posts: 124
    I found a hotfix for the problem. I changed a couple lines of code and now it is working correctly.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Mindie wrote:
    I found a hotfix for the problem. I changed a couple lines of code and now it is working correctly.

    Can you please post the code here, (if its just a few lines) and a link to the KB. It will be of use to help those that have helped you.
    David Singleton
  • MindieMindie Member Posts: 124
    Sure

    Here's the link: https://mbs.microsoft.com/knowledgebase ... OQRZLRXVOU

    Here's the change:

    To apply this hotfix, change the code in the Purchase Header - OnAfterGetRecord() trigger in the Delete Invoiced Purch. Orders report (499) as follows.

    Existing code
    ...
    IF PurchLine.FIND('-') THEN
    REPEAT
    PurchLine.CALCFIELDS("Qty. Assigned");
    IF ((PurchLine."Qty. Assigned" = PurchLine."Quantity Invoiced") OR

    // Delete the following lines.
    (PurchLine.Type <> PurchLine.Type::"Charge (Item)")) AND
    (PurchLine."Qty. Assigned" <> 0)

    THEN BEGIN
    ...

    Replacement code
    ...
    IF PurchLine.FIND('-') THEN
    REPEAT
    PurchLine.CALCFIELDS("Qty. Assigned");

    // Modify the following line.
    IF ((PurchLine."Qty. Assigned" = PurchLine."Quantity Invoiced") AND

    // Add the following lines.
    (PurchLine."Qty. Assigned" <> 0)) OR
    (PurchLine.Type <> PurchLine.Type::"Charge (Item)")

    THEN BEGIN
    ...
Sign In or Register to comment.