Compare commits
No commits in common. "afbf036796c829c5b800da008b20c5f7b9e40a24" and "e0cf555851d9737c7469fdbdb2810db46802fc99" have entirely different histories.
afbf036796
...
e0cf555851
3 changed files with 8 additions and 22 deletions
|
@ -24,7 +24,6 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{:assign date_debut=$ligne_immo.date}}
|
{{:assign date_debut=$ligne_immo.date}}
|
||||||
{{:assign solde=$ligne_immo.montant}}
|
{{:assign solde=$ligne_immo.montant}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
|
||||||
|
|
||||||
{{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
{{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
||||||
{{:assign duree=$duration}}
|
{{:assign duree=$duration}}
|
||||||
|
@ -165,8 +164,8 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Libellé</dt>
|
||||||
<dd><span class="num"><a href={{$trans_url}}>#{{$ligne_immo.trans_id}}</a></span> {{$ligne_immo.label}}</dd>
|
<dd>{{$ligne_immo.label}}</dd>
|
||||||
<dt>Montant</dt>
|
<dt>Montant</dt>
|
||||||
<dd><strong class="money">{{"%f"|math:$ligne_immo.montant|money_currency}}</strong></dd>
|
<dd><strong class="money">{{"%f"|math:$ligne_immo.montant|money_currency}}</strong></dd>
|
||||||
<dt>Début d'amortissement</dt>
|
<dt>Début d'amortissement</dt>
|
||||||
|
|
|
@ -67,22 +67,19 @@
|
||||||
{{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$amort_amount}}
|
{{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$amort_amount}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
lister les exercices ouverts :
|
lister les exercices qui englobent la date de début du prochain amortissement
|
||||||
- dont la date de fin est postérieure à la date du dernier amortissment
|
|
||||||
- dont la date de début est antérieure ou égale à la date du jour
|
|
||||||
*}}
|
*}}
|
||||||
{{:assign default_exit_date=""}}
|
{{:assign default_exit_date=""}}
|
||||||
{{#years closed=false order="start_date" where=":debut <= end_date" :debut=$date_debut}}
|
{{#years closed=false order="start_date" where="start_date <= :debut AND :debut <= end_date"
|
||||||
|
:debut=$date_debut assign=years.}}
|
||||||
{{if $start_date|strtotime <= $now && $now <= $end_date|strtotime}}
|
{{if $start_date|strtotime <= $now && $now <= $end_date|strtotime}}
|
||||||
{{:assign default_exit_date=$now|date_short}}
|
{{:assign default_exit_date=$now|date_short}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $start_date|strtotime > $now}}
|
{{:assign ts_fin=$end_date|strtotime}}
|
||||||
{{:break}}
|
|
||||||
{{/if}}
|
|
||||||
{{:assign var="years." id=$id label=$label start_date=$start_date end_date=$end_date}}
|
|
||||||
{{:assign debut=$start_date|date_short}}
|
{{:assign debut=$start_date|date_short}}
|
||||||
{{:assign fin=$end_date|date_short}}
|
{{:assign fin=$end_date|date_short}}
|
||||||
{{:assign var="open_years.%d"|args:$id value=$label|cat:" (du "|cat:$debut|cat:" au "|cat:$fin|cat:")"}}
|
{{:assign var="open_years.%d"|args:$id value=$label|cat:" (du "|cat:$debut|cat:" au "|cat:$fin|cat:")"}}
|
||||||
|
{{:assign var="years_data.%d"|args:$id value=$ts_debut|cat:" "|cat:$ts_fin}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:error message="Aucun exercice ouvert pour enregistrer un amortissement"}}
|
{{:error message="Aucun exercice ouvert pour enregistrer un amortissement"}}
|
||||||
{{/years}}
|
{{/years}}
|
||||||
|
@ -144,7 +141,6 @@ lister les exercices ouverts :
|
||||||
{{* vérifier que la date de sortie est située dans un exercice ouvert *}}
|
{{* vérifier que la date de sortie est située dans un exercice ouvert *}}
|
||||||
{{:assign ts_exit = $_POST.date_sortie|parse_date|strtotime}}
|
{{:assign ts_exit = $_POST.date_sortie|parse_date|strtotime}}
|
||||||
{{:assign ok=false}}
|
{{:assign ok=false}}
|
||||||
{{:assign msg_amort=""}}
|
|
||||||
{{#foreach from=$years}}
|
{{#foreach from=$years}}
|
||||||
{{if $id == $_POST.id_year}}
|
{{if $id == $_POST.id_year}}
|
||||||
{{:assign selected_year=$id}}
|
{{:assign selected_year=$id}}
|
||||||
|
@ -153,24 +149,16 @@ lister les exercices ouverts :
|
||||||
{{:break}}
|
{{:break}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{* voir si des amortissements ont été oubliés *}}
|
|
||||||
{{if $start_date|strtotime > $amort_line.last_amort_date|strtotime && $end_date|strtotime < $now}}
|
|
||||||
{{:assign debut=$start_date|date_short}}
|
|
||||||
{{:assign fin=$end_date|date_short}}
|
|
||||||
{{:assign msg_amort=$msg_amort|cat:"\n"|cat:" - "|cat:$label|cat:" : du "|cat:$debut|cat:" au "|cat:$fin}}
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{if ! $ok}}
|
{{if ! $ok}}
|
||||||
{{:error message="La date choisie n'est pas dans l'exercice sélectionné !"}}
|
{{:error message="La date choisie n'est pas dans l'exercice sélectionné !"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $msg_amort != ""}}
|
|
||||||
{{:error message="Vous devez d'abord enregistrer les amortissements des exercices suivants : %s"|args:$msg_amort}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{:redirect to="compute_exit_data.html?immo_id=%s&amort_amount=%s&year=%s&date_mes=%s&date_debut=%s&exit_date=%s&duree_amort=%s"|args:$_GET.immo_id:$amort_amount:$selected_year:$ts_mes:$ts_debut:$ts_exit:$duree_amort}}
|
{{:redirect to="compute_exit_data.html?immo_id=%s&amort_amount=%s&year=%s&date_mes=%s&date_debut=%s&exit_date=%s&duree_amort=%s"|args:$_GET.immo_id:$amort_amount:$selected_year:$ts_mes:$ts_debut:$ts_exit:$duree_amort}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Sortie de bilan" custom_css="./style.css" current="module_amortissement"}}
|
{{:admin_header title="Sortie de bilan" custom_css="./style.css" current="module_amortissement"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:include file="_nav.html" current="index" subcurrent="%s"|args:$_GET.type_immo subsubcurrent="balance_exit"}}
|
{{:include file="_nav.html" current="index" subcurrent="%s"|args:$_GET.type_immo subsubcurrent="balance_exit"}}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
"prefixes": {
|
"prefixes": {
|
||||||
"20": "Immobilisations incorporelles",
|
"20": "Immobilisations incorporelles",
|
||||||
"21": "Immobilisations corporelles",
|
"21": "Immobilisations corporelles",
|
||||||
"23": "Immobilisations en cours",
|
|
||||||
"27": "Immobilisations financières"
|
"27": "Immobilisations financières"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue