Overview
Comment: | Don't show accounts with a sum of 0 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
2a23e4cca5c376b6ecbe9e550fe41383 |
User & Date: | bohwaz on 2020-11-13 23:19:48 |
Other Links: | branch diff | manifest | tags |
Context
2020-11-13
| ||
23:20 | Make it clear we are changing the status with bitmasks check-in: 8dbda6899e user: bohwaz tags: dev | |
23:19 | Don't show accounts with a sum of 0 check-in: 2a23e4cca5 user: bohwaz tags: dev | |
22:17 | Display the correct year name in import check-in: a4e54b013c user: bohwaz tags: dev | |
Changes
Modified src/include/lib/Garradin/Accounting/Reports.php from [30c1bfeb1b] to [6a3f830e75].
︙ | ︙ | |||
202 203 204 205 206 207 208 209 210 211 212 213 214 215 | $sql = sprintf('SELECT a.id, a.code, a.label, a.position, SUM(l.credit) AS credit, SUM(l.debit) AS debit, SUM(l.credit - l.debit) %s AS sum FROM %s l INNER JOIN %s t ON t.id = l.id_transaction INNER JOIN %s a ON a.id = l.id_account WHERE %s GROUP BY l.id_account ORDER BY %s;', $reverse, Line::TABLE, Transaction::TABLE, Account::TABLE, $where, $order); return DB::getInstance()->getGrouped($sql); } static public function getBalanceSheet(array $criterias): array { | > | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | $sql = sprintf('SELECT a.id, a.code, a.label, a.position, SUM(l.credit) AS credit, SUM(l.debit) AS debit, SUM(l.credit - l.debit) %s AS sum FROM %s l INNER JOIN %s t ON t.id = l.id_transaction INNER JOIN %s a ON a.id = l.id_account WHERE %s GROUP BY l.id_account HAVING sum != 0 ORDER BY %s;', $reverse, Line::TABLE, Transaction::TABLE, Account::TABLE, $where, $order); return DB::getInstance()->getGrouped($sql); } static public function getBalanceSheet(array $criterias): array { |
︙ | ︙ |