diff --git a/_archives.html b/_archives.html index be33053..8a8f8ad 100644 --- a/_archives.html +++ b/_archives.html @@ -34,7 +34,6 @@ Montant N° compte Compte - Projet @@ -54,13 +53,11 @@ line.debit AS debit, account.id as account_id, account.code as account_code, - account.label as account_label, - project.label as project_label + account.label as account_label FROM acc_transactions AS trans INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id INNER JOIN acc_accounts AS account ON line.id_account = account.id INNER JOIN acc_years AS years ON trans.id_year = years.id - LEFT JOIN acc_projects AS project ON line.id_project = project.id WHERE !condition ORDER BY trans.date DESC; !condition=$condition @@ -155,8 +152,8 @@ {{"%f"|math:$montant_immo|money_html:false|raw}} {{$account_code}} {{$account_label}} - {{$project_label}} + {{:linkbutton label="Modifier" href="exit_step3.html?immo_doc_id=%s"|args:$info_immo.id shape="edit"}} {{/select}} diff --git a/_get_credit_lines.html b/_get_credit_lines.html index 2bef7fb..c06adc5 100644 --- a/_get_credit_lines.html +++ b/_get_credit_lines.html @@ -3,8 +3,8 @@ {{* chercher des écritures liées à l'immo paramètre au crédit du même compte @param immo_doc_id : id du doc associé à l'immobilisation - @param linked_immos : liste des écritures liées - @param total_credits : montant total des écritures + @result linked_immos : liste des écritures liées + @result total_credits : montant total des écritures *}} {{:assign linked_immos=null}} {{:assign total_credits=0}} @@ -14,14 +14,19 @@ line.id as line_id, trans.id as trans_id, trans.label, - trans.date + trans.date, + trans.id_year as year, + account.id as account_id, + account.code as account_code, + account.label as account_label FROM acc_transactions_lines AS line INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id + INNER join acc_accounts AS account on line.id_account = account.id WHERE line.id = :credit_line_id; :credit_line_id=$credit_line_id }} {{:assign credit=$credit}} - {{:assign var="linked_immos." doc=$id trans_id=$trans_id credit_line_id=$line_id label=$label amount=$credit date=$date}} + {{:assign var="linked_immos." doc=$id trans_id=$trans_id credit_line_id=$line_id label=$label amount=$credit date=$date account_id=$account_id account_code=$account_code account_label=$account_label year=$year}} {{/select}} {{if $amount == null}} {{:assign total_credits="%d+%d"|math:$total_credits:$credit}} diff --git a/_immobilisations_autres.html b/_immobilisations_autres.html index 992e20c..bacef59 100644 --- a/_immobilisations_autres.html +++ b/_immobilisations_autres.html @@ -172,8 +172,8 @@ label="Paramètres" href="add_infos.html?immo_line_id=%s"|args:$immo_line_id shape="settings" + target="_dialog" }} -{{* target="_dialog"*}} {{/foreach}} diff --git a/add_infos.html b/add_infos.html index 382025b..d78097c 100644 --- a/add_infos.html +++ b/add_infos.html @@ -1,21 +1,22 @@ {{* -*- brindille -*- *}} {{* + Classer une immobilisation non prise en charge @param immo_line_id - - TODO ? : - - séparer les cas des immo simples et complexes (BOI) - par exemple pour la durée d'amort par défaut {{:input ...}} - - prise en charge immo => param = immo_line_id - - modif param immo => param = immo_doc_id *}} -{{* cas de la prise en charge *}} {{* données de l'immobilisation *}} {{:assign montant_affecte=0}} {{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_line_id|intval assign="info_immo"}} {{:assign montant_affecte="%d+%d"|math:$montant_affecte:$amount}} {{/load}} +{{if $info_immo != null}} + {{:assign date_defaut=$info_immo.date}} + {{:assign duree_defaut=$info_immo.duration}} + {{:assign choix_defaut=$info_immo.status}} +{{else}} + {{:assign duree_defaut=null}} +{{/if}} {{#select trans.id as immo_trans_id, @@ -59,7 +60,7 @@ type="immo" line=$_GET.immo_line_id|intval duration=0 - status="archived" + status="managed" assign_new_id="immo_doc_id" }} {{:redirect force="exit_step1.html?immo_doc_id=%s"|args:$immo_doc_id}} @@ -139,7 +140,7 @@ status=$status }} - {{if $_POST.amortir}} + {{if $_POST.classify == "managed"}} {{:assign type_immo="managed"}} {{else}} {{:assign type_immo="other"}} @@ -219,6 +220,7 @@ function toggleInputs(event) { const managed = classement_immo.querySelector('input[type=radio][value=managed]'); if (managed.checked) { g.toggle('.masquable', true); + document.getElementById('f_duree').focus(); } else { g.toggle('.masquable', false); } diff --git a/amortization.html b/amortization.html index 3efc74f..2613641 100644 --- a/amortization.html +++ b/amortization.html @@ -27,7 +27,7 @@ {{/if}} {{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}} -{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}} +{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_immos, total_credits"}} {{:assign solde="%d-%d"|math:$ligne_immo.amount:$total_credits}} {{if $info_immo.status == "amortized"}} @@ -42,7 +42,7 @@ {{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$total_amort}} {{if $valeur_residuelle > 0}} - {{* lister les amortissements non rattachés à une immo *}} + {{* lister les amortissements non attachés à une immo *}} {{:include file="./_get_free_amort.html" filter_condition="1" keep="free_amort_lines"}} {{/if}} @@ -69,10 +69,14 @@ }} {{if $_GET.ok}} - {{if $_GET.msg|match:"attach"}} - {{:assign msg="Attachement amortissement %s effectué"|args:$_GET.trans_id}} - {{elseif $_GET.msg|match:"detach"}} - {{:assign msg="Détachement amortissement %s affectué"|args:$_GET.trans_id}} + {{if $_GET.msg|match:"attach_amort"}} + {{:assign msg="Attachement amortissement effectué"}} + {{elseif $_GET.msg|match:"detach_amort"}} + {{:assign msg="Détachement amortissement affectué"}} + {{elseif $_GET.msg|match:"attach_avoir"}} + {{:assign msg="Attachement avoir affectué"}} + {{elseif $_GET.msg|match:"detach_avoir"}} + {{:assign msg="Détachement avoir affectué"}} {{elseif $_GET.msg|match:"amortissement"}} {{:assign msg="Amortissement enregistré"}} {{/if}} @@ -104,6 +108,49 @@ + + +{{if $linked_immos != null}} + +{{/if}} +
Immobilisation
@@ -180,15 +227,17 @@ -{{else}} -

Aucun amortissement enregistré pour cette immobilisation

{{/if}} {{if $free_amort_lines}}

- Il y a des écritures d'amortissement qui ne sont pas rattachées à une immobilisation !
- Utilisez le bouton « Rattacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation. + Il y a des écritures d'amortissement qui ne sont pas attachées à une immobilisation !
+ Utilisez le bouton « Attacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.

{{/if}} + +{{if $linked_amort == null}} +

Aucun amortissement enregistré pour cette immobilisation ; utilisez le bouton « Enregistrer un amortissement » pour enregistrer un nouvel amortissement

+{{/if}} {{:form_errors}} {{:admin_footer}} diff --git a/attach_amort.html b/attach_amort.html index 755ff70..adf9e5c 100644 --- a/attach_amort.html +++ b/attach_amort.html @@ -144,9 +144,9 @@ {{/if}} {{if $_GET.from == "exit"}} - {{:redirect to="exit_step2.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}} + {{:redirect force="exit_step2.html?immo_doc_id=%s&ok=1&msg=attach_amort"|args:$_GET.immo_doc_id}} {{else}} - {{:redirect to="amortization.html?immo_doc_id=%s&type_immo=%s&ok=1&msg=attach_amort"|args:$_GET.immo_doc_id:$status}} + {{:redirect force="amortization.html?immo_doc_id=%s&type_immo=%s&ok=1&msg=attach_amort"|args:$_GET.immo_doc_id:$status}} {{/if}} {{/form}} diff --git a/attach_credit.html b/attach_credit.html index 7cd7b16..5028718 100644 --- a/attach_credit.html +++ b/attach_credit.html @@ -125,11 +125,11 @@ {{/if}} {{if $_GET.from == "exit"}} - {{:redirect force="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}} + {{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}} {{else}} - {{:redirect to="amortization.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}} + {{:redirect force="details_immo.html?immo_doc_id=%s&ok=1&msg=attach_credit"|args:$_GET.immo_doc_id}} + {{*:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id*}} {{/if}} -{{*:redirect to="details_immo.html?immo_doc_id=%s&ok=1&msg=attach_credit"|args:$_GET.immo_doc_id*}} {{/form}} {{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}} diff --git a/delete_infos.html b/delete_infos.html index 6ec1875..8af819c 100644 --- a/delete_infos.html +++ b/delete_infos.html @@ -20,10 +20,9 @@ {{#select trans.id FROM acc_transactions_lines AS line - INNER JOIN !table ON $$.credit_line_id = line.id + INNER JOIN !table AS credit_link ON $$.credit_line_id = line.id INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id - WHERE $$.type = - "credit_link" AND $$.immo_doc_id = :immo_doc_id + WHERE $$.type = "credit_link" AND $$.immo_doc_id = :immo_doc_id ; !table = $module.table :immo_doc_id = $_GET.immo_doc_id|intval @@ -60,8 +59,7 @@ }} {{* supprimer les docs de liaison *}} - {{:delete type="immo_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval}} - + {{:delete type="credit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval}} {{/if}} {{* supprimer les infos de l'immobilisation *}} diff --git a/detach_amort.html b/detach_amort.html index 14be3bc..eba97ee 100644 --- a/detach_amort.html +++ b/detach_amort.html @@ -26,7 +26,7 @@ }} {{if $_GET.from == "exit"}} - {{:redirect to="exit_step2.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}} + {{:redirect force="exit_step2.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id}} {{else}} - {{:redirect to="amortization.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id:}} + {{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id:}} {{/if}} diff --git a/detach_credit.html b/detach_credit.html index fb13fcc..1abc8d9 100644 --- a/detach_credit.html +++ b/detach_credit.html @@ -25,8 +25,8 @@ }} {{if $_GET.from == "exit"}} - {{:redirect to="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}} + {{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id}} {{else}} - {{:redirect to="amortization.html?immo_doc_id=%s&ok=1&msg=detach_avoir&"|args:$_GET.immo_doc_id}} + {{:redirect force="details_immo.html?immo_doc_id=%s&ok=1&msg=detach&"|args:$_GET.immo_doc_id}} + {{*:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id*}} {{/if}} -{{*:redirect to="details_immo.html?immo_doc_id=%s&ok=1&msg=detach&"|args:$_GET.immo_doc_id*}} diff --git a/details_immo.html b/details_immo.html index 0896717..ca3d93b 100644 --- a/details_immo.html +++ b/details_immo.html @@ -31,25 +31,19 @@ {{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}} -{{* {{if ! $dialog}} {{:assign subsubcurrent=null}} - {{if $total_credits == 0 && $total_amort == 0}} - {{:assign subsubcurrent="credit"}} - {{/if}} {{if $total_amort == 0}} - {{:assign subsubcurrent=$subsubcurrent|cat:"-modif"}} + {{:assign subsubcurrent="credit"}} {{/if}} {{:include file="_nav.html" current="index" subcurrent="details" subsubcurrent=$subsubcurrent}} {{/if}} -*}} {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}} +{{* +*}} {{if $_GET.ok}} {{if $_GET.msg|match:"attach_amort"}} @@ -96,7 +91,9 @@ {{$line.date|date_short}} {{"%f"|math:$line.amount|money_currency_html:false|raw}} - {{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}} + {{if $total_amort == 0}} + {{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}} + {{/if}} {{/foreach}} diff --git a/exit_step1.html b/exit_step1.html index c736e67..d3cc904 100644 --- a/exit_step1.html +++ b/exit_step1.html @@ -27,11 +27,11 @@ {{* lister les amortissements liés à l'immobilisation *}} {{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}} -{{* chercher des écritures au crédit du compte de l'immo sans doc associé *}} {{* - - line.credit < ligne_immo.amount => peut-être un avoir - - line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan - *}} + chercher des écritures au crédit du compte de l'immo sans doc associé + - line.credit < ligne_immo.amount => peut-être un avoir + - line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan +*}} {{#select trans.id as trans_id, trans.label as trans_label, @@ -51,8 +51,12 @@ acc.code = :acc_code AND line.credit > 0 AND credit_line_id NOT IN ( - SELECT json_extract(link.document, '$.credit_line_id') AS line_id FROM !table as link - WHERE json_extract(link.document, '$.type') == "credit_link") + SELECT json_extract(credit_link.document, '$.credit_line_id') AS line_id FROM !table as credit_link + WHERE json_extract(credit_link.document, '$.type') == "credit_link" + UNION + SELECT json_extract(exit_link.document, '$.exit_line_id') AS line_id FROM !table as exit_link + WHERE json_extract(exit_link.document, '$.type') == "exit_link" + ) ; :acc_code=$ligne_immo.account_code !table =$module.table @@ -60,8 +64,6 @@ }} {{if $credit_line.amount < $solde}} {{:assign var="credit_lines." value=$credit_line}} - {{elseif $credit_line.amount == $solde}} - {{:assign var="exit_lines." value=$credit_line}} {{/if}} {{/select}} @@ -122,6 +124,15 @@ {{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}} +{{if $_GET.ok}} + {{if $_GET.msg|match:"attach_avoir"}} + {{:assign msg="Écriture d'avoir attachée"}} + {{elseif $_GET.msg|match:"detach_avoir"}} + {{:assign msg="Écriture d'avoir détachée"}} + {{/if}} +

{{$msg}}

+{{/if}} +
Immobilisation
@@ -147,25 +158,27 @@ {{if $linked_immos != null}}

Écritures d'avoir attachées à l'immobilisation

-{{/if}} - -{{if $linked_immos != null}} + + {{#foreach from=$linked_immos item="line"}} {{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} + {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} + + @@ -173,10 +186,14 @@ {{/foreach}}
Date Libellé MontantN° compteCompte
#{{$line.trans_id}} {{$line.date|date_short}} {{$line.label}} {{"%f"|math:$line.amount|money_currency_html:false|raw}}{{$line.account_code}}{{$line.account_label}} {{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
-{{else}} +{{elseif $credit_lines}}

Vous pouvez attacher une ou plusieurs écritures d'avoir à votre immobilisation

+{{else}} +

+ Aucune écriture au crédit du compte d'immobilisation ; vous pouvez passer à la suite +

{{/if}} {{if $credit_lines}} diff --git a/exit_step2.html b/exit_step2.html index 72deafe..699b947 100644 --- a/exit_step2.html +++ b/exit_step2.html @@ -1,18 +1,16 @@ {{* -*- brindille -*- *}} {{* - Associer les différentes écritures à une immo créée avant la mise - en service du module et sortie du bilan + Associer les différentes écritures à une immo créée et sortie du + bilan avant la mise en service du module @param immo_doc_id : id du doc associé à l'immobilisation *}} {{* données de l'immobilisation *}} -{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="ligne_immo, message"}} +{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}} {{if $message != null}} {{:error message=$message}} {{/if}} -{{* voir si un document a été associé à l'immo *}} -{{#load id=$ligne_immo.line_id assign="info_immo"}}{{/load}} {{#form on="backward"}} {{:redirect to="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}} @@ -37,44 +35,6 @@ {{* lister les amortissements liés à l'immobilisation *}} {{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}} -{{* - chercher des écritures au crédit du compte de l'immo sans doc associé - - line.credit < ligne_immo.amount => peut-être un avoir - - line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan -*}} -{{#select - trans.id as trans_id, - trans.label as trans_label, - trans.date as date, - trans.id_year as year, - line.id as credit_line_id, - line.label as line_label, - line.credit as amount, - acc.id as account_id, - acc.code as account_code, - acc.label as account_label - FROM acc_transactions AS trans - INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id - INNER JOIN acc_accounts AS acc ON line.id_account = acc.id - LEFT JOIN module_data_amortization AS mda ON json_extract(mda.document, '$.amort_line_id') = line.id - WHERE - acc.code = :acc_code - AND line.credit > 0 - AND credit_line_id NOT IN ( - SELECT json_extract(link.document, '$.credit_line_id') AS line_id FROM !table as link - WHERE json_extract(link.document, '$.type') == "credit_link") - ; - :acc_code=$ligne_immo.account_code - !table =$module.table - assign="credit_line" - }} - {{if $credit_line.amount < $solde}} - {{:assign var="credit_lines." value=$credit_line}} - {{elseif $credit_line.amount == $solde}} - {{:assign var="exit_lines." value=$credit_line}} - {{/if}} -{{/select}} - {{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}} {{:include file="./_get_amort_code.html" @@ -132,6 +92,15 @@ {{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}} +{{if $_GET.ok}} + {{if $_GET.msg|match:"attach_amort"}} + {{:assign msg="Écriture d'amortissement attachée"}} + {{elseif $_GET.msg|match:"detach_amort"}} + {{:assign msg="Écriture d'amortissement détachée"}} + {{/if}} +

{{$msg}}

+{{/if}} +
Immobilisation
@@ -180,6 +149,9 @@ {{if $line.line_label != null}} {{$line.line_label}} + {{if $line.trans_label != $line.line_label}} + — {{$line.trans_label}} + {{/if}} {{else}} {{$line.trans_label}} {{/if}} @@ -194,15 +166,19 @@ {{/foreach}} +{{elseif $free_amort_lines}} +

+ Vous pouvez attacher une ou plusieurs écritures d'amortissement à l'immobilisation +

{{else}}

- Vous pouvez attacher une ou plusieurs écritures d'amortissement à votre immobilisation + Aucune écriture d'amortissement à rattacher ; vous pouvez passer à la suite

{{/if}} -

Autres écritures d'amortissements

{{if $free_amort_lines}} +

Autres écritures d'amortissements

@@ -223,8 +199,19 @@ - diff --git a/exit_step3.html b/exit_step3.html index 045cdc5..671b415 100644 --- a/exit_step3.html +++ b/exit_step3.html @@ -1,15 +1,11 @@ {{* -*- brindille -*- *}} {{* - Associer les différentes écritures à une immo créée avant la mise - en service du module et sortie du bilan + Associer les différentes écritures à une immo créée et sortie du + bilan avant la mise en service du module @param immo_doc_id : id du doc associé à l'immobilisation *}} -{{* - TODO : affichage après attachement écriture sortie bilan (ligne attachée, bouton détacher) -*}} - {{* données de l'immobilisation *}} {{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}} {{if $message != null}} @@ -29,6 +25,10 @@ {{:redirect to="index.html?type_immo=archived"}} {{/form}} +{{#form on="finish"}} + {{:redirect to="index.html?type_immo=managed"}} +{{/form}} + {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} {{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}} {{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}} @@ -68,11 +68,11 @@ {{/select}} {{/if}} -{{* chercher des écritures au crédit du compte de l'immo sans doc associé *}} {{* - - line.credit < ligne_immo.amount => peut-être un avoir - - line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan - *}} + chercher des écritures au crédit du compte de l'immo sans doc associé + - line.credit < ligne_immo.amount => peut-être un avoir + - line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan +*}} {{#select trans.id as trans_id, trans.label as trans_label, @@ -103,9 +103,7 @@ !table =$module.table assign="credit_line" }} - {{if $credit_line.amount < $solde}} - {{:assign var="credit_lines." value=$credit_line}} - {{elseif $credit_line.amount == $solde}} + {{if $credit_line.amount == $solde}} {{:assign var="exit_lines." value=$credit_line}} {{/if}} {{/select}} @@ -233,9 +231,9 @@
#{{$line.amort_trans_id}} {{$line.date|date_short}}{{$line.trans_label}} + + {{if $line.line_label != null}} + {{$line.line_label}} + {{if $line.trans_label != $line.line_label}} + — {{$line.trans_label}} + {{/if}} + {{else}} + {{$line.trans_label}} + {{/if}} +{{* + {{$line.trans_label}} {{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}} +*}} {{"%f"|math:$line.amort_amount|money_html:false|raw}} {{$line.account_code}}
-{{else}} +{{elseif $exit_lines}}

- Vous pouvez attacher une écriture de sortie du bilan à votre immobilisation + Vous pouvez attacher une écriture de sortie du bilan à l'immobilisation

{{/if}} @@ -275,14 +273,16 @@ {{elseif $exit_line == null}} -

Aucune écriture de sortie du bilan

+

Aucune écriture de sortie du bilan. Vérifiez l'attachement d'écriture d'avoir.

{{/if}}

{{:button type="submit" name="backward" label="Revenir à l'étape précédente" shape="left" class="main"}} {{if $exit_line}} - {{:button type="submit" name="validate" label="Valider" shape="check" class="main"}} + {{:button type="submit" name="validate" label="Terminer" shape="check" class="main"}} + {{else}} + {{:button type="submit" name="finish" label="Terminer" shape="export" class="main"}} {{/if}}

diff --git a/link_immo.html b/link_immo.html index a05eab1..77f5cd1 100644 --- a/link_immo.html +++ b/link_immo.html @@ -10,6 +10,10 @@ {{if $message != null}} {{:error message=$message}} {{/if}} +{{:assign label_immo=$ligne_immo.trans_label}} +{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}} + {{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}} +{{/if}} {{* lister les écritures au crédit du compte de l'immobilisation diff --git a/modify_infos.html b/modify_infos.html index 354b3f3..1b6d615 100644 --- a/modify_infos.html +++ b/modify_infos.html @@ -168,7 +168,7 @@ {{else}} {{:assign type_immo="other"}} {{/if}} - {{:redirect force="index.html?ok=1&msg=infos&type_immo=%s"|args:$type_immo}} + {{:redirect force="details_immo.html?immo_doc_id=%s&type_immo=%s&ok=1&msg=infos"|args:$_GET.immo_doc_id:$type_immo}} {{/form}} @@ -219,6 +219,7 @@ {{/if}} {{:input type="date" name="date_achat" label="Date d'acquisition" default=$info_immo.date_achat}} {{:input type="date" name="date_mes" label="Date de mise en service" default=$info_immo.date_mes}} +{{* {{if $linked_immos != null}}
@@ -233,6 +234,7 @@
{{/if}} +*}}
diff --git a/other_amortizations.html b/other_amortizations.html index c08211b..6838cbf 100644 --- a/other_amortizations.html +++ b/other_amortizations.html @@ -32,6 +32,12 @@ {{* lister les amortissements non rattachés à une immo *}} {{:include file="./_get_free_amort.html" filter_condition=$filter_condition keep="free_amort_lines"}} +{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}} +{{:include + file="./_get_amort_code.html" + code_immo=$ligne_immo.account_code + keep="code_amort" +}} {{:admin_header title="Amortissements non rattachés" custom_css="./style.css" current="module_amortization"}} {{* barre de navigation *}} @@ -52,7 +58,7 @@
- {{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher les écritures ignorées"}} + {{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher toutes les écritures"}}
@@ -73,13 +79,23 @@ {{#foreach from=$free_amort_lines item="line"}} + {{if $_POST.unhide == null && $line.account_code != $code_amort}} + {{:continue}} + {{/if}} {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}} #{{$line.trans_id}} {{$line.trans_date|date_short}} - {{$line.trans_label}} - {{if $line.line_label != null && $line.line_label != $line.trans_label}} - {{$line.line_label}}{{/if}} + + {{if $line.line_label != null}} + {{$line.line_label}} + {{if $line.trans_label != $line.line_label}} + — {{$line.trans_label}} + {{/if}} + {{else}} + {{$line.trans_label}} + {{/if}} {{"%f"|math:$line.amount|money_html:false|raw}} {{$line.account_code}} diff --git a/transfer.html b/transfer.html index fdcbe3e..cb6643c 100644 --- a/transfer.html +++ b/transfer.html @@ -271,6 +271,7 @@ {{/foreach}} +