1 {**************************************************************************}
3 {* Copyright (C) 2003-2010 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
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. *}
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. *}
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 *}
21 {**************************************************************************}
23 <h1>Réconciliation - {$title}</h1>
29 <th>Choix de la méthode de paiement</th>
31 {foreach from=$methods item=method}
32 <tr class="{cycle values="pair,impair"}">
34 <a href="admin/payments/reconcile/step1/{$method.id}">{$method.text}</a>
40 {elseif $step eq 'step2'}
42 {include core=csv-importer.tpl}
44 {elseif $step eq 'step3'}
50 <th colspan="3">Récapitulatif des informations de réconciliation</th>
53 <td width="30%">ID de la méthode de paiement:</td>
54 <td colspan="2">{$recon.method_id}</td>
57 <td>Début de période :</td>
59 <input type="text" name="period_start" value="{$recon.period_start}" maxlength="10" />
64 <td>Fin de période :</td>
66 <input type="text" name="period_end" value="{$recon.period_end}" maxlength="10" />
71 <td>Nombre de transactions :</td>
72 <td colspan="2">{$recon.payment_count}</td>
75 <td>Total des paiements :</td>
76 <td>{$recon.sum_amounts|string_format:"%.2f"|replace:'.':','}€</td>
77 <td>(environ {$recon.sum_amounts/$recon.payment_count|string_format:"%.2f"|replace:'.':','}€/paiement)</td>
80 <td>Total des commissions :</td>
81 <td>{$recon.sum_commissions|string_format:"%.2f"|replace:'.':','}€</td>
82 <td>(environ {$recon.sum_commissions/$recon.sum_amounts*100|string_format:"%.2f"|replace:'.':','}%)</td>
90 <th colspan="2">À l'étape suivante, une comparaison entre les transactions existantes et la liste importé va être réalisée.</th>
93 <td width="30%">Vérification à faire :</td>
95 <label><input type="checkbox" name="check1" checked="checked" disabled="disabled"/> apparier les transactions</label><br />
96 <label><input type="checkbox" name="check2" checked="checked" /> afficher les transactions existantes orphelines</label><br />
97 <label><input type="checkbox" name="check3" checked="checked" /> afficher les transactions importées orphelines</label><br />
102 <p class="center"><input type="submit" name="next" value="étape suivante" /></p>
105 {elseif $step eq 'step4'}
107 <p>ok : {$ok_count}<br />
108 differ : {$differ_count}<br />
109 onlydb : {$onlydb_count}<br />
110 onlyim : {$onlyim_count}<br />
111 total (excepted onlydb) : {$ok_count+$differ_count+$onlyim_count} (doit être égal à {$recon.payment_count})
114 <h2>Enregistrements avec champs qui diffèrent</h2>
116 {if $differ_count ne 0}
117 <table class="bicol">
119 <th>Référence</th><th>method_id</th><th>Date</th>
120 <th>Montant</th><th>Com</th><th>Statut</th>
121 <th>recon_id</th><th>Action</th>
123 {foreach from=$differs item=i}
124 <tr class="{cycle values="pair,impair"}">
125 <td>{$i.fullref}<br />{$i.reference}</td>
126 <td>{$i.method_id}<br /> </td>
127 <td>{$i.ts_confirmed}<br />{$i.date}</td>
128 <td>{$i.amount}<br />{$i.amount2}</td>
129 <td>{$i.commission}<br />{$i.commission2}</td>
130 <td>{$i.status}<br /> </td>
131 <td>{$i.recon_id}<br /> </td>
132 <td><form method="POST">{xsrf_token_field}<input type="submit" name="force[{$i.id}]" value="Forcer" /></form></td>
140 <h2>Enregistrements uniquement dans la base</h2>
142 {if $onlydb_count ne 0}
143 <table class="bicol">
144 {assign var='headerstatus' value='doheader'}
145 {foreach from=$only_database item=i}
146 {if $headerstatus eq 'doheader'}
147 {assign var='headerstatus' value='headerdone'}
149 {foreach from=$i key=k item=v}
154 <tr class="{cycle values="pair,impair"}">
155 {foreach from=$i key=k item=v}
165 <h2>Enregistrements uniquement dans l'import</h2>
167 {if $onlyim_count ne 0}
168 <table class="bicol">
169 {assign var='headerstatus' value='doheader'}
170 {foreach from=$only_import item=i}
171 {if $headerstatus eq 'doheader'}
172 {assign var='headerstatus' value='headerdone'}
174 {foreach from=$i key=k item=v}
179 <tr class="{cycle values="pair,impair"}">
180 {foreach from=$i key=k item=v}
190 <h2>Commentaires</h2>
192 <p>Les tableaux si dessus ne seront pas enregistrés, il convient donc de reprendre leur contenu dans
193 le champ de commentaires si dessous, si nécesssaire.</p>
197 <textarea name="comments" rows="10" cols="100">{$recon.comments}</textarea>
198 <input type="submit" name="savecomments" value="Enregistrer les commentaires" /></p>
204 <p class="center"><input type="submit" name="next" value="Terminer la réconciliation" /></p>
207 {else} {* defaults to "list" *}
208 {assign var='dontshowback' value='dontshowback'}
216 <a href="admin/payments/reconcile">back</a>