Skip to Content
Former Member
Apr 19, 2011 at 10:46 AM

Purchase Register


Dear Experts

i am creating query on purchase register but when i am running the query i see document no. is appering more than one in few document.I am looking for base document amt .tax amt and document total only.I dont want by row wise report.

can somebody guide me



SELECT T0.[DocDate], T0.[TaxDate], T0.[DocNum], T0.[DocType], T2.[GroupName], T0.[CardCode], T0.[CardName],

T0.[LicTradNum],T0.[NumAtCard], T1.[AddID], T0.[Comments], T3.[VatPrcnt], T0.[VatSum], T0.[DocTotal]

FROM [dbo].[OPCH] T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG T2 ON T1.GroupCode = T2.GroupCode

INNER JOIN PCH1 T3 ON T0.DocEntry = T3.DocEntry WHERE T0.[DocDate] >=[%0] AND T0.[DocDate] <= [%1]