-
Notifications
You must be signed in to change notification settings - Fork 3
Description
A critical error occurs when attempting to activate a loyalty card for an existing customer, causing the application to crash with a ClassCastException. This prevents saving customer data and blocks loyalty program functionality.
Steps to Reproduce
Navigate to Customers module.
Search for and select an existing customer.
In the edit dialog, set customer type to "Account".
Check the "Loyalty Enabled" checkbox.
Ensure the "Card" field is populated.
Click "Save".
❌ Application crashes with error.
Expected Behavior
The customer record should save successfully, and the loyalty card should be activated without errors.
Actual Behavior
The application crashes with a modal error dialog:
Unable to save the record.
class java.lang.Boolean cannot be cast to class java.lang.String
(java.lang.Boolean and java.lang.String are in module java.base of loader bootstrap)
Error Log (Snippet)
java
java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class java.lang.String
at uk.chromis.administration.customers.CustomerDataLogic.customerUpdate(CustomerDataLogic.java:~589)
at uk.chromis.administration.customers.CustomerEditDialog.saveData(CustomerEditDialog.java:~XXX)
Environment
App Version: Chromis POS V1.5.4
Component: Customers / Loyalty Management
Impact: Critical - blocks core functionality
Additional Context
The bug is 100% reproducible following the steps above.
There is a risk of data inconsistency if the error occurs during a save operation.
The issue likely involves incorrect data binding or type handling in the customer update logic.
Labels
bug
critical
customers
loyalty
java