Overview
Comment: | Fix: date de cotisation dans la liste |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
95f78a6662c3b7fd4bdf23be655d8c69 |
User & Date: | bohwaz on 2020-05-22 00:01:06 |
Other Links: | manifest | tags |
Context
2020-05-22
| ||
00:19 | Ne pas utiliser array_key_exists sur un objet check-in: afc3c85204 user: bohwaz tags: trunk, stable | |
00:01 | Fix: date de cotisation dans la liste check-in: 95f78a6662 user: bohwaz tags: trunk, stable | |
2020-05-18
| ||
13:51 | Fix champs date dans l'import de membre [19d400cafc23eb2fe585bdd8e4f76c6d280ebe81] check-in: 96ef8a00ab user: bohwaz tags: trunk, stable | |
Changes
Modified src/include/lib/Garradin/Membres/Cotisations.php from [88504eeee4] to [0eef95049b].
︙ | ︙ | |||
285 286 287 288 289 290 291 | $desc = $desc ? 'DESC' : 'ASC'; // Renvoyer la liste avec tous les membres des catégories dont la cotisation obligatoire est celle-ci if ($include_category) { $cats_obligatoires = $db->getAssoc('SELECT id, id FROM membres_categories WHERE id_cotisation_obligatoire = ? AND cacher = 0;', $id); | | | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | $desc = $desc ? 'DESC' : 'ASC'; // Renvoyer la liste avec tous les membres des catégories dont la cotisation obligatoire est celle-ci if ($include_category) { $cats_obligatoires = $db->getAssoc('SELECT id, id FROM membres_categories WHERE id_cotisation_obligatoire = ? AND cacher = 0;', $id); return $db->get('SELECT m.id AS id_membre, MAX(cm.date) AS date, cm.id, m.numero, m.'.$champ_id.' AS nom, c.montant, CASE WHEN cm.id IS NULL THEN 0 WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\') >= date() WHEN c.fin IS NOT NULL THEN (cm.date <= c.fin AND cm.date >= c.debut) ELSE 1 END AS a_jour FROM membres AS m LEFT JOIN cotisations_membres AS cm ON cm.id_membre = m.id AND cm.id_cotisation = ? LEFT JOIN cotisations AS c ON c.id = cm.id_cotisation WHERE '.$db->where('m.id_categorie', $cats_obligatoires) . ' GROUP BY m.id ORDER BY '.$order.' '.$desc.' LIMIT ?,?;', $id, $begin, self::ITEMS_PER_PAGE); } return $db->get('SELECT cm.id_membre, MAX(cm.date) AS date, cm.id, m.numero, m.'.$champ_id.' AS nom, c.montant, CASE WHEN c.duree IS NOT NULL THEN date(cm.date, \'+\'||c.duree||\' days\') >= date() WHEN c.fin IS NOT NULL THEN (cm.date <= c.fin AND cm.date >= c.debut) ELSE 1 END AS a_jour FROM cotisations_membres AS cm INNER JOIN cotisations AS c ON c.id = cm.id_cotisation INNER JOIN membres AS m ON m.id = cm.id_membre |
︙ | ︙ |