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}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/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}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
{{/if}}
|
{{/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
|
lister les écritures au crédit du compte de l'immobilisation
|
||||||
|
|
@ -23,6 +28,8 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign account_code=$ligne_immo.account_code|substr:0:2|cat:"%"}}
|
{{:assign account_code=$ligne_immo.account_code|substr:0:2|cat:"%"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{:assign date_immo=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
line.id as credit_line_id,
|
line.id as credit_line_id,
|
||||||
line.id_transaction as credit_trans_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_accounts AS account ON account.id = line.id_account
|
||||||
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
INNER JOIN acc_years AS y ON y.id = trans.id_year
|
||||||
WHERE account.code LIKE :account_code AND credit > 0
|
WHERE account.code LIKE :account_code AND credit > 0
|
||||||
|
AND trans.date >= :date_immo
|
||||||
AND credit_line_id NOT IN (
|
AND credit_line_id NOT IN (
|
||||||
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
SELECT json_extract(link.document, '$.credit_line_id') AS credit_line_id FROM !table as link
|
||||||
WHERE json_extract(link.document, '$.type') == "credit_link"
|
WHERE json_extract(link.document, '$.type') == "credit_link"
|
||||||
|
|
@ -48,7 +56,8 @@
|
||||||
WHERE json_extract(exit_link.document, '$.type') == "exit_link")
|
WHERE json_extract(exit_link.document, '$.type') == "exit_link")
|
||||||
ORDER BY trans.date, trans.label;
|
ORDER BY trans.date, trans.label;
|
||||||
:account_code = $account_code
|
:account_code = $account_code
|
||||||
!table =$module.table
|
!table = $module.table
|
||||||
|
:date_immo = $date_immo
|
||||||
assign="other_immos."
|
assign="other_immos."
|
||||||
}}
|
}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
@ -88,7 +97,7 @@
|
||||||
<dt>Montant</dt>
|
<dt>Montant</dt>
|
||||||
<dd class="money strong">{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
<dd class="money strong">{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}</dd>
|
||||||
<dt>Date de l'immobilisation</dt>
|
<dt>Date de l'immobilisation</dt>
|
||||||
<dd>{{$ligne_immo.date_achat|date_short}}</dd>
|
<dd>{{$date_debut|date_short}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue