Overview
Comment:Fix: parfois le rappel sélectionné n'était pas forcément le plus proche, dans le cas où plusieurs rappels ont été créés pour une même cotisation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 16a3fb2fbefa22786160320c9a49207273cef0f0
User & Date: bohwaz on 2020-01-05 19:05:47
Other Links: manifest | tags
Context
2020-01-31
01:06
* Gérer les fichiers CSV provenant des vieilles versions d'Excel pour Mac OS. * Ajouter la mention de la taille limite du fichier check-in: b81cf4d462 user: bohwaz tags: trunk, stable
2020-01-06
12:15
Fusion avec trunk check-in: 451f4d7e39 user: bohwaz tags: dev
2020-01-05
19:05
Fix: parfois le rappel sélectionné n'était pas forcément le plus proche, dans le cas où plusieurs rappels ont été créés pour une même cotisation check-in: 16a3fb2fbe user: bohwaz tags: trunk, stable
18:26
Message plus clair qu'un select vide check-in: 257e6ec217 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Rappels.php from [cb8851d857] to [7c23d0c913].

162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
		SELECT 
			*,
			/* Nombre de jours avant ou après expiration */
			(julianday(date()) - julianday(expiration)) AS nb_jours,
			/* Date de mise en œuvre du rappel */
			date(expiration, delai || \' days\') AS date_rappel
		FROM (
			SELECT m.*, r.delai, r.sujet, r.texte, r.id_cotisation, r.id AS id_rappel,
				m.'.$config->get('champ_identite').' AS identite,
				CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\')
				WHEN c.fin IS NOT NULL THEN c.fin ELSE 0 END AS expiration
			FROM rappels AS r
				INNER JOIN cotisations AS c ON c.id = r.id_cotisation
				INNER JOIN cotisations_membres AS cm ON cm.id_cotisation = c.id
				INNER JOIN membres AS m ON m.id = cm.id_membre







|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
		SELECT 
			*,
			/* Nombre de jours avant ou après expiration */
			(julianday(date()) - julianday(expiration)) AS nb_jours,
			/* Date de mise en œuvre du rappel */
			date(expiration, delai || \' days\') AS date_rappel
		FROM (
			SELECT m.*, MIN(r.delai) AS delai, r.sujet, r.texte, r.id_cotisation, r.id AS id_rappel,
				m.'.$config->get('champ_identite').' AS identite,
				CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\')
				WHEN c.fin IS NOT NULL THEN c.fin ELSE 0 END AS expiration
			FROM rappels AS r
				INNER JOIN cotisations AS c ON c.id = r.id_cotisation
				INNER JOIN cotisations_membres AS cm ON cm.id_cotisation = c.id
				INNER JOIN membres AS m ON m.id = cm.id_membre