diff --git a/README.md b/README.md index 578af08..e771e69 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,15 @@ Ce module permet de gérer les écritures d'amortissements pour les immobilisati - lister les immobilisations - ajouter une nouvelle immobilisation -- lister les amortissements d'une immobilisation +- lister les amortissements d'une immobilisation : + - amortissements déjà enregistrés + - amortissements à venir +- associer une écriture d'amortissement à une immobilisation - enregistrer un nouvel amortissement -- incorporer d'anciennes immobilisations et leurs amortisements ## Installation - télécharger [l'archive zip](https://link.infini.fr/amortissement) - cliquer « Configuration » puis « Extensions » - en bas de la page, cliquer « Importer un module » - sélectionner l'archive téléchargée ci-dessus -- activer le module - +- activer le module qui est maintenant présent dans la liste des extensions inactives diff --git a/_archives.html b/_archives.html index b5d2cc6..ce92aff 100644 --- a/_archives.html +++ b/_archives.html @@ -153,7 +153,7 @@ {{$account_code}} {{$account_label}} - {{:linkbutton label="Modifier" href="exit_step1.html?immo_doc_id=%s&from=exit"|args:$info_immo.id shape="edit"}} + {{:linkbutton label="Modifier" href="exit_step4.html?immo_doc_id=%s"|args:$info_immo.id shape="edit"}} {{/select}} diff --git a/_common_detach.html b/_common_detach.html index 8c84736..b4e80d0 100644 --- a/_common_detach.html +++ b/_common_detach.html @@ -1,13 +1,12 @@ {{* -*- brindille -*- *}} {{* - Supprimer l'association entre une ligne d'immo et une autre ligne (amort, credit, cession, sortie) + Supprimer l'association entre deux lignes @param immo_doc_id : id du doc associé à la ligne d'immobilisation @param line_id : id de la ligne à détacher *}} - {{* données de l'immobilisation *}} -{{:include file="_get_immo_data.html" immo_doc_id=$immo_doc_id|intval keep="info_immo, ligne_immo, message"}} +{{:include file="_get_immo_data.html" immo_doc_id=$immo_doc_id|intval keep="ligne_immo, message"}} {{if $message != null}} {{:error message=$message}} {{/if}} diff --git a/_compare_version.tpl b/_compare_version.tpl deleted file mode 100644 index 88d8a40..0000000 --- a/_compare_version.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{{* -*- brindille -*- *}} - -{{* - Comparer deux numéros de version n1.n2[.n3] - @param nv1 - @param nv2 - @result comp : -1 si nv1 < nv2, 0 si nv1 = nv2, 1 si nv1 > nv2 -*}} - -{{:assign nv1=$nv1|cat:"."}} -{{:assign nv2=$nv2|cat:"."}} -{{:assign var="tv1" value=$nv1|explode:"."}} -{{:assign var="tv2" value=$nv2|explode:"."}} - -{{:assign comp=0}} -{{:assign i=0}} -{{#foreach from=$tv1 item="e1"}} - {{:assign var="e2" from="tv2.%d"|args:$i}} - {{if $e1 < $e2}} - {{:assign comp=-1}} - {{:break}} - {{elseif $e1 > $e2}} - {{:assign comp=1}} - {{:break}} - {{/if}} - {{:assign i="%d+1"|math:$i}} -{{/foreach}} -{{* - cas où le premier tableau a moins d'éléments que le 2ème - et où les éléments présents dans les deux tableaux sont identiques - *}} -{{if $comp == 0 && $tv1|count < $tv2|count}} - {{:assign comp = -1}} -{{/if}} diff --git a/_get_free_amort.html b/_get_free_amort.html index b3b142f..8a2649b 100644 --- a/_get_free_amort.html +++ b/_get_free_amort.html @@ -2,7 +2,7 @@ {{* lister les amortissement non rattachés à une immo - @param condition + @param filter_condition *}} {{#select line.id as line_id, @@ -18,9 +18,9 @@ FROM acc_transactions_lines AS line INNER JOIN acc_accounts AS account ON account.id = line.id_account INNER JOIN acc_transactions AS trans ON trans.id = line.id_transaction - WHERE credit > 0 AND (NOT trans.status & 16) AND !condition + WHERE credit > 0 AND (NOT trans.status & 16) AND !filter_condition ORDER BY trans.date, trans.label; - !condition=$condition + !filter_condition=$filter_condition assign="amort_line" }} {{* voir s'il existe des lignes d'immo liées à cette ligne d'amortissement *}} diff --git a/_immobilisations.html b/_immobilisations.html index 93648ec..ab4d4d6 100644 --- a/_immobilisations.html +++ b/_immobilisations.html @@ -76,7 +76,7 @@ {{:assign montant_immo=$doc_amount|or:$debit}} {{:assign immo_date = $doc_date_achat|or:$trans_date}} {{:assign label_immo=$doc_label|or:$trans_label}} - {{if $label_immo|strpos:$line_label === false}} + {{if $line_label != null && $line_label != $label_immo}} {{:assign label_immo=$label_immo|cat:" — "|cat:$line_label}} {{/if}} diff --git a/_immobilisations_autres.html b/_immobilisations_autres.html index 383ba12..0401feb 100644 --- a/_immobilisations_autres.html +++ b/_immobilisations_autres.html @@ -86,7 +86,7 @@ !table_join WHERE !condition GROUP BY immo_line_id - ORDER BY trans.date; + ORDER BY trans.date DESC; !columns=$columns !table_join=$table_join !table=$module.table @@ -149,8 +149,6 @@ {{#foreach from=$module.config.filters item="filter"}} {{if $trans_label|strpos:$filter !== false}} {{:assign status="ignored"}} - {{else}} - {{:assign status=""}} {{/if}} {{/foreach}} {{/if}} diff --git a/_nav.html b/_nav.html index a3bf0b8..fac14e4 100644 --- a/_nav.html +++ b/_nav.html @@ -1,32 +1,55 @@ {{* -*- brindille -*- *}}