How to trace Transaction Missing One side posting caused by DB Corrupt/connection issue

Created by Cheng Kah Poh, Modified on Tue, 19 Jul, 2022 at 10:06 AM by Cheng Kah Poh

SCENARIO:


As per sample below, Transaction only have single posting.

by right should be Debit Purchase, Credit Supplier account.


Note: above issue happen when DB is corrupted/suspect, after repaid by script may caused data loss.

OR

when user internet extremely not stable, caused data posting missing.


SOLUTION:


run below Script to trace all transaction which have same issue


select sum(Debit) debit,sum(credit) credit, sum(Debit) - sum(credit) variance, DocumentCode, JournalType, string_agg(ARM.Arcode,',') knockoffwithOR, string_agg(APM.APcode, ',') knockoffwithPV

from gltransactions G

left JOIN ARMatched ARM

ON G.DocumentId = ARM.PayForId

left JOIN APMatched APM

ON G.Documentid = APM.PayForId

where G.TransactionDate > '01-Jan-2015'--cut off date

group by documentcode,  JournalType

having sum(Debit) - sum(credit) != 0 

order by JournalType asc


Note: this script with knock off info.


Or

Run below Script to trace all transaction which have same issue, without knock off info.


select sum(Debit) debit,sum(credit) credit, sum(Debit) - sum(credit) variance, DocumentCode, JournalType from gltransactions

where TransactionDate > '01-Jan-2015'--cut off date  

group by documentcode, JournalType 

having sum(Debit) - sum(credit) != 0 

order by JournalType asc


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article