Avertissement informations non utilisées immobilisations comptes 23xx
This commit is contained in:
parent
88c878d89f
commit
6d6e6870da
1 changed files with 10 additions and 19 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{:admin_header title="Ajout immobilisation" current="module_amortization"}}
|
||||
{{:include file="_get_config.html" keep="module.config"}}
|
||||
|
||||
{{#years closed=false order="start_date" assign=years.}}
|
||||
|
|
@ -47,6 +48,8 @@
|
|||
keep="account_code"
|
||||
}}
|
||||
{{:assign credit_account=$account_code}}
|
||||
{{:assign debit_account_code=$debit_account|keys|value:0}}
|
||||
{{:assign credit_account_code=$credit_account|keys|value:0}}
|
||||
|
||||
{{* vérifier :
|
||||
- que le compte d'immo débute par un préfixe correct (20, 21, ...)
|
||||
|
|
@ -63,6 +66,10 @@
|
|||
{{:assign code=$elem}}
|
||||
{{/if}}
|
||||
{{:assign var="prefix_array." value=$code}}
|
||||
{{* déterminer si le compte d'immo est un compte d'immo en cours *}}
|
||||
{{if $debit_account_code|strpos:$code === 0}}
|
||||
{{:assign status="unfinished"}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
{{:include
|
||||
|
|
@ -78,21 +85,6 @@
|
|||
{{:redirect url="add_account.html?account=%s&chart=%s"|args:$compte:$selected_chart}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign debit_account=$debit_account|keys|value:0}}
|
||||
{{:assign credit_account=$credit_account|keys|value:0}}
|
||||
|
||||
{{* déterminer si le compte d'immo est un compte d'immo en cours *}}
|
||||
{{#foreach from=$module.config.unfinished item="elem"}}
|
||||
{{if $elem.code != null}}
|
||||
{{:assign code=$elem.code}}
|
||||
{{else}}
|
||||
{{:assign code=$elem}}
|
||||
{{/if}}
|
||||
{{if $debit_account|strpos:$code === 0}}
|
||||
{{:assign status="unfinished"}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
{{if $status != "unfinished"}}
|
||||
{{* vérifier que la date d'acquisition est antérieure à la date de mise en service *}}
|
||||
{{:assign date_debut=$_POST.date_mes|or:$_POST.date_achat|parse_date}}
|
||||
|
|
@ -120,11 +112,10 @@
|
|||
date=$_POST.date_achat
|
||||
label=$_POST.designation
|
||||
amount=$_POST.montant
|
||||
debit=$debit_account
|
||||
credit=$credit_account
|
||||
debit=$debit_account_code
|
||||
credit=$credit_account_code
|
||||
id_project=$_POST.id_project
|
||||
}}
|
||||
|
||||
{{if $status != "unfinished"}}
|
||||
{{* vérifier s'il y a déjà un document avec le même numéro de ligne *}}
|
||||
{{:assign var="immo_line_id" value=$result.lines.1.id}}
|
||||
|
|
@ -158,7 +149,6 @@
|
|||
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Ajout immobilisation" current="module_amortization"}}
|
||||
{{* barre de navigation *}}
|
||||
{{if ! $dialog}}
|
||||
{{:linkbutton href="index.html" label="Retour" shape="left"}}
|
||||
|
|
@ -221,6 +211,7 @@
|
|||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Amortissement</legend>
|
||||
<span class="help">Informations non utilisées pour les immobilisations du compte 23 et ses sous-comptes</span>
|
||||
<dl>
|
||||
<div id="div_amort">
|
||||
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=0 default=1 suffix="année(s)"}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue