Dear Experts,
I am using the below query to extract Sales Order vs Delivery Vs AR Invoice details. I am facing an problem as such that some Sales Order have a direct AR invoice without any delivery and this report is not showing those sales order
SELECT distinct T0.[DocNum],T0.doctotal, T0.paidtodate, (T0.doctotal-T0.paidtodate) as 'Balance due',T2.docnum as 'Delivery No' , T2.doctotal as 'Deliv Doc Total', T5.docnum as 'Sales Order No.', T5.doctotal as 'S.O Total' FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry inner join odln T2 on T2.docnum=T1.basedocnum inner join dln1 T4 on T4.docentry=T2.docentry inner join ordr T5 on T5.docnum=T4.basedocnum
My requirement is basically to know how many Sales Order is open which have partial delivery or partial invoicing.
Please advise.
Regards,
Kamlesh