0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
50a40a33 |
3 | {* Copyright (C) 2003-2006 Polytechnique.org *} |
0337d704 |
4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} |
6 | {* This program is free software; you can redistribute it and/or modify *} |
7 | {* it under the terms of the GNU General Public License as published by *} |
8 | {* the Free Software Foundation; either version 2 of the License, or *} |
9 | {* (at your option) any later version. *} |
10 | {* *} |
11 | {* This program is distributed in the hope that it will be useful, *} |
12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
14 | {* GNU General Public License for more details. *} |
15 | {* *} |
16 | {* You should have received a copy of the GNU General Public License *} |
17 | {* along with this program; if not, write to the Free Software *} |
18 | {* Foundation, Inc., *} |
19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
20 | {* *} |
21 | {**************************************************************************} |
22 | |
0337d704 |
23 | {if $smarty.request.action eq "edit"} |
24 | <h1> |
25 | Gestion des opérations de trésorerie |
26 | </h1> |
27 | |
f3cb77fc |
28 | <form method="post" action="{rel}/{$platal->path}"> |
0337d704 |
29 | <table class="bicol"> |
30 | <tr> |
31 | <th colspan="2"> |
32 | {if $op_id} |
33 | Modifier une opération |
34 | {else} |
35 | Ajouter une opération |
36 | {/if} |
37 | </th> |
38 | </tr> |
39 | <tr> |
40 | <td>Date (DD/MM/YYYY)</td> |
41 | <td><input type="text" name="op_date" size="40" |
f3cb77fc |
42 | value="{$op_date|date_format:"%d/%m/%Y"}" /></td> |
0337d704 |
43 | </tr> |
44 | <tr> |
45 | <td>Description libre</td> |
46 | <td><input type="text" name="op_label" size="40" value="{$op_label}" /></td> |
47 | </tr> |
48 | <tr> |
49 | <td>Débit</td> |
50 | <td><input type="text" name="op_debit" size="40" value="{$op_debit}" /></td> |
51 | </tr> |
52 | <tr> |
53 | <td>Crédit</td> |
54 | <td><input type="text" name="op_credit" size="40" value="{$op_credit}" /></td> |
55 | </tr> |
56 | <tr> |
57 | <td class="center" colspan="2"> |
58 | <input type="hidden" name="op_id" value="{$op_id}" /> |
59 | <input type="hidden" name="action" value="update" /> |
60 | <input type="hidden" name="annee" value="{$annee_sel}" /> |
61 | <input type="hidden" name="mois" value="{$mois_sel}" /> |
62 | <input type="submit" value="enregistrer" /> |
63 | </td> |
64 | </tr> |
65 | </table> |
66 | </form> |
67 | |
f3cb77fc |
68 | <a href="{rel}/{$platal->path}">retour</a> |
0337d704 |
69 | {elseif $smarty.request.action eq "update" && $op_id} |
70 | <strong>modification de l'opération</strong> |
71 | {elseif $smarty.request.action eq "update"} |
72 | <strong>ajout de l'opération</strong> |
73 | {elseif $smarty.request.action eq "del"} |
74 | <strong>suppression de l'opération</strong> |
75 | {/if} |
76 | |
77 | {if $smarty.request.action neq "edit"} |
78 | <h1> |
79 | Trésorerie pour {$mon_sel} |
80 | </h1> |
81 | |
82 | <table class="bicol"> |
83 | <tr> |
84 | <th>Solde en début de mois</th> |
85 | </tr> |
86 | <tr> |
87 | <td class="right">{$from_solde}</td> |
88 | </tr> |
89 | </table> |
90 | |
91 | <br /> |
92 | |
93 | <table class="bicol" style="font-size: 90%"> |
94 | <tr> |
95 | <th>Id</th> |
96 | <th>Date</th> |
97 | <th>Description</th> |
98 | <th>Débit</th> |
99 | <th>Crédit</th> |
100 | <th>Action</th> |
101 | </tr> |
102 | <tr class="impair"> |
103 | <td> </td> |
104 | <td> </td> |
105 | <td><strong>Nouvelle opération</strong></td> |
106 | <td> </td> |
107 | <td> </td> |
108 | <td> |
f3cb77fc |
109 | <form method="post" action="{rel}/{$platal->path}"> |
0337d704 |
110 | <div> |
111 | <input type="hidden" name="op_id" value="0" /> |
112 | <input type="hidden" name="action" value="edit" /> |
113 | <input type="hidden" name="annee" value="{$annee_sel}" /> |
114 | <input type="hidden" name="mois" value="{$mois_sel}" /> |
115 | <input type="submit" value="new" /> |
116 | </div> |
117 | </form> |
118 | </td> |
119 | </tr> |
120 | {iterate item=op from=$ops} |
121 | <tr class="{cycle values="pair,impair"}"> |
122 | <td>{$op.id}</td> |
123 | <td>{$op.date|date_format}</td> |
124 | <td>{$op.label}</td> |
125 | <td class="right">{$op.debit}</td> |
126 | <td class="right">{$op.credit}</td> |
127 | <td> |
f3cb77fc |
128 | <form method="post" action="{rel}/{$platal->path}"> |
0337d704 |
129 | <div> |
130 | <input type="hidden" name="op_id" value="{$op.id}" /> |
131 | <input type="hidden" name="annee" value="{$annee_sel}" /> |
132 | <input type="hidden" name="mois" value="{$mois_sel}" /> |
133 | <input type="submit" name="action" value="edit" /> |
134 | <input type="submit" name="action" value="del" /> |
135 | </div> |
136 | </form> |
137 | </td> |
138 | </tr> |
139 | {/iterate} |
140 | </table> |
141 | |
142 | <br /> |
143 | |
144 | <table class="bicol"> |
145 | <tr> |
146 | <th>Solde en fin de mois</th> |
147 | </tr> |
148 | <tr> |
149 | <td class="right">{$to_solde}</td> |
150 | </tr> |
151 | </table> |
152 | |
153 | <br /> |
154 | |
155 | {include file=trezo/choix_date.tpl month_arr=$month_arr} |
156 | {/if} |
157 | |
158 | {* vim:set et sw=2 sts=2 sws=2: *} |