Ne pas afficher montant par défaut si plus d'un exercice possible
This commit is contained in:
parent
ba3081cf00
commit
3bcd6bcdc8
1 changed files with 12 additions and 6 deletions
|
|
@ -219,13 +219,13 @@
|
|||
|
||||
{{if $years|count == 1}}
|
||||
{{:assign var=selected_year value=$years.0.id}}
|
||||
{{/if}}
|
||||
{{:assign var=date_amort value=$years.0.end_date}}
|
||||
{{:include file="_calcul_dates.html" date_debut=$date_debut date_fin=$date_amort keep="nbjours"}}
|
||||
|
||||
{{* montant de l'amortissement *}}
|
||||
{{:assign montant_amort="%f/%f/365*%d"|math:$ligne_immo.amount:$info_immo.duration:$nbjours|intval}}
|
||||
{{:assign montant_amort="min(%f, %d-%d)"|math:$montant_amort:$ligne_immo.amount:$total_amort}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign var="debit_account.6811" value="6811 — Dot. aux amortissements des immobilisations"}}
|
||||
{{:assign var="credit_account.%s"|args:$code_amort value="%s — "|args:$code_amort|cat:$amort_account_label}}
|
||||
|
||||
|
|
@ -242,7 +242,13 @@
|
|||
{{:input type="select" default=$selected_year name="id_year" label="Exercice" required=true default_empty="— Faire un choix —" options=$open_years}}
|
||||
{{:input type="date" name="date_amort" label="Date" required=true default=$date_amort|date_short}}
|
||||
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}}
|
||||
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort}}
|
||||
{{if $total_amort == 0 || $nbjours < 365 || $nbjours > 366}}
|
||||
{{:assign msg="Montant calculé au prorata du nombre de jours d'amortissement dans l'exercice"}}
|
||||
{{if $nbjours != null}}
|
||||
{{:assign msg=$msg|cat:" (%s)"|args:$nbjours}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{:input type="money" name="montant" label="Montant" required=true default=$montant_amort help=$msg}}
|
||||
{{:input
|
||||
type="list"
|
||||
name="debit_account"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue