• Mahmoud Aglan's avatar
    fix(accounting): connection centre 500'd under only_full_group_by · 14e892ff
    Mahmoud Aglan authored
    The stream list used LEFT JOIN revenue_posting_rules + GROUP BY s.id and selected
    r.id / r.stage. MySQL rejects that under only_full_group_by — r.id is not
    functionally dependent on s.id — so the page threw PDOException on every load.
    
    Caught by running the query against the live database rather than trusting that
    it looked reasonable.
    
    The representative rule is now picked in its own aggregate and joined back by id,
    preferring the collection stage since that is the one people mean by "where does
    this money go", then the newest effective date and version.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    14e892ff
RevenueMappingController.php 52.9 KB