• Mahmoud Aglan's avatar
    Comprehensive subscription cycle fix: data integrity, fines, retroactive entries · 2da473e7
    Mahmoud Aglan authored
    Migration Phase_92_005:
    - Fix missing dev fee on member rows
    - Apply 50% discount to 2023/2024 rows that missed it
    - Recalculate total_amount where it doesn't match (base - discount)
    - Fix paid rows with 0 paid_amount (set paid_amount = total)
    - Reset all fine_amounts to 0 (recalculated on page visit)
    
    Code fixes:
    - OverdueFineApplicator: only write fine_amount if actually changed
    - SubscriptionCalculator: expose subscription_total in fine details
    - SubscriptionController: pick single dev fee per year (not SUM)
    - View: show correct base (subscription_total) in fine detail panel
    - RetroactiveMembershipService: don't accept form paid_amount for
      status=paid (server calculates correct value); remove dev fee
      from paid_amount (dev fee is invoice-level, not per-row)
    - RetroactiveWizardController: remove misleading 492/527 defaults
    - OverdueFineJob: run year-round (grace period handled by calculator)
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    2da473e7