• Mahmoud Aglan's avatar
    fix(accounting): billing sources installed none — information_schema case, and wire cheques · 2780509a
    Mahmoud Aglan authored
    TWO THINGS.
    
    1. Billing sources installed nothing.
       validate() read information_schema with lower-case keys (column_name,
       data_type) while this server returns them upper case, so every column looked
       missing, every source failed validation, and the seed skipped all seven while
       reporting success. Columns are now aliased explicitly. The defaults moved into
       BillingSourceService::syncDefaults() so they can be re-installed after a schema
       change instead of being trapped in a one-shot seed, and anything that still
       does not fit is named rather than dropped.
    
       Found by running the validator against the live database instead of trusting
       that an empty table meant "nothing to do".
    
    2. The cheque lifecycle now posts.
       CheckLifecycleService had a correct state machine and zero journal entries, so
       a cheque moving desk → bank → collected, or bouncing, left no trace in the
       ledger at all.
    
       Each movement now posts through configurable account pointers:
    
         deposited   Dr شيكات تحت التحصيل  / Cr أوراق قبض
         collected   Dr البنك              / Cr شيكات تحت التحصيل
         bounced     Dr مدينون (شيكات مرتدة) / Cr شيكات تحت التحصيل
         endorsed    Dr الدائن             / Cr أوراق قبض
         paid        Dr أوراق دفع          / Cr البنك
    
       The bounce charge posts as its own entry so it can be waived without touching
       the restored debt. Re-presenting a bounced cheque moves it back to
       under_collection and posts the deposit leg again, so a second and third
       presentation each leave their own trail.
    
       Posting happens AFTER the status commit on purpose: a cheque physically moving
       to the bank must be recorded even when its accounts are unmapped, otherwise the
       paperwork and the system disagree. An unpostable move returns a warning.
    
       Also corrects a real error along the way: AccountCodes sends a cheque payment
       straight to the bank. Taking a post-dated cheque is not money in the bank — it
       is a note receivable until the bank collects it. The counter account is now a
       configurable pointer per payment method (treasury:method_check → أوراق قبض),
       so it is fixed from the screen rather than in code, and a header account there
       is refused with the pointer name to map.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    2780509a
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...