Join PS_WTHD_TRXN_TBL to PS_PYMNT_VCHR_XREF without PYMNT_ID
Hello all - I am working on making changes for Year end 1099 reporting. This year we need to supply Pennsylvania withholding information (Box 16 on the form).
I have a view that selects data from PS_WTHD_TRXN_TBL for boxes 17 and 18 that I would like to modify to add the Box 16 withholding totals.
In order to get the withholding data I believe I need to join to PS_PYMNT_VCHR_XREF and get the PYMNT_GROSS_AMT where the PYMNT_TYPE is equal to 'W' and the REMIT_VENDOR is '47860A'.
The problem is that on these withholding payments the way it was setup in PS, there is no PYMNT_ID associated to the withholding payment (PYMNT_TYPE 'W') so I can not find a way to join to PS_WTHD_TRXN_TBL (which also has a PYMNT_ID field).