diff --git a/attach_cession.html b/_attach_cession.html similarity index 67% rename from attach_cession.html rename to _attach_cession.html index bd78460..6216bf6 100644 --- a/attach_cession.html +++ b/_attach_cession.html @@ -8,7 +8,7 @@ *}} {{* données de l'immobilisation *}} -{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}} +{{:include file="_get_immo_data.html" immo_doc_id=$immo_doc_id keep="info_immo, ligne_immo, message"}} {{if $message != null}} {{:error message=$message}} {{/if}} @@ -18,7 +18,7 @@ id_transaction FROM acc_transactions_lines WHERE id = :line_id; - :line_id = $_GET.cession_line_id|intval + :line_id = $cession_line_id|intval }} {{:assign cession_id=$id_transaction}} {{else}} @@ -26,14 +26,12 @@ {{/select}} {{* Lier l'écriture de cession à l'écriture d'immobilisation *}} -{{:include file="_common_attach.html" immo_doc_id=$_GET.immo_doc_id trans_id=$cession_id}} +{{:include file="_common_attach.html" immo_doc_id=$immo_doc_id trans_id=$cession_id}} {{* enregistrer la liaison de l'écriture de cession *}} {{:save key=""|uuid type="cession_link" immo_doc_id=$info_immo.id - cession_line_id=$_GET.cession_line_id|intval + cession_line_id=$cession_line_id|intval }} - -{{:redirect force="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_cession"|args:$_GET.immo_doc_id}} diff --git a/attach_exit.html b/_attach_exit.html similarity index 68% rename from attach_exit.html rename to _attach_exit.html index a58eecc..e4aa5c8 100644 --- a/attach_exit.html +++ b/_attach_exit.html @@ -8,7 +8,7 @@ *}} {{* données de l'immobilisation *}} -{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}} +{{:include file="_get_immo_data.html" immo_doc_id=$immo_doc_id keep="info_immo, ligne_immo, message"}} {{if $message != null}} {{:error message=$message}} {{/if}} @@ -18,7 +18,7 @@ id_transaction FROM acc_transactions_lines WHERE id = :line_id; - :line_id = $_GET.exit_line_id|intval + :line_id = $exit_line_id|intval }} {{:assign rebut_id=$id_transaction}} {{else}} @@ -26,14 +26,12 @@ {{/select}} {{* Lier l'écriture de sortie à l'écriture d'immobilisation *}} -{{:include file="_common_attach.html" immo_doc_id=$_GET.immo_doc_id trans_id=$rebut_id}} +{{:include file="_common_attach.html" immo_doc_id=$immo_doc_id trans_id=$rebut_id}} {{* enregistrer la liaison de l'écriture de sortie *}} {{:save key=""|uuid type="exit_link" immo_doc_id=$info_immo.id - exit_line_id=$_GET.exit_line_id|intval + exit_line_id=$exit_line_id|intval }} - -{{:redirect force="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_GET.immo_doc_id}} diff --git a/detach_amort.html b/_detach_amort.html similarity index 55% rename from detach_amort.html rename to _detach_amort.html index 873c924..1ceed6a 100644 --- a/detach_amort.html +++ b/_detach_amort.html @@ -7,12 +7,13 @@ @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=$immo_doc_id line_id=$amort_line_id keep="info_immo"}} + {{* 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" - :immo_doc_id=$_GET.immo_doc_id|intval - :amort_line_id = $_GET.amort_line_id|intval + :immo_doc_id=$immo_doc_id|intval + :amort_line_id = $amort_line_id|intval }} {{:delete id=$id}} {{/load}} @@ -24,9 +25,3 @@ status="managed" }} {{/if}} - -{{if $_GET.from == "exit"}} - {{:redirect force="exit_step2.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id}} -{{else}} - {{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id:}} -{{/if}} diff --git a/detach_cession.html b/_detach_cession.html similarity index 59% rename from detach_cession.html rename to _detach_cession.html index 2733fcc..0f230f0 100644 --- a/detach_cession.html +++ b/_detach_cession.html @@ -7,15 +7,13 @@ @param cession_line_id : id de la ligne de cession *}} -{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.cession_line_id}} +{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$cession_line_id}} {{* supprimer le doc de liaison entre les lignes *}} {{#load type="cession_link" where="$$.immo_doc_id = :immo_doc_id AND $$.cession_line_id = :cession_line_id" - :immo_doc_id=$_GET.immo_doc_id|intval - :cession_line_id = $_GET.cession_line_id|intval + :immo_doc_id=$immo_doc_id|intval + :cession_line_id = $cession_line_id|intval }} {{:delete id=$id}} {{/load}} - -{{:redirect to="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_cession"|args:$_GET.immo_doc_id}} diff --git a/_detach_credit.html b/_detach_credit.html new file mode 100644 index 0000000..2c36f1d --- /dev/null +++ b/_detach_credit.html @@ -0,0 +1,19 @@ +{{* -*- brindille -*- *}} + +{{* + Supprimer l'association entre une écriture d'immobilisation et + une écriture au crédit du compte d'immobilisation + @param immo_doc_id : id du doc associé à l'immo + @param credit_line_id : id de la ligne de crédit +*}} + +{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$credit_line_id}} + +{{* supprimer le doc de liaison entre les lignes *}} +{{#load type="credit_link" + where="$$.immo_doc_id = :immo_doc_id AND $$.credit_line_id = :credit_line_id" + :immo_doc_id=$immo_doc_id|intval + :credit_line_id = $credit_line_id|intval +}} + {{:delete id=$id}} +{{/load}} diff --git a/detach_exit.html b/_detach_exit.html similarity index 60% rename from detach_exit.html rename to _detach_exit.html index 094bd88..b811cde 100644 --- a/detach_exit.html +++ b/_detach_exit.html @@ -7,15 +7,13 @@ @param exit_line_id : id de la ligne de sortie de bilan *}} -{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.exit_line_id}} +{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$exit_line_id}} {{* supprimer le doc de liaison entre les lignes *}} {{#load type="exit_link" where="$$.immo_doc_id = :immo_doc_id AND $$.exit_line_id = :exit_line_id" - :immo_doc_id=$_GET.immo_doc_id|intval - :exit_line_id = $_GET.exit_line_id|intval + :immo_doc_id=$immo_doc_id|intval + :exit_line_id = $exit_line_id|intval }} {{:delete id=$id}} {{/load}} - -{{:redirect to="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_exit"|args:$_GET.immo_doc_id}} diff --git a/amortization.html b/amortization.html index 7678061..35af614 100644 --- a/amortization.html +++ b/amortization.html @@ -12,6 +12,24 @@ {{:error message=$message}} {{/if}} +{{* + Supprimer l'association entre une écriture d'immobilisation et + une écriture au crédit du compte d'immobilisation +*}} +{{#form on="detach_credit"}} + {{:include file="_detach_credit.html" immo_doc_id=$_POST.immo_doc_id credit_line_id=$_POST.detach_credit}} + {{:redirect to="?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_POST.immo_doc_id}} +{{/form}} + +{{* + Supprimer l'association entre une écriture d'amortissement et + une écriture d'immobilisation +*}} +{{#form on="detach_amort"}} + {{:include file="_detach_amort.html" immo_doc_id=$_POST.immo_doc_id amort_line_id=$_POST.detach_amort}} + {{:redirect to="?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_POST.immo_doc_id:}} +{{/form}} + {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}} {{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}} {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} @@ -169,31 +187,34 @@ {{/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}} - - - - - - - - {{/foreach}} - -
N°DateLibelléMontant
#{{$line.trans_id}}{{$line.date|date_short}}{{$line.label}}{{"%f"|math:$line.amount|money_currency_html:false|raw}} - {{if ! $created_amort}} - {{: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 from=$linked_immos item="line"}} + {{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}} + + + + + + + + {{/foreach}} + +
N°DateLibelléMontant
#{{$line.trans_id}}{{$line.date|date_short}}{{$line.label}}{{"%f"|math:$line.amount|money_currency_html:false|raw}} + {{if ! $created_amort}} + {{:button type="submit" name="detach_credit" label="Détacher" shape="minus" value=$line.credit_line_id}} + {{/if}} +
+ +
{{/if}}

Amortissements

@@ -218,47 +239,50 @@ {{if $linked_amort != null}}
- - - - - - - - - - - - - - - {{#foreach from=$linked_amort|ksort item="line"}} - {{* données de l'écriture *}} - {{: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}} - {{:assign solde="%f-%d"|math:$solde:$line.amount}} + +
N°DateLibelléMontantValeur netteN° compteCompte
+ - - - - - - - - + + + + + + + + - {{/foreach}} - -
#{{$line.trans_id}}{{$line.date|date_short}} - {{$line.trans_label}} - {{if $line.line_label != null && $line.line_label != $line.trans_label}} - — {{$line.line_label}} - {{/if}} - {{"%f"|math:$line.amount|money_html:false|raw}}{{"%f"|math:$solde|money_html:false|raw}}{{$line.account_code}}{{$line.account_label}} - {{if ! $created_amort}} - {{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}} - {{/if}} - N°DateLibelléMontantValeur netteN° compteCompte
+ + + {{#foreach from=$linked_amort|ksort item="line"}} + {{* données de l'écriture *}} + {{: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}} + {{:assign solde="%f-%d"|math:$solde:$line.amount}} + + #{{$line.trans_id}} + {{$line.date|date_short}} + + {{$line.trans_label}} + {{if $line.line_label != null && $line.line_label != $line.trans_label}} + — {{$line.line_label}} + {{/if}} + + {{"%f"|math:$line.amount|money_html:false|raw}} + {{"%f"|math:$solde|money_html:false|raw}} + {{$line.account_code}} + {{$line.account_label}} + + {{if ! $created_amort}} + {{:button type="submit" name="detach_amort" label="Détacher" shape="minus" value=$line.line_id}} + {{/if}} + + + {{/foreach}} + + + +
{{/if}} diff --git a/detach_credit.html b/detach_credit.html deleted file mode 100644 index 9b7da0e..0000000 --- a/detach_credit.html +++ /dev/null @@ -1,25 +0,0 @@ -{{* -*- brindille -*- *}} - -{{* - Supprimer l'association entre une écriture d'immobilisation et - une écriture au crédit du compte d'immobilisation - @param immo_doc_id : id du doc associé à l'immo - @param credit_line_id : id de la ligne de crédit -*}} - -{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.credit_line_id}} - -{{* supprimer le doc de liaison entre les lignes *}} -{{#load type="credit_link" - where="$$.immo_doc_id = :immo_doc_id AND $$.credit_line_id = :credit_line_id" - :immo_doc_id=$_GET.immo_doc_id|intval - :credit_line_id = $_GET.credit_line_id|intval -}} - {{:delete id=$id}} -{{/load}} - -{{if $_GET.from == "exit"}} - {{:redirect force="exit_step1.html?immo_doc_id=%s&from=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id:$_GET.from}} -{{else}} - {{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id}} -{{/if}} diff --git a/exit_step1.html b/exit_step1.html index 3ffa2cd..592eff4 100644 --- a/exit_step1.html +++ b/exit_step1.html @@ -12,6 +12,15 @@ {{:error message=$message}} {{/if}} +{{* + Supprimer l'association entre une écriture d'immobilisation et + une écriture au crédit du compte d'immobilisation +*}} +{{#form on="detach_credit"}} + {{:include file="_detach_credit.html" immo_doc_id=$_POST.immo_doc_id credit_line_id=$_POST.detach_credit}} + {{:redirect to="?immo_doc_id=%s&from=exit&ok=1&msg=detach_avoir"|args:$_POST.immo_doc_id}} +{{/form}} + {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} {{if $label_immo|strpos:$ligne_immo.line_label === false}} {{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}} @@ -139,6 +148,8 @@

{{$msg}}

{{/if}} +{{:form_errors}} +
Immobilisation
@@ -173,34 +184,37 @@

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

{{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}} - - - - - - - - - - {{/foreach}} - -
N°DateLibellé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"}} -
+
+ + + + + + + + + + + + {{#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}} + + + + + + + + + + {{/foreach}} + +
N°DateLibellé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}} + {{:button type="submit" name="detach_credit" label="Détacher" shape="minus" value=$line.credit_line_id}} +
+ +
{{elseif $credit_lines}}

Vous pouvez attacher une ou plusieurs écritures d'avoir à votre immobilisation diff --git a/exit_step2.html b/exit_step2.html index acf7cc0..c230b98 100644 --- a/exit_step2.html +++ b/exit_step2.html @@ -20,6 +20,15 @@ {{:redirect to="exit_step3.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}} {{/form}} +{{* + Supprimer l'association entre une écriture d'amortissement et + une écriture d'immobilisation +*}} +{{#form on="detach_amort"}} + {{:include file="_detach_amort.html" immo_doc_id=$_POST.immo_doc_id amort_line_id=$_POST.detach_amort}} + {{:redirect to="?immo_doc_id=%s&from=exit&ok=1&msg=detach_amort"|args:$_POST.immo_doc_id}} +{{/form}} + {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} {{if $label_immo|strpos:$ligne_immo.line_label === false}} {{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}} @@ -139,46 +148,49 @@

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

{{if $linked_amort != null}} - - - - - - - - - - - - - - {{#foreach from=$linked_amort|ksort item="line"}} - {{* données de l'écriture *}} - {{: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}} + +
N°DateLibelléMontantN° compteCompte
+ - - - - - - - + + + + + + + - {{/foreach}} - -
#{{$line.trans_id}}{{$line.date|date_short}} - {{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}}{{$line.account_label}} - {{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}} - N°DateLibelléMontantN° compteCompte
+ + + {{#foreach from=$linked_amort|ksort item="line"}} + {{* données de l'écriture *}} + {{: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.date|date_short}} + + {{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}} + {{$line.account_label}} + + {{:button type="submit" name="detach_amort" label="Détacher" shape="minus" value=$line.line_id}} + + + {{/foreach}} + + + + {{elseif $free_amort_lines}}

Vous pouvez attacher une ou plusieurs écritures d'amortissement à l'immobilisation diff --git a/exit_step3.html b/exit_step3.html index 365d817..e77a5f7 100644 --- a/exit_step3.html +++ b/exit_step3.html @@ -20,6 +20,15 @@ {{:redirect to="exit_step4.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}} {{/form}} +{{* + Supprimer l'association entre une écriture d'immobilisation et + une écriture de cession +*}} +{{#form on="detach_cession"}} + {{:include file="_detach_cession.html" immo_doc_id=$_POST.immo_doc_id cession_line_id=$_POST.detach_cession}} + {{:redirect to="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_cession"|args:$_GET.immo_doc_id}} +{{/form}} + {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} {{if $label_immo|strpos:$ligne_immo.line_label === false}} {{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}} @@ -94,6 +103,7 @@ {{/select}} {{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}} + {{if $_GET.from == "exit"}} {{:assign current="other"}} {{else}} @@ -109,6 +119,8 @@

{{$msg}}

{{/if}} +{{:form_errors}} +
Immobilisation
@@ -147,46 +159,49 @@

Écriture de cession attachée à l'immobilisation

{{if $linked_cessions != null}} - - - - - - - - - - - - - - {{#foreach from=$linked_cessions item="line"}} - {{* données de l'écriture *}} - {{: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}} + +
N°DateLibelléMontantN° compteCompte
+ - - - - - - - + + + + + + + - {{/foreach}} - -
#{{$line.trans_id}}{{$line.date|date_short}} - {{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}}{{$line.account_label}} - {{:linkbutton label="Détacher" href="detach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}} - N°DateLibelléMontantN° compteCompte
+ + + {{#foreach from=$linked_cessions item="line"}} + {{* données de l'écriture *}} + {{: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.date|date_short}} + + {{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}} + {{$line.account_label}} + + {{:button type="submit" name="detach_cession" label="Détacher" shape="minus" value=$line.line_id}} + + + {{/foreach}} + + + + {{elseif $free_cessions}}

Vous pouvez attacher une écriture de cession à l'immobilisation diff --git a/exit_step4.html b/exit_step4.html index d880d2e..b4e18e0 100644 --- a/exit_step4.html +++ b/exit_step4.html @@ -99,7 +99,7 @@ {{:assign exit_amort_display=$exit_amort|money_currency:false|replace:" ":" "}} {{:assign total_amort_display=$total_amort|money_currency:false|replace:" ":" "}} {{:assign erreur=1}} - {{:assign message="Le montant des amortissement dans l'écriture de sortie (%s) est différent du total des amortissements associés à l'immobilisation (%s)."|args:$exit_amort_display:$total_amort_display}} + {{:assign message="Le montant des amortissement dans l'écriture de sortie (%s) est différent du total des amortissements attachés à l'immobilisation (%s)."|args:$exit_amort_display:$total_amort_display}} {{/if}} {{if $exit_line.amount != $solde}} @@ -224,6 +224,15 @@ {{:redirect to="index.html?type_immo=other"}} {{/form}} +{{* + Supprimer l'association entre une écriture d'immobilisation et + une écriture de sortie de bilan +*}} +{{#form on="detach_exit"}} + {{:include file="_detach_exit.html" immo_doc_id=$_POST.immo_doc_id exit_line_id=$_POST.detach_exit}} + {{:redirect to="?immo_doc_id=%s&from=exit&ok=1&msg=detach_exit"|args:$_POST.immo_doc_id}} +{{/form}} + {{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}} {{if $_GET.from == "exit"}} {{:assign current="other"}} @@ -272,7 +281,7 @@ {{if $erreur == 1}} Vérifiez si vous avez correctement attaché les écritures d'amortissement. {{elseif $erreur == 2}} - Vérifiez si vous avez correctement attaché les éventuelles écritures d'avoir. + Vérifiez si vous avez correctement attaché d'éventuelles écritures d'avoir. {{/if}}

@@ -313,49 +322,9 @@

Écriture de sortie de bilan attachée à l'immobilisation

{{if $exit_line != null}} {{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$exit_line.trans_id}} -
- - - - - - - - - - - - - - - - - - - - - - -
N°DateLibelléMontantN° compteCompte
#{{$exit_line.trans_id}}{{$exit_line.date|date_short}} - {{if $exit_line.line_label != null}} - {{$exit_line.line_label}} - {{else}} - {{$exit_line.trans_label}} - {{/if}} - {{"%f"|math:$exit_line.amount|money_html:false|raw}}{{$exit_line.account_code}}{{$exit_line.account_label}} - {{:linkbutton label="Détacher" href="detach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$exit_line.line_id shape="minus"}} -
-{{elseif $exit_lines}} -

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

-{{/if}} - -{{if $exit_lines}} -{{* -

Écritures non rattachées

- - + +
+ @@ -367,33 +336,41 @@ - - {{#foreach from=$exit_lines item="line"}} - {{:assign exit_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}} - - - - - - - - - - {{/foreach}} + + + + + + + + + -
N° Date
#{{$line.trans_id}}{{$line.date|date_short}}{{$line.trans_label}} - {{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}} - {{"%f"|math:$line.amount|money_html:false|raw}}{{$line.account_code}}{{$line.account_label}} - {{:linkbutton label="Attacher" href="attach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="plus"}} -
#{{$exit_line.trans_id}}{{$exit_line.date|date_short}} + {{if $exit_line.line_label != null}} + {{$exit_line.line_label}} + {{else}} + {{$exit_line.trans_label}} + {{/if}} + {{"%f"|math:$exit_line.amount|money_html:false|raw}}{{$exit_line.account_code}}{{$exit_line.account_label}} + {{if ! $erreur}} + {{:button type="submit" name="detach_exit" label="Détacher" shape="minus" value=$exit_line.line_id}} + {{/if}} +
-*}} -{{elseif $exit_line == null}} + + + +{{elseif $exit_lines}} +

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

+{{/if}} + +{{if $exit_lines == null && $exit_line == null}}

Aucune écriture de sortie de bilan avec un montant de {{$solde|money_currency_html:false|raw}} au crédit du compte {{$ligne_immo.account_code}} — {{$ligne_immo.account_label}} ;
- Vérifiez si vous avez correctement attaché les éventuelles écritures d'avoir. + Vérifiez si vous avez correctement attaché d'éventuelles écritures d'avoir.
Si vous avez supprimé l'écriture de sortie de bilan, il faut la recréer avant de pouvoir classer cette immobilisation diff --git a/list_cessions.html b/list_cessions.html index 9ead861..65a910d 100644 --- a/list_cessions.html +++ b/list_cessions.html @@ -9,6 +9,16 @@ {{if $message != null}} {{:error message=$message}} {{/if}} + +{{* + Enregistrer la liaison entre une écriture d'immobilisation et + une écriture de cession +*}} +{{#form on="attach_cession"}} + {{:include file="_attach_cession.html" immo_doc_id=$_POST.immo_doc_id cession_line_id=$_POST.attach_cession}} + {{:redirect force="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_cession"|args:$_POST.immo_doc_id}} +{{/form}} + {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}} {{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}} {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} @@ -62,6 +72,8 @@ {{:admin_header title="Écritures de cession du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}} +{{:form_errors}} +

Immobilisation
@@ -74,45 +86,48 @@
{{if $free_cessions}} - - - - - - - - - - - - - - - {{#foreach from=$free_cessions item="line"}} - {{:assign cession_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}} + +
N°DateLibelléMontantN° compteCompte
+ - - - - - - - + + + + + + + - {{/foreach}} - -

Sélectionner une écriture de cession pour l'associer à l'immobilisation

-
#{{$line.trans_id}}{{$line.date|date_short}} - {{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}}{{$line.account_label}} - {{:linkbutton label="Attacher" href="attach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="plus"}} - N°DateLibelléMontantN° compteCompte
+ + + + {{#foreach from=$free_cessions item="line"}} + {{:assign cession_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.date|date_short}} + + {{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}} + {{$line.account_label}} + + {{:button type="submit" name="attach_cession" label="Attacher" shape="plus" value=$line.line_id}} + + + {{/foreach}} + +

Sélectionner une écriture de cession pour l'associer à l'immobilisation

+ + + {{/if}} diff --git a/list_exit.html b/list_exit.html index 306f9f2..1d60ea5 100644 --- a/list_exit.html +++ b/list_exit.html @@ -9,6 +9,16 @@ {{if $message != null}} {{:error message=$message}} {{/if}} + +{{* + Enregistrer la liaison entre une écriture d'immobilisation et + une écriture de sortie d'immobilisation +*}} +{{#form on="attach_exit"}} + {{:include file="_attach_exit.html" immo_doc_id=$_POST.immo_doc_id exit_line_id=$_POST.attach_exit}} + {{:redirect force="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_POST.immo_doc_id}} +{{/form}} + {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}} {{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}} {{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}} @@ -58,7 +68,9 @@ {{/if}} {{/select}} -{{:admin_header title="Écritures de cession du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}} +{{:admin_header title="Écritures de sortie du bilan" custom_css="./style.css" current="module_amortization"}} + +{{:form_errors}}
@@ -72,37 +84,40 @@
{{if $exit_lines}} - - - - - - - - - - - - - - {{#foreach from=$exit_lines item="line"}} - {{:assign exit_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}} - - - - - - - - - - {{/foreach}} - -

Sélectionner une écriture de sortie de bilan pour l'associer à l'immobilisation

-
N°DateLibelléMontantN° compteCompte
#{{$line.trans_id}}{{$line.date|date_short}}{{$line.trans_label}} - {{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}} - {{"%f"|math:$line.amount|money_html:false|raw}}{{$line.account_code}}{{$line.account_label}} - {{:linkbutton label="Attacher" href="attach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="plus"}} -
+
+ + + + + + + + + + + + + + {{#foreach from=$exit_lines item="line"}} + {{:assign exit_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}} + + + + + + + + + + {{/foreach}} + +

Sélectionner une écriture de sortie de bilan pour l'associer à l'immobilisation

+
N°DateLibelléMontantN° compteCompte
#{{$line.trans_id}}{{$line.date|date_short}}{{$line.trans_label}} + {{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}} + {{"%f"|math:$line.amount|money_html:false|raw}}{{$line.account_code}}{{$line.account_label}} + {{:button type="submit" name="attach_exit" label="Attacher" shape="plus" value=$line.credit_line_id}} +
+ +
{{/if}}