Correction erreur date début amortissement importé depuis balance initiale
This commit is contained in:
parent
d149a85018
commit
3173b06cf1
2 changed files with 10 additions and 6 deletions
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
{{:assign ts_debut=$date_debut|strtotime}}
|
||||
{{:assign ts_fin=$date_fin|strtotime}}
|
||||
{{:assign nbjours="1+abs(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}}
|
||||
{{:assign nbjours="round(1+abs(%d-%d)/(60*60*24), 0)"|math:$ts_fin:$ts_debut}}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@
|
|||
{{:assign amort_label=$line_label|or:$trans_label}}
|
||||
{{/foreach}}
|
||||
|
||||
{{* date de début du 1er exercice dans paheko *}}
|
||||
{{#years order="start_date" limit=1}}
|
||||
{{:assign first_date=$start_date}}
|
||||
{{/years}}
|
||||
|
||||
{{if $total_amort == 0}}
|
||||
{{* 1er amortissement *}}
|
||||
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
||||
|
|
@ -55,8 +60,10 @@
|
|||
{{:assign var=libelle value="Amortissement %s"|args:$ligne_immo.trans_label}}
|
||||
{{else}}
|
||||
{{* amortissements suivants *}}
|
||||
{{:assign date_debut=$date_debut|strtotime}}
|
||||
{{:assign date_debut="%d+(60*60*24)"|math:$date_debut|date:"Y-m-d"}}
|
||||
{{if $date_debut != $first_date}}
|
||||
{{:assign date_debut=$date_debut|strtotime}}
|
||||
{{:assign date_debut="%d+(60*60*24)"|math:$date_debut|date:"Y-m-d"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
|
|
@ -244,9 +251,6 @@
|
|||
{{:input type="text" name="designation" label="Libellé" required=true default=$amort_label size="50"}}
|
||||
{{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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue