Changement filtre brindille : key => value
This commit is contained in:
parent
b8ff213645
commit
ec54c90440
6 changed files with 19 additions and 15 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign condition=$condition|cat:"0)"}}
|
{{:assign condition=$condition|cat:"0)"}}
|
||||||
|
|
||||||
{{:assign account_code=$account|keys|key:0}}
|
{{:assign account_code=$account|keys|value:0}}
|
||||||
{{#sql
|
{{#sql
|
||||||
select="code"
|
select="code"
|
||||||
tables="acc_accounts"
|
tables="acc_accounts"
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,13 @@
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
déterminer le numéro du compte passé en paramètre dans un tableau
|
déterminer le numéro du compte passé en paramètre dans un tableau
|
||||||
|
la clé est parfois l'identifiant du compte, parfois son code...
|
||||||
|
d'où l'obligation d'extraire le code de la valeur qui a toujours
|
||||||
|
la forme : code — libellé
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{:assign label=$account|values|key:0}}
|
{{:assign values=$account|values}}
|
||||||
|
{{:assign label=$values.0}}
|
||||||
{{:assign pos=$label|strpos:" "}}
|
{{:assign pos=$label|strpos:" "}}
|
||||||
{{:assign account_code=$label|substr:0:$pos}}
|
{{:assign account_code=$label|substr:0:$pos}}
|
||||||
{{:assign var="account_code.%s"|args:$account_code value=$label}}
|
{{:assign var="account_code.%s"|args:$account_code value=$label}}
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@
|
||||||
date=$_POST.date_achat
|
date=$_POST.date_achat
|
||||||
label=$_POST.designation
|
label=$_POST.designation
|
||||||
amount=$_POST.montant
|
amount=$_POST.montant
|
||||||
debit=$debit_account|keys|key:0
|
debit=$debit_account|keys|value:0
|
||||||
credit=$credit_account|keys|key:0
|
credit=$credit_account|keys|value:0
|
||||||
id_project=$_POST.id_project
|
id_project=$_POST.id_project
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,14 +181,14 @@
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
debit=$_POST.montant
|
debit=$_POST.montant
|
||||||
account=$debit_account|keys|key:0
|
account=$debit_account|keys|value:0
|
||||||
id_project=$_GET.project_id
|
id_project=$_GET.project_id
|
||||||
label=$_POST.designation
|
label=$_POST.designation
|
||||||
}}
|
}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
credit=$_POST.montant
|
credit=$_POST.montant
|
||||||
account=$credit_account|keys|key:0
|
account=$credit_account|keys|value:0
|
||||||
id_project=$_GET.project_id
|
id_project=$_GET.project_id
|
||||||
label=$_POST.designation
|
label=$_POST.designation
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
account=$elem
|
account=$elem
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign debit_account=$account_code|keys|key:0}}
|
{{:assign debit_account=$account_code|keys|value:0}}
|
||||||
{{:assign var="amount" from="_POST.credit_lines.%s"|args:$rang}}
|
{{:assign var="amount" from="_POST.credit_lines.%s"|args:$rang}}
|
||||||
{{:assign var="label" from="_POST.line_labels.%s"|args:$rang}}
|
{{:assign var="label" from="_POST.line_labels.%s"|args:$rang}}
|
||||||
{{:assign
|
{{:assign
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
account=$_POST.debit_account
|
account=$_POST.debit_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign credit_account=$account_code|keys|key:0}}
|
{{:assign credit_account=$account_code|keys|value:0}}
|
||||||
{{:assign var="amount" from="_POST.debit_lines.%s"|args:0}}
|
{{:assign var="amount" from="_POST.debit_lines.%s"|args:0}}
|
||||||
{{:assign count=$_POST.line_labels|count}}
|
{{:assign count=$_POST.line_labels|count}}
|
||||||
{{:assign count="%d-1"|math:$count}}
|
{{:assign count="%d-1"|math:$count}}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
account=$account
|
account=$account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign amort_account_code=$account_code|keys|key:0}}
|
{{:assign amort_account_code=$account_code|keys|value:0}}
|
||||||
|
|
||||||
{{if $valeur_nette > 0}}
|
{{if $valeur_nette > 0}}
|
||||||
{{* immo non totalement amortie *}}
|
{{* immo non totalement amortie *}}
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
account=$_POST.comp_account
|
account=$_POST.comp_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign comp_account_code=$account_code|keys|key:0}}
|
{{:assign comp_account_code=$account_code|keys|value:0}}
|
||||||
|
|
||||||
{{:assign libelle="Amortissement complémentaire "|cat:$ligne_immo.label}}
|
{{:assign libelle="Amortissement complémentaire "|cat:$ligne_immo.label}}
|
||||||
{{:assign
|
{{:assign
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
account=$_POST.except_account
|
account=$_POST.except_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign except_account_code=$account_code|keys|key:0}}
|
{{:assign except_account_code=$account_code|keys|value:0}}
|
||||||
{{:assign libelle="Amortissement exceptionnel "|cat:$ligne_immo.label}}
|
{{:assign libelle="Amortissement exceptionnel "|cat:$ligne_immo.label}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
|
|
@ -150,7 +150,7 @@
|
||||||
account=$_POST.immo_account
|
account=$_POST.immo_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign immo_account_code=$account_code|keys|key:0}}
|
{{:assign immo_account_code=$account_code|keys|value:0}}
|
||||||
{{:assign libelle="Sortie du bilan de "|cat:$ligne_immo.label}}
|
{{:assign libelle="Sortie du bilan de "|cat:$ligne_immo.label}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
account=$_POST.vnc_account
|
account=$_POST.vnc_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign vnc_account_code=$account_code|keys|key:0}}
|
{{:assign vnc_account_code=$account_code|keys|value:0}}
|
||||||
{{:assign
|
{{:assign
|
||||||
var="lines."
|
var="lines."
|
||||||
account=$vnc_account_code
|
account=$vnc_account_code
|
||||||
|
|
@ -203,13 +203,13 @@
|
||||||
account=$_POST.creance_account
|
account=$_POST.creance_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign creance_account=$account_code|keys|key:0}}
|
{{:assign creance_account=$account_code|keys|value:0}}
|
||||||
{{:include
|
{{:include
|
||||||
file="_get_codes.html"
|
file="_get_codes.html"
|
||||||
account=$_POST.cession_account
|
account=$_POST.cession_account
|
||||||
keep="account_code"
|
keep="account_code"
|
||||||
}}
|
}}
|
||||||
{{:assign cession_account=$account_code|keys|key:0}}
|
{{:assign cession_account=$account_code|keys|value:0}}
|
||||||
{{:api
|
{{:api
|
||||||
method="POST"
|
method="POST"
|
||||||
path="accounting/transaction"
|
path="accounting/transaction"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue