Skip to Content
0
Feb 22, 2009 at 12:50 PM

Invoice Key Error

45 Views

Hi Xperts,

While I try to Map the A/P Invoices with their respective Outgoing Payment,

I used the following Query and it's Query Printlayout

 SELECT T0.DocNum, T0.DocDate, T0.CardCode,
T0.CardName, T2.InvoiceId, T2.DocEntry, 
(select numatcard from opch t3 where t3.docnum=t2.docentry)[bill no],
(select docdate from opch t3 where t3.docnum=t2.docentry)[bill date],
T2.selfInv,  T2.SumApplied,T2.WtAppld  FROM [dbo].[OVPM]  T0 
INNER JOIN [dbo].[VPM2]  T2 ON T0.DocNum = T2.DocNum 
where t0.cardname=[%0] and t0.docdate=[%1] and T0.DocNum=[%2] 

What the problem now is, the invoice key of the outgoing payment is showing

wrong number i.e 1991 instead of A/P Invoice 1996 (for example). But the miracle

is when I click the arrange arrow of 1991, A/P Invoice 1995 is showing...

What could be the reason?

Whether the query is wrong? or... something else..

Regards,

Bala