Répartition opérations details/amortization

This commit is contained in:
Jean-Christophe Engel 2026-06-06 11:59:23 +02:00
parent ae63f13776
commit c7f7ead2a5
5 changed files with 16 additions and 20 deletions

View file

@ -110,11 +110,6 @@
<nav style="margin-bottom: 1em;"> <nav style="margin-bottom: 1em;">
<aside> {{* class="right">*}} <aside> {{* class="right">*}}
{{if $total_amort == 0}}
{{:linkbutton label="Modifier les paramètres" href="modify_infos.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="edit" target="_dialog"}}
{{:linkbutton label="Supprimer les paramètres" href="delete_infos.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="delete" target="_dialog"}}
{{:linkbutton label="Attacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
{{/if}}
{{if $free_amort_lines}} {{if $free_amort_lines}}
{{:linkbutton {{:linkbutton
label="Attacher un amortissement" label="Attacher un amortissement"
@ -145,7 +140,9 @@
<td>{{$line.date|date_short}}</td> <td>{{$line.date|date_short}}</td>
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td> <td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
<td> <td>
{{: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}}
</td> </td>
</tr> </tr>
{{/foreach}} {{/foreach}}

View file

@ -127,9 +127,9 @@
{{if $_GET.from == "exit"}} {{if $_GET.from == "exit"}}
{{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|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}} {{else}}
{{:redirect force="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}} {{/if}}
{{*:redirect to="details_immo.html?immo_doc_id=%s&ok=1&msg=attach_credit"|args:$_GET.immo_doc_id*}}
{{/form}} {{/form}}
{{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}} {{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}

View file

@ -27,6 +27,6 @@
{{if $_GET.from == "exit"}} {{if $_GET.from == "exit"}}
{{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|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}} {{else}}
{{:redirect force="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}} {{/if}}
{{*:redirect to="details_immo.html?immo_doc_id=%s&ok=1&msg=detach&"|args:$_GET.immo_doc_id*}}

View file

@ -31,25 +31,19 @@
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}} {{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
{{*
{{if ! $dialog}} {{if ! $dialog}}
{{:assign subsubcurrent=null}} {{:assign subsubcurrent=null}}
{{if $total_credits == 0 && $total_amort == 0}}
{{:assign subsubcurrent="credit"}}
{{/if}}
{{if $total_amort == 0}} {{if $total_amort == 0}}
{{:assign subsubcurrent=$subsubcurrent|cat:"-modif"}} {{:assign subsubcurrent="credit"}}
{{/if}} {{/if}}
{{:include file="_nav.html" current="index" subcurrent="details" subsubcurrent=$subsubcurrent}} {{:include file="_nav.html" current="index" subcurrent="details" subsubcurrent=$subsubcurrent}}
{{/if}} {{/if}}
*}}
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}} {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
{{*
<nav class="tabs"> <nav class="tabs">
<aside> <aside>
{{*if $total_credits == 0*}}
{{:linkbutton label="Rattacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}} {{:linkbutton label="Rattacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
{{*/if*}}
</aside> </aside>
<nav style="margin-bottom: 1em;"> <nav style="margin-bottom: 1em;">
{{:linkbutton shape="left" label="Retour à la liste des immobilisations" href="index.html}} {{:linkbutton shape="left" label="Retour à la liste des immobilisations" href="index.html}}
@ -59,6 +53,7 @@
{{/if}} {{/if}}
</nav> </nav>
</nav> </nav>
*}}
{{if $_GET.ok}} {{if $_GET.ok}}
{{if $_GET.msg|match:"attach_amort"}} {{if $_GET.msg|match:"attach_amort"}}
@ -96,7 +91,9 @@
<td>{{$line.date|date_short}}</td> <td>{{$line.date|date_short}}</td>
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td> <td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
<td> <td>
{{: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}}
</td> </td>
</tr> </tr>
{{/foreach}} {{/foreach}}

View file

@ -168,7 +168,7 @@
{{else}} {{else}}
{{:assign type_immo="other"}} {{:assign type_immo="other"}}
{{/if}} {{/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}} {{/form}}
@ -219,6 +219,7 @@
{{/if}} {{/if}}
{{:input type="date" name="date_achat" label="Date d'acquisition" default=$info_immo.date_achat}} {{: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}} {{:input type="date" name="date_mes" label="Date de mise en service" default=$info_immo.date_mes}}
{{*
{{if $linked_immos != null}} {{if $linked_immos != null}}
<dt><label>Écritures d'avoir liées à l'immobilisation</label></dt> <dt><label>Écritures d'avoir liées à l'immobilisation</label></dt>
<dd> <dd>
@ -233,6 +234,7 @@
</span> </span>
</dd> </dd>
{{/if}} {{/if}}
*}}
</div> </div>
</dl> </dl>
</fieldset> </fieldset>