Index: src/include/lib/Garradin/Accounting/Reports.php ================================================================== --- src/include/lib/Garradin/Accounting/Reports.php +++ src/include/lib/Garradin/Accounting/Reports.php @@ -62,11 +62,12 @@ * Return account sums per year or per account * @param bool $order_year If true will return accounts grouped by year, if false it will return years grouped by account */ static public function getAnalyticalSums(bool $by_year = false): \Generator { - $sql = 'SELECT a.label AS account_label, a.id AS id_account, y.id AS id_year, y.label AS year_label, y.start_date, y.end_date, + $sql = 'SELECT a.label AS account_label, a.description AS account_description, a.id AS id_account, + y.id AS id_year, y.label AS year_label, y.start_date, y.end_date, SUM(l.credit - l.debit) AS sum, SUM(l.credit) AS credit, SUM(l.debit) AS debit FROM acc_transactions_lines l INNER JOIN acc_transactions t ON t.id = l.id_transaction INNER JOIN acc_accounts a ON a.id = l.id_analytical INNER JOIN acc_years y ON y.id = t.id_year @@ -105,10 +106,11 @@ if (null === $current) { $current = (object) [ 'id' => $by_year ? $row->id_year : $row->id_account, 'label' => $by_year ? $row->year_label : $row->account_label, + 'description' => !$by_year ? $row->account_description : null, 'credit' => 0, 'debit' => 0, 'sum' => 0, 'items' => [] ]; Index: src/templates/acc/reports/projects.tpl ================================================================== --- src/templates/acc/reports/projects.tpl +++ src/templates/acc/reports/projects.tpl @@ -30,11 +30,11 @@ {if !empty($list)} -
Année | Débits | @@ -42,13 +42,14 @@Solde | ||
{$parent.label}+ {if $parent.description}{$parent.description|escape|nl2br} {/if} |
||||
---|---|---|---|---|
{$item.label} | Index: src/www/admin/static/styles/10-accounting.css ================================================================== --- src/www/admin/static/styles/10-accounting.css +++ src/www/admin/static/styles/10-accounting.css @@ -102,5 +102,7 @@ table.accounts .account-level-2 th { padding-left: 1em; font-size: 1.3em; } table.accounts .account-level-3 th { padding-left: 2em; } table.accounts .account-level-4 th { padding-left: 3em; } table.accounts .account-level-5 th { padding-left: 4em; } table.accounts .account-level-6 th { padding-left: 5em; } + +table.projects tr.title p.help { font-weight: normal; text-align: center; }