write_exit : correction sélecteurs comptes
This commit is contained in:
parent
2bf3234ec1
commit
ff2d16d8cb
1 changed files with 22 additions and 15 deletions
|
|
@ -283,21 +283,28 @@
|
||||||
{{:assign condition=$liste_codes|keys|implode:","}}
|
{{:assign condition=$liste_codes|keys|implode:","}}
|
||||||
{{:assign condition="acc.code IN ("|cat:$condition|cat:")"}}
|
{{:assign condition="acc.code IN ("|cat:$condition|cat:")"}}
|
||||||
|
|
||||||
|
{{#select
|
||||||
|
chart.id
|
||||||
|
FROM acc_charts AS chart
|
||||||
|
INNER JOIN acc_years AS year ON chart.id = year.id_chart
|
||||||
|
WHERE year.id = :year_id;
|
||||||
|
:year_id = $_GET.year
|
||||||
|
}}
|
||||||
|
{{:assign chart_id=$id}}
|
||||||
|
{{/select}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
acc.id,
|
acc.id,
|
||||||
acc.code as acc_code,
|
acc.code as acc_code,
|
||||||
acc.label as acc_label,
|
acc.label as acc_label
|
||||||
year.label as year_label
|
|
||||||
FROM acc_accounts as acc
|
FROM acc_accounts as acc
|
||||||
INNER JOIN acc_charts as chart ON chart.id = acc.id_chart
|
INNER JOIN acc_charts as chart ON chart.id = acc.id_chart
|
||||||
INNER JOIN acc_years as year ON chart.id = year.id_chart
|
WHERE chart.id = :chart_id AND !condition;
|
||||||
WHERE year.id = :year_id AND !condition;
|
:chart_id = $chart_id
|
||||||
:year_id = $_GET.year
|
|
||||||
!condition=$condition
|
!condition=$condition
|
||||||
}}
|
}}
|
||||||
{{:assign var="liste_codes.%s.id"|args:$acc_code value=$id}}
|
{{:assign var="liste_codes.%s.id"|args:$acc_code value=$id}}
|
||||||
{{:assign var="liste_codes.%s.acc_label"|args:$acc_code value=$acc_label}}
|
{{:assign var="liste_codes.%s.acc_label"|args:$acc_code value=$acc_label}}
|
||||||
{{:assign var="liste_codes.%s.year_label"|args:$acc_code value=$year_label}}
|
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{#foreach from=$liste_codes key=code}}
|
{{#foreach from=$liste_codes key=code}}
|
||||||
|
|
@ -378,7 +385,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="comp_account"
|
name="comp_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"68*":$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"68*":$chart_id
|
||||||
default=$comp_account
|
default=$comp_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -390,7 +397,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="amort_comp_account"
|
name="amort_comp_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"28*":$chart_id
|
||||||
default=$amort_account
|
default=$amort_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -422,7 +429,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="except_account"
|
name="except_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"687*":$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"687*":$chart_id
|
||||||
default=$except_account
|
default=$except_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -434,7 +441,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="amort_except_account"
|
name="amort_except_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"28*":$chart_id
|
||||||
default=$amort_account
|
default=$amort_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -460,7 +467,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="amort_sortie_account"
|
name="amort_sortie_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"28*":$chart_id
|
||||||
default=$amort_account
|
default=$amort_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -478,7 +485,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="vnc_account"
|
name="vnc_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s*&year=%d"|args:$vnc_code:$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s*&id_chart=%s"|args:$vnc_code:$chart_id
|
||||||
default=$vnc_account
|
default=$vnc_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -491,7 +498,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="immo_account"
|
name="immo_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:$patterns:$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:$patterns:$chart_id
|
||||||
default=$immo_account
|
default=$immo_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -517,7 +524,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="creance_account"
|
name="creance_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"462*":$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"462*":$chart_id
|
||||||
default=$creance_account
|
default=$creance_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -529,7 +536,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="cession_account"
|
name="cession_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s*&year=%d"|args:$cession_code:$_GET.year
|
target="!acc/charts/accounts/selector.php?codes=%s*&id_chart=%s"|args:$cession_code:$chart_id
|
||||||
default=$cession_account
|
default=$cession_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue