Overview
Comment: | Patch du ticket [76931fcb17] (solde dans le grand livre) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a3d37baef8c5f7d0591a4dfcafc0d9fd |
User & Date: | bohwaz on 2014-06-30 23:48:24 |
Other Links: | manifest | tags |
Context
2014-07-01
| ||
00:09 | Application patch ticket [29871886d9] : corrections comptes passif ET actif dans bilan check-in: 2b920e5efa user: bohwaz tags: trunk | |
2014-06-30
| ||
23:48 | Patch du ticket [76931fcb17] (solde dans le grand livre) check-in: a3d37baef8 user: bohwaz tags: trunk | |
2014-06-10
| ||
11:01 | Mieux avec fakeroot check-in: c06885d8f3 user: bohwaz tags: trunk | |
Changes
Modified src/include/class.compta_exercices.php from [b79696ceb1] to [e40c0ae693].
︙ | ︙ | |||
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | $livre['classes'][$classe][$parent]['comptes'][$compte]['journal'] = $db->simpleStatementFetch( 'SELECT *, strftime(\'%s\', date) AS date FROM ( SELECT * FROM compta_journal WHERE compte_debit = :compte AND id_exercice = '.(int)$exercice.' UNION SELECT * FROM compta_journal WHERE compte_credit = :compte AND id_exercice = '.(int)$exercice.' ) ORDER BY date, numero_piece, id;', SQLITE3_ASSOC, ['compte' => $compte]); $debit = (float) $db->simpleQuerySingle( 'SELECT SUM(montant) FROM compta_journal WHERE compte_debit = ? AND id_exercice = '.(int)$exercice.';', false, $compte); $credit = (float) $db->simpleQuerySingle( 'SELECT SUM(montant) FROM compta_journal WHERE compte_credit = ? AND id_exercice = '.(int)$exercice.';', false, $compte); $livre['classes'][$classe][$parent]['comptes'][$compte]['debit'] = $debit; $livre['classes'][$classe][$parent]['comptes'][$compte]['credit'] = $credit; $livre['classes'][$classe][$parent]['total'] += $debit; $livre['classes'][$classe][$parent]['total'] -= $credit; $livre['debit'] += $debit; $livre['credit'] += $credit; } | > > > > > > > > > > > > > > > | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | $livre['classes'][$classe][$parent]['comptes'][$compte]['journal'] = $db->simpleStatementFetch( 'SELECT *, strftime(\'%s\', date) AS date FROM ( SELECT * FROM compta_journal WHERE compte_debit = :compte AND id_exercice = '.(int)$exercice.' UNION SELECT * FROM compta_journal WHERE compte_credit = :compte AND id_exercice = '.(int)$exercice.' ) ORDER BY date, numero_piece, id;', SQLITE3_ASSOC, ['compte' => $compte]); $solde = 0.0; foreach ($livre['classes'][$classe][$parent]['comptes'][$compte]['journal'] as &$ligne) { if ($ligne["compte_credit"] == $compte) { $solde += $ligne['montant']; } else { $solde -= $ligne['montant']; } $ligne['solde'] = $solde; } $debit = (float) $db->simpleQuerySingle( 'SELECT SUM(montant) FROM compta_journal WHERE compte_debit = ? AND id_exercice = '.(int)$exercice.';', false, $compte); $credit = (float) $db->simpleQuerySingle( 'SELECT SUM(montant) FROM compta_journal WHERE compte_credit = ? AND id_exercice = '.(int)$exercice.';', false, $compte); $livre['classes'][$classe][$parent]['comptes'][$compte]['debit'] = $debit; $livre['classes'][$classe][$parent]['comptes'][$compte]['credit'] = $credit; $livre['classes'][$classe][$parent]['comptes'][$compte]['solde'] = $credit - $debit; $livre['classes'][$classe][$parent]['total'] += $debit; $livre['classes'][$classe][$parent]['total'] -= $credit; $livre['debit'] += $debit; $livre['credit'] += $credit; } |
︙ | ︙ |
Modified src/templates/admin/compta/exercices/grand_livre.tpl from [b6dd238c6f] to [961c7b63da].
︙ | ︙ | |||
11 12 13 14 15 16 17 | {foreach from=$comptes item="compte" key="code"} {foreach from=$compte.comptes item="souscompte" key="souscode"} <table class="list"> <caption><h4>{$souscode|escape} — {$souscode|get_nom_compte|escape}</h4></caption> <colgroup> <col width="15%" /> | | > | | > | | > | | > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | {foreach from=$comptes item="compte" key="code"} {foreach from=$compte.comptes item="souscompte" key="souscode"} <table class="list"> <caption><h4>{$souscode|escape} — {$souscode|get_nom_compte|escape}</h4></caption> <colgroup> <col width="15%" /> <col width="55%" /> <col width="10%" /> <col width="10%" /> <col width="10%" /> </colgroup> <thead> <tr> <td>Date</td> <th>Intitulé</th> <td class="money">Débit</td> <td class="money">Crédit</td> <td class="money">Solde</td> </tr> </thead> <tbody> {foreach from=$souscompte.journal item="ligne"} <tr> <td>{$ligne.date|date_fr:'d/m/Y'|escape}</td> <th>{$ligne.libelle|escape}</th> <td class="money">{if $ligne.compte_debit == $souscode}{$ligne.montant|html_money}{/if}</td> <td class="money">{if $ligne.compte_credit == $souscode}{$ligne.montant|html_money}{/if}</td> <td class="money">{$ligne.solde|html_money}</td> </tr> {/foreach} </tbody> <tfoot> <tr> <td></td> <th>Solde final</th> <td class="money">{if $souscompte.debit > 0}{$souscompte.debit|html_money}{/if}</td> <td class="money">{if $souscompte.credit > 0}{$souscompte.credit|html_money}{/if}</td> <td class="money">{$souscompte.solde|html_money}</td> </tr> </tfoot> </table> {/foreach} <table class="list"> <colgroup> |
︙ | ︙ |
Modified src/www/admin/static/admin.css from [218216a26b] to [da51915e76].
︙ | ︙ | |||
515 516 517 518 519 520 521 522 523 524 525 526 527 528 | width: 80%; } #rapport td, #rapport th { padding: 0.2em 0.5em; text-align: left; } #rapport .compte th { font-weight: normal; } #rapport table table td { text-align: right; | > > > > | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | width: 80%; } #rapport td, #rapport th { padding: 0.2em 0.5em; text-align: left; } #rapport td.money, #rapport th.money { text-align: right; } #rapport .compte th { font-weight: normal; } #rapport table table td { text-align: right; |
︙ | ︙ |