RE: Error Posting Manual Payment
I always like to use the built-in Dynamics GP functions first.
Run Checklinks on the Purchasing module and for all Payables units.
Remember to always run reconcile after and try in test system first.
But if you want to run SQL, here is a simple code that will give you the PM History info and if it exists in the work, tax work or open tables.
If it appears in one of the other tables, it will show a 1 in the appropriate column.
SELECT * FROM (
SELECT h.VCHRNMBR, h.VENDORID, h.DOCNUMBR,
CASE WHEN o.VCHRNMBR IS NOT NULL THEN 1 ELSE 0 END as 'Open',
CASE WHEN t.VCHRNMBR IS NOT NULL THEN 1 ELSE 0 END as 'TrxWork',
CASE WHEN w.VCHRNMBR IS NOT NULL THEN 1 ELSE 0 END as 'Work'
FROM PM30200 h
LEFT OUTER JOIN PM20000 o on h.VCHRNMBR = o.VCHRNMBR AND h.DOCTYPE = o.DOCTYPE
LEFT OUTER JOIN PM10000 t on h.VCHRNMBR = o.VCHRNMBR AND h.DOCTYPE = t.DOCTYPE
LEFT OUTER JOIN PM10300 w on h.VCHRNMBR = o.VCHRNMBR AND h.DOCTYPE = w.DOCTYPE
) as z
WHERE [Open] = 1 OR [TrxWork] = 1 OR [Work] = 1