Fixing a Double AR void Invoice

From KeystoneIntranet
Revision as of 12:58, 14 July 2023 by WikiAdmin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Example of fixing a double void

This example we are unvoiding session 291763

first document original invoices: (select void_inv_session_no, from artinv where session_no = 291763) Results: SESSION TRNS 291743 957 291743 1014

We can use this trick to come up with a value equal to SESSION*10000+TRANS for later when we need to list these: 29174300957, 29174301014


Now Delete:

delete from glttrx where session_no = 291763
delete from arttaxtrx where session_no = 291763
delete from artcshhd where session_no = 291763
update artprtrx set reconciled_flag='Y' where session_no = 291763
DELETE from artprtrx where session_no = 291763
update artslsdt set reconciled_flag='Y' where session_no = 291763
DELETE from artslshd where session_no = 291763
DELETE from artinv where session_no = 291763

and update original invoice to unpaid and non-void:

select  * from artinv where (session_no*100000+trans_no) in ( 29174300957,  29174301014)

update artinv set void_flag='N', CREDIT_AMOUNT=0 , LAST_POST_DATE=NULL
where (session_no*100000+trans_no) in ( 29174300957, 29174301014)


The customer can now void as desired.