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
|
|
@ -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