1 {include file="admin/_head.tpl" title="Modification de l'opération n°`$operation.id`" current="compta/saisie" js=1}
9 <form method="post" action="{$self_url|escape}">
12 <legend>Informations sur l'opération</legend>
14 <dt><label for="f_date">Date</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
15 <dd><input type="date" name="date" id="f_date" value="{form_field name=date default=$operation.date|date_fr:'Y-m-d'}" size="10" required="required" /></dd>
16 <dt><label for="f_libelle">Libellé</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
17 <dd><input type="text" name="libelle" id="f_libelle" value="{form_field name=libelle data=$operation}" required="required" /></dd>
18 <dt><label for="f_montant">Montant</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
19 <dd><input type="number" size="5" name="montant" id="f_montant" value="{form_field name=montant data=$operation}" min="0.00" step="0.01" required="required" /> {$config.monnaie|escape}</dd>
22 <dt><label for="f_compte_debit">Compte débité</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
24 {select_compte comptes=$comptes name="compte_debit" data=$operation}
26 <dt><label for="f_compte_credit">Compte crédité</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
28 {select_compte comptes=$comptes name="compte_credit" data=$operation}
31 <dt><label for="f_moyen_paiement">Moyen de paiement</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
33 <select name="moyen_paiement" id="f_moyen_paiement">
34 {foreach from=$moyens_paiement item="moyen"}
35 <option value="{$moyen.code|escape}"{if $moyen.code == $operation.moyen_paiement} selected="selected"{/if}>{$moyen.nom|escape}</option>
39 <dt class="f_cheque"><label for="f_numero_cheque">Numéro de chèque</label></dt>
40 <dd class="f_cheque"><input type="text" name="numero_cheque" id="f_numero_cheque" value="{form_field name=numero_cheque data=$operation}" /></dd>
41 <dt class="f_banque"><label for="f_banque">Compte bancaire</label></dt>
43 <select name="banque" id="f_banque">
44 {foreach from=$comptes_bancaires item="compte"}
45 <option value="{$compte.id|escape}"{if ($type == Garradin\Compta_Categories::DEPENSES && $compte.id == $operation.compte_credit) || $compte.id == $operation.compte_debit} selected="selected"{/if}>{$compte.libelle|escape} - {$compte.banque|escape}</option>
51 <dt><label for="f_numero_piece">Numéro de pièce comptable</label></dt>
52 <dd><input type="text" name="numero_piece" id="f_numero_piece" value="{form_field name=numero_piece data=$operation}" /></dd>
53 <dt><label for="f_remarques">Remarques</label></dt>
54 <dd><textarea name="remarques" id="f_remarques" rows="4" cols="30">{form_field name=remarques data=$operation}</textarea></dd>
60 <legend>Catégorie</legend>
62 {foreach from=$categories item="cat"}
64 <input type="radio" name="id_categorie" value="{$cat.id|escape}" id="f_cat_{$cat.id|escape}" {form_field name="id_categorie" checked=$cat.id data=$operation} />
65 <label for="f_cat_{$cat.id|escape}">{$cat.intitule|escape}</label>
67 {if !empty($cat.description)}
68 <dd class="desc">{$cat.description|escape}</dd>
74 <script type="text/javascript">
78 window.changeMoyenPaiement = function()
80 var elm = $('#f_moyen_paiement');
81 toggleElementVisibility('.f_cheque', elm.value == 'CH');
82 toggleElementVisibility('.f_banque', elm.value != 'ES');
85 changeMoyenPaiement();
87 $('#f_moyen_paiement').onchange = changeMoyenPaiement;
94 {csrf_field key="compta_modifier_`$operation.id`"}
95 <input type="submit" name="save" value="Enregistrer →" />
100 {include file="admin/_foot.tpl"}