Overview
Comment: | Méthodes listes et comptage des rappels envoyés |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
3fcdfaaeb4be312968b68c48f1a61980 |
User & Date: | bohwaz on 2014-03-14 18:10:35 |
Other Links: | manifest | tags |
Context
2014-03-14
| ||
18:28 | Passage à la syntaxe courte des array() dans PHP 5.4 check-in: ee4dfba719 user: bohwaz tags: trunk | |
18:10 | Méthodes listes et comptage des rappels envoyés check-in: 3fcdfaaeb4 user: bohwaz tags: trunk | |
15:47 | suppression de rappel automatique check-in: 1bb95bcff2 user: bohwaz tags: trunk | |
Changes
Modified src/include/class.rappels_envoyes.php from [30a92f9841] to [648dfeb78f].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
<?php namespace Garradin; class Rappels_Envoyes { const MEDIA_EMAIL = 1; const MEDIA_COURRIER = 2; const MEDIA_TELEPHONE = 3; const MEDIA_AUTRE = 4; /** * Vérification des champs fournis pour la modification de donnée * @param array $data Tableau contenant les champs à ajouter/modifier * @return void */ protected function _checkFields(&$data) { ................................................................................ INNER JOIN cotisations ON c.id = r.id_cotisation WHERE re.id_membre = ? ORDER BY re.date DESC;', \SQLITE3_ASSOC, (int)$id); } /** * Liste des rappels pour une cotisation donnée * @param integer $id Numéro du rappel * @return array Liste des rappels */ public function listForCotisation($id) { return DB::getInstance()->simpleStatementFetch('SELECT * FROM rappels_envoyes WHERE id_rappel = ? ORDER BY date DESC;', \SQLITE3_ASSOC, (int)$id); } } |
>
>
>
>
>
>
>
>
|
>
|
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
<?php namespace Garradin; class Rappels_Envoyes { /** * Types de médias */ const MEDIA_EMAIL = 1; const MEDIA_COURRIER = 2; const MEDIA_TELEPHONE = 3; const MEDIA_AUTRE = 4; /** * Nombre d'items par page dans les listes */ const ITEMS_PER_PAGE = 50; /** * Vérification des champs fournis pour la modification de donnée * @param array $data Tableau contenant les champs à ajouter/modifier * @return void */ protected function _checkFields(&$data) { ................................................................................ INNER JOIN cotisations ON c.id = r.id_cotisation WHERE re.id_membre = ? ORDER BY re.date DESC;', \SQLITE3_ASSOC, (int)$id); } /** * Liste des rappels pour une cotisation donnée * @param integer $id Numéro de la cotisation * @param integer $page Numéro de page de liste * @return array Liste des rappels */ public function listForCotisation($id, $page = 1) { $begin = ($page - 1) * self::ITEMS_PER_PAGE; return DB::getInstance()->simpleStatementFetch('SELECT * FROM rappels_envoyes WHERE id_rappel IN (SELECT id FROM rappels WHERE id_cotisation = ?) ORDER BY date DESC;', \SQLITE3_ASSOC, (int)$id); } /** * Nombre de rappels pour une cotisation donnée * @param integer $id Numéro de la cotisation * @return integer Nombre de rappels envoyés */ public function countForCotisation($id) { return DB::getInstance()->simpleQuerySingle('SELECT COUNT(*) FROM rappels_envoyes WHERE id_rappel IN (SELECT id FROM rappels WHERE id_cotisation = ?);', false, (int)$id); } /** * Nombre de rappels envoyés pour un rappel automatique * @param integer $id Numéro du rappel * @param integer $page Numéro de page de liste * @return array Liste des rappels envoyés */ public function listForRappel($id, $page = 1) { $begin = ($page - 1) * self::ITEMS_PER_PAGE; return DB::getInstance()->simpleStatementFetch('SELECT * FROM rappels_envoyes WHERE id_rappel = ? ORDER BY date DESC LIMIT ?,?;', \SQLITE3_ASSOC, (int)$id, (int)$begin, self::ITEMS_PER_PAGE); } /** * Nombre de rappels envoyés pour un rappel automatique * @param integer $id Numéro du rappel * @return integer Nombre de rappels envoyés pour ce rappel */ public function countForRappel($id) { return DB::getInstance()->simpleQuerySingle('SELECT COUNT(*) FROM rappels_envoyes WHERE id_rappel = ?;', false, (int)$id); } } |
Modified src/templates/admin/membres/cotisations/ajout.tpl from [6f2455fe45] to [1fc93787ff].
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
{/if} <li><a href="{$admin_url}membres/cotisations.php?id={$membre.id|escape}">Suivi des cotisations</a></li> </ul> {else} {include file="admin/_head.tpl" title="Enregistrer une cotisation" current="membres/cotisations" js=1} <ul class="actions"> <li><a href="{$admin_url}membres/cotisations/">Suivi des cotisations</a></li> <li class="current"><a href="{$admin_url}membres/cotisations/ajout.php">Enregistrer une cotisation</a></li> <li><a href="{$admin_url}membres/cotisations/rappels.php">État des rappels</a></li> </ul> {/if} {if $error} <p class="error">{$error|escape}</p> {else if $user.droits.compta >= Garradin\Membres::DROIT_ECRITURE} <p class="help"> |
| | > > > |
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
{/if} <li><a href="{$admin_url}membres/cotisations.php?id={$membre.id|escape}">Suivi des cotisations</a></li> </ul> {else} {include file="admin/_head.tpl" title="Enregistrer une cotisation" current="membres/cotisations" js=1} <ul class="actions"> <li><a href="{$admin_url}membres/cotisations/">Cotisations</a></li> <li class="current"><a href="{$admin_url}membres/cotisations/ajout.php">Saisie d'une cotisation</a></li> <li><a href="{$admin_url}membres/cotisations/rappels.php">État des rappels</a></li> {if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN} <li><a href="{$admin_url}membres/cotisations/gestion/rappels.php">Gestion des rappels automatiques</a></li> {/if} </ul> {/if} {if $error} <p class="error">{$error|escape}</p> {else if $user.droits.compta >= Garradin\Membres::DROIT_ECRITURE} <p class="help"> |