on 03-28-2012 1:19 AM
Hi All ,
I Used follwoing Query to get Sales Order to Invoice
SELECT
Distinct
T0
.[DocNum] as 'SO Num',T2.SlpName as 'Sales Person',T0.DocStatus AS 'Order Status' , T0.[DocDate] as 'SO Date', T0.[DocDueDate] as 'SO Commit Date',
T0
.[CardCode] as 'Party Code', T0.[CardName] as 'Party Name', T0.[NumAtCard]as 'Customer Po Num', T1.[ItemCode], T1.[Dscription],
T1
.[Quantity] as 'Order Qty', (T1.Quantity*(T1.[Price]* T0.DocRate)) AS ' Ordered Value ', T1.[OpenQty] as 'Pending Order Qty',
(T1.OpenQty *(T1.[Price]* T0.DocRate)) AS 'Open Ordered Value ',T4.[Quantity] as 'Delivered Qty',(T4.Quantity*(T4.[Price]* T5.DocRate)) AS ' Delivered Value ',
T6
.[Quantity] as 'Invoiced Qty',(T6.Quantity*(T6.[Price]* T7.DocRate)) AS ' Invoiced Value '
FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
Left
Join DLN1 T4 On T1.DocEntry=T4.BaseEntry And T1.LineNum=T4.BaseLine
LEFT
JOIN ODLN T5 On T4.DocEntry=T5.DocEntry LEFT JOIN INV1 T6 On T4.DocEntry=T6.BaseEntry And T4.LineNum=T6.BaseLine
LEFT
JOIN OINV T7 On T6.DocEntry=T7.DocEntry
INNER
JOIN OSLP T2 ON T1.SlpCode = T2.SLPCode
In the above Query When Quantity of Sales Order is delivered Partially then Lines are repeating What to do if i dont want to repeat the Lines
Ashish Gupte
dear Ashish,
I'm also the same problem like you. It's coz of text line problem. You need to use tmsp_doclinetypelayout stored procedure to solve repeating line problem. If you have any question, please let me know.
best regards,
zzymt (myanmar)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.