Overview
Comment:Make sure that year is set
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: 2217843c43d07f653dd2836d4a419c2695fe8f9a798767a59448e38a8550788c
User & Date: bohwaz on 2021-03-08 15:32:12
Other Links: manifest | tags
Context
2021-03-08
15:33
setTranslationTable expects an array check-in: d40d4ff083 user: bohwaz tags: trunk, stable
15:32
Make sure that year is set check-in: 2217843c43 user: bohwaz tags: trunk, stable
15:30
Fix export of simple list check-in: f42fe0087f user: bohwaz tags: trunk, stable
Changes

Modified src/www/admin/acc/years/import.php from [b974f2e823] to [4878b9a097].

11
12
13
14
15
16
17
18

19
20
21
22
23
24
25
26
27
28
$year_id = (int) qg('id') ?: CURRENT_YEAR_ID;

if ($year_id === CURRENT_YEAR_ID) {
	$year = $current_year;
}
else {
	$year = Years::get($year_id);


	if (!$year) {
		throw new UserException("L'exercice demandé n'existe pas.");
	}
}

if (qg('export')) {
	CSV::export(
		qg('export'),
		sprintf('Export comptable - %s - %s', Config::getInstance()->get('nom_asso'), $year->label),
		Transactions::export($year->id())







|
>
|
|
<







11
12
13
14
15
16
17
18
19
20
21

22
23
24
25
26
27
28
$year_id = (int) qg('id') ?: CURRENT_YEAR_ID;

if ($year_id === CURRENT_YEAR_ID) {
	$year = $current_year;
}
else {
	$year = Years::get($year_id);
}

if (!$year) {
	throw new UserException("L'exercice demandé n'existe pas.");

}

if (qg('export')) {
	CSV::export(
		qg('export'),
		sprintf('Export comptable - %s - %s', Config::getInstance()->get('nom_asso'), $year->label),
		Transactions::export($year->id())