Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3323

Invoice showing Item and Service Items

$
0
0

Hello,

 

I am having issues getting a query built that will bring in service types invoices when I query the OINV and INV1 tables.  All of the Item invoices show up, but none of the service ones show up.  Any tricks?

 

SELECT T0.[DocEntry], T0.[TaxDate], T0.[CardName] AS 'BP Name',

T5.[GroupName] AS 'BP Group', T7.SlpName AS 'Sales Rep', T2.Territory, T2.State1, T1.[ItemCode], T1.Quantity AS 'Quantity', T4.[ItmsGrpNam] AS 'Item Group', T1.[LineTotal] AS 'Total', T6.Price AS 'RM Standard'

FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN OITM T3 ON T1.ItemCode = T3.ItemCode INNER JOIN OITB T4 ON T3.ItmsGrpCod = T4.ItmsGrpCod INNER JOIN OCRG T5 ON T2.GroupCode = T5.GroupCode INNER JOIN ITM1 T6 ON T3.ItemCode = T6.ItemCode INNER JOIN OSLP T7 ON T0.SlpCode = T7.SlpCode

WHERE T0.[TaxDate] >=[%0] and   T0.[TaxDate] <=[%1]  AND T0.[CANCELED] = 'N' AND T6.Pricelist = '13' AND T2.GroupCode = '103'

 

Thanks,

Ben


Viewing all articles
Browse latest Browse all 3323

Trending Articles



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