Hi Leslie! Haha! Not a problem. I ran the scripts as you suggested and below is what I am seeing:
*************
SCRIPT:
select 'PM10200' as [table], vendorid, docdate, apfrdcnm, aptodcnm, aptodcty, appldamt
from pm10200
where aptodcnm = '0336163-IN'
and vendorid = 'Vendor ID'
union
select 'PM30300' as [table], vendorid, docdate, apfrdcnm, aptodcnm, aptodcty, appldamt
from pm30300
where aptodcnm = '0336163-in'
and vendorid = 'Vendor ID'
***********
RESULTS:
table apfrdcnm aptodcnm aptodcty appldamt
PM10200 CREDIT CARD 0336163-IN 1 1.56
PM10200 19320 0336163-IN 1 154.44
PM10200 0336163-IN 1 154.44
PM30300 CREDIT CARD 0336163-IN 1 1.56
PM30300 28224 0336163-IN 1 154.44
**Interesting on this - I have no IDEA what that 19320 voucher number is. It is not in any inquiry screen for the vendor.
************
SCRIPT:
select 'PM20000' as [table], docnumbr, docamnt, curtrxam, vendorid
from PM20000
where docnumbr in ('CREDEIT CARD', '28224', '0336163-in')
AND VENDORID = 'Vendor ID'
UNION
SELECT 'PM30200' AS [TABLE], DOCNUMBR, DOCAMNT, CURTRXAM, VENDORID
FROM PM30200
WHERE DOCNUMBR IN ('CREDEIT CARD', '28224', '0336163-in')
AND VENDORID = 'Vendor ID'
*************
RESULTS:
table docnumbr docamnt curtrxam
PM20000 0336163-IN 156 154.44
PM30200 28224 154.44 0
The "Credit Card" and the "28224" are the payments applied to this invoice, and both are in history, however the invoice does show a remaining amount open of the 154.44.
Thank you for all your help!!
Linda DiGiacomo