Skip to Content

Incoming payment with invoice list

Nov 11, 2016 at 04:23 PM


avatar image

Hello Everyone! I am just try to make a short query which shows a certain company incoming payment with listing the paid invoices. My query is almost ready but I cannout find the paid invoice numbers in the ORCT / RCT2 table. I checked all fields of them but it seems they do not contains the invoice number. The query in the moment:

SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T1.[InvoiceId], T1.[AppliedFC], T1.[AppliedSys] FROM ORCT T0 INNER JOIN RCT2 T1 ON T0.[DocEntry] = T1.[DocNum] WHERE T0.[CardName] = '[%1]'

How can I put the paid invoice number to the query?


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Danilo Kasparian Aug 28, 2017 at 01:01 PM

You need to use the RCT2.DocEntry and the RCT2.InvType, the InvType indentify your object type (Invoice, purchase, etc) the docEntry is the Key of your base document

Link the DocEntry to the OINV when it is a invoice and get the OINV.DocNum

10 |10000 characters needed characters left characters exceeded