Quantcast
Channel: SCN: Message List - Reporting and Printing
Viewing all articles
Browse latest Browse all 2719

Re: Mapping Sales Invoices with Delivery Notes

$
0
0

Hi Jessica

 

Try the below query

 

SELECT Distinct

t0.docnum as 'Sales Order',

t3.docnum as 'Delivery Note',

T5.DocNum as 'Invoice',

t3.docdate as 'D/Note Date',

t3.docstatus as 'Open/Closed',

t0.numatcard as 'Customer Ref No.',

t1.subcatnum as 'Customer No.',

t1.Itemcode as 'Item Code',

t1.dscription as 'Description',

t1.quantity as 'Quantity',

t1.price as 'Price',

t1.linetotal as 'Total Value'

 

FROM ordr t0

inner join rdr1 t1 on t0.docentry = t1.docentry

inner join dln1 t2 on t2.baseentry = t0.docentry and t1.linenum = t2.baseline

inner join odln t3 on t3.docentry = t2.docentry

LEFT JOIN INV1 T4 ON T4.BaseEntry=T3.DocEntry

LEFT JOIN OINV T5 ON T5.DocEntry=T4.DocEntry

 

WHERE

t0.cardcode = '[%0]'

 

ORDER BY

t0.docnum,

t2.docentry

 

FOR BROWSE

 

With Regards

 

Balaji Sampath


Viewing all articles
Browse latest Browse all 2719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>