Overview
SHA1:d4816ac9d7a9e72597bb96f666bd579b18c10f99
Date: 2015-04-16 12:16:37
User: bohwaz
Comment:Correction pour quand il n'y a aucun exercice ouvert en base
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2015-04-16
15:32
[7656a52835] Supprimer les fichiers liés à la page wiki (user: bohwaz, tags: trunk)
12:16
[d4816ac9d7] Correction pour quand il n'y a aucun exercice ouvert en base (user: bohwaz, tags: trunk)
2015-04-14
16:56
[222ec93a45] synchro avec 0.7.0.sql (user: bohwaz, tags: trunk, stable)
Changes

Modified src/include/lib/Garradin/Compta/Stats.php from [4f574303f5] to [63af68cb36].

89
90
91
92
93
94
95





96
97
98
99
100
101
102
	{
		$db = DB::getInstance();

		$data = $db->simpleStatementFetchAssoc($query);

		$e = $db->querySingle('SELECT *, strftime(\'%s\', debut) AS debut,
			strftime(\'%s\', fin) AS fin FROM compta_exercices WHERE cloture = 0;', true);






		$y = date('Y', $e['debut']);
		$m = date('m', $e['debut']);
		$max = date('Ym', $e['fin']);

		while ($y . $m <= $max)
		{







>
>
>
>
>







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
	{
		$db = DB::getInstance();

		$data = $db->simpleStatementFetchAssoc($query);

		$e = $db->querySingle('SELECT *, strftime(\'%s\', debut) AS debut,
			strftime(\'%s\', fin) AS fin FROM compta_exercices WHERE cloture = 0;', true);

		if (!$e)
		{
			return [];
		}

		$y = date('Y', $e['debut']);
		$m = date('m', $e['debut']);
		$max = date('Ym', $e['fin']);

		while ($y . $m <= $max)
		{