diff --git a/amortization.html b/amortization.html index ee68bd0..29fdad6 100644 --- a/amortization.html +++ b/amortization.html @@ -24,7 +24,6 @@ {{/select}} {{:assign date_debut=$ligne_immo.date}} {{:assign solde=$ligne_immo.montant}} -{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}} {{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}} {{:assign duree=$duration}} @@ -165,8 +164,8 @@
-
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$ligne_immo.label}}
+
Libellé
+
{{$ligne_immo.label}}
Montant
{{"%f"|math:$ligne_immo.montant|money_currency}}
Début d'amortissement
diff --git a/balance_sheet_exit.html b/balance_sheet_exit.html index b557a8e..ad1a00a 100644 --- a/balance_sheet_exit.html +++ b/balance_sheet_exit.html @@ -67,22 +67,19 @@ {{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$amort_amount}} {{* -lister les exercices ouverts : - - dont la date de fin est postérieure à la date du dernier amortissment - - dont la date de début est antérieure ou égale à la date du jour + lister les exercices qui englobent la date de début du prochain amortissement *}} {{:assign default_exit_date=""}} -{{#years closed=false order="start_date" where=":debut <= end_date" :debut=$date_debut}} +{{#years closed=false order="start_date" where="start_date <= :debut AND :debut <= end_date" + :debut=$date_debut assign=years.}} {{if $start_date|strtotime <= $now && $now <= $end_date|strtotime}} {{:assign default_exit_date=$now|date_short}} {{/if}} - {{if $start_date|strtotime > $now}} - {{:break}} - {{/if}} - {{:assign var="years." id=$id label=$label start_date=$start_date end_date=$end_date}} + {{:assign ts_fin=$end_date|strtotime}} {{:assign debut=$start_date|date_short}} {{:assign fin=$end_date|date_short}} {{:assign var="open_years.%d"|args:$id value=$label|cat:" (du "|cat:$debut|cat:" au "|cat:$fin|cat:")"}} + {{:assign var="years_data.%d"|args:$id value=$ts_debut|cat:" "|cat:$ts_fin}} {{else}} {{:error message="Aucun exercice ouvert pour enregistrer un amortissement"}} {{/years}} @@ -144,7 +141,6 @@ lister les exercices ouverts : {{* vérifier que la date de sortie est située dans un exercice ouvert *}} {{:assign ts_exit = $_POST.date_sortie|parse_date|strtotime}} {{:assign ok=false}} - {{:assign msg_amort=""}} {{#foreach from=$years}} {{if $id == $_POST.id_year}} {{:assign selected_year=$id}} @@ -153,24 +149,16 @@ lister les exercices ouverts : {{:break}} {{/if}} {{/if}} - {{* voir si des amortissements ont été oubliés *}} - {{if $start_date|strtotime > $amort_line.last_amort_date|strtotime && $end_date|strtotime < $now}} - {{:assign debut=$start_date|date_short}} - {{:assign fin=$end_date|date_short}} - {{:assign msg_amort=$msg_amort|cat:"\n"|cat:" - "|cat:$label|cat:" : du "|cat:$debut|cat:" au "|cat:$fin}} - {{/if}} {{/foreach}} {{if ! $ok}} {{:error message="La date choisie n'est pas dans l'exercice sélectionné !"}} {{/if}} - {{if $msg_amort != ""}} - {{:error message="Vous devez d'abord enregistrer les amortissements des exercices suivants : %s"|args:$msg_amort}} - {{/if}} {{:redirect to="compute_exit_data.html?immo_id=%s&amort_amount=%s&year=%s&date_mes=%s&date_debut=%s&exit_date=%s&duree_amort=%s"|args:$_GET.immo_id:$amort_amount:$selected_year:$ts_mes:$ts_debut:$ts_exit:$duree_amort}} {{/form}} {{:admin_header title="Sortie de bilan" custom_css="./style.css" current="module_amortissement"}} + {{* barre de navigation *}} {{if ! $dialog}} {{:include file="_nav.html" current="index" subcurrent="%s"|args:$_GET.type_immo subsubcurrent="balance_exit"}} diff --git a/defaut.json b/defaut.json index 498a835..5c00d9b 100644 --- a/defaut.json +++ b/defaut.json @@ -3,7 +3,6 @@ "prefixes": { "20": "Immobilisations incorporelles", "21": "Immobilisations corporelles", - "23": "Immobilisations en cours", "27": "Immobilisations financières" } }