Overview
Comment:Fix nom de colonne liste des cotisations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 4ea98fe3d5e8e2d8eeb48ec8df41bcd3a78f5c53
User & Date: bohwaz on 2020-07-03 02:10:51
Other Links: manifest | tags
Context
2020-07-18
20:33
Vérifier le format d'entrée des champs date check-in: 0977e93dc8 user: bohwaz tags: trunk, stable
2020-07-03
02:10
Fix nom de colonne liste des cotisations check-in: 4ea98fe3d5 user: bohwaz tags: trunk, stable
2020-06-24
01:49
Essai de correction / simplification envoi rappels check-in: 16d295170c user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Membres/Cotisations.php from [0eef95049b] to [f8b5327ae2].

343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
	 * @param  integer $id Numéro de membre
	 * @return array     Liste des cotisations en cours de validité
	 */
	public function listSubscriptionsForMember($id)
	{
		$db = DB::getInstance();
		return $db->get('SELECT c.*,
			MAX(cm.date),
			CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\') >= date()
			WHEN c.fin IS NOT NULL THEN (cm.id IS NOT NULL AND cm.date <= c.fin AND cm.date >= c.debut)
			WHEN cm.id IS NOT NULL THEN 1 ELSE 0 END AS a_jour,
			CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\')
			WHEN c.fin IS NOT NULL THEN c.fin ELSE 1 END AS expiration,
			(julianday(date()) - julianday(CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\')
			WHEN c.fin IS NOT NULL THEN c.fin END)) AS nb_jours







|







343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
	 * @param  integer $id Numéro de membre
	 * @return array     Liste des cotisations en cours de validité
	 */
	public function listSubscriptionsForMember($id)
	{
		$db = DB::getInstance();
		return $db->get('SELECT c.*,
			MAX(cm.date) AS date,
			CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\') >= date()
			WHEN c.fin IS NOT NULL THEN (cm.id IS NOT NULL AND cm.date <= c.fin AND cm.date >= c.debut)
			WHEN cm.id IS NOT NULL THEN 1 ELSE 0 END AS a_jour,
			CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\')
			WHEN c.fin IS NOT NULL THEN c.fin ELSE 1 END AS expiration,
			(julianday(date()) - julianday(CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\')
			WHEN c.fin IS NOT NULL THEN c.fin END)) AS nb_jours