Compare commits
No commits in common. "main" and "simplification_liens" have entirely different histories.
main
...
simplifica
12 changed files with 13 additions and 57 deletions
|
|
@ -4,7 +4,7 @@
|
|||
{{if $subcurrent == null}}
|
||||
{{if $current == "managed" || $current == "amortized" || $current == "archived"}}
|
||||
<aside>
|
||||
{{:linkbutton label="Ajouter une immobilisation" shape="plus" href="add_asset.html?from=%s"|args:$current}}
|
||||
{{:linkbutton label="Ajouter une immobilisation" shape="plus" href="add_asset.html"}}
|
||||
</aside>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
{{:assign line_id=$type|cat:"_line_id"}}
|
||||
{{#load type=$link_type assign="link"}}
|
||||
{{:assign new_link=null}}
|
||||
{{:assign var="new_link.key" value=$link.key}}
|
||||
{{:assign var="new_link.key value=$link.key}}
|
||||
{{:assign var="new_link.type" value=$link.type}}
|
||||
{{:assign var="new_link.immo_doc_id" value=$link.immo_doc_id}}
|
||||
{{:assign var="new_link.line_id" from="link.%s"|args:$line_id}}
|
||||
|
|
|
|||
|
|
@ -20,12 +20,6 @@
|
|||
{{* Traiter l'envoi du formulaire *}}
|
||||
{{#form on="add"}}
|
||||
{{* vérifier que la date d'achat est située dans un l'exercice sélectionné *}}
|
||||
{{if $_POST.date_achat|parse_date === false}}
|
||||
{{:error message="Erreur : la date d'achat (%s) est invalide"|args:$_POST.date_achat}}
|
||||
{{/if}}
|
||||
{{if $_POST.date_mes|parse_date === false}}
|
||||
{{:error message="Erreur : la date de mise en service (%s) est invalide"|args:$_POST.date_mes}}
|
||||
{{/if}}
|
||||
{{:assign ts_date = $_POST.date_achat|parse_date|strtotime}}
|
||||
{{:assign ok=false}}
|
||||
{{#foreach from=$years}}
|
||||
|
|
@ -99,12 +93,7 @@
|
|||
{{:assign da=$_POST.date_achat|date_short}}
|
||||
{{:error message="Erreur : la date de mise en service (%s) ne peut être antérieure à la date d'acquisition (%s)"|args:$dd:$da}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign duration=$_POST.duree|intval}}
|
||||
{{if $duration <= 0}}
|
||||
{{:error message="Erreur : la durée d'amortissement doit être strictement positive"}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign status="managed"}}
|
||||
{{if $_POST.date_mes == null || $_POST.date_mes == $_POST.date_achat}}
|
||||
{{:assign date_mes=null}}
|
||||
|
|
@ -162,7 +151,7 @@
|
|||
|
||||
{{* barre de navigation *}}
|
||||
{{if ! $dialog}}
|
||||
{{:linkbutton href="index.html?type_immo=%s"|args:$_GET.from label="Retour" shape="left"}}
|
||||
{{:linkbutton href="index.html" label="Retour" shape="left"}}
|
||||
{{/if}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
|
|
|||
|
|
@ -73,12 +73,6 @@
|
|||
{{:redirect force="exit_step1.html?immo_doc_id=%s&from=exit"|args:$immo_doc_id}}
|
||||
{{else}}
|
||||
{{* immobilisation amortissable *}}
|
||||
{{if $_POST.date_achat|parse_date === false}}
|
||||
{{:error message="Erreur : la date d'achat (%s) est invalide"|args:$_POST.date_achat}}
|
||||
{{/if}}
|
||||
{{if $_POST.date_mes|parse_date === false}}
|
||||
{{:error message="Erreur : la date de mise en service (%s) est invalide"|args:$_POST.date_mes}}
|
||||
{{/if}}
|
||||
{{if $_POST.date_achat|parse_date > $ligne_immo.date_achat}}
|
||||
{{:assign da=$ligne_immo.date_achat|date_short}}
|
||||
{{:error message="Erreur : la date d'achat (%s) ne peut être postérieure à la date de l'écriture d'immobilisation (%s)"|args:$_POST.date_achat:$da}}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
{{* Traiter l'envoi du formulaire *}}
|
||||
{{#form on="save"}}
|
||||
|
||||
{{if $_POST.montant == null || $_POST.montant == 0}}
|
||||
{{if $_POST.montant == null}}
|
||||
{{if $montant_affecte == 0}}
|
||||
{{:assign saved_credit=null}}
|
||||
{{:assign montant_credit=$credit_line.amount}}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@
|
|||
{{:assign amort_number=$linked_amort|count}}
|
||||
|
||||
{{#foreach from=$linked_amort|ksort item="line"}}
|
||||
{{if $first_amort_date == null}}
|
||||
{{:assign first_amort_date=$line.date}}
|
||||
{{/if}}
|
||||
{{if $last_amort_date == null}}
|
||||
{{:assign last_amort_date=$line.date}}
|
||||
{{elseif $line.date > $last_amort_date}}
|
||||
|
|
@ -79,15 +82,11 @@
|
|||
{{* Traiter l'envoi du formulaire *}}
|
||||
{{#form on="proceed"}}
|
||||
|
||||
{{* vérifier la validité de la date de sortie *}}
|
||||
{{if $_POST.date_sortie == null}}
|
||||
{{:error message="Vous devez renseigner la date de sortie"}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_sortie|parse_date === false}}
|
||||
{{:error message="Erreur : la date de sortie (%s) est invalide"|args:$_POST.date_sortie}}
|
||||
{{/if}}
|
||||
|
||||
{{* vérifier la validité de la date de sortie *}}
|
||||
{{if $info_immo.date_mes != null}}
|
||||
{{if $_POST.date_sortie|parse_date < $info_immo.date_mes}}
|
||||
{{:assign immo_date=$info_immo.date_mes|date_short}}
|
||||
|
|
@ -97,7 +96,6 @@
|
|||
{{:assign immo_date=$ligne_immo.date_achat|date_short}}
|
||||
{{:error message="La date de sortie doit être postérieure à la date d'acquisition de l'immobilisation (%s)"|args:$immo_date}}
|
||||
{{/if}}
|
||||
|
||||
{{if $amort_number != 0 && $_POST.date_sortie|parse_date <= $last_amort_date}}
|
||||
{{:assign last_amort_date=$last_amort_date|date_short}}
|
||||
{{:error message="La date de sortie doit être postérieure à la date du dernier amortissement (%s)"|args:$last_amort_date}}
|
||||
|
|
@ -105,7 +103,6 @@
|
|||
|
||||
{{:assign ts_exit = $_POST.date_sortie|parse_date|strtotime}}
|
||||
{{:assign exercice_ok=false}}
|
||||
|
||||
{{* vérifier que la date de sortie est dans l'exercice choisi *}}
|
||||
{{#foreach from=$years item="current_year"}}
|
||||
{{if $current_year.id == $_POST.id_year}}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
{{:assign type_immo=$_GET.type_immo}}
|
||||
{{/if}}
|
||||
|
||||
{{if $type_immo == "amortized"}}
|
||||
{{if $type_immo == "managed"}}
|
||||
{{:admin_header title="Immobilisations en cours d'amortissement" custom_css="./style.css" current="module_amortization"}}
|
||||
{{elseif $type_immo == "amortized"}}
|
||||
{{:admin_header title="Immobilisations amorties" custom_css="./style.css" current="module_amortization"}}
|
||||
{{elseif $type_immo == "archived"}}
|
||||
{{:admin_header title="Immobilisations archivées" custom_css="./style.css" current="module_amortization"}}
|
||||
|
|
@ -15,9 +17,6 @@
|
|||
{{:admin_header title="Immobilisations à classer" custom_css="./style.css" current="module_amortization"}}
|
||||
{{elseif $type_immo == "unfinished"}}
|
||||
{{:admin_header title="Immobilisations en cours de constitution" custom_css="./style.css" current="module_amortization" subcurrent="unfinished"}}
|
||||
{{else}}
|
||||
{{:assign type_immo="managed"}}
|
||||
{{:admin_header title="Immobilisations en cours d'amortissement" custom_css="./style.css" current="module_amortization"}}
|
||||
{{/if}}
|
||||
{{:include file="_nav.html" current=$type_immo}}
|
||||
|
||||
|
|
@ -47,7 +46,7 @@
|
|||
{{:include file="_archives.html"}}
|
||||
{{elseif $type_immo == "unfinished"}}
|
||||
{{:include file="_unfinished.html"}}
|
||||
{{else}}
|
||||
{{elseif $type_immo == "managed" || $type_immo == "amortized"}}
|
||||
{{:include file="_immobilisations.html"}}
|
||||
{{/if}}
|
||||
{{:admin_footer}}
|
||||
|
|
|
|||
|
|
@ -34,18 +34,6 @@
|
|||
|
||||
{{* traiter la saisie *}}
|
||||
{{#form on="save"}}
|
||||
{{if $_POST.date_achat == null || $_POST.date_achat|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_achat=null}}
|
||||
{{else}}
|
||||
{{:assign date_achat=$_POST.date_achat|parse_date}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_mes == null || $_POST.date_mes == $_POST.date_achat}}
|
||||
{{:assign date_mes=null}}
|
||||
{{else}}
|
||||
{{:assign date_mes=$_POST.date_mes|parse_date}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_achat|parse_date > $ligne_immo.date_achat}}
|
||||
{{:assign da=$ligne_immo.date_achat|date_short}}
|
||||
{{:error message="Erreur : la date d'achat (%s) ne peut être postérieure à la date de l'écriture d'immobilisation (%s)"|args:$_POST.date_achat:$da}}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
name="Amortissements"
|
||||
description="Immobilisations et amortissements\nversion 0.42.2"
|
||||
description="Immobilisations et amortissements\nversion 0.42"
|
||||
author="Jean-Christophe Engel"
|
||||
author_url="https://gitea.zaclys.com/lesanges"
|
||||
home_button=false
|
||||
|
|
|
|||
|
|
@ -93,9 +93,6 @@
|
|||
{{* Traiter l'envoi du formulaire *}}
|
||||
{{#form on="save"}}
|
||||
{{* vérifier que la date est située dans un exercice compatible *}}
|
||||
{{if $_POST.date_amort|parse_date === false}}
|
||||
{{:error message="Erreur : la date d'amortissement (%s) est invalide"|args:$_POST.date_amort}}
|
||||
{{/if}}
|
||||
{{:assign ts_date = $_POST.date_amort|parse_date|strtotime}}
|
||||
{{:assign ok=false}}
|
||||
{{#foreach from=$years}}
|
||||
|
|
|
|||
|
|
@ -69,9 +69,6 @@
|
|||
{{* Traiter l'envoi du formulaire *}}
|
||||
{{#form on="transfer"}}
|
||||
{{* vérifier que la date de mise en service est postérieure aux dates d'acquisition *}}
|
||||
{{if $_POST.date_mes|parse_date === false}}
|
||||
{{:error message="Erreur : la date de mise en service (%s) est invalide"|args:$_POST.date_mes}}
|
||||
{{/if}}
|
||||
{{if $_POST.date_mes|parse_date < $max_date}}
|
||||
{{:assign dacq=$max_date|date_short}}
|
||||
{{:error message="La date de mise en service (%s) doit être postérieure à la date d'acquisition d'immobilisation la plus récente (%s) !"|args:$_POST.date_mes:$dacq}}
|
||||
|
|
@ -99,9 +96,6 @@
|
|||
{{:assign status="ignored"}}
|
||||
{{else}}
|
||||
{{:assign duration=$_POST.duree|intval}}
|
||||
{{if $duration <= 0}}
|
||||
{{:error message="Erreur : la durée d'amortissement doit être strictement positive"}}
|
||||
{{/if}}
|
||||
{{:assign status="managed"}}
|
||||
{{/if}}
|
||||
|
||||
|
|
|
|||
|
|
@ -320,8 +320,6 @@
|
|||
:year_id = $_GET.year
|
||||
}}
|
||||
{{:assign chart_id=$id}}
|
||||
{{else}}
|
||||
{{:error message="Pas de plan comptable pour l'exercice %s"|args:$_GET.year}}
|
||||
{{/select}}
|
||||
|
||||
{{#select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue