Compare commits
3 Commits
caecba987f
...
ad4b76695d
Author | SHA1 | Date | |
---|---|---|---|
ad4b76695d | |||
f1bea6bda2 | |||
1e2ba133f5 |
@ -6,6 +6,10 @@
|
|||||||
{{:include file="_nav.html" current="index"}}
|
{{:include file="_nav.html" current="index"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{:read file="./defaut.json" assign="config_json"}}
|
||||||
|
{{:assign config_defaut=$config_json|json_decode}}
|
||||||
|
{{:assign var="prefix_array" value=$config_defaut.prefixes|keys}}
|
||||||
|
|
||||||
{{* Traiter l'envoi du formulaire *}}
|
{{* Traiter l'envoi du formulaire *}}
|
||||||
{{#form on="add"}}
|
{{#form on="add"}}
|
||||||
|
|
||||||
@ -119,9 +123,6 @@
|
|||||||
{{:assign var="projects.%d"|args:$id value=$label}}
|
{{:assign var="projects.%d"|args:$id value=$label}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{:read file="./defaut.json" assign="config_json"}}
|
|
||||||
{{:assign config_defaut=$config_json|json_decode}}
|
|
||||||
{{:assign var="prefix_array" value=$config_defaut.prefixes|keys}}
|
|
||||||
{{#foreach from=$prefix_array item="code"}}
|
{{#foreach from=$prefix_array item="code"}}
|
||||||
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
{{:assign var="pattern_array." value="%s*"|args:$code}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
@ -137,13 +138,13 @@
|
|||||||
{{:input type="date" name="date_mes" label="Date de mise en service" help="à renseigner uniquement si différente de la date d'acquisition"}}
|
{{:input type="date" name="date_mes" label="Date de mise en service" help="à renseigner uniquement si différente de la date d'acquisition"}}
|
||||||
{{:input type="text" name="designation" label="Désignation" required=true}}
|
{{:input type="text" name="designation" label="Désignation" required=true}}
|
||||||
{{:input type="money" name="montant" label="Montant" required=true}}
|
{{:input type="money" name="montant" label="Montant" required=true}}
|
||||||
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=0 default=1}}
|
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=0 default=1 suffix="année(s)"}}
|
||||||
{{:input
|
{{:input
|
||||||
type="list"
|
type="list"
|
||||||
name="credit_account"
|
name="credit_account"
|
||||||
label="Compte de décaissement"
|
label="Compte de décaissement"
|
||||||
required=true
|
required=true
|
||||||
target="!acc/charts/accounts/selector.php?targets=%s&date=%s"|args:"1:2:3":$date
|
target="!acc/charts/accounts/selector.php?types=%s&date=%s"|args:"1|2|3":$date
|
||||||
default=$bank_account
|
default=$bank_account
|
||||||
}}
|
}}
|
||||||
{{:input
|
{{:input
|
||||||
@ -151,7 +152,7 @@
|
|||||||
name="debit_account"
|
name="debit_account"
|
||||||
label="Compte d'immobilisation (20xx, 21xx, ...)"
|
label="Compte d'immobilisation (20xx, 21xx, ...)"
|
||||||
required=true
|
required=true
|
||||||
target="!acc/charts/accounts/selector.php?date=%s&patterns=%s"|args:$date:$patterns
|
target="!acc/charts/accounts/selector.php?date=%s&codes=%s"|args:$date:$patterns
|
||||||
default=$immo_account
|
default=$immo_account
|
||||||
}}
|
}}
|
||||||
{{if $projects != null}}
|
{{if $projects != null}}
|
||||||
|
@ -259,7 +259,7 @@
|
|||||||
inner join acc_accounts as acc on acc.id = li.id_account
|
inner join acc_accounts as acc on acc.id = li.id_account
|
||||||
inner join acc_transactions as trans on trans.id = li.id_transaction
|
inner join acc_transactions as trans on trans.id = li.id_transaction
|
||||||
inner join acc_years as y on y.id = trans.id_year
|
inner join acc_years as y on y.id = trans.id_year
|
||||||
where acc.code like "28%" AND credit > 0
|
where acc.code like "28%" AND credit > 0 AND (NOT trans.status & 16)
|
||||||
order by trans.date, trans.label;
|
order by trans.date, trans.label;
|
||||||
assign=autre_amort
|
assign=autre_amort
|
||||||
}}
|
}}
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$quote|cat:$code|cat:"%"|cat:$quote|cat:" OR "}}
|
{{:assign condition=$condition|cat:" account.code LIKE "|cat:$quote|cat:$code|cat:"%"|cat:$quote|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign condition=$condition|cat:"0)"}}
|
{{:assign condition=$condition|cat:"0)"}}
|
||||||
{{:assign condition=$condition|cat:" AND debit > 0"}}
|
{{:assign condition=$condition|cat:" AND debit > 0 AND NOT (trans.status & 16)"}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
trans.id as trans_id,
|
trans.id as trans_id,
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
name="debit_account"
|
name="debit_account"
|
||||||
label="Compte de débit"
|
label="Compte de débit"
|
||||||
required=true
|
required=true
|
||||||
target="!acc/charts/accounts/selector.php?patterns=%s&year=%d"|args:"68*":$year.id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"68*":$year.id
|
||||||
default=$debit_account
|
default=$debit_account
|
||||||
}}
|
}}
|
||||||
{{:input
|
{{:input
|
||||||
@ -155,7 +155,7 @@
|
|||||||
name="credit_account"
|
name="credit_account"
|
||||||
label="Compte d'amortissement (280xx ou 281xx)"
|
label="Compte d'amortissement (280xx ou 281xx)"
|
||||||
required=true
|
required=true
|
||||||
target="!acc/charts/accounts/selector.php?patterns=%s&year=%d"|args:"28*":$year.id
|
target="!acc/charts/accounts/selector.php?codes=%s&year=%d"|args:"28*":$year.id
|
||||||
default=$credit_account
|
default=$credit_account
|
||||||
}}
|
}}
|
||||||
</dl>
|
</dl>
|
||||||
|
Loading…
Reference in New Issue
Block a user