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="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
|
||||
acc.id,
|
||||
acc.code as acc_code,
|
||||
acc.label as acc_label,
|
||||
year.label as year_label
|
||||
acc.label as acc_label
|
||||
FROM acc_accounts as acc
|
||||
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 year.id = :year_id AND !condition;
|
||||
:year_id = $_GET.year
|
||||
WHERE chart.id = :chart_id AND !condition;
|
||||
:chart_id = $chart_id
|
||||
!condition=$condition
|
||||
}}
|
||||
{{: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.year_label"|args:$acc_code value=$year_label}}
|
||||
{{/select}}
|
||||
|
||||
{{#foreach from=$liste_codes key=code}}
|
||||
|
|
@ -378,7 +385,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -390,7 +397,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -422,7 +429,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -434,7 +441,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -460,7 +467,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -478,7 +485,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -491,7 +498,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -517,7 +524,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
@ -529,7 +536,7 @@
|
|||
{{:input
|
||||
type="list"
|
||||
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
|
||||
}}
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue