Simplification traitement immo amortie pour cas suppression écriture amortissement
This commit is contained in:
parent
83c9fcb7cd
commit
dde5240860
2 changed files with 5 additions and 14 deletions
|
|
@ -29,13 +29,7 @@
|
||||||
{{* 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="linked_immos, 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}}
|
||||||
|
{{:assign valeur_residuelle=$solde}}
|
||||||
{{if $info_immo.status == "amortized"}}
|
|
||||||
{{:assign amort_amount=$solde}}
|
|
||||||
{{:assign valeur_residuelle=0}}
|
|
||||||
{{else}}
|
|
||||||
{{:assign valeur_residuelle=$solde}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{* lister les amortissements liés à l'immobilisation *}}
|
{{* lister les amortissements liés à l'immobilisation *}}
|
||||||
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort, created_amort"}}
|
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort, created_amort"}}
|
||||||
|
|
@ -122,7 +116,6 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -145,7 +138,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $valeur_residuelle > 0}}
|
{{if $valeur_residuelle > 0}}
|
||||||
<dt>Montant des amortissements</dt>
|
<dt>Montant des amortissements</dt>
|
||||||
<dd>{{"%d-%d"|math:$solde:$valeur_residuelle|money_currency_html:false|raw}}</dd>
|
<dd>{{$total_amort|money_currency_html:false|raw}}</dd>
|
||||||
<dt>Valeur nette résiduelle</dt>
|
<dt>Valeur nette résiduelle</dt>
|
||||||
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
|
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,6 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign var="amort_label" value="Amortissement %s"|args:$amort_label}}
|
{{:assign var="amort_label" value="Amortissement %s"|args:$amort_label}}
|
||||||
|
|
||||||
{{if $info_immo.status == "amortized" || $info_immo.status == "archived"}}
|
|
||||||
{{:error message="Cette immobilisation est complètement amortie ; il est impossible d'ajouter une écriture d'amortissement"}}
|
|
||||||
{{/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="total_credits"}}
|
||||||
{{:assign var="ligne_immo.amount" value="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
{{:assign var="ligne_immo.amount" value="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
||||||
|
|
@ -82,7 +78,9 @@
|
||||||
{{:assign var="years_data.%d"|args:$id value=$ts_debut|cat:" "|cat:$ts_fin}}
|
{{:assign var="years_data.%d"|args:$id value=$ts_debut|cat:" "|cat:$ts_fin}}
|
||||||
{{:assign msg_years=$msg_years|cat:"\n"|cat:" - "|cat:$label|cat:" : "|cat:$debut|cat:" à "|cat:$fin}}
|
{{:assign msg_years=$msg_years|cat:"\n"|cat:" - "|cat:$label|cat:" : "|cat:$debut|cat:" à "|cat:$fin}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:error message="Aucun exercice ouvert pour enregistrer un amortissement"}}
|
{{:assign date_debut=$date_debut|date_short}}
|
||||||
|
{{:assign msg="Pas d'exercice ouvert pour enregistrer un amortissement à partir du %s"|args:$date_debut}}
|
||||||
|
{{:error message=$msg}}
|
||||||
{{/years}}
|
{{/years}}
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue