Cant delete users

I have a question about deleting old users.

It seems that while doing some house cleaning, we noticed that we can’t delete any user that we want to delete.

It will say:
Can’t delete because this User is used by a Order
OR
Can’t delete because this User is used by a Payment.

For now I am renaming the users we want to be delete with a prefix if deleted.

Any Ideas on how to solve this?

Screen Shot 2022-08-08 at 7.45.49 AM

You can not delete users that have tickets.

How do I find the tickets that they are bound to?

You shouldn’t edit the database for that it will possibly break something.

This is terrible that I cant delete users. This just leaves behind a mess.

Suggestions?

Rename them with an x or something in front of them.

As you can see in the photo that is kind of what I did. That was my only temp solution, but this is not a fix.
This is a bug.

This is not a bug. Sambapos was designed this way. I understand what your asking. We will look at that when we build a labor project in the future.

It seems like if there was a ticket left open or something, which I dont think there is, I could somehow search by user, delete the OLD ticket, and then delete the user.

Is there not a way inside of Samba to do this?

Users are part of tickets, payments,account documents, inventory purchases and many other tables. It’s how it was designed. But again I do understand you we just don’t have what your asking for yet.

They are relational with various tables.

I would suggest to have two categories

  • Active Users
  • Blocked Users

Just a simple check-box to mark user as Blocked/Inactive. Update their PIN to a random 20 digit number and update their category as Blocked and make it so that they cant login even if they were to guess the 20 digit PIN. (reason to that is so you can reuse the PIN they used to use in case its a RFID card or something)