Prestige Barber Club v4.44.3 - Membership Sales History Integrity Audit
=======================================================================

INVESTIGATION ROOT CAUSE
1. v4.44.2 Quick Membership POS writes source_type values:
   - quick_activation_member
   - quick_activation_registration
   - quick_activation_pre_member
   - quick_renewal
2. membership_sales.source_type in the existing schema was still:
   ENUM('manual','public_registration','pre_member','non_member').
3. Impact:
   - MySQL strict mode: INSERT can fail with invalid ENUM/data truncation.
   - MySQL non-strict mode: unsupported value may be stored as empty ENUM value.
   - This breaks reliable identification/synchronization of Quick POS sales and can make
     activation/payment workflow appear disconnected from membership sales history.
4. v4.44.2 also relied on the table default for sale_date and had no post-insert ledger assertion.

FIXES IN v4.44.3
- Expanded membership_sales.source_type ENUM for all Quick POS source values.
- Added sale_kind ENUM: legacy / activation / renewal.
- Explicitly writes sale_date=NOW() in create_membership_sale_v435().
- Quick POS now asserts the membership_sales row exists before COMMIT.
- membership_finalize_payment() now explicitly sets status='paid' together with payment_status='paid'.
- History date filter uses COALESCE(sale_date,created_at).
- History UI shows transaction type: AKTIVASI / PERPANJANGAN / REGULER.
- Membership export includes transaction type.
- Migration normalizes legacy invalid/blank source_type before ALTER ENUM, preventing upgrade failure.
- Existing recognized Quick POS rows are backfilled to sale_kind.

SAFETY
- No DROP TABLE.
- No TRUNCATE.
- Existing membership_sales records are retained.
- Legacy source types remain valid.
- Old/full Membership Sales page remains functional.

LIMITATION
- No live production MySQL database was available in this build environment, so real production
  row counts and server SQL mode could not be verified. The defect was confirmed by static schema
  vs code-path comparison and fixed defensively for both strict and non-strict MySQL behavior.
