Amortissements : Ajout boutons et écritures avoir liées
This commit is contained in:
parent
b3aeb9b09c
commit
769123236c
1 changed files with 62 additions and 10 deletions
|
|
@ -27,7 +27,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||||
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}}
|
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_immos, total_credits"}}
|
||||||
{{:assign solde="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
{{:assign solde="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
||||||
|
|
||||||
{{if $info_immo.status == "amortized"}}
|
{{if $info_immo.status == "amortized"}}
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
{{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$total_amort}}
|
{{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$total_amort}}
|
||||||
|
|
||||||
{{if $valeur_residuelle > 0}}
|
{{if $valeur_residuelle > 0}}
|
||||||
{{* lister les amortissements non rattachés à une immo *}}
|
{{* lister les amortissements non attachés à une immo *}}
|
||||||
{{:include file="./_get_free_amort.html" filter_condition="1" keep="free_amort_lines"}}
|
{{:include file="./_get_free_amort.html" filter_condition="1" keep="free_amort_lines"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
@ -69,10 +69,14 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach"}}
|
{{if $_GET.msg|match:"attach_amort"}}
|
||||||
{{:assign msg="Attachement amortissement %s effectué"|args:$_GET.trans_id}}
|
{{:assign msg="Attachement amortissement effectué"}}
|
||||||
{{elseif $_GET.msg|match:"detach"}}
|
{{elseif $_GET.msg|match:"detach_amort"}}
|
||||||
{{:assign msg="Détachement amortissement %s affectué"|args:$_GET.trans_id}}
|
{{:assign msg="Détachement amortissement affectué"}}
|
||||||
|
{{elseif $_GET.msg|match:"attach_avoir"}}
|
||||||
|
{{:assign msg="Attachement avoir affectué"}}
|
||||||
|
{{elseif $_GET.msg|match:"detach_avoir"}}
|
||||||
|
{{:assign msg="Détachement avoir affectué"}}
|
||||||
{{elseif $_GET.msg|match:"amortissement"}}
|
{{elseif $_GET.msg|match:"amortissement"}}
|
||||||
{{:assign msg="Amortissement enregistré"}}
|
{{:assign msg="Amortissement enregistré"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -104,6 +108,52 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<nav style="margin-bottom: 1em;">
|
||||||
|
<aside> {{* class="right">*}}
|
||||||
|
{{if $total_amort == 0}}
|
||||||
|
{{:linkbutton label="Modifier les paramètres" href="modify_infos.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="edit" target="_dialog"}}
|
||||||
|
{{:linkbutton label="Supprimer les paramètres" href="delete_infos.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="delete" target="_dialog"}}
|
||||||
|
{{:linkbutton label="Attacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
{{if $free_amort_lines}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Attacher un amortissement"
|
||||||
|
title="Attacher un amortissement existant"
|
||||||
|
href="other_amortizations.html?immo_doc_id=%s"|args:$_GET.immo_doc_id
|
||||||
|
shape="link"
|
||||||
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Enregistrer un amortissement"
|
||||||
|
title="Enregistrer un nouvel amortissement"
|
||||||
|
href="save_amort.html?immo_doc_id=%s"|args:$_GET.immo_doc_id target="_dialog"
|
||||||
|
shape="plus"
|
||||||
|
}}
|
||||||
|
</aside>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{{if $linked_immos != null}}
|
||||||
|
<aside class="right">
|
||||||
|
<table class="list">
|
||||||
|
<caption>Écritures d'avoir liées</caption>
|
||||||
|
<tbody>
|
||||||
|
{{#foreach from=$linked_immos item="line"}}
|
||||||
|
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||||
|
<tr>
|
||||||
|
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||||
|
<td>{{$line.label}}</td>
|
||||||
|
<td>{{$line.date|date_short}}</td>
|
||||||
|
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||||
|
<td>
|
||||||
|
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{/foreach}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</aside>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -180,15 +230,17 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
{{else}}
|
|
||||||
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $free_amort_lines}}
|
{{if $free_amort_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Il y a des écritures d'amortissement qui ne sont pas rattachées à une immobilisation ! <br />
|
Il y a des écritures d'amortissement qui ne sont pas attachées à une immobilisation ! <br />
|
||||||
Utilisez le bouton « Rattacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.
|
Utilisez le bouton « Attacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $linked_amort == null}}
|
||||||
|
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation ; utilisez le bouton « Enregistrer un amortissement » pour enregistrer un nouvel amortissement</p>
|
||||||
|
{{/if}}
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue