-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Allow anonymous giftcard creation #4278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
fe0a4ab to
374bd09
Compare
|
CRITICAL - 2025-07-10 00:58:46 --> [Caused by] mysqli_sql_exception: Cannot add or update a child row: a foreign key constraint fails ( |
|
I wonder how this would have worked then , I don't see any changes to gitcard table since some time. Did you use mariadb or mysql for the test? |
|
I use Mysql and to get this option to work I had to drop the constraint. And in Controller /Sales the following needs to be modified if a Customer needs to be added to the Sale with a blank Giftcard name otherwise you get the Incorrect Customer Error. |
|
Its weird as the foreign key seems to have been there for some time, so maybe mysql behavior changed and it cannot be null anymore? Thanks for the suggestion I might apply it to the master |
|
I haven't looked at the code for this change, but from a use standpoint I think the use of a giftcard should not require the purchasing customer to be entered, but I can see arguments either way for requiring a customer to be entered in the sales register. In terms of fraud prevention, having the purchasing and using customers be stored. We could make a "Require customer to use gift cards" checkbox so that those who want to track gift card use with a specific customer can enforce it. |
|
I think it will be incredibly important to test database schema changes against both MariaDB and MySQL. |
No description provided.