data inconsistencies

Hi

I use Sage 50 DT Expert. In Maintenance, Check Data Integrity, I have Data inconsistencies in A/P balance (-144.98$) VS Unpaid invoides (0.00$). It seems to be a refund on a credit card, which I entered first as an invoice, then corrected it as a refund on a credit card. Could the error be there? If so, how to correct it?

I also have data inconsistencies in A/R Balance (-108.16$) VS Unpaid invoices (89.71$). In fact I really have unpaid customers Invoices for 89.71$ and I don't understand where the -108.16$ amount comes from. Adding the 2 amounts gives 197.87$, which is the balance before the unpaid invoices when I print a general ledger of Customer account. Any idea how to correct this will be appreciated.

Thanks to everybody that could help.Any idea is welcome!