Purchase Order and Invoice relationship

Hi all,

I'm trying to find the relationship between Post Purchase Invoices and Purchase Orders.

The purchase invoices are NOT posted from the purchase order, rather created by a separate Purchase Invoice and using Functions, Get Receipt Lines

 

I do have a Pre-Assigned No. (PI) but NO Order No.'s (PO) but don't know how this relates back

Example assigned Series #

PPI000123 - Posted Purchase Invoice

PI0000123 - Pre-Assigned No.

PO400012 - Purchase Order

 

This is to amend the Detailed Trial Balance Report to show the original Purchase Order or Sales Order

 

  • Open the Purchase Order form, click on the "Order" button and then click "Invoices". This opens the purchase invoice list populated with all related posted invoices, and they should all be there. In the RTC that is under "Related Information".

    To figure out how the relationship works, open the Purchase Order form in design mode and investigate how that menu selection is programmed.

  • In reply to Daniel Rimmelzwaan:

    DenSter

    Open the Purchase Order form, click on the "Order" button and then click "Invoices". This opens the purchase invoice list populated with all related posted invoices, and they should all be there. In the RTC that is under "Related Information".

    To figure out how the relationship works, open the Purchase Order form in design mode and investigate how that menu selection is programmed.

    I guess it wont show invoices when we post from Purchase Invoices with Get Receipt Lines Function.. Sad

  • It's not possible to get PO no. if you post purchase invoice by using function "Get Receipt Lines", only one alternative solution, in  first posted purchase invoice line description field, you'll get posted purchase receipt no., then from posted purchase receipt you'll Purchase order no(PO No.)

  • Alex Snowdon-Darling
    The purchase invoices are NOT posted from the purchase order, rather created by a separate Purchase Invoice and using Functions, Get Receipt Lines

    Generally this approach is used (instead of posting invoices directly from PO) in cases, when user wishes to gather together receipts from several POs in one joined Invoice, so easy linking is impossible, as it becomes one-to-many.

    Also, this method leaves POs in the PO "list", even if they are fully received and fully invoiced - to remove them, you need to run periodically Delete Invoiced PurchOrders batch job.

  • In reply to Modris Ivans:

    When you do Get Receipts, the Receipt number is on the Invoice Line. You can retrieve the Receipt Header from there, which in turn should have a reference to the original order in the "Order No." field.

  • In reply to Daniel Rimmelzwaan:

    Thanks for all the help guys

    For others that want to know also, here is the relationship in SQL format

        SELECT pil.[Document No_]
                ,LEFT(RIGHT(pil.Description, 9), 8) gr
                ,prh.[Order No_] PO
          FROM [Purch_ Inv_ Line] pil
          INNER JOIN [Purch_ Rcpt_ Header] prh ON prh.No_ = LEFT(RIGHT(pil.Description, 9), 8)
          WHERE pil.Description LIKE 'Receipt No. GR%'

  • In reply to Alex Snowdon-Darling:

    Thanks for following up and sharing your findings Alex, glad to hear you were able to solve that.

  • In reply to Daniel Rimmelzwaan:

    Hi All,

    How to generate outstanding purchase invoices report as at given date for vendors.

    Thanks,

    DWIA Gunasinghe

     

Related