Overview
SHA1:b64cb36115dc9513485387a5b3b840ca44f89a32
Date: 2013-09-15 12:34:31
User: bohwaz
Comment:Merge: Bugfix: comptes dupliqués si credit ET debit sont != de 0, corrigé avec un SUM+GROUP BY, probablement pas très élégant + Correction format monnaie mal affiché
Timelines: family | ancestors | descendants | both | stable | 0.5.8
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
  • branch=trunk inherited from [e5099a03d9]
  • sym-0.5.8
  • sym-stable
Context
2013-09-29
11:27
[3d710711d8] Merges multiples de corrections dans la branche stable (user: bohwaz, tags: stable, 0.5.9)
2013-09-15
12:34
[b64cb36115] Merge: Bugfix: comptes dupliqués si credit ET debit sont != de 0, corrigé avec un SUM+GROUP BY, probablement pas très élégant + Correction format monnaie mal affiché (user: bohwaz, tags: stable, 0.5.8)
2013-09-14
19:02
[4ab167a244] merge 1823585df4a899f5a79d3ce6db45e1f113742822 (user: bohwaz, tags: stable, 0.5.7)
Changes

Modified VERSION from [46318b44fa] to [a3a33376d7].

1
0.5.7
|
1
0.5.8

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

225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

240
241
242
243
244
245
246
    {
        $db = DB::getInstance();

        $charges    = array('comptes' => array(), 'total' => 0.0);
        $produits   = array('comptes' => array(), 'total' => 0.0);
        $resultat   = 0.0;

        $res = $db->prepare('SELECT compte, debit, credit
            FROM
                (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%\'

            ORDER BY base64(compte) COLLATE BINARY ASC;'
            )->execute();

        while ($row = $res->fetchArray(SQLITE3_NUM))
        {
            list($compte, $debit, $credit) = $row;
            $classe = substr($compte, 0, 1);







|







>







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
    {
        $db = DB::getInstance();

        $charges    = array('comptes' => array(), 'total' => 0.0);
        $produits   = array('comptes' => array(), 'total' => 0.0);
        $resultat   = 0.0;

        $res = $db->prepare('SELECT compte, SUM(debit), SUM(credit)
            FROM
                (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);

Modified include/lib.template.php from [061878cf78] to [40856b120d].

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
    $out .= '</select>';

    return $out;
}

function escape_money($number)
{
    return number_format((float)$number, 2, ',', '&nbsp;');
}

function tpl_html_champ_membre($params)
{
    if (empty($params['config']) || empty($params['name']))
        throw new \BadFunctionCallException('Paramètres type et name obligatoires.');








|







354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
    $out .= '</select>';

    return $out;
}

function escape_money($number)
{
    return number_format((float)$number, 2, ',', ' ');
}

function tpl_html_champ_membre($params)
{
    if (empty($params['config']) || empty($params['name']))
        throw new \BadFunctionCallException('Paramètres type et name obligatoires.');