• Mahmoud Aglan's avatar
    feat(accounting): manage the chart of accounts from the screen — move, delete, reclassify · 1edf3267
    Mahmoud Aglan authored
    The chart could only be created and edited. Restructuring it — the thing that
    actually gets asked for — meant a developer.
    
    Adds move / delete / promote-demote with the guards a ledger needs, each refusing
    with the specific reason rather than failing later at month end:
    
    MOVE
    - Refuses a move under the account's own descendant, which would detach the
      subtree from the root and make the tree query loop.
    - Refuses a parent of a different account_type — that would file an asset under
      liabilities and quietly corrupt the balance sheet.
    - Refuses a non-header parent.
    - Carries the whole subtree and recomputes every level beneath.
    
    DELETE
    - An account with posted history is ARCHIVED, never deleted: removing it would
      leave old journal lines pointing at a name that no longer exists. The button
      relabels itself to "أرشفة" and says why.
    - Refuses while children exist, or while anything still points at it — posting
      rules, tax profiles, voucher types, vouchers, bank accounts, treasuries — and
      lists what, so the blocker is actionable.
    - System accounts can be deactivated, not removed.
    
    PROMOTE / DEMOTE
    - Refuses to promote an account that already carries movement; a header takes no
      entries, so its balance would be stranded.
    - Refuses to demote one with children; entries would post at a summary level and
      double-count up the tree.
    
    The management panel loads the usage check before offering anything, so a button
    that is going to be refused is disabled with the reason instead of being offered
    and failing.
    
    Reference scanning tolerates a missing table or column, so a trimmed or older
    install does not break the screen. Descendant walking is iterative and guarded
    against a pre-existing cycle rather than recursing into a hang.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    1edf3267
Name
Last commit
Last update
..
Academies Loading commit data...
AcademyContracts Loading commit data...
AccessMatrix Loading commit data...
Accounting Loading commit data...
Achievements Loading commit data...
ActivitySubscriptions Loading commit data...
Alerts Loading commit data...
Archive Loading commit data...
Audit Loading commit data...
Auth Loading commit data...
Branches Loading commit data...
Carnets Loading commit data...
Cashier Loading commit data...
Children Loading commit data...
Coaches Loading commit data...
Dashboard Loading commit data...
Death Loading commit data...
Disciplines Loading commit data...
Divorce Loading commit data...
Documents Loading commit data...
Facilities Loading commit data...
FacilityDashboards Loading commit data...
FacilityGrids Loading commit data...
Fines Loading commit data...
Foreign Loading commit data...
Forms Loading commit data...
HR Loading commit data...
Honorary Loading commit data...
Installments Loading commit data...
Interviews Loading commit data...
Inventory Loading commit data...
MatchCenter Loading commit data...
MedicalBoard Loading commit data...
Members Loading commit data...
News Loading commit data...
Notifications Loading commit data...
ParentPortal Loading commit data...
Payments Loading commit data...
PlayerAffairs Loading commit data...
PlayerApi Loading commit data...
PlayerAuth Loading commit data...
PlaygroundAdmin Loading commit data...
PoolManagement Loading commit data...
Pricing Loading commit data...
Procurement Loading commit data...
Receipts Loading commit data...
Rentals Loading commit data...
Reports Loading commit data...
Reservations Loading commit data...
Roles Loading commit data...
Rules Loading commit data...
Sales Loading commit data...
Scheduling Loading commit data...
Seasonal Loading commit data...
ServiceCatalog Loading commit data...
Sessions Loading commit data...
Settings Loading commit data...
Sports Loading commit data...
SportsActivity Loading commit data...
SportsDashboard Loading commit data...
Spouses Loading commit data...
Subscriptions Loading commit data...
Support Loading commit data...
Temporary Loading commit data...
Tournaments Loading commit data...
TrainerPortal Loading commit data...
Training Loading commit data...
TrainingGroups Loading commit data...
Transfers Loading commit data...
Treasury Loading commit data...
Tutorials Loading commit data...
Users Loading commit data...
Waiver Loading commit data...
Workflow Loading commit data...