Jump to content

Delete invoice hook


barneby

Recommended Posts

On 8/12/2022 at 12:45 PM, barneby said:

I use pro forma invoicing. If it is a prpforma invoice, I can delete it.

You can, but you can't...

Sometimes it may happen that you delete a proforma, but the corresponding rows (stored in a different table) are not deleted.

So it happens that:

- you delete proforma id 12345

- rows of deleted proforma id 12345 stay and are not deleted

- you create a new proforma and... guess, its number will be the last one available,12345!

- in the proforma you have just created your user will find the the rows of the "previous" proforma id 12345 (even if they were of a different user)

So, a great mess...

Right way to do:

- never delete proforma: always just cancel them

- if you want to delete them, do it for any of them but the last one (with the higher id)

   

Link to comment
Share on other sites

2 hours ago, Remitur said:

You can, but you can't...

Sometimes it may happen that you delete a proforma, but the corresponding rows (stored in a different table) are not deleted.

So it happens that:

- you delete proforma id 12345

- rows of deleted proforma id 12345 stay and are not deleted

- you create a new proforma and... guess, its number will be the last one available,12345!

- in the proforma you have just created your user will find the the rows of the "previous" proforma id 12345 (even if they were of a different user)

So, a great mess...

Right way to do:

- never delete proforma: always just cancel them

- if you want to delete them, do it for any of them but the last one (with the higher id)

   

great explanation. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated