Skip to content

[Bug]: Loyalty auto-assignment uses the first enabled POS Settings row instead of the active context #203

@my-dev-jour

Description

@my-dev-jour

Bug Description

Customer loyalty auto-assignment selects the first enabled POS Settings record with a default loyalty program, instead of resolving from the actual POS Profile / company context that created the customer.

Expected Behavior

The loyalty program assigned to a new customer should match the company/profile context of the current POS session.

Actual Behavior

The selection is global and order-dependent rather than context-aware.

Steps to Reproduce

  1. Configure multiple POS settings/profile contexts with different default loyalty programs
  2. Create customers from different POS contexts
  3. Compare the assigned loyalty program with the context that created each customer

Impact

  • wrong loyalty program can be assigned in multi-profile or multi-company setups
  • customer creation behavior becomes inconsistent across contexts
  • downstream loyalty earning/redemption rules may be wrong from the start

Suggested Fix

  • resolve default loyalty program from the active POS Profile/company context
  • avoid using the first enabled settings row as a global fallback

Notes

This is primarily a context-resolution bug and becomes much more visible on multi-company or multi-profile deployments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions