Changement nom : immo_link => credit_link
This commit is contained in:
parent
d06dd424b3
commit
c620ac769e
6 changed files with 23 additions and 16 deletions
|
|
@ -82,7 +82,7 @@
|
||||||
et déduire leur montant de celui de l'immo
|
et déduire leur montant de celui de l'immo
|
||||||
*}}
|
*}}
|
||||||
{{#load
|
{{#load
|
||||||
type="immo_link"
|
type="credit_link"
|
||||||
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $immo_doc_id
|
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $immo_doc_id
|
||||||
}}
|
}}
|
||||||
{{if $amount == null}}
|
{{if $amount == null}}
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Détails"
|
label="Détails"
|
||||||
href="details_immo.html?immo_doc_id=%s"|args:$immo_doc_id
|
href="details_immo.html?immo_doc_id=%s"|args:$immo_doc_id
|
||||||
shape="search"
|
shape="eye"
|
||||||
}}
|
}}
|
||||||
{{* target="_dialog"*}}
|
{{* target="_dialog"*}}
|
||||||
{{*/if*}}
|
{{*/if*}}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
line.label as line_label,
|
line.label as line_label,
|
||||||
trans.id as immo_trans_id,
|
trans.id as immo_trans_id,
|
||||||
trans.label as label,
|
trans.label as label,
|
||||||
trans.date,
|
trans.date as date_achat,
|
||||||
account.code as account_code,
|
account.code as account_code,
|
||||||
account.label as account_label
|
account.label as account_label
|
||||||
FROM acc_transactions_lines AS line
|
FROM acc_transactions_lines AS line
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.immo_trans_id}}
|
{{: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}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.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}}
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
et déduire leur montant de celui de l'immo
|
et déduire leur montant de celui de l'immo
|
||||||
*}}
|
*}}
|
||||||
{{:assign total_credits=0}}
|
{{: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}}
|
{{if $amount == null}}
|
||||||
{{#select credit FROM acc_transactions_lines WHERE id = :credit_line_id;
|
{{#select credit FROM acc_transactions_lines WHERE id = :credit_line_id;
|
||||||
:credit_line_id=$credit_line_id
|
:credit_line_id=$credit_line_id
|
||||||
|
|
@ -180,9 +180,8 @@
|
||||||
}}
|
}}
|
||||||
</p>
|
</p>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
Il sera possible de choisir la date de sortie, d'indiquer
|
Il sera possible de choisir la date de sortie et d'indiquer
|
||||||
le montant de la cession le cas échéant et de modifier les
|
le montant de la cession le cas échéant.
|
||||||
comptes associés.
|
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
{{* montant de l'écriture de crédit déjà affecté *}}
|
{{* montant de l'écriture de crédit déjà affecté *}}
|
||||||
{{:assign montant_affecte=0}}
|
{{: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"
|
where="$$.credit_line_id = :credit_line_id"
|
||||||
:credit_line_id = $_GET.credit_line_id|intval
|
:credit_line_id = $_GET.credit_line_id|intval
|
||||||
}}
|
}}
|
||||||
|
|
@ -114,7 +114,7 @@
|
||||||
{{* enregistrer la liaison des lignes d'immo *}}
|
{{* enregistrer la liaison des lignes d'immo *}}
|
||||||
{{:save
|
{{:save
|
||||||
key=""|uuid
|
key=""|uuid
|
||||||
type="immo_link"
|
type="credit_link"
|
||||||
immo_doc_id=$_GET.immo_doc_id|intval
|
immo_doc_id=$_GET.immo_doc_id|intval
|
||||||
credit_line_id=$_GET.credit_line_id|intval
|
credit_line_id=$_GET.credit_line_id|intval
|
||||||
amount=$saved_credit
|
amount=$saved_credit
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["amort_link", "immo_link"]
|
"enum": ["amort_link", "credit_link", "exit_link"]
|
||||||
},
|
},
|
||||||
"immo_doc_id" : {
|
"immo_doc_id" : {
|
||||||
"description": "identifiant du document d'immobilisation associé",
|
"description": "identifiant du document d'immobilisation associé",
|
||||||
|
|
@ -13,12 +13,17 @@
|
||||||
"exclusiveMinimum": 0
|
"exclusiveMinimum": 0
|
||||||
},
|
},
|
||||||
"amort_line_id" : {
|
"amort_line_id" : {
|
||||||
"description": "numéro de ligne d'amortissement associée à l'immobilisation",
|
"description": "ligne d'amortissement associée à l'immobilisation",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"exclusiveMinimum": 0
|
"exclusiveMinimum": 0
|
||||||
},
|
},
|
||||||
"credit_line_id": {
|
"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",
|
"type": "integer",
|
||||||
"exclusiveMinimum": 0
|
"exclusiveMinimum": 0
|
||||||
},
|
},
|
||||||
|
|
@ -31,6 +36,9 @@
|
||||||
"if": {"properties": {"type": {"const": "amort_link"}}, "required": ["type"]},
|
"if": {"properties": {"type": {"const": "amort_link"}}, "required": ["type"]},
|
||||||
"then": {"required": ["amort_line_id"]},
|
"then": {"required": ["amort_line_id"]},
|
||||||
"else":
|
"else":
|
||||||
"if": {"properties": {"type": {"const": "immo_link"}}, "required": ["type"]},
|
"if": {"properties": {"type": {"const": "credit_link"}}, "required": ["type"]},
|
||||||
"then": {"required": ["credit_line_id"]},
|
"then": {"required": ["credit_line_id"]},
|
||||||
|
"else":
|
||||||
|
"if": {"properties": {"type": {"const": "exit_link"}}, "required": ["type"]},
|
||||||
|
"then": {"required": ["exit_line_id"]},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
WHERE account.code = :account_code AND credit > 0
|
WHERE account.code = :account_code AND credit > 0
|
||||||
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') == "immo_link")
|
WHERE json_extract(link.document, '$.type') == "credit_link")
|
||||||
ORDER BY trans.date, trans.label;
|
ORDER BY trans.date, trans.label;
|
||||||
:account_code = $ligne_immo.account_code
|
:account_code = $ligne_immo.account_code
|
||||||
!table =$module.table
|
!table =$module.table
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
*}}
|
*}}
|
||||||
{{:assign total_credits=0}}
|
{{:assign total_credits=0}}
|
||||||
{{#load
|
{{#load
|
||||||
type="immo_link"
|
type="credit_link"
|
||||||
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval
|
where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval
|
||||||
}}
|
}}
|
||||||
{{if $amount == null}}
|
{{if $amount == null}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue