on 2024 Feb 02 10:15 AM
Hi All
Please help advise how to enhance this Query to show the actual Invoice Number of Closed Delivery Order. Right now it is only showing internal Target Entry from DO.
SELECT T0."DocDate", T0.DocEntry, T0.[DocNum] 'DO No', T0.[CardCode], T0.[CardName], T1.[VisOrder] + 1 'LineNo.', T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[OpenQty], T2.Telephone as 'Sales Employee', T1.[TargetType], T1.[TrgetEntry] FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OSLP T2 ON T0.[SlpCode] = T2.[SlpCode] LEFT OUTER JOIN INV1 T3 on T1.[TargetType]=T3.[TrgetEntry] LEFT OUTER JOIN OINV T4 ON T4.[DocEntry] = T3.[DocEntry]
WHERE T0."DocStatus" = 'C'
Kedalene Chong
Request clarification before answering.
Hi,
please check again your JOIN to INV1...
LEFT OUTER JOIN INV1 T3 on T1.[TargetType]=T3.[DocEntry]
DocEntry is needed instead of TargetEntry
Hope that helps.
Greetings
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
9 | |
9 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.