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 *}}
|
||||
{{: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}}
|
||||
|
||||
{{if $info_immo.status == "amortized"}}
|
||||
{{:assign amort_amount=$solde}}
|
||||
{{:assign valeur_residuelle=0}}
|
||||
{{else}}
|
||||
{{:assign valeur_residuelle=$solde}}
|
||||
{{/if}}
|
||||
{{:assign valeur_residuelle=$solde}}
|
||||
|
||||
{{* 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"}}
|
||||
|
|
@ -122,7 +116,6 @@
|
|||
{{/if}}
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
|
|
@ -145,7 +138,7 @@
|
|||
{{/if}}
|
||||
{{if $valeur_residuelle > 0}}
|
||||
<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>
|
||||
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,6 @@
|
|||
{{/if}}
|
||||
{{: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 *}}
|
||||
{{: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}}
|
||||
|
|
@ -82,7 +78,9 @@
|
|||
{{: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}}
|
||||
{{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}}
|
||||
|
||||
{{* Traiter l'envoi du formulaire *}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue