Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec6cf99507 |
2 changed files with 43 additions and 37 deletions
|
|
@ -23,7 +23,16 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{{* lister les immobilisations en cours de constitution *}}
|
{{* lister les immobilisations en cours de constitution *}}
|
||||||
{{:assign condition=$condition|cat:"account.code LIKE '23%' AND debit > 0 AND NOT (trans.status & 16)"}}
|
{{:include file="_get_config.html" keep="config.prefixes"}}
|
||||||
|
{{:assign condition="("}}
|
||||||
|
{{#foreach from=$config.prefixes item="code"}}
|
||||||
|
{{if $code|substr:0:2 == "23"}}
|
||||||
|
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||||
|
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$code|cat:" OR "}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{:assign condition=$condition|cat:"0)"}}
|
||||||
|
{{:assign condition=$condition|cat:" AND debit > 0 AND NOT (trans.status & 16)"}}
|
||||||
{{:assign nb_immo=0}}
|
{{:assign nb_immo=0}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,21 @@
|
||||||
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
|
||||||
|
{{* date de début de l'exercice *}}
|
||||||
|
{{#select start_date FROM acc_years WHERE id = :year_id; :year_id = $_GET.year}}
|
||||||
|
{{*
|
||||||
|
{{if $start_date < "2025-01-01"
|
||||||
|
*}}
|
||||||
|
{{:assign vnc_code="675"}}
|
||||||
|
{{:assign cession_code="775"}}
|
||||||
|
{{*
|
||||||
|
{{else}}
|
||||||
|
{{:assign vnc_code="657"}}
|
||||||
|
{{:assign cession_code="757"}}
|
||||||
|
{{/if}}
|
||||||
|
*}}
|
||||||
|
{{/select}}
|
||||||
|
|
||||||
{{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$_GET.amort_amount}}
|
{{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$_GET.amort_amount}}
|
||||||
{{:assign amort_comp=0}} {{* amortissement complémentaire jqà date sortie *}}
|
{{:assign amort_comp=0}} {{* amortissement complémentaire jqà date sortie *}}
|
||||||
{{:assign amort_except=0}} {{* amortissement exceptionnel jqà date fin amortissement *}}
|
{{:assign amort_except=0}} {{* amortissement exceptionnel jqà date fin amortissement *}}
|
||||||
|
|
@ -254,25 +269,16 @@
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:include file="_nav.html" current="index" subcurrent="balance_exit"}}
|
{{:include file="_nav.html" current="index" subcurrent="balance_exit"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{:form_errors}}
|
||||||
|
|
||||||
{{*
|
{{* Préparer les infos pour le formulaire *}}
|
||||||
Préparer les infos pour le formulaire
|
|
||||||
déterminer les comptes pour les différentes écritures
|
|
||||||
*}}
|
|
||||||
|
|
||||||
|
{{* déterminer les comptes pour les différentes écritures *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_get_amort_code.html"
|
file="./_get_amort_code.html"
|
||||||
code_immo=$ligne_immo.code
|
code_immo=$ligne_immo.code
|
||||||
keep="code_amort"
|
keep="code_amort"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{*
|
|
||||||
Utilisation des « anciens » numéros de comptes because conflit
|
|
||||||
avec les nouveaux numéros ; voir info.org
|
|
||||||
*}}
|
|
||||||
{{:assign vnc_code="675"}}
|
|
||||||
{{:assign cession_code="775"}}
|
|
||||||
|
|
||||||
{{:assign var="liste_codes.6811" name="comp_account"}}
|
{{:assign var="liste_codes.6811" name="comp_account"}}
|
||||||
{{:assign var="liste_codes.687" name="except_account"}}
|
{{:assign var="liste_codes.687" name="except_account"}}
|
||||||
{{:assign var="liste_codes.462" name="creance_account"}}
|
{{:assign var="liste_codes.462" name="creance_account"}}
|
||||||
|
|
@ -283,28 +289,20 @@
|
||||||
{{: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
|
||||||
WHERE chart.id = :chart_id AND !condition;
|
INNER JOIN acc_years as year ON chart.id = year.id_chart
|
||||||
:chart_id = $chart_id
|
WHERE year.id = 1 AND !condition;
|
||||||
!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}}
|
||||||
|
|
@ -385,7 +383,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="comp_account"
|
name="comp_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"68*":$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"68*":$_GET.year
|
||||||
default=$comp_account
|
default=$comp_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -397,7 +395,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="amort_comp_account"
|
name="amort_comp_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"28*":$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$_GET.year
|
||||||
default=$amort_account
|
default=$amort_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -429,7 +427,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="except_account"
|
name="except_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"687*":$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"687*":$_GET.year
|
||||||
default=$except_account
|
default=$except_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -441,7 +439,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="amort_except_account"
|
name="amort_except_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"28*":$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$_GET.year
|
||||||
default=$amort_account
|
default=$amort_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -467,7 +465,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="amort_sortie_account"
|
name="amort_sortie_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"28*":$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$_GET.year
|
||||||
default=$amort_account
|
default=$amort_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -485,7 +483,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="vnc_account"
|
name="vnc_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s*&id_chart=%s"|args:$vnc_code:$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s*&year=%d"|args:$vnc_code:$_GET.year
|
||||||
default=$vnc_account
|
default=$vnc_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -494,11 +492,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td> {{* style="pointer-events: none; opacity: 0.6;">*}}
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="immo_account"
|
name="immo_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:$patterns:$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:$patterns:$_GET.year
|
||||||
default=$immo_account
|
default=$immo_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -524,7 +522,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="creance_account"
|
name="creance_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s&id_chart=%s"|args:"462*":$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"462*":$_GET.year
|
||||||
default=$creance_account
|
default=$creance_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -536,7 +534,7 @@
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="cession_account"
|
name="cession_account"
|
||||||
target="!acc/charts/accounts/selector.php?codes=%s*&id_chart=%s"|args:$cession_code:$chart_id
|
target="!acc/charts/accounts/selector.php?codes=%s*&year=%d"|args:$cession_code:$_GET.year
|
||||||
default=$cession_account
|
default=$cession_account
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -552,5 +550,4 @@
|
||||||
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
{{:form_errors}}
|
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue