Modification présentation écritures avoir liées
This commit is contained in:
parent
b83942efd2
commit
18ce7b0edd
2 changed files with 65 additions and 15 deletions
|
|
@ -1,6 +1,5 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{*
|
||||
Afficher les détails d'une immmo
|
||||
|
|
@ -32,7 +31,7 @@
|
|||
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_transactions AS trans ON line.id_transaction = trans.id
|
||||
INNER JOIN acc_accounts AS account ON line.id_account = account.id
|
||||
WHERE line.id = :line_id;
|
||||
:line_id = $info_immo.line
|
||||
|
|
@ -44,7 +43,7 @@
|
|||
|
||||
{{:assign var="info_immo.amount" value=$info_immo.amount|or:$ligne_immo.montant}}
|
||||
{{:assign var="info_immo.date_achat" value=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign var="info_immo.date_mes" value=$info_immo.date_mes|or:$ligne_immo.date_achat}}
|
||||
{{:assign var="info_immo.date_mes" value=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign var="info_immo.label" value=$info_immo.label|or:$ligne_immo.label}}
|
||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $info_immo.label}}
|
||||
{{:assign var="info_immo.label" value=$info_immo.label|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
|
|
@ -56,19 +55,20 @@
|
|||
*}}
|
||||
{{:assign linked_immos=null}}
|
||||
{{:assign total_credits=0}}
|
||||
{{#load type="immo_link" where="$$.immo_doc_id=:immo_doc_id" :immo_doc_id=$_GET.immo_doc_id|intval}}
|
||||
{{#load type="credit_link" where="$$.immo_doc_id=:immo_doc_id" :immo_doc_id=$_GET.immo_doc_id|intval}}
|
||||
{{#select
|
||||
line.credit,
|
||||
trans.id
|
||||
trans.id,
|
||||
trans.label,
|
||||
trans.date
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
WHERE line.id = :credit_line_id;
|
||||
:credit_line_id=$credit_line_id
|
||||
}}
|
||||
{{:assign credit=$credit}}
|
||||
{{:assign credit_trans_id=$id}}
|
||||
{{:assign var="linked_immos." id=$id label=$label amount=$credit date=$date}}
|
||||
{{/select}}
|
||||
{{:assign var="linked_immos." value=$credit_trans_id}}
|
||||
{{if $amount == null}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
||||
{{else}}
|
||||
|
|
@ -94,17 +94,37 @@
|
|||
{{/if}}
|
||||
{{/load}}
|
||||
|
||||
{{* barre de navigation *}}
|
||||
{{: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"}}
|
||||
{{else}}
|
||||
{{:assign subsubcurrent=null}}
|
||||
{{/if}}
|
||||
{{if $total_amort == 0}}
|
||||
{{:assign subsubcurrent=$subsubcurrent|cat:"-modif"}}
|
||||
{{/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.immo_trans_id}}
|
||||
|
||||
<nav class="tabs">
|
||||
<aside>
|
||||
{{*if $total_credits == 0*}}
|
||||
{{:linkbutton label="Rattacher une écriture d'immobilisation" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
||||
{{*/if*}}
|
||||
</aside>
|
||||
<nav style="margin-bottom: 1em;">
|
||||
{{*:linkbutton shape="left" label="Retour à la liste des immobilisations" href="index.html*}}
|
||||
{{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"}}
|
||||
{{/if}}
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
{{if $_GET.ok}}
|
||||
{{if $_GET.msg|match:"attach_amort"}}
|
||||
{{:assign msg="Attachement amortissement effectué"}}
|
||||
|
|
@ -119,14 +139,34 @@
|
|||
<p class="block error">{{$msg}}</p>
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
<h3 class="ruler">
|
||||
Paramètres de l'immobilisation
|
||||
<span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span>
|
||||
</h3>
|
||||
*}}
|
||||
{{if $linked_immos != null}}
|
||||
<aside class="right">
|
||||
<table class="list">
|
||||
<caption>Écritures d'avoir liées</caption>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_immos item="elem"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$elem.id}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$url}}">#{{$elem.id}}</a></td>
|
||||
<td>{{$elem.label}}</td>
|
||||
<td>{{$elem.date|date_short}}</td>
|
||||
<td class="money">{{"%f"|math:$elem.amount|money_currency_html:false|raw}}</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</aside>
|
||||
{{/if}}
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
<dd><span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span> {{$info_immo.label}}</dd>
|
||||
<dd><span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span><span class="label"> {{$info_immo.label}}</span></dd>
|
||||
<dt>Compte d'immobilisation</dt>
|
||||
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
||||
<dt>Montant de l'immobilisation</dt>
|
||||
|
|
@ -134,14 +174,15 @@
|
|||
{{if $total_credits > 0}}
|
||||
<dt>Montant des avoirs</dt>
|
||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||
{{*
|
||||
<dt>Écritures d'avoir</dt>
|
||||
<dd>
|
||||
{{#foreach from=$linked_immos item="id"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$id}}
|
||||
<span class="num"><a href="{{$url}}">#{{$id}}</a></span>
|
||||
{{#foreach from=$linked_immos item="elem"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$elem.id}}
|
||||
<span class="num"><a href="{{$url}}">#{{$elem.id}}</a></span>
|
||||
{{/foreach}}
|
||||
{{*:debug linked_immos=$linked_immos*}}
|
||||
</dd>
|
||||
*}}
|
||||
<dt>Montant à amortir</dt>
|
||||
<dd class="money strong">{{"%f"|math:$solde|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -98,3 +98,12 @@ html.dark .block.alert {
|
|||
span.input-list.avoirs label {
|
||||
padding : 0.4rem 0.6rem;
|
||||
}
|
||||
|
||||
aside.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.label {
|
||||
font-size : 120%;
|
||||
font-weight : bold;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue