Commit cc0a1385 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Revert: do not auto-set membership_type on enrollment

Membership is only for participants who explicitly registered with a
membership_id. Non-members pay 900, members pay 650 — determined at
registration time, not at enrollment.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 2cb74b78
......@@ -95,16 +95,9 @@ public function enroll(Participant $participant, TrainingGroup $group, User $act
// Update group count
$this->groupService->incrementCount($group);
// Activate participant and set as member on first enrollment
$updates = [];
// Activate participant if still in registered status
if ($participant->status->value === 'registered') {
$updates['status'] = 'active';
}
if (($participant->membership_type?->value ?? $participant->membership_type) === 'non_member') {
$updates['membership_type'] = 'member';
}
if ($updates) {
$participant->update($updates);
$participant->update(['status' => 'active']);
}
// Auto-create invoice if program has a price (skip if invoice already provided via options)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment