on 04-16-2016 4:43 AM
Dear Expert,
Advance thanks for help...
Pls find below query which one reflect item wise purchase return in these query i want to add vendor code & vendor name and require filter of From Date & To Date option.
SELECT T0.[DocNum][PONO], T1.[ItemCode], T1.[Dscription], T1.[Quantity][Purchased Qty],
T3.[Quantity][Recieved Qty],T5.[Quantity][Returned Qty], T2.[DocNum][GRPO No], T4.[DocNum][GoodsReturn No]
FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry,
OPDN T2 INNER JOIN PDN1 T3 ON T2.DocEntry = T3.DocEntry,
ORPD T4 INNER JOIN RPD1 T5 ON T4.DocEntry = T5.DocEntry
WHERE T3.[BaseRef] = T0.[DocNum] and T5.[BaseRef] = T2.[DocNum]
GROUP BY T0.[DocNum], T1.[ItemCode], T1.[Dscription], T1.[Quantity],
T3.[Quantity],T5.[Quantity], T2.[DocNum], T4.[DocNum]
I really appreciate if you kindly help me on this because i am functional person and i want to acquire technical knowledge also.....
Thanks & Regards,
Pratik D. Patel
Hi,
Above query is not linked correctly. Please try this query and add required fields.
SELECT T0.[CardCode], T0.[CardName], T0.[DocNum], T0.[DocDate], T1.[ItemCode], T1.[Quantity], T3.[DocNum], T3.[DocDate], T2.[Quantity], T5.[DocNum], T5.[DocDate], T4.[Quantity] FROM OPOR T0 INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry] left join PDN1 T2 on T2.[BaseEntry] = T1.[DocEntry] and T2.[BaseLine] = T1.[LineNum] INNER JOIN OPDN T3 ON T2.[DocEntry] = T3.[DocEntry] left join RPD1 T4 on T4.[BaseEntry] = T2.[DocEntry] and T4.[BaseLine] = T2.[LineNum] LEFT JOIN ORPD T5 ON T4.[DocEntry] = T5.[DocEntry] WHERE T0.[DocDate] between [%0] and [%1]
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.