diff --git a/_common_detach.html b/_common_detach.html index 8c84736..2c730c8 100644 --- a/_common_detach.html +++ b/_common_detach.html @@ -7,7 +7,7 @@ *}} {{* 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/amortization.html b/amortization.html index 97ded50..a3378b2 100644 --- a/amortization.html +++ b/amortization.html @@ -151,7 +151,7 @@

Avoirs

diff --git a/detach_amort.html b/detach_amort.html index b058716..eba97ee 100644 --- a/detach_amort.html +++ b/detach_amort.html @@ -7,7 +7,8 @@ @param amort_line_id : id de la ligne d'amortissement *}} -{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.amort_line_id keep="info_immo"}} +{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.amort_line_id}} + {{* supprimer le doc de liaison entre les lignes *}} {{#load type="amort_link" where="$$.immo_doc_id = :immo_doc_id AND $$.amort_line_id = :amort_line_id" @@ -18,12 +19,11 @@ {{/load}} {{* marquer immo non soldée *}} -{{if $info_immo.status == "amortized"}} - {{:save - key=$info_immo.key - status="managed" - }} -{{/if}} +{{* TODO : À VÉRIFIER *}} +{{:save + key=$info_immo.key + status="managed" +}} {{if $_GET.from == "exit"}} {{:redirect force="exit_step2.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id}} diff --git a/exit_step4.html b/exit_step4.html index 7868913..f377496 100644 --- a/exit_step4.html +++ b/exit_step4.html @@ -44,24 +44,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 une écriture de cession associée *}} -{{#load type="cession_link" - where="$$.immo_doc_id = :immo_doc_id" - :immo_doc_id = $_GET.immo_doc_id|intval - }} - {{if $amount == null || $amount == 0}} - {{#select credit - FROM acc_transactions_lines - WHERE id = :cession_line_id; - :cession_line_id = $cession_line_id - }} - {{:assign montant_cession=$credit}} - {{/select}} - {{else}} - {{:assign montant_cession=$amount}} - {{/if}} -{{/load}} - {{* chercher une écriture de sortie de bilan associée *}} {{#load type="exit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id=$info_immo.id assign="exit_info"}} {{/load}} @@ -218,10 +200,6 @@
Valeur nette résiduelle
{{"%d-%d"|math:$solde:$total_amort|money_currency_html:false|raw}}
{{/if}} - {{if $montant_cession > 0}} -
Montant de la cession
-
{{$montant_cession|money_currency_html:false|raw}}
- {{/if}} diff --git a/link_immo.html b/link_immo.html index 43be090..557b0e8 100644 --- a/link_immo.html +++ b/link_immo.html @@ -18,11 +18,7 @@ {{* lister les écritures au crédit du compte de l'immobilisation *}} -{{if $_GET.filter}} - {{:assign account_code=$ligne_immo.account_code|cat:"%"}} -{{else}} - {{:assign account_code=$ligne_immo.account_code|substr:0:2|cat:"%"}} -{{/if}} +{{:assign account_code=$ligne_immo.account_code|cat:"%"}} {{#select line.id as credit_line_id, line.id_transaction as credit_trans_id, @@ -65,32 +61,23 @@ }} {{/if}} - -
+
+ + Écritures au crédit du compte d'immobilisation « {{$ligne_immo.account_code}} » et sous-comptes + +
Immobilisation
#{{$ligne_immo.trans_id}} {{$label_immo}}
Montant
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
-
Date de l'immobilisation
+
Date de l'écriture d'immobilisation
{{$ligne_immo.date_achat|date_short}}
+
{{if $other_immos != null}} @@ -124,8 +111,8 @@ {{/foreach}} -

Sélectionner une écriture d'avoir ou autre réduction du montant de l'acquisition pour l'associer à l'immobilisation

+

Sélectionner une écriture d'avoir ou autre réduction du montant de l'acquisition pour l'associer à l'immobilisation

{{else}}

Aucune écriture au crédit du compte « {{$ligne_immo.account_code}} »

{{/if}} diff --git a/other_amortizations.html b/other_amortizations.html index 45488ca..8716a25 100644 --- a/other_amortizations.html +++ b/other_amortizations.html @@ -60,19 +60,9 @@ -
-
-
-
Immobilisation
-
#{{$ligne_immo.trans_id}} {{$label_immo}}
-
Montant
-
{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}
-
Date de l'immobilisation
-
{{$ligne_immo.date_achat|date_short}}
-
-
- - {{if $free_amort_lines != null}} +{{if $free_amort_lines != null}} +
+

Immobilisation « {{$label_immo}} »

@@ -116,12 +106,11 @@ {{/foreach}} -

Sélectionner une écriture d'amortissement pour l'associer à l'immobilisation

- {{else}} -

Aucun amortissement pour le compte {{$code_amort}}

- {{/if}} -
+
+{{else}} +

Aucun amortissement pour le compte {{$code_amort}}

+{{/if}} {{:form_errors}}