cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order Query

0 Kudos

Hi, I am writing a query to show certain fields, this is what I have so far:

SELECT T0.[DocNum], T0.[U_SOPP_Num], T0.[NumAtCard], T0.[DocDate], T0.[DocCur],T1.[Price] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[DocStatus] <> '2' and T0.[DocNum] <> '26645' AND T0.[SlpCode] = ' 4' OR T0.[SlpCode] = ' 29' OR T0.[SlpCode] = ' 26' OR T0.[SlpCode] = ' 25'

The query needs to show only certain sales people, sales orders that have not been cancelled and one sales order that was created by mistake.

This works fine apart from I am struggling to find the correct field for the total amount on the sales order in it's native currency. I have found the field that shows the total in the system currency however, any field I find such as doc total or price it then shows in the query result every line item in the query. I have also been asked on whether the query can have a total amount field for all the resulting sales orders. I know you can press control and the field header to get it in the query but this will end up as a alert by email.

Any help would be appreciated.

Thanks

Neil

Accepted Solutions (0)

Answers (0)