Commit 7d6c6ada authored by DevPilot's avatar DevPilot

fix(accounting): lines كلمة محجوزة في MySQL 8 — alias اتغيّر لـ line_count

parent 9245247e
......@@ -176,7 +176,7 @@ final class PartyStatementService
$params = array_map(fn($p) => $p . '%', $prefixes);
$row = $db->selectOne(
"SELECT COALESCE(SUM(jel.debit) - SUM(jel.credit), 0) AS balance, COUNT(*) AS lines
"SELECT COALESCE(SUM(jel.debit) - SUM(jel.credit), 0) AS balance, COUNT(*) AS line_count
FROM journal_entry_lines jel
JOIN journal_entries je ON je.id = jel.journal_entry_id
JOIN chart_of_accounts coa ON coa.id = jel.account_id
......@@ -188,7 +188,7 @@ final class PartyStatementService
return [
'balance' => (string) ($row['balance'] ?? '0.00'),
'lines' => (int) ($row['lines'] ?? 0),
'lines' => (int) ($row['line_count'] ?? 0),
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment