Overview
Comment: | Liste des écritures réalisées par un membre |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4d6e4631551ff87c9e0c9b0fc115cca0 |
User & Date: | bohwaz on 2014-02-06 19:59:06 |
Other Links: | manifest | tags |
Context
2014-02-07
| ||
14:41 | Message en cas d'absence de résultat check-in: 8658e35b26 user: bohwaz tags: trunk | |
2014-02-06
| ||
19:59 | Liste des écritures réalisées par un membre check-in: 4d6e463155 user: bohwaz tags: trunk | |
19:37 | Nombre d'écritures comptables réalisées par un membre check-in: 0c756fa6ba user: bohwaz tags: trunk | |
Changes
Modified src/include/class.compta_journal.php from [1959f1b323] to [8a7c696057].
︙ | ︙ | |||
162 163 164 165 166 167 168 169 170 171 172 173 174 175 | public function countForMember($id) { $db = DB::getInstance(); return $db->simpleQuerySingle('SELECT COUNT(*) FROM compta_journal WHERE id_auteur = ?;', false, (int)$id); } protected function _checkFields(&$data) { $db = DB::getInstance(); if (empty($data['libelle']) || !trim($data['libelle'])) { | > > > > > > > | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | public function countForMember($id) { $db = DB::getInstance(); return $db->simpleQuerySingle('SELECT COUNT(*) FROM compta_journal WHERE id_auteur = ?;', false, (int)$id); } public function listForMember($id, $exercice) { $db = DB::getInstance(); return $db->simpleStatementFetch('SELECT * FROM compta_journal WHERE id_auteur = ? AND id_exercice = ?;', \SQLITE3_ASSOC, (int)$id, (int)$exercice); } protected function _checkFields(&$data) { $db = DB::getInstance(); if (empty($data['libelle']) || !trim($data['libelle'])) { |
︙ | ︙ |
Added src/templates/admin/compta/operations/membre.tpl version [0797e9c6e2].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 57 58 59 60 61 62 63 | {include file="admin/_head.tpl" title="Écritures réalisées par le membre n°`$membre.id`" current="compta/gestion"} <form method="get" action="{$self_url|escape}"> <fieldset> <legend>Exercice à visualiser</legend> <p> <input type="hidden" name="id" value="{$membre.id|escape}" /> <select name="exercice" id="f_exercice" onchange="this.form.submit();"> {foreach from=$exercices item="e"} <option value="{$e.id|escape}" {form_field name="exercice" selected=$e.id default=$exercice}>{$e.libelle} — {if $e.cloture}Clôturé{else}En cours{/if} — Du {$e.debut|date_fr:'d/m/Y'} au {$e.fin|date_fr:'d/m/Y'} </option> {/foreach} </select> </p> <noscript> <p> <input type="submit" value="Visualiser →" /> </p> </noscript> </fieldset> </form> <table class="list"> <colgroup> <col width="3%" /> <col width="3%" /> <col width="12%" /> <col width="10%" /> <col /> </colgroup> <thead> <tr> <td></td> <td></td> <td>Date</td> <td>Montant</td> <th>Libellé</th> <td>Compte débité</td> <td>Compte crédité</td> </tr> </thead> <tbody> {foreach from=$journal item="ligne"} <tr> <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|format_sqlite_date_to_french|escape}</td> <td>{$ligne.montant|html_money}</td> <th>{$ligne.libelle|escape}</th> <td>{$ligne.compte_debit|escape} — {$ligne.compte_debit|get_nom_compte}</td> <td>{$ligne.compte_credit|escape} — {$ligne.compte_credit|get_nom_compte}</td> </tr> {/foreach} </tbody> </table> {include file="admin/_foot.tpl"} |
Added src/www/admin/compta/operations/membre.php version [f877939cc7].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 | <?php namespace Garradin; require_once __DIR__ . '/../_inc.php'; $exercices = new Compta_Exercices; $journal = new Compta_Journal; $exercice = utils::get('exercice') ?: $exercices->getCurrentId(); if (!$exercice) { throw new UserException('Exercice inconnu.'); } if (empty($_GET['id']) || !is_numeric($_GET['id'])) { throw new UserException("Argument du numéro de membre manquant."); } $id = (int) $_GET['id']; $membre = $membres->get($id); if (!$membre) { throw new UserException("Le membre demandé n'existe pas."); } $liste_comptes = $comptes->getListAll(); function get_nom_compte($compte) { if (is_null($compte)) return ''; global $liste_comptes; return $liste_comptes[$compte]; } $tpl->register_modifier('get_nom_compte', 'Garradin\get_nom_compte'); $tpl->assign('journal', $journal->listForMember($membre['id'], $exercice)); $tpl->assign('exercices', $exercices->getList()); $tpl->assign('exercice', $exercice); $tpl->assign('membre', $membre); $tpl->display('admin/compta/operations/membre.tpl'); ?> |
Modified src/www/admin/membres/transactions/ecritures.php from [41da3cec99] to [6088e86071].
︙ | ︙ | |||
14 15 16 17 18 19 20 | } $id = (int) $_GET['id']; $transactions = new Transactions; $m_transactions = new Membres_Transactions; | < < < < < < < < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | } $id = (int) $_GET['id']; $transactions = new Transactions; $m_transactions = new Membres_Transactions; $tr = $m_transactions->get($id); if (!$tr) { throw new UserException("Ce paiement n'existe pas."); } |
︙ | ︙ |