Overview
SHA1:92ef87c2c141b0035569bc07942e944a843a2caf
Date: 2013-09-14 19:26:40
User: bohwaz
Comment:Merge effectif
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2013-09-15
05:33
[4a3e135481] Gérons l'affichage de la monnaie par CSS car money_format n'accepte pas les chaînes de plus de 1 caractère (user: bohwaz, tags: trunk)
2013-09-14
19:26
[92ef87c2c1] Merge effectif (user: bohwaz, tags: trunk)
19:18
[e2dd055f3c] merge back from stable branch (user: bohwaz, tags: trunk)
18:52
[ac8c82ea1c] Correction oubli valeur en dur dans requête sur le bilan (user: bohwaz, tags: stable, 0.5.7)
Changes

Modified src/include/class.compta_exercices.php from [c15898ea4d] to [6b8be88ed3].

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
        }

        // 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;







|


|







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
        }

        // 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;