• Mahmoud Aglan's avatar
    fix(accounting): align account codes with live chart of accounts and fix 4 journal-entry bugs · e6708441
    Mahmoud Aglan authored
    - AccountingIntegrationService: read payment_type key (dispatched) not type key (wrong fallback)
      that was silently routing every payment journal to the default catch-all account
    - InstallmentController: fire installment.plan_created (correct) not installment_plan.created
      so AR journal entry is created when a plan is made from the installments UI
    - AccountCodes: remap all constants to accounts that actually exist in chart_of_accounts DB
      - form_fee → 410103 (استمارات عضويات), membership_fee → 410101 (عضويات جديدة)
      - addition_fee → 410102 (إضافة عضويات)
      - installment → 410510 (الاقساط), down_payment → 410503 (مقدم عضويه)
      - waiver_fee/death_fee → 410515 (إيرادات متنوعه)
      - sports_registration/sa_form_fee → 410516 (استمارات نشاط)
      - fine → 410512 (غرامة تاخير), SERVICE_REVENUE → 410515 (exists, was 4110 which did not exist)
    - DB: corrected treasury 3 account_code from 12060103 (EUR label) to 12060101 (EGP)
      which was causing form_fee journals to debit the wrong sub-treasury cash account
    Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
    e6708441
AccountCodes.php 11 KB