In this post, an SQL script gathers all types of Post Dated Checks along with all the associated details. The report data set is illustrated in the table below:
Post dated checks types are:
- Saved, before the cash receipt is posted
- Received, when the cash receipt is posted
- Collected, when the cash receipt is collected
Tables Included:
· RVLPD008 | Sales Payment Document Work
· RVLPD009 | Sales Payment Document Open
SELECT 'Saved' AS Document_Status ,DOCNUMBR AS [Cash Receipt Number] ,CUSTNMBR AS [Customer Number] ,CUSTNAME AS [Customer Name] ,PMTDOCID AS [Payment Document ID] ,CHEKNMBR AS [Check Number] ,CHEKBKID AS [Checkbook],DOCDATE AS [Document Date] ,DUEDATE AS [Check Due Date] ,DOCAMNT AS [Check Amount]FROM dbo.RVLPD008WHERE PDOCSTRM = 1UNION ALLSELECT 'Collected' AS Document_Status ,DOCNUMBR AS [Cash Receipt Number] ,CUSTNMBR AS [Customer Number] ,CUSTNAME AS [Customer Name] ,PMTDOCID AS [Payment Document ID] ,CHEKNMBR AS [Check Number] ,CHEKBKID AS Checkbook ,DOCDATE AS [Document Date] ,DUEDATE AS [Check Due Date] ,DOCAMNT AS [Check Amount]FROM dbo.RVLPD009WHERE PDOCSTRM = 4UNION ALLSELECT 'Received' AS Document_Status ,DOCNUMBR AS [Cash Receipt Number] ,CUSTNMBR AS [Customer Number] ,CUSTNAME AS [Customer Name] ,PMTDOCID AS [Payment Document ID] ,CHEKNMBR AS [Check Number] ,CHEKBKID AS Checkbook ,DOCDATE AS [Document Date] ,DUEDATE AS [Check Due Date] ,DOCAMNT AS [Check Amount]FROM dbo.RVLPD009WHERE PDOCSTRM = 1
Best Regards,
Mahmoud M. AlSaadi

Like
Report
*This post is locked for comments