How can i delete an invoice

I am currently trying out ERPNext. Using the newest version that is available.
I created 2 invoices (sales invoice) to get to know the system (taxes and things…). it worked but now i want to delete the invoices. There were created without a Order or Project. I can cancel them, that works. But when i click delete it doesnt let me delete them. it errors with saying " Sales Invoice ACC-SINV-2022-00002 mit GL Entry [1fb490db5b] verknüpft ist" So its complaining that the sales invoice is linked to a GL entry.
But i can not delete that GL entry.
Is there a way to autamatically delete canceled sales invoices so that the invoice numbers do net get messed up?

Hello @kpwn,

It is possible, there is a setting to allow you to delete the General Ledger and Stock Ledger entries at time of deleting document. Please see this reference to enable it:
https://docs.erpnext.com/docs/v13/user/manual/en/accounts/accounts-settings#7-delete-accounting-and-stock-ledger-entries-on-deletion-of-transaction

2 Likes

thanks.