How to unvoid payment in ClaimCenter

53 Views Asked by At

We have 1 scenario where user accidentally voided the payment through datachange using Check#voidCheck() method. Is there any way to unvoid the payment ?

CC Version : v9.0.4 , PL Version : v9.14.11

1

There are 1 best solutions below

0
Abhijay Kumar On

There's no easy way to undo voiding a check programmatically or through the UI. Voiding a check doesn't delete any transactions, it simply offsets the existing transactions on the CheckSet with equal negatives. It's set up that way to maintain a clear record of transactions and ensure consistency on the T-account. However, if a check was voided by mistake, you can always clone it using the button (wizard) on the ClaimCenter UI or programmatically via a gosu script in case this needs to be done for multiple checks. Here's a sample script that can help you clone a check

gw.transaction.Transaction.runWithNewBundle(\ bundle -> {
  var check = Query.make(Check).compare(Check#CheckNumber, Relop.Equals, "10436").select().FirstResult
  bundle.add(check)
  var newCheck = check.cloneCheck()
  newCheck.Memo = "Cloned from voided check 10436"
  newCheck.CheckSet.prepareForCommit()
}, CCUser)

In case you intended to ask if it's possible to un-void a check and roll back all the negative transactions generated, leaving a clean trail, then it is certainly possible but not recommended. The way I would approach this is to open a bundle, change the status of the check, and purge all transactions that resulted from the void. You would have to programmatically undo or reverse every action performed during the void including the changes to the T-account and the CheckSet. However, this is a risky approach and inconsistent reversals can lead to several data issues so I would not sweat it and go with the first approach, or rather have a business user clone or re-create the check from the UI.