Skip to Content

Link AP invoice with purchase order to get the PO's remark

Currently i'm working on a query which is to get AP invoice and other data. And now i need to add purchase order's remark into the query, i tried many way but still unable to pull out purchase order's remark, please help.

Below is my working query and trying to add PO's remarks on the query.

SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T5.[GroupName], T0.[DocStatus], T1.[U_Job], T1.[ItemCode], T1.[Dscription], T1.[WhsCode], T2.[U_Brand], T2.[U_Prod_type], T2.[U_Packing_size], T2.[U_Packing_unit], T2.[U_InventoryUOM], T1.[U_Tariff_Code] as 'Tariff Code (Inv)', T2.[U_HS_Code] as 'Tariff Code (Item)', T1.[Quantity], T1.[unitMsr], T1.[PriceBefDi], T0.[DocCur], T0.[DocRate], T1.[VatGroup], T1.[TotalFrgn] as 'Row Total FC', T1.[TotalSumSy] as 'Row Total SC', T1.[VatSumFrgn], T1.[VatSumSy], T2.[VatGourpSA] as ' Item Code Sales Tax', T2.[VatGroupPU] as ' Item Code Purchase Tax', T0.[U_K2], T0.[Comments], T1.[U_UDF_1] as 'SST Exempt No.', T6.[Comments]

FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
LEFT JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
INNER JOIN OCRD T3 ON T0.CardCode = T3.CardCode
INNER JOIN OCTG T4 ON T0.GroupNum = T4.GroupNum
INNER JOIN OCRG T5 ON T3.GroupCode = T5.GroupCode

WHERE T0.[DocDate] >= [%1] AND T0.[DocDate] <= [%2]

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 27, 2019 at 11:12 AM

    Hi,

    Are you creating PO to AP Invoice directly?

    Regards,

    Nagarajan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.