Project

General

Profile

Anomalie #1558 » 0001-Adjust-members-state-due-chart-counts-refs-1558.patch

Guillaume Agnieray, 09/20/2021 12:10 AM

View differences:

galette/lib/Galette/IO/Charts.php
168 168
            array(
169 169
                'cnt' => new Expression('COUNT(a.' . Adherent::PK . ')')
170 170
            )
171
        )->where(array('bool_exempt_adh' => new Expression('true')));
171
        )
172
            ->where(array('activite_adh' => new Expression('true')))
173
            ->where(array('bool_exempt_adh' => new Expression('true')));
172 174

  
173 175
        $results = $zdb->execute($select);
174 176
        $result = $results->current();
......
183 185
            array(
184 186
                'cnt' => new Expression('COUNT(a.' . Adherent::PK . ')')
185 187
            )
186
        )->where('date_echeance IS NULL');
188
        )
189
            ->where(array('activite_adh' => new Expression('true')))
190
            ->where(array('bool_exempt_adh' => new Expression('false')))
191
            ->where('date_echeance IS NULL');
187 192

  
188 193
        $results = $zdb->execute($select);
189 194
        $result = $results->current();
......
204 209
                'cnt' => new Expression('COUNT(a.' . Adherent::PK . ')')
205 210
            )
206 211
        )
212
            ->where(array('activite_adh' => new Expression('true')))
213
            ->where(array('bool_exempt_adh' => new Expression('false')))
207 214
            ->where->lessThanOrEqualTo('date_echeance', $soon_date->format('Y-m-d'))
208 215
            ->where->greaterThanOrEqualTo('date_echeance', $now->format('Y-m-d'));
209 216

  
......
220 227
            array(
221 228
                'cnt' => new Expression('COUNT(a.' . Adherent::PK . ')')
222 229
            )
223
        )->where->greaterThan('date_echeance', $now->format('Y-m-d'));
230
        )
231
            ->where(array('activite_adh' => new Expression('true')))
232
            ->where(array('bool_exempt_adh' => new Expression('false')))
233
            ->where->greaterThan('date_echeance', $now->format('Y-m-d'));
224 234

  
225 235
        $results = $zdb->execute($select);
226 236
        $result = $results->current();
......
235 245
            array(
236 246
                'cnt' => new Expression('COUNT(a.' . Adherent::PK . ')')
237 247
            )
238
        )->where->lessThan('date_echeance', $now->format('Y-m-d'));
248
        )
249
            ->where(array('activite_adh' => new Expression('true')))
250
            ->where(array('bool_exempt_adh' => new Expression('false')))
251
            ->where->lessThan('date_echeance', $now->format('Y-m-d'));
239 252

  
240 253
        $results = $zdb->execute($select);
241 254
        $result = $results->current();
242
- 
(1-1/2)