Avoirs : correction date et libellé ; sélection écritures postérieures date immo
This commit is contained in:
parent
3c29faea6c
commit
64d4788e76
1 changed files with 12 additions and 3 deletions
|
|
@ -10,10 +10,15 @@
|
|||
{{if $message != null}}
|
||||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
{{:assign label_immo=$ligne_immo.trans_label}}
|
||||
|
||||
{{: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}}
|
||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
{{/if}}
|
||||
{{if $info_immo.amount != null}}
|
||||
{{:assign var="ligne_immo.amount" value=$info_immo.amount}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
lister les écritures au crédit du compte de l'immobilisation
|
||||
|
|
@ -23,6 +28,8 @@
|
|||
{{else}}
|
||||
{{:assign account_code=$ligne_immo.account_code|substr:0:2|cat:"%"}}
|
||||
{{/if}}
|
||||
{{:assign date_immo=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
|
||||
{{#select
|
||||
line.id as credit_line_id,
|
||||
line.id_transaction as credit_trans_id,
|
||||
|
|
@ -40,6 +47,7 @@
|
|||
INNER JOIN acc_accounts AS account ON account.id = line.id_account
|
||||
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
||||
WHERE account.code LIKE :account_code AND credit > 0
|
||||
AND trans.date >= :date_immo
|
||||
AND credit_line_id NOT IN (
|
||||
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
||||
WHERE json_extract(link.document, '$.type') == "credit_link"
|
||||
|
|
@ -49,6 +57,7 @@
|
|||
ORDER BY trans.date, trans.label;
|
||||
:account_code = $account_code
|
||||
!table = $module.table
|
||||
:date_immo = $date_immo
|
||||
assign="other_immos."
|
||||
}}
|
||||
{{/select}}
|
||||
|
|
@ -88,7 +97,7 @@
|
|||
<dt>Montant</dt>
|
||||
<dd class="money strong">{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
||||
<dt>Date de l'immobilisation</dt>
|
||||
<dd>{{$ligne_immo.date_achat|date_short}}</dd>
|
||||
<dd>{{$date_debut|date_short}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue