Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Unable to perform return of goods for a Received Purchase order.

Posted on by

Hi folks,

Quick question should we be able to return of goods for a line  in a PO which was received but never invoiced.

If yes then please suggest a fix for me , because when i try to do ROG (return of goods) for a line item i get the error message ""A pending vendor invoice exists for this product receipt and must be removed."//

Further debugging & investigation reveals that error is coming from below code and 

Class PurchFormLetter_packing slip

void clicked()
{
InventQualityOrderTable inventQualityOrderTable = vendPackingSlipJour.openQualityOrder();
VendPackingSlipJour localVendPackingSlipJour = vendPackingSlipJour.data();

if (localVendPackingSlipJour.existsPendingVendorInvoice())
{
throw error("@SYP4986046"); // "A pending vendor invoice exists for this product receipt and must be removed."//
}

  • Verified answer
    SouravDam Profile Picture
    SouravDam 11,721 on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Hello Mav,

    I think better to create a support ticket with Microsoft without delay; provided that there is no customization involved here.

    Best regards,
    Sourav Dam

    Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.

  • Mav Profile Picture
    Mav on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Sorry to report  that it did not work.

    I remember earlier in Ax 2012, we were able to correct a erroneously received  line item . Looks like  we will always have to correct it by invoicing it to $0 on another invoice that it doesnt even belong to so kind of wrong thing to do, or leave it as a pending item forever which isn't ideal since we need to keep invoices under 60 days due

    Again, we used to be able to do this, and it changed last sept/Oct--- i'm thinking with the AX upgrade and that wasnt a great change. how can we change it back?

  • Suggested answer
    SouravDam Profile Picture
    SouravDam 11,721 on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Hello Mav,

    Item line will show in PO invoice if you select the Default from as "Product receipt quantity" in case if this is stocked product for which product receipt is posted.

    1682.JPG

    Otherwise; if this is service type item, then you can change the Default from as "Ordered quantity".

    1856.JPG

    In both cases, item line will be showing in PO invoice.

    Best regards,
    Sourav Dam

    Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.

  • Mav Profile Picture
    Mav on at
    RE: Unable to perform return of goods for a Received Purchase order.

    It appears that i cannot see the line amount in the invoices, but i can see the amount in the preview pane & that is why is not allowing to delete. I guess if we are able to fix the issue of line item to appear as there is amt linked to it then it should fix the overall  issue.

  • Suggested answer
    SouravDam Profile Picture
    SouravDam 11,721 on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Hello Mav,

    When you are trying to post PO invoice without amount, generally you will get below notification in system. Not only without item lines but system will ask for "Invoice date" as this is a mandatory field. 

    Below screen shot is taken from D365 for your understanding.

    0638.JPG

    However; first you test in any test environment if you try to post an invoice without any line, still system is allowing you to post that invoice in PO or not.

    If this is allowing (being an Admin user), then same testing you have to do by using any non-admin user ID to confirm that the problem lies for all the users.

    You have below options to go with;

    --- Modify the code so that system should not allow to post PO invoice if there is no line (in case if this validation is not available in AX 2012 !!).

    --- Else; case log to MS for their suggestion.

    Best regards,
    Sourav Dam

    Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.

  • Mav Profile Picture
    Mav on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Summarizing the issue & finding so far.

    Unable to perform return of good on a received PO.

    Found a vendor invoice which is causing this issue , this pending vendor invoice had no line item, it did not allow me to edit or delete it.

    Eventually in order to delete it i had to go to vendinvoiceinfotable, find this invoice status of which was showing executed , changed teh status to waiting come back & delete the invoice. That resolved the issue.

    My concern is how do i stop the user from creating such issues because it is not viable to go to production db each time &  make the required changes. Also the current solution does not look viable when we upgrade to D365 as in D365 we will not have access to prod db or aot.

  • Suggested answer
    SouravDam Profile Picture
    SouravDam 11,721 on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Hello Mav,

    The issue what you mentioned in your 1st post here, looks like any pending invoice is there in that PO and the PO is never invoiced. But now you mentioned that, this invoice status is 'Executed' without line items! Which means it is posted right ?

    If this is the case, then the meaning of this error sounds quite odd!

    What is the current status of this PO? Is it in 'Received' or 'Open' (in case of partially invoiced)?

    Best regards,
    Sourav Dam

    Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.

  • Mav Profile Picture
    Mav on at
    RE: Unable to perform return of goods for a Received Purchase order.

    I am the developer & shared the debugging report in 1st post.

    I can see that an invoice was created without line items & has the status of executed , perhaps this is why I cannot delete it.

    What i am trying to understand now is how  can i prevent such things at user level with no customization as i think users will always run into this issue of creating invoice in error without line items, forgeting about it & it is not pragmatic to go into Prod & delete the record from backend. There has to be some way using which , users could be restricted to do such things.

  • Suggested answer
    SouravDam Profile Picture
    SouravDam 11,721 on at
    RE: Unable to perform return of goods for a Received Purchase order.

    Hello Mav,

    'Something' is stuck somewhere in system for sure!

    Please check with the developer to set the debugger if they can find anything.

    Else, please create a support ticket to MS to move ahead on this case.

    Best regards,
    Sourav Dam

    Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.

  • Mav Profile Picture
    Mav on at
    RE: Unable to perform return of goods for a Received Purchase order.
    I have tried that cache clearing and dB synchronization but unfortunately it does not help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans