Pages

Monday, July 11, 2011

Customer A/R Status: Issue with Retuned Check (RC)

Issue:
Customer A/R status is incorrect due to issue with RC transaction. Entry is erroneous due to transaction code UNO is not removed from the report.


Cause:
The cause of this error is due to the old patch being used. This has been corrected on the current patch.

Fix:
1. Run script below to check for other RC issues:
SELECT a.cust_code, a.trans_code, a.doc_no
FROM a_open_item AS a WITH(NOLOCK)
INNER JOIN a_open_itm_hist AS b WITH(NOLOCK)
ON a.company_code = b.company_code
AND a.cust_code = b.cust_code
AND a.trans_code = b.trans_code
AND a.doc_no = b.doc_no
INNER JOIN a_open_payment AS c WITH(NOLOCK)
ON c.company_code = b.company_code
AND c.cust_code = b.cust_code
AND c.payment_doc_no = b.doc_no
WHERE a.trans_code = (‘UNO’)
AND b.trans_code = (‘UNO’)
AND c.payment_trans_code = ‘OR’
AND c.cleared_flg = ‘Y’
AND c.returned_chk_flg = ‘Y’
2. Take note of the document numbers with issue then perform script below:
– Declare variables
declare
@doc_no as char(8),
@trans_uno as char(3),
@trans_unp as char(3),
@trans_or as char(3)
– Initialize values
set @doc_no = ‘doc_no with issue’
set @trans_uno = ‘UNO’
set @trans_unp = ‘UNP’
set @trans_or = ‘OR’
– Delete record from a_open_item
delete from a_open_item
where doc_no = @doc_no and trans_code = @trans_uno
– Delete record from a_open_itm_hist
delete from a_open_itm_hist
where doc_no = @doc_no and trans_code in (@trans_uno, @trans_unp)
– Update record from a_open_payment
update a_open_payment
set unapplied_amt = ’0.00′
where payment_doc_no = @doc_no and payment_trans_code = @trans_or

No comments:

Post a Comment