BUG ? Can not delete an account in Chart of account list

Hello,
I deleted all company transactions from (Company > Manage > Delete Transactions).
the deletion was successful. however, when I tried to delete one of the accounts in the chart of accounts it gave me this error message

Cannot delete or cancel because Account “2351 added Tax -MME” is linked with Purchase Invoice “ACC-PINV-2021-00026-2”

when I follow the link for ACC-PINV-2021-00026-2 an error page appears (Sorry! I could not find what you were looking for.) which makes sense since I had deleted all transactions.

I tried to find some workaround, I found in Settings > Reports & Masters > Data > Deleted Documents
then I deleted all records but I still face the same issue.

So it seems there are still links or transactions existing. How to remove them?

I’m using the latest ERPNEXT V.13
Cloud basef from Frappe.

any idea to solve this issue?

Any advice?

At Last, have you checked GL Entry ?

Yes, no any records.

Try to run the Delete Transactions one more time and then try.

I did
Same issue

Check out the photos




any advice?

I can’t remember what version the Bug was on. But there was a time when Delete All Transactions failed to deleted child table rows. The only way to delete them is to login via an SQL client and delete the records manually.

Probably there is a row in one of the Purchase Invoice child tables referencing this account.

1 Like

Thank you for the info.
May i know how to do that?
Im hosting the system online on frappe servers. Is it somthing can be done easily?

Thank you

If you’re on hosting by Frappe, most likely you don’t have access to the database directly. I would reach out the the frappe team via a support ticket and ask them if your instance is effected.

If I’m not mistaken the issue was fixed with fix: delete child docs when parent doc is deleted by GangaManoj · Pull Request #26239 · frappe/erpnext · GitHub

this issue was patched in subsequent release: patch: Delete all orphaned tables by GangaManoj · Pull Request #26743 · frappe/erpnext · GitHub are you on latest version?

If this doesn’t work I’d suggest disabling the account instead of deleting it, that will make it unusable in transactions.

2 Likes

Hello @dj12djdjs
thank you so much for all your suggestions. I had contacted them however they said I need to contact ERPNEXT support, not frappe. to cut it short, do you know any document I can follow that can help me to solve this issue?

Hello @ankush
here is the version installed

image

@Tawfiq_Murtaja This shouldn’t be an issue on the version you are running.

Could you check your GL Entry list if there are any records referencing this account?

No records.

Any suggestion?

Do you have enterprise hosting with ERPNext, or are you hosted on frappe cloud ?