Overview
SHA1:cc7ae49e5707c1fefa36a27a3a1bd9027fa38425
Date: 2015-12-08 18:48:41
User: bohwaz
Comment:Je ne trouve plus de trace de à quoi sert ce hack à base de base64, et ça semble marcher sans, suppression pour fixer [3ea1a0bbc66d9f9bcfe0c6afad349f2d872ea83c]
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
References
2015-12-08
18:49 • Fixed ticket [3ea1a0bbc6]: Grand Livre : Sous comptes mal triés plus 4 other changes (user: bohwaz) [details]
Tags And Properties
Context
2015-12-09
12:42
[fc7970d376] Intégration de la préférence d'utilisation de HTTPS (ou non) (user: bohwaz, tags: trunk, stable)
2015-12-08
18:48
[cc7ae49e57] Je ne trouve plus de trace de à quoi sert ce hack à base de base64, et ça semble marcher sans, suppression pour fixer [3ea1a0bbc66d9f9bcfe0c6afad349f2d872ea83c] (user: bohwaz, tags: trunk)
2015-10-10
08:18
[61819f034c] Transmission catégorie en cours dans la pagination, fix [72bfc5da9a4556ded51d50971df2dbd576d87f47] (user: bohwaz, tags: trunk)
Changes

Modified src/include/lib/Garradin/Compta/Exercices.php from [d46db9407d] to [3af8248722].

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
...
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
...
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532

        $res = $db->prepare('SELECT compte FROM
            (SELECT compte_debit AS compte FROM compta_journal
                    WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_debit
                UNION
                SELECT compte_credit AS compte FROM compta_journal
                    WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_credit)
            ORDER BY base64(compte) COLLATE BINARY ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            $compte = $row[0];

            if (is_null($compte))
................................................................................
                (SELECT compte_debit AS compte, SUM(montant) AS debit, 0 AS credit
                    FROM compta_journal WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_debit
                UNION
                SELECT compte_credit AS compte, 0 AS debit, SUM(montant) AS credit
                    FROM compta_journal WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_credit)
            WHERE compte LIKE \'6%\' OR compte LIKE \'7%\'
            GROUP BY compte
            ORDER BY base64(compte) COLLATE BINARY ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            list($compte, $debit, $credit) = $row;
            $classe = substr($compte, 0, 1);
            $parent = substr($compte, 0, 2);
................................................................................
            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;
            $parent = substr($compte, 0, 2);
            $classe = $compte[0];







|







 







|







 







|







329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
...
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
...
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532

        $res = $db->prepare('SELECT compte FROM
            (SELECT compte_debit AS compte FROM compta_journal
                    WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_debit
                UNION
                SELECT compte_credit AS compte FROM compta_journal
                    WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_credit)
            ORDER BY compte ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            $compte = $row[0];

            if (is_null($compte))
................................................................................
                (SELECT compte_debit AS compte, SUM(montant) AS debit, 0 AS credit
                    FROM compta_journal WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_debit
                UNION
                SELECT compte_credit AS compte, 0 AS debit, SUM(montant) AS credit
                    FROM compta_journal WHERE id_exercice = '.(int)$exercice.' GROUP BY compte_credit)
            WHERE compte LIKE \'6%\' OR compte LIKE \'7%\'
            GROUP BY compte
            ORDER BY compte ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            list($compte, $debit, $credit) = $row;
            $classe = substr($compte, 0, 1);
            $parent = substr($compte, 0, 2);
................................................................................
            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 compte ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            list($compte, $debit, $credit, $position) = $row;
            $parent = substr($compte, 0, 2);
            $classe = $compte[0];