Skip to Content

Need sql query to link delivery note with Ar inovice

Dear Experts

I need a query with provide delivery note linked to Ar invoice

below given details required

Delivery Posting date - Delivery Doc No - Delivery Total - Delivery Series -

Ar Invoice Posting Date - Ar Invoice Doc No - Ar invoice Total - Ar Invoice Series

need to filter with Posting date - From - To

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 28, 2017 at 08:13 AM

    Hi,

    Try this query,

    SELECT T0.[DocNum], T0.[DocDate], T0.[Series], T0.[DocTotal], T3.[DocNum], T3.[DocDate], T3.[Series], T3.[DocTotal] FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.[DocEntry] = T1.[DocEntry] left join INV1 T2 on T2.[BaseEntry] = T1.Docentry and T2.[BaseLine] = T1.[LineNum] INNER JOIN OINV T3 ON T2.[DocEntry] = T3.[DocEntry] WHERE T0.[DocDate] between [%0] and [%1] group by T0.[DocNum], T0.[DocDate], T0.[Series], T0.[DocTotal], T3.[DocNum], T3.[DocDate], T3.[Series], T3.[DocTotal]

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded