Changement nom : immo_link => credit_link

This commit is contained in:
Jean-Christophe Engel 2026-05-04 13:48:48 +02:00
parent d06dd424b3
commit c620ac769e
6 changed files with 23 additions and 16 deletions

View file

@ -82,7 +82,7 @@
et déduire leur montant de celui de l'immo
*}}
{{#load
type="immo_link"
type="credit_link"
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $immo_doc_id
}}
{{if $amount == null}}
@ -143,7 +143,7 @@
{{:linkbutton
label="Détails"
href="details_immo.html?immo_doc_id=%s"|args:$immo_doc_id
shape="search"
shape="eye"
}}
{{* target="_dialog"*}}
{{*/if*}}

View file

@ -19,7 +19,7 @@
line.label as line_label,
trans.id as immo_trans_id,
trans.label as label,
trans.date,
trans.date as date_achat,
account.code as account_code,
account.label as account_label
FROM acc_transactions_lines AS line
@ -34,7 +34,7 @@
{{/select}}
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.immo_trans_id}}
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date}}
{{: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.label}}
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
@ -52,7 +52,7 @@
et déduire leur montant de celui de l'immo
*}}
{{: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}}
{{if $amount == null}}
{{#select credit FROM acc_transactions_lines WHERE id = :credit_line_id;
:credit_line_id=$credit_line_id
@ -180,9 +180,8 @@
}}
</p>
<p class="help">
Il sera possible de choisir la date de sortie, d'indiquer
le montant de la cession le cas échéant et de modifier les
comptes associés.
Il sera possible de choisir la date de sortie et d'indiquer
le montant de la cession le cas échéant.
</p>
</fieldset>
</form>

View file

@ -52,7 +52,7 @@
{{* montant de l'écriture de crédit déjà affecté *}}
{{:assign montant_affecte=0}}
{{#load type="immo_link" assign="linked_immo."
{{#load type="credit_link" assign="linked_immo."
where="$$.credit_line_id = :credit_line_id"
:credit_line_id = $_GET.credit_line_id|intval
}}
@ -114,7 +114,7 @@
{{* enregistrer la liaison des lignes d'immo *}}
{{:save
key=""|uuid
type="immo_link"
type="credit_link"
immo_doc_id=$_GET.immo_doc_id|intval
credit_line_id=$_GET.credit_line_id|intval
amount=$saved_credit

View file

@ -5,7 +5,7 @@
"properties": {
"type": {
"type": "string",
"enum": ["amort_link", "immo_link"]
"enum": ["amort_link", "credit_link", "exit_link"]
},
"immo_doc_id" : {
"description": "identifiant du document d'immobilisation associé",
@ -13,12 +13,17 @@
"exclusiveMinimum": 0
},
"amort_line_id" : {
"description": "numéro de ligne d'amortissement associée à l'immobilisation",
"description": "ligne d'amortissement associée à l'immobilisation",
"type": "integer",
"exclusiveMinimum": 0
},
"credit_line_id": {
"description": "numéro de ligne au crédit du compte de l'immobilisation",
"description": "ligne au crédit du compte de l'immobilisation",
"type": "integer",
"exclusiveMinimum": 0
},
"exit_line_id": {
"description": "ligne d'amortissement de sortie du bilan de l'immobilisation",
"type": "integer",
"exclusiveMinimum": 0
},
@ -31,6 +36,9 @@
"if": {"properties": {"type": {"const": "amort_link"}}, "required": ["type"]},
"then": {"required": ["amort_line_id"]},
"else":
"if": {"properties": {"type": {"const": "immo_link"}}, "required": ["type"]},
"if": {"properties": {"type": {"const": "credit_link"}}, "required": ["type"]},
"then": {"required": ["credit_line_id"]},
"else":
"if": {"properties": {"type": {"const": "exit_link"}}, "required": ["type"]},
"then": {"required": ["exit_line_id"]},
}

View file

@ -58,7 +58,7 @@
WHERE account.code = :account_code AND credit > 0
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') == "immo_link")
WHERE json_extract(link.document, '$.type') == "credit_link")
ORDER BY trans.date, trans.label;
:account_code = $ligne_immo.account_code
!table =$module.table

View file

@ -57,7 +57,7 @@
*}}
{{:assign total_credits=0}}
{{#load
type="immo_link"
type="credit_link"
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval
}}
{{if $amount == null}}