Overview
SHA1:ac8c82ea1cc7ca931493cf3590958a1eb60662e0
Date: 2013-09-14 18:52:27
User: bohwaz
Comment:Correction oubli valeur en dur dans requête sur le bilan
Timelines: family | ancestors | descendants | both | stable | 0.5.7
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
  • branch=trunk inherited from [e5099a03d9]
  • sym-0.5.7
  • sym-stable
Context
2013-09-14
19:26
[92ef87c2c1] Merge effectif (user: bohwaz, tags: trunk)
19:18
[e2dd055f3c] merge back from stable branch (user: bohwaz, tags: trunk)
19:02
[4ab167a244] merge 1823585df4a899f5a79d3ce6db45e1f113742822 (user: bohwaz, tags: stable, 0.5.7)
18:52
[ac8c82ea1c] Correction oubli valeur en dur dans requête sur le bilan (user: bohwaz, tags: stable, 0.5.7)
2013-07-11
10:38
[8cc2a9c58f] Correction bug signalé par @arf où une modification d'une fiche avec des champs privés remplis par un non-admin vidait les champs privés (user: bohwaz, tags: stable, 0.5.6)
Changes

Modified VERSION from [7d37a34280] to [46318b44fa].

1
0.5.6
|
1
0.5.7

Modified include/class.compta_exercices.php from [cee018764e] to [25f448bf50].

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
        }

        // Y'a sûrement moyen d'améliorer tout ça pour que le maximum de travail
        // soit fait au niveau du SQL, mais pour le moment ça marche
        $res = $db->prepare('SELECT compte, debit, credit, (SELECT position FROM compta_comptes WHERE id = compte) AS position
            FROM
                (SELECT compte_debit AS compte, SUM(montant) AS debit, NULL AS credit
                    FROM compta_journal WHERE id_exercice = 1 GROUP BY compte_debit
                UNION
                SELECT compte_credit AS compte, NULL AS debit, SUM(montant) AS credit
                    FROM compta_journal WHERE id_exercice = 1 GROUP BY compte_credit)
            WHERE compte IN (SELECT id FROM compta_comptes WHERE position IN ('.implode(', ', $include).'))
            ORDER BY base64(compte) COLLATE BINARY ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            list($compte, $debit, $credit, $position) = $row;







|


|







313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
        }

        // Y'a sûrement moyen d'améliorer tout ça pour que le maximum de travail
        // soit fait au niveau du SQL, mais pour le moment ça marche
        $res = $db->prepare('SELECT compte, debit, credit, (SELECT position FROM compta_comptes WHERE id = compte) AS position
            FROM
                (SELECT compte_debit AS compte, SUM(montant) AS debit, NULL AS credit
                    FROM compta_journal WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_debit
                UNION
                SELECT compte_credit AS compte, NULL AS debit, SUM(montant) AS credit
                    FROM compta_journal WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_credit)
            WHERE compte IN (SELECT id FROM compta_comptes WHERE position IN ('.implode(', ', $include).'))
            ORDER BY base64(compte) COLLATE BINARY ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            list($compte, $debit, $credit, $position) = $row;