Comment: | Gérons l'affichage de la monnaie par CSS car money_format n'accepte pas les chaînes de plus de 1 caractère |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4a3e1354815ceda9bcd2fd8d8104742f |
User & Date: | bohwaz on 2013-09-15 05:33:30 |
Other Links: | manifest | tags |
2013-09-15
| ||
12:28 | Bugfix: comptes dupliqués si credit ET debit sont != de 0, corrigé avec un SUM+GROUP BY, probablement pas très élégant check-in: 97082b4ba5 user: bohwaz tags: trunk | |
05:33 | Gérons l'affichage de la monnaie par CSS car money_format n'accepte pas les chaînes de plus de 1 caractère check-in: 4a3e135481 user: bohwaz tags: trunk | |
2013-09-14
| ||
19:26 | Merge effectif check-in: 92ef87c2c1 user: bohwaz tags: trunk | |
Modified src/include/lib.template.php from [061878cf78] to [dd71740f1e].
︙ | ︙ | |||
354 355 356 357 358 359 360 | $out .= '</select>'; return $out; } function escape_money($number) { | | > > > > > | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | $out .= '</select>'; return $out; } function escape_money($number) { return number_format((float)$number, 2, ',', ' '); } function tpl_html_money($number) { return '<b class="money">' . escape_money($number) . '</b>'; } function tpl_html_champ_membre($params) { if (empty($params['config']) || empty($params['name'])) throw new \BadFunctionCallException('Paramètres type et name obligatoires.'); |
︙ | ︙ | |||
502 503 504 505 506 507 508 509 510 511 512 513 514 515 | $tpl->register_function('html_champ_membre', 'Garradin\tpl_html_champ_membre'); $tpl->register_modifier('get_country_name', array('Garradin\utils', 'getCountryName')); $tpl->register_modifier('format_tel', 'Garradin\tpl_format_tel'); $tpl->register_modifier('format_wiki', 'Garradin\tpl_format_wiki'); $tpl->register_modifier('liens_wiki', 'Garradin\tpl_liens_wiki'); $tpl->register_modifier('escape_money', 'Garradin\escape_money'); $tpl->register_modifier('abs', 'abs'); $tpl->register_modifier('display_champ_membre', function ($v, $config) { if ($config['type'] == 'checkbox') { return $v ? 'Oui' : 'Non'; } elseif ($config['type'] == 'email') { return '<a href="mailto:' . $v . '">' . $v . '</a>'; | > | 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | $tpl->register_function('html_champ_membre', 'Garradin\tpl_html_champ_membre'); $tpl->register_modifier('get_country_name', array('Garradin\utils', 'getCountryName')); $tpl->register_modifier('format_tel', 'Garradin\tpl_format_tel'); $tpl->register_modifier('format_wiki', 'Garradin\tpl_format_wiki'); $tpl->register_modifier('liens_wiki', 'Garradin\tpl_liens_wiki'); $tpl->register_modifier('escape_money', 'Garradin\escape_money'); $tpl->register_modifier('html_money', 'Garradin\tpl_html_money'); $tpl->register_modifier('abs', 'abs'); $tpl->register_modifier('display_champ_membre', function ($v, $config) { if ($config['type'] == 'checkbox') { return $v ? 'Oui' : 'Non'; } elseif ($config['type'] == 'email') { return '<a href="mailto:' . $v . '">' . $v . '</a>'; |
︙ | ︙ |
Modified src/templates/admin/compta/banques/index.tpl from [b89f5aedf9] to [1d6216dc7e].
︙ | ︙ | |||
11 12 13 14 15 16 17 | {foreach from=$liste item="compte"} <dt>{$compte.libelle|escape} {if !empty($compte.banque)}({$compte.banque|escape}){/if}</dt> <dd class="desc"> IBAN : {$compte.iban|escape|format_iban}<br /> BIC : {$compte.bic|escape}<br /> {$compte.iban|escape|format_rib} </dd> | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | {foreach from=$liste item="compte"} <dt>{$compte.libelle|escape} {if !empty($compte.banque)}({$compte.banque|escape}){/if}</dt> <dd class="desc"> IBAN : {$compte.iban|escape|format_iban}<br /> BIC : {$compte.bic|escape}<br /> {$compte.iban|escape|format_rib} </dd> <dd class="desc">Solde : {$compte.solde|html_money} {$config.monnaie|escape}</dd> <dd class="actions"> <a href="{$www_url}admin/compta/comptes/journal.php?id={$compte.id|escape}">Journal</a> {if $user.droits.compta >= Garradin\Membres::DROIT_ADMIN} | <a href="{$www_url}admin/compta/banques/modifier.php?id={$compte.id|escape}">Modifier</a> | <a href="{$www_url}admin/compta/banques/supprimer.php?id={$compte.id|escape}">Supprimer</a> {/if} </dd> |
︙ | ︙ |
Modified src/templates/admin/compta/comptes/journal.tpl from [56e444f799] to [d8b60dbe29].
︙ | ︙ | |||
25 26 27 28 29 30 31 | <td><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a></td> <td class="actions"> {if $user.droits.compta >= Garradin\Membres::DROIT_ADMIN} <a class="icn" href="{$admin_url}compta/operations/modifier.php?id={$ligne.id|escape}">✎</a> {/if} </td> <td>{$ligne.date|date_fr:'d/m/Y'|escape}</td> | | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | <td><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a></td> <td class="actions"> {if $user.droits.compta >= Garradin\Membres::DROIT_ADMIN} <a class="icn" href="{$admin_url}compta/operations/modifier.php?id={$ligne.id|escape}">✎</a> {/if} </td> <td>{$ligne.date|date_fr:'d/m/Y'|escape}</td> <td>{if $ligne.compte_credit == $compte.id}{$credit}{else}{$debit}{/if}{$ligne.montant|html_money}</td> <td>{$ligne.solde|html_money}</td> <th>{$ligne.libelle|escape}</th> </tr> {/foreach} </tbody> <tfoot> <tr> <td colspan="3"></td> <th>Solde</th> <td colspan="2">{$solde|html_money} {$config.monnaie|escape}</td> </tr> </tfoot> </table> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/exercices/bilan.tpl from [c2322ae634] to [307b3bb00c].
︙ | ︙ | |||
16 17 18 19 20 21 22 | <td> <table> <caption><h3>Actif</h3></caption> <tbody> {foreach from=$bilan.actif.comptes key="parent_code" item="parent"} <tr class="parent"> <th>{$parent_code|get_nom_compte|escape}</th> | | | | | | | | 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | <td> <table> <caption><h3>Actif</h3></caption> <tbody> {foreach from=$bilan.actif.comptes key="parent_code" item="parent"} <tr class="parent"> <th>{$parent_code|get_nom_compte|escape}</th> <td>{$parent.solde|html_money}</td> </tr> {foreach from=$parent.comptes item="solde" key="compte"} <tr class="compte"> <th>{$compte|get_nom_compte|escape}</th> <td>{$solde|html_money}</td> </tr> {/foreach} {/foreach} </tbody> </table> </td> <td> <table> <caption><h3>Passif</h3></caption> <tbody> {foreach from=$bilan.passif.comptes key="parent_code" item="parent"} <tr class="parent"> <th>{$parent_code|get_nom_compte|escape}</th> <td>{$parent.solde|html_money}</td> </tr> {foreach from=$parent.comptes item="solde" key="compte"} <tr class="compte"> <th>{$compte|get_nom_compte|escape}</th> <td>{$solde|html_money}</td> </tr> {/foreach} {/foreach} </tbody> </table> </td> </tr> </tbody> <tfoot> <tr> <td> <table> <tfoot> <tr> <th>Total actif</th> <td>{$bilan.actif.total|html_money}</td> </tr> </tfoot> </table> </td> <td> <table> <tfoot> <tr> <th>Total passif</th> <td>{$bilan.passif.total|html_money}</td> </tr> </tfoot> </table> </td> </tr> </tfoot> </table> <p class="help">Toutes les opérations sont libellées en {$config.monnaie|escape}.</p> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/exercices/compte_resultat.tpl from [401ed137cb] to [a532c27a55].
︙ | ︙ | |||
16 17 18 19 20 21 22 | <td> <table> <caption><h3>Charges</h3></caption> <tbody> {foreach from=$compte_resultat.charges.comptes key="parent_code" item="parent"} <tr class="parent"> <th>{$parent_code|get_nom_compte|escape}</th> | | | | | | | | | 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | <td> <table> <caption><h3>Charges</h3></caption> <tbody> {foreach from=$compte_resultat.charges.comptes key="parent_code" item="parent"} <tr class="parent"> <th>{$parent_code|get_nom_compte|escape}</th> <td>{$parent.solde|html_money}</td> </tr> {foreach from=$parent.comptes item="solde" key="compte"} <tr class="compte"> <th>{$compte|get_nom_compte|escape}</th> <td>{$solde|html_money}</td> </tr> {/foreach} {/foreach} </tbody> </table> </td> <td> <table> <caption><h3>Produits</h3></caption> <tbody> {foreach from=$compte_resultat.produits.comptes key="parent_code" item="parent"} <tr class="parent"> <th>{$parent_code|get_nom_compte|escape}</th> <td>{$parent.solde|html_money}</td> </tr> {foreach from=$parent.comptes item="solde" key="compte"} <tr class="compte"> <th>{$compte|get_nom_compte|escape}</th> <td>{$solde|html_money}</td> </tr> {/foreach} {/foreach} </tbody> </table> </td> </tr> </tbody> <tfoot> <tr> <td> <table> <tfoot> <tr> <th>Total charges</th> <td>{$compte_resultat.charges.total|html_money}</td> </tr> </tfoot> </table> </td> <td> <table> <tfoot> <tr> <th>Total produits</th> <td>{$compte_resultat.produits.total|html_money}</td> </tr> </tfoot> </table> </td> </tr> <tr> <td> </td> <td> <table> <tfoot> <tr> <th>Résultat</th> <td>{$compte_resultat.resultat|html_money}</td> </tr> </tfoot> </table> </td> </tr> </tfoot> </table> <p class="help">Toutes les opérations sont libellées en {$config.monnaie|escape}.</p> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/exercices/grand_livre.tpl from [9b0516d806] to [b6dd238c6f].
︙ | ︙ | |||
28 29 30 31 32 33 34 | </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> | | | | | | | | | | 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | </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>{if $ligne.compte_debit == $souscode}{$ligne.montant|html_money}{/if}</td> <td>{if $ligne.compte_credit == $souscode}{$ligne.montant|html_money}{/if}</td> </tr> {/foreach} </tbody> <tfoot> <tr> <td></td> <th>Solde final</th> <td>{if $souscompte.debit > 0}{$souscompte.debit|html_money}{/if}</td> <td>{if $souscompte.credit > 0}{$souscompte.credit|html_money}{/if}</td> </tr> </tfoot> </table> {/foreach} <table class="list"> <colgroup> <col width="15%" /> <col width="65%" /> <col width="10%" /> <col width="10%" /> </colgroup> <tfoot> <tr> <td>Total</td> <th>{$code|get_nom_compte|escape}</th> <td>{if $compte.total > 0}{$compte.total|abs|html_money}{/if}</td> <td>{if $compte.total < 0}{$compte.total|abs|html_money}{/if}</td> </tr> </tfoot> </table> {/foreach} {/foreach} <table class="list"> <colgroup> <col width="15%" /> <col width="65%" /> <col width="10%" /> <col width="10%" /> </colgroup> <tfoot> <tr> <td><strong>Total</strong></td> <th></th> <td>{$livre.debit|html_money}</td> <td>{$livre.credit|html_money}</td> </tr> </tfoot> </table> <p class="help">Toutes les opérations sont libellées en {$config.monnaie|escape}.</p> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/exercices/journal.tpl from [ee7cc03357] to [bcf20608f1].
︙ | ︙ | |||
18 19 20 21 22 23 24 | </thead> <tbody> {foreach from=$journal item="ligne"} <tr> <td rowspan="2">{$ligne.date|date_fr:'d/m/Y'|escape}</td> <th rowspan="2">{$ligne.libelle|escape}</th> <td>{$ligne.compte_debit|escape} - {$ligne.compte_debit|get_nom_compte|escape}</td> | | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | </thead> <tbody> {foreach from=$journal item="ligne"} <tr> <td rowspan="2">{$ligne.date|date_fr:'d/m/Y'|escape}</td> <th rowspan="2">{$ligne.libelle|escape}</th> <td>{$ligne.compte_debit|escape} - {$ligne.compte_debit|get_nom_compte|escape}</td> <td>{$ligne.montant|html_money}</td> <td></td> </tr> <tr> <td>{$ligne.compte_credit|escape} - {$ligne.compte_credit|get_nom_compte|escape}</td> <td></td> <td>{$ligne.montant|html_money}</td> </tr> {/foreach} </tbody> </table> <p class="help">Toutes les opérations sont libellées en {$config.monnaie|escape}.</p> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/operations/index.tpl from [e60008a93a] to [9d3bbaf993].
︙ | ︙ | |||
40 41 42 43 44 45 46 | <td><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a></td> <td class="actions"> {if $user.droits.compta >= Garradin\Membres::DROIT_ADMIN} <a class="icn" href="{$admin_url}compta/operations/modifier.php?id={$ligne.id|escape}">✎</a> {/if} </td> <td>{$ligne.date|date_fr:'d/m/Y'|escape}</td> | | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | <td><a href="{$admin_url}compta/operations/voir.php?id={$ligne.id|escape}">{$ligne.id|escape}</a></td> <td class="actions"> {if $user.droits.compta >= Garradin\Membres::DROIT_ADMIN} <a class="icn" href="{$admin_url}compta/operations/modifier.php?id={$ligne.id|escape}">✎</a> {/if} </td> <td>{$ligne.date|date_fr:'d/m/Y'|escape}</td> <td>{$ligne.montant|html_money} {$config.monnaie|escape}</td> <th>{$ligne.libelle|escape}</th> {if !$categorie && $type} <td>{$ligne.categorie|escape}</td> {/if} </tr> {foreachelse} <tr> <td colspan="3"></td> <td colspan="2"> Aucune opération. </td> {if !$categorie && $type}<td></td>{/if} </tr> {/foreach} </tbody> <tfoot> <tr> <td></td> <td></td> <th>Total</th> <td>{$total|html_money} {$config.monnaie|escape}</td> <td></td> {if !$categorie && $type}<td></td>{/if} </tr> </tfoot> </table> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/compta/operations/voir.tpl from [30335ca44c] to [35e0931d5b].
︙ | ︙ | |||
9 10 11 12 13 14 15 | <dl class="describe"> <dt>Date</dt> <dd>{$operation.date|date_fr:'l j F Y (d/m/Y)'}</dd> <dt>Libellé</dt> <dd>{$operation.libelle|escape}</dd> <dt>Montant</dt> | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <dl class="describe"> <dt>Date</dt> <dd>{$operation.date|date_fr:'l j F Y (d/m/Y)'}</dd> <dt>Libellé</dt> <dd>{$operation.libelle|escape}</dd> <dt>Montant</dt> <dd>{$operation.montant|html_money} {$config.monnaie|escape}</dd> <dt>Numéro pièce comptable</dt> <dd>{if trim($operation.numero_piece)}{$operation.numero_piece|escape}{else}<em>Non renseigné</em>{/if}</dd> {if $operation.id_categorie} <dt>Moyen de paiement</dt> <dd>{if trim($operation.moyen_paiement)}{$moyen_paiement|escape}{else}<em>Non renseigné</em>{/if}</dd> |
︙ | ︙ | |||
71 72 73 74 75 76 77 | <td>Crédit</td> </tr> </thead> <tbody> <tr> <td><a href="{$admin_url}compta/comptes/journal.php?id={$operation.compte_debit|escape}">{$operation.compte_debit|escape}</a></td> <td>{$nom_compte_debit}</td> | | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | <td>Crédit</td> </tr> </thead> <tbody> <tr> <td><a href="{$admin_url}compta/comptes/journal.php?id={$operation.compte_debit|escape}">{$operation.compte_debit|escape}</a></td> <td>{$nom_compte_debit}</td> <td>{$operation.montant|html_money} {$config.monnaie|escape}</td> <td></td> </tr> <tr> <td><a href="{$admin_url}compta/comptes/journal.php?id={$operation.compte_credit|escape}">{$operation.compte_credit|escape}</a></td> <td>{$nom_compte_credit}</td> <td></td> <td>{$operation.montant|html_money} {$config.monnaie|escape}</td> </tr> </tbody> </table> {include file="admin/_foot.tpl"} |
Modified src/templates/admin/membres/transactions/index.tpl from [b686009736] to [68f9009738].
1 2 3 4 5 6 7 8 9 10 11 12 13 | {include file="admin/_head.tpl" title="Transactions" current="membres/transactions"} <table class="list"> <thead> <th>Intitulé</th> <td>Montant</td> <td>Période</td> <td></td> </thead> <tbody> {foreach from=$liste item="tr"} <tr> <th>{$tr.intitule|escape}</th> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | {include file="admin/_head.tpl" title="Transactions" current="membres/transactions"} <table class="list"> <thead> <th>Intitulé</th> <td>Montant</td> <td>Période</td> <td></td> </thead> <tbody> {foreach from=$liste item="tr"} <tr> <th>{$tr.intitule|escape}</th> <td class="num">{$tr.montant|html_money} {$config.monnaie|escape}</td> <td> {if $tr.duree} {$tr.duree|escape} jours {elseif $tr.debut} du {$tr.debut|format_sqlite_date_to_french} au {$tr.fin|format_sqlite_date_to_french} {else} ponctuelle |
︙ | ︙ |
Modified src/www/admin/static/admin.css from [d685a74b7c] to [2a8df9d068].
︙ | ︙ | |||
379 380 381 382 383 384 385 386 387 388 389 390 391 392 | color: #fff; } table.list .actions { text-align: right; } #rapport h3 { text-align: center; margin-bottom: .5em; } #rapport table { | > > > > > | 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | color: #fff; } table.list .actions { text-align: right; } b.money { font-weight: inherit; white-space: pre; } #rapport h3 { text-align: center; margin-bottom: .5em; } #rapport table { |
︙ | ︙ |