Overview
Comment:Only show comparison form when there's a year list
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: e57ad5533b80d69aa4024cf515fb29a0273969df41ebc8472677c8a7e713328a
User & Date: bohwaz on 2021-12-09 02:22:20
Other Links: manifest | tags
Context
2021-12-09
02:23
Reverse order of other years, makes more sense check-in: 4a89f01f47 user: bohwaz tags: trunk, stable
02:22
Only show comparison form when there's a year list check-in: e57ad5533b user: bohwaz tags: trunk, stable
02:21
Fix empty list of years check-in: 170e0c12ae user: bohwaz tags: trunk, stable
Changes

Modified src/www/admin/acc/reports/balance_sheet.php from [c8856ac959] to [f3e2995539].

1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
<?php

namespace Garradin;

use Garradin\Accounting\Reports;
use Garradin\Accounting\Years;
use Garradin\Entities\Accounting\Account;

require_once __DIR__ . '/_inc.php';

$tpl->assign('balance', Reports::getBalanceSheet($criterias));

if (!empty($criterias['year'])) {
	$tpl->assign('other_years', [null => '-- Ne pas comparer'] + Years::listClosedAssocExcept($criterias['year']));

}

$tpl->display('acc/reports/balance_sheet.tpl');













|
>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace Garradin;

use Garradin\Accounting\Reports;
use Garradin\Accounting\Years;
use Garradin\Entities\Accounting\Account;

require_once __DIR__ . '/_inc.php';

$tpl->assign('balance', Reports::getBalanceSheet($criterias));

if (!empty($criterias['year'])) {
	$years = Years::listClosedAssocExcept($criterias['year']);
	$tpl->assign('other_years', count($years) ? [null => '-- Ne pas comparer'] + $years : $years);
}

$tpl->display('acc/reports/balance_sheet.tpl');

Modified src/www/admin/acc/reports/statement.php from [ad83b8c204] to [45a0377453].

8
9
10
11
12
13
14
15

16
17
18

require_once __DIR__ . '/_inc.php';

$tpl->assign('general', Reports::getStatement($criterias + ['exclude_type' => Account::TYPE_VOLUNTEERING]));
$tpl->assign('volunteering', Reports::getStatement($criterias + ['type' => Account::TYPE_VOLUNTEERING]));

if (!empty($criterias['year'])) {
	$tpl->assign('other_years', [null => '-- Ne pas comparer'] + Years::listClosedAssocExcept($criterias['year']));

}

$tpl->display('acc/reports/statement.tpl');







|
>



8
9
10
11
12
13
14
15
16
17
18
19

require_once __DIR__ . '/_inc.php';

$tpl->assign('general', Reports::getStatement($criterias + ['exclude_type' => Account::TYPE_VOLUNTEERING]));
$tpl->assign('volunteering', Reports::getStatement($criterias + ['type' => Account::TYPE_VOLUNTEERING]));

if (!empty($criterias['year'])) {
	$years = Years::listClosedAssocExcept($criterias['year']);
	$tpl->assign('other_years', count($years) ? [null => '-- Ne pas comparer'] + $years : $years);
}

$tpl->display('acc/reports/statement.tpl');