From 7903afbd0cabd92b8b08ae1fd84b3ba093cdbee6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 15 Jun 2026 12:13:24 +0200 Subject: [PATCH] Simplification navigation --- _nav.html | 56 ++++++++++++---------------------------- add_asset.html | 2 +- add_infos.html | 2 +- amortization.html | 37 +++++++++++--------------- attach_amort.html | 2 +- attach_credit.html | 5 ++-- balance_sheet_exit.html | 8 +++++- compute_exit_data.html | 11 ++++++-- index.html | 2 +- link_immo.html | 5 ++-- modify_infos.html | 2 +- other_amortizations.html | 5 ++-- save_amort.html | 22 +++++++++++++--- transfer.html | 2 +- write_exit.html | 7 ++++- 15 files changed, 84 insertions(+), 84 deletions(-) diff --git a/_nav.html b/_nav.html index fac14e4..c81e1f3 100644 --- a/_nav.html +++ b/_nav.html @@ -1,55 +1,31 @@ {{* -*- brindille -*- *}} {{if $linked_amort != null}} diff --git a/attach_amort.html b/attach_amort.html index 5c2951c..738a3c0 100644 --- a/attach_amort.html +++ b/attach_amort.html @@ -134,7 +134,7 @@ {{* barre de navigation *}} {{if ! $dialog}} - {{:include file="_nav.html" current="config" subcurrent="init" subsubcurrent="parameter"}} + {{:include file="_nav.html" current="managed" subcurrent="attach_amort"}} {{/if}} {{:form_errors}} diff --git a/attach_credit.html b/attach_credit.html index 6e8d22a..276dc76 100644 --- a/attach_credit.html +++ b/attach_credit.html @@ -115,9 +115,8 @@ {{if ! $dialog}} {{:include file="_nav.html" - current="config" - subcurrent="other" - subsubcurrent="immo" + current="managed" + subcurrent="attach_credit" type_immo="other" }} {{/if}} diff --git a/balance_sheet_exit.html b/balance_sheet_exit.html index 2b4cf6b..d844c91 100644 --- a/balance_sheet_exit.html +++ b/balance_sheet_exit.html @@ -10,6 +10,12 @@ {{if $message != null}} {{:error message=$message}} {{/if}} +{{* TODO VÉRIFIER SI UTILE *}} +{{* +{{if $info_immo.duration == null || $info_immo.duration == 0}} + {{:error message="Vous devez renseigner la durée d'amortissement au préalable"}} +{{/if}} +*}} {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} {{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}} @@ -135,7 +141,7 @@ {{:admin_header title="Sortie de bilan" custom_css="./style.css" current="module_amortization"}} {{if ! $dialog}} - {{:include file="_nav.html" current="index" subcurrent="%s"|args:$_GET.type_immo subsubcurrent="balance_exit"}} + {{:include file="_nav.html" current="%s"|args:$_GET.type_immo subcurrent="balance_exit"}} {{/if}} {{:form_errors}} diff --git a/compute_exit_data.html b/compute_exit_data.html index 7caf90b..c824af5 100644 --- a/compute_exit_data.html +++ b/compute_exit_data.html @@ -9,7 +9,9 @@ @param date_debut : date de début de la période d'amortissement complémentaire @param exit_date : date de sortie de l'immobilisation *}} -{{* TODO *}} + +{{* TODO boutons de navigation avant-arrière*}} + {{* données de l'immobilisation *}} {{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id|intval keep="info_immo, ligne_immo, message"}} {{if $message != null}} @@ -58,7 +60,12 @@ {{* barre de navigation *}} {{if ! $dialog}} - {{:include file="_nav.html" current="index" subcurrent="balance_exit"}} + {{if $valeur_nette > 0}} + {{:assign type_immo="managed"}} + {{else}} + {{:assign type_immo="amortized"}} + {{/if}} + {{:include file="_nav.html" current="%s"|args:$type_immo subcurrent="balance_exit"}} {{/if}} {{:form_errors}} diff --git a/index.html b/index.html index 5007c48..f2fab2e 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ {{:admin_header title="Immobilisations en cours de constitution" custom_css="./style.css" current="module_amortization" subcurrent="unfinished"}} {{/if}} -{{:include file="_nav.html" current="index" subcurrent=$type_immo}} +{{:include file="_nav.html" current=$type_immo}} {{if $_GET.ok}} {{if $_GET.msg|match:"immobilisation"}} diff --git a/link_immo.html b/link_immo.html index 77f5cd1..ddee4dd 100644 --- a/link_immo.html +++ b/link_immo.html @@ -51,9 +51,8 @@ {{if ! $dialog}} {{:include file="_nav.html" - current="config" - subcurrent="other" - subsubcurrent="immo" + current="managed" + subcurrent="link_immo" type_immo="other" }} {{/if}} diff --git a/modify_infos.html b/modify_infos.html index 5b89e91..7694e83 100644 --- a/modify_infos.html +++ b/modify_infos.html @@ -153,7 +153,7 @@ {{:admin_header title="Modifier l'immobilisation" custom_css="./style.css" current="module_amortization"}} {{if ! $dialog}} - {{:include file="_nav.html" current="index" subcurrent="%s"|args:$_GET.type_immo subsubcurrent="parameter"}} + {{:include file="_nav.html" current="managed" subcurrent="modify_infos"}} {{/if}} {{:form_errors}} diff --git a/other_amortizations.html b/other_amortizations.html index bc5b2c5..8716a25 100644 --- a/other_amortizations.html +++ b/other_amortizations.html @@ -38,9 +38,8 @@ {{if ! $dialog}} {{:include file="_nav.html" - current="index" - subcurrent="managed" - subsubcurrent="amortization" + current="managed" + subcurrent="amortization" type_immo="managed" autres_amort=$free_amort_lines }} diff --git a/save_amort.html b/save_amort.html index 1705579..224d52e 100644 --- a/save_amort.html +++ b/save_amort.html @@ -65,7 +65,7 @@ *}} {{:assign msg_years=""}} {{#years closed=false order="start_date" where="start_date <= :debut AND :debut <= end_date" - :debut=$date_debut assign=years.}} + :debut=$date_debut assign="years."}} {{if $total_amort == 0}} {{:assign ts_debut=$date_debut|strtotime}} {{else}} @@ -178,6 +178,20 @@ {{* enregistrer la liaison des lignes *}} {{#foreach from=$result.lines item="line"}} {{if $line.account_code == $credit_account|keys|value:0}} + {{* TODO VOIR SI CORRECT ET UTILE *}} + {{* + vérifier la présence d'un doc avec cette ligne d'amortissement + (cas de la suppression manuelle d'un amortissement) + *}} + + {{#load type="amort_link" where="$$.amort_line_id = :amort_line_id" :amort_line_id=$line.id debug=true assign="info_amort"}} + {{:debug info_amort=$info_amort}} + {{:assign uuid=$key}} + {{:break}} + {{else}} + {{:assign uuid=""|uuid}} + {{/load}} +{{:debug uuid=$uuid}} {{:save key=""|uuid type="amort_link" @@ -205,12 +219,14 @@ {{* barre de navigation *}} {{if ! $dialog}} - {{:include file="_nav.html" current="index" subcurrent="managed" subsubcurrent="amortization"}} + {{:include file="_nav.html" current="managed" subcurrent="amortization"}} {{/if}} {{:form_errors}} -{{:assign var=selected_year value=$years.0.id}} +{{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"}} diff --git a/transfer.html b/transfer.html index a9c9f50..17d3b31 100644 --- a/transfer.html +++ b/transfer.html @@ -192,7 +192,7 @@ {{:admin_header title="Transfert d'immobilisation en cours" custom_css="./style.css" current="module_amortization"}} {{if ! $dialog}} - {{:include file="_nav.html" current="index" subcurrent="unfinished" subsubcurrent="transfer"}} + {{:include file="_nav.html" current="unfinished" subcurrent="transfer"}} {{/if}} {{:form_errors}} diff --git a/write_exit.html b/write_exit.html index 0a17d3b..beb6e68 100644 --- a/write_exit.html +++ b/write_exit.html @@ -267,7 +267,12 @@ {{:admin_header title="Sortie du bilan" custom_css="./style.css" current="module_amortization"}} {{if ! $dialog}} - {{:include file="_nav.html" current="index" subcurrent="balance_exit"}} + {{if $valeur_nette > 0}} + {{:assign type_immo="managed"}} + {{else}} + {{:assign type_immo="amortized"}} + {{/if}} + {{:include file="_nav.html" current="%s"|args:$type_immo subcurrent="balance_exit"}} {{/if}} {{*