Overview
Comment:Vérifier aussi la première ligne sur l'import Citizen
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 2e7b29ce7efc6f6edb17e25acc078f59a6ae1144
User & Date: bohwaz on 2019-03-13 17:15:49
Other Links: manifest | tags
Context
2019-03-19
16:23
Correction bug lors de la restauration d'une vieille sauvegarde qui nécessite une mise à jour (colonne menu_condition non existante dans la table plugins) check-in: 93ceba6d80 user: bohwaz tags: trunk, stable
2019-03-13
17:15
Vérifier aussi la première ligne sur l'import Citizen check-in: 2e7b29ce7e user: bohwaz tags: trunk, stable
17:12
La première ligne contient parfois un seul champ vide quand la ligne est vide check-in: 7cc2708a58 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Compta/Import.php from [d8cc440c1c] to [e0565043bb].

300
301
302
303
304
305
306





307
308
309
310
311
312
313
			if (empty($row))
			{
				continue;
			}

			if (empty($columns))
			{





				$columns = $row;
				$columns = array_flip($columns);
				continue;
			}

			$date = $col('Date');
			$date = \DateTime::createFromFormat('d/m/Y', $date);







>
>
>
>
>







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
			if (empty($row))
			{
				continue;
			}

			if (empty($columns))
			{
				if (empty($row[0]))
				{
					throw new UserException(sprintf('Erreur sur la ligne %d : la ligne est vide ?', $line));
				}

				$columns = $row;
				$columns = array_flip($columns);
				continue;
			}

			$date = $col('Date');
			$date = \DateTime::createFromFormat('d/m/Y', $date);