Query to show purchase order full details (PGSQL)

Query to show purchase order full details (PGSQL)

Tested in PGSQL build (14300)

SELECT po.POCUSTOMID AS "Order No.",poi.serialno "S.No", poaddfield.UDF_CHAR1 AS "Legal Entity", po.PONAME AS "PO Name", pos.STATUSNAME AS "PO Status", cy.currencyname "Currency",  paao.NAME AS "Vendor Name", po.SHIPTO AS "Ship To", po.BILLTO AS "Bill To",ct.componenttypename "Product Type", cd.componentname "Product", poi.description "Additional information about the product", poi.price "Price", poi.quantityordered "Quantity", sum(poi.quantityordered*poi.Price) "Amount", sdu.firstname "Requested By", pogl.GLCODE AS "GL Code", LONGTODATE(po.DATEORDERED) AS "PO Created Date", LONGTODATE(po.DATEORDERED) AS "Ordered Date", ad.ORG_NAME AS "Account" FROM PurchaseOrder po LEFT JOIN POStatus pos ON po.STATUSID=pos.STATUSID LEFT JOIN VendorDefinition pvd ON po.VENDORID=pvd.VENDORID LEFT JOIN SDOrganization paao ON pvd.VENDORID=paao.ORG_ID LEFT JOIN PurchaseGLCodes pogl ON po.GLCODE=pogl.GLCODEID INNER JOIN POAccMapping poacc ON po.PURCHASEORDERID=poacc.PURCHASEORDERID INNER JOIN AccountDefinition ad ON poacc.ACCOUNTID=ad.ORG_ID LEFT JOIN PurchaseOrderItem poi ON po.purchaseorderid=poi.purchaseorderid LEFT JOIN SDUSER sdu on po.requesterid=sdu.userid LEFT JOIN ComponentDefinition cd ON poi.componentid=cd.componentid LEFT JOIN Componenttype ct ON cd.componenttypeid=ct.componenttypeid  LEFT JOIN PurchaseOrder_Fields poaddfield ON po.PURCHASEORDERID=poaddfield.PURCHASEORDERID LEFT JOIN Povendorcurrency poc ON po.purchaseorderid=poc.purchaseorderid LEFT JOIN Currency cy ON poc.currencyid=cy.currencyid GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20 ORDER BY 1, 2

                  New to ADSelfService Plus?

                    • Related Articles

                    • Purchase order approval details

                      SELECT po.POCUSTOMID AS "PO Number", max(po.PONAME) AS "PO Name", max(poa.FIRST_NAME) AS "Purchase Requester", longtodate(max(po.DATEORDERED)) AS "Ordered Date", longtodate(max(po.DATEREQUIRED)) AS "Required Date", max(pos.STATUSNAME) AS "PO Status", ...
                    • Query to show PO associated assets with Invoice details (MSSQL & PGSQL)

                      Tested in build PGSQL (14300) and MSSQL (14306) SELECT po.Purchaseorderid "PO ID", MAX(po.poname) "PO Name", Max(ci.ciname) "CI Name", MAX(systeminfo.SERVICETAG) "Service Tag", MAX(systeminfo.MANUFACTURER) "Manufacturer", MAX(systeminfo.MODEL) ...
                    • Query Reports on Purchase Order Items (MSSQL)

                      Tested in build MSSQL (14306) MSSQL: 1. Login to SDP MSP as administrator 2. Execute this from SDP MSP application -> Reports -> New Query report Execute below query SELECT "po"."POCUSTOMID" AS "PO Number", "po"."PONAME" AS "PO Name", ...
                    • Purchase details

                      SELECT po.POCUSTOMID "PO Number", max(po.PONAME) "PO Name", max(po.TERMS) "PO Terms", LONGTODATE(max(po.DATEORDERED)) "Ordered Date", max(pos.STATUSNAME) "PO Status", max(poa.FIRST_NAME) "Purchase Requester", max(po.SHIPTO) "Ship To", max(paao.NAME) ...
                    • Query to show Problem - Task Report with Problem Details (MSSQL & PGSQL)

                      Tested in builds PGSQL (14300) or MSSQL (14306) Attached the sample query output. Query: SELECT prob.PROBLEMID AS "Problem ID", prob.TITLE AS "Title",catadef.CATEGORYNAME AS "Category", longtodate(prob.CLOSEDTIME) AS "Closed Date", ...