Overview
Comment:Afficher la transaction liée
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d2edadaecacdaa1b1927409b5a4f24ae663c7e02
User & Date: bohwaz on 2014-01-31 17:40:06
Other Links: manifest | tags
Context
2014-02-03
15:34
Boutons d'ordre des colonnes plus clairs check-in: 40db664167 user: bohwaz tags: trunk
2014-01-31
17:40
Afficher la transaction liée check-in: d2edadaeca user: bohwaz tags: trunk
2014-01-30
17:15
Création de paiement check-in: 131f09907f user: bohwaz tags: trunk
Changes

Modified src/include/class.membres_transactions.php from [45988e7312] to [7a570041fe].

130
131
132
133
134
135
136
137



138
139
140
141
142
143
144
145
		$db = DB::getInstance();
		return $db->simpleQuerySingle('SELECT * FROM membres_transactions WHERE id = ?;', true, (int) $id);
	}

	public function listForMember($id)
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT * FROM membres_transactions 



			WHERE id_membre = ? ORDER BY date DESC;', \SQLITE3_ASSOC, (int)$id);
	}

	public function isMemberUpToDate($id, $transaction)
	{
		$db = DB::getInstance();

		$where = '';







|
>
>
>
|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
		$db = DB::getInstance();
		return $db->simpleQuerySingle('SELECT * FROM membres_transactions WHERE id = ?;', true, (int) $id);
	}

	public function listForMember($id)
	{
		$db = DB::getInstance();
		return $db->simpleStatementFetch('SELECT mtr.*, 
				tr.intitule, tr.duree, tr.debut, tr.fin
			FROM membres_transactions AS mtr 
				LEFT JOIN transactions AS tr ON tr.id = mtr.id_transaction
			WHERE mtr.id_membre = ? ORDER BY mtr.date DESC;', \SQLITE3_ASSOC, (int)$id);
	}

	public function isMemberUpToDate($id, $transaction)
	{
		$db = DB::getInstance();

		$where = '';

Modified src/templates/admin/membres/transactions.tpl from [c5c5fb2d45] to [c45af7a1ef].

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
    </dd>
    <dd><form method="get" action="{$admin_url}membres/transactions/ajout.php"><input type="submit" value="Enregistrer un paiement &rarr;" /><input type="hidden" name="id" value="{$membre.id|escape}" /></form></dd>
</dl>

<table class="list">
    <thead>
        <th>Date</th>
        <td width="30%">Intitulé</td>
        <td>Montant</td>
        <td>Activité ou cotisation liée</td>
        <td class="actions"></td>
    </thead>
    <tbody>
        {foreach from=$paiements item="p"}
            <tr>
                <td>{$p.date|format_sqlite_date_to_french}</td>
                <td>{$p.libelle|escape}</td>
                <td class="num">{$p.montant|html_money} {$config.monnaie|escape}</td>
                <td>
                    {if $p.id_transaction}
                        FIXME








                    {else}
                        <em>Aucune</em>
                    {/if}
                </td>
                <td class="actions">
                    <a href="{$admin_url}membres/transactions/modifier.php?id={$p.id|escape}">Modifier</a>
                    | <a href="{$admin_url}membres/transactions/supprimer.php?id={$p.id|escape}">Supprimer</a>







|












<
>
>
>
>
>
>
>
>







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
    </dd>
    <dd><form method="get" action="{$admin_url}membres/transactions/ajout.php"><input type="submit" value="Enregistrer un paiement &rarr;" /><input type="hidden" name="id" value="{$membre.id|escape}" /></form></dd>
</dl>

<table class="list">
    <thead>
        <th>Date</th>
        <td width="40%">Intitulé</td>
        <td>Montant</td>
        <td>Activité ou cotisation liée</td>
        <td class="actions"></td>
    </thead>
    <tbody>
        {foreach from=$paiements item="p"}
            <tr>
                <td>{$p.date|format_sqlite_date_to_french}</td>
                <td>{$p.libelle|escape}</td>
                <td class="num">{$p.montant|html_money} {$config.monnaie|escape}</td>
                <td>
                    {if $p.id_transaction}

                        {$p.intitule|escape} — 
                        {if $p.duree}
                            {$p.duree|escape} jours
                        {elseif $p.debut}
                            du {$p.debut|format_sqlite_date_to_french} au {$p.fin|format_sqlite_date_to_french}
                        {else}
                            ponctuelle
                        {/if}
                    {else}
                        <em>Aucune</em>
                    {/if}
                </td>
                <td class="actions">
                    <a href="{$admin_url}membres/transactions/modifier.php?id={$p.id|escape}">Modifier</a>
                    | <a href="{$admin_url}membres/transactions/supprimer.php?id={$p.id|escape}">Supprimer</a>