cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice details in Incoming/Outgoing Payment PLD

kvbalakumar
Active Contributor
0 Kudos

I used the following Query and it's QPLD but I'm getting the output of

the both the Present Year and Last Financial Year details.

Below query is for Outgoing QPLD

SELECT T0.DocNum [Payment#], 
T0.DocDate [Payment Date], T0.CardCode, 
T0.CardName, T1.InvoiceId, T2.DocNum [AP Inv#], 
T2.NumatCard [Bill No.], T2.DocDate [Bill Date], 
T1.selfInv, T1.SumApplied, T1.WtAppld, T0.NoDocsum  
FROM  [dbo].[OVPM] T0  INNER  JOIN [dbo].[VPM2] T1  
ON  T1.[DocNum] = T0.DocNum INNER  JOIN 
[dbo].[OPCH] T2  ON  T2.[DocEntry] = T1.DocEntry 
WHERE T0.Cardname='[%0]' and 
T0.DocDate='[%1]' and T0.DocNum='[%2]'

Waiting for the replies...

Regards,

Balakumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The link in your query is not corrected. Try this one:


SELECT T0.DocNum [Payment#], T0.DocDate [Payment Date], T0.CardCode, T0.CardName, 
T1.InvoiceId, T2.DocNum [AP Inv#], T2.NumatCard [Bill No.], T2.DocDate [Bill Date], 
T1.selfInv, T1.SumApplied, T1.WtAppld, T0.NoDocsum  
FROM  [dbo].[OVPM] T0 
INNER  JOIN [dbo].[VPM2] T1  ON  T1.[DocNum] = T0.DocEntry
INNER  JOIN [dbo].[OPCH] T2  ON  T2.[DocEntry] = T1.DocEntry 
WHERE T0.Cardname='[%0]' and T0.DocDate='[%1]' and T0.DocNum='[%2]'

Thanks,

Gordon

Answers (0)