cancel
Showing results for 
Search instead for 
Did you mean: 

Query - Link Outgoing Payment with A/P Invoice

Hi Experts!

I am looking to create a query between Outgoing Payment (OVPM) with A/P Invoice (OPCH).

We have in my company the case where we have several Outgoing payment for one A/P Invoice and in the field of the OPCH (receiptNum), we have only the last Outgoing Payment.

I would like to monitor by a query all outgoing payment for one invoice given.

We are using: SBO2005A SP01 PL18 and SQLserver 2000

I will definitely appreciate your help.

Best regards,

Sébastien

sebastien.guy@parrot.com

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

May be, U use 3 table : OVPM, VPM2, OPCH. e.g :

SELECT T0.[DocNum],T0.[DocDate], T0.[CardCode], T0.[CardName], T1.[SumApplied] As 'Payment', T2.[DocNum] 'AP Invoice No.',T2.[DocDate], T2.[DocDueDate], T2.[DocTotal], T2.[PaidToDate], T2.[PaidSum] FROM [dbo].[OVPM] T0 INNER JOIN [dbo].[VPM2] T1 ON T0.DocNum = T1.DocNum INNER JOIN OPCH T2 ON T1.DocEntry = T2.DocEntry ORDER BY T2.[DocNum]

Actually I don't like this query result, but it's the best we can do I think without SDK.

HTH,

0 Kudos

Thx a lot for your help

Regards,

Sébastien

Answers (0)