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

Re: Details repeated twice in Outgoing payment query

$
0
0

Hi,

 

Try:

 

SELECT Distinct T0.[DocNum], T0.[DocDate], T0.[CardCode],

T0.[CardName], T0.[NumAtCard],T0.[DocTotal] 'Doc Total', T1.[SumApplied] 'Applied Amt', T1.[DocNum] 'SAP Pymt No.',

T2.[DocDate], (T2.[CashSum] + T2.[CreditSum] + T2.[CheckSum] + T2.[TrsfrSum]) 'Paid Amount'

from OPCH T0 INNER JOIN VPM2 t1 on t0.DocEntry=T1.DocEntry  and t1.invtype ='18'

inner join  OVPM T2 on t1.DocNum = t2.DocNum

WHERE T2.[DocDate]>=[%0] AND T2.[DocDate]<=[%1] AND T2.[Canceled] = 'N'

ORDER BY T1.[DocNum]

 

Thanks,

Gordon


Viewing all articles
Browse latest Browse all 9063

Trending Articles