Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8802

Re: Offered Amount Quotations against orders

$
0
0

Hi Ramon Duunk....

 

Try this with the basic linking


 

Select II.Docnum Invoice,I.ItemCode,

  QQ.Docnum 'Quotation',Q.quantity,

  OO.DocNum 'Order',O.Quantity,

  DD.DocNum Delivery,D.Quantity,

  I.Quantity,I.LineTotal

From OINV II inner join INV1 I On I.DocEntry=II.DocEntry

   left outer join DLN1 D on I.BaseEntry=D.DocEntry and I.BaseType=15 and I.BaseLine=D.LineNum

left outer join ODLN DD on DD.DocEntry=D.DocEntry

   left outer join RDR1 O on (I.BaseEntry=O.DocEntry and I.BaseType=17 and I.BaseLine=O.LineNum)

     or (D.BaseEntry=O.DocEntry and D.BaseType=17 and D.BaseLine=O.LineNum)

left outer join ORDR OO on OO.DocEntry=O.DocEntry

   left outer join QUT1 Q on (O.BaseEntry=Q.DocEntry and O.BaseType=23 and O.BaseLine=Q.LineNum)

     or (I.BaseEntry=Q.DocEntry and I.BaseType=23 and I.BaseLine=Q.LineNum)

     or (D.BaseEntry=Q.DocEntry and D.BaseType=23 and D.BaseLine=Q.LineNum)

left outer join OQUT QQ on QQ.DocEntry=Q.DocEntry

 

Hope helpful

 

Regards

kennedy


Viewing all articles
Browse latest Browse all 8802

Trending Articles