Compare commits
No commits in common. "23fac6ecea85c55de2e182e1e2fc8d32eea6caea" and "49b207c0e1ff3487a6eb710a01e6e24aa80a292a" have entirely different histories.
23fac6ecea
...
49b207c0e1
8 changed files with 55 additions and 305 deletions
|
|
@ -73,18 +73,6 @@
|
|||
{{:error message="Erreur : la date de mise en service (%s) ne peut être antérieure à la date d'acquisition (%s)"|args:$_POST.date_mes:$da}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_achat == null || $_POST.date_achat|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_achat=null}}
|
||||
{{else}}
|
||||
{{:assign date_achat=$_POST.date_achat|parse_date}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_mes == null || $_POST.date_mes == $_POST.date_achat}}
|
||||
{{:assign date_mes=null}}
|
||||
{{else}}
|
||||
{{:assign date_mes=$_POST.date_mes|parse_date}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign duration=$_POST.duree|intval}}
|
||||
{{if $duration <= 0}}
|
||||
{{:error message="Erreur : la durée d'amortissement doit être strictement positive"}}
|
||||
|
|
@ -112,6 +100,17 @@
|
|||
{{:error message="Le montant (%s) ne peut être supérieur au reste (%s)"|args:$montant_nb:$reste_nb}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_achat == null || $_POST.date_achat|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_achat=null}}
|
||||
{{else}}
|
||||
{{:assign date_achat=$_POST.date_achat|parse_date}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_mes == null || $_POST.date_mes == $_POST.date_achat || $_POST.date_mes|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_mes=null}}
|
||||
{{else}}
|
||||
{{:assign date_mes=$_POST.date_mes|parse_date}}
|
||||
{{/if}}
|
||||
{{:assign status="managed"}}
|
||||
{{/if}}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
{{/if}}
|
||||
{{/load}}
|
||||
{{:assign solde="%d-%d"|math:$ligne_immo.montant:$total_credits}}
|
||||
{{*:debug info_immo=$info_immo ligne_immo=$ligne_immo total_credits=$total_credits solde=$solde*}}
|
||||
|
||||
{{if $info_immo.status == "amortized"}}
|
||||
{{:assign amort_amount=$solde}}
|
||||
|
|
@ -212,7 +213,7 @@
|
|||
{{/if}}
|
||||
{{if $info_immo.duration != null && $valeur_residuelle > 0}}
|
||||
<dt>Annuité estimée</dt>
|
||||
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:$solde:$info_immo.duration|money_currency_html:false|raw}}</dd>
|
||||
<dd>{{"min(%d, %f/%d)"|math:$valeur_residuelle:solde:$info_immo.duration|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,100 +0,0 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{*
|
||||
Supprimer les infos d'une immo et les liaisons d'immo associées
|
||||
@param immo_doc_id
|
||||
*}}
|
||||
|
||||
{{#load id=$_GET.immo_doc_id|intval assign="info_immo"}}
|
||||
{{else}}
|
||||
{{:error message="Immobilisation non trouvée"}}
|
||||
{{/load}}
|
||||
{{#select
|
||||
trans.id as immo_trans_id,
|
||||
trans.label as trans_label,
|
||||
trans.date as date_achat,
|
||||
line.debit as montant,
|
||||
line.label as line_label,
|
||||
acc.code,
|
||||
acc.label as account_label
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER join acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
INNER JOIN acc_accounts AS acc ON line.id_account = acc.id
|
||||
WHERE line.id = :line_id;
|
||||
:line_id = $info_immo.line
|
||||
assign="ligne_immo"
|
||||
}}
|
||||
{{else}}
|
||||
{{:error message="Immobilisation non trouvée"}}
|
||||
{{/select}}
|
||||
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.immo_trans_id}}
|
||||
{{:assign immo_label=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $immo_label}}
|
||||
{{:assign immo_label=$immo_label|cat::" — "|cat:$ligne_immo.line_label}}
|
||||
{{/if}}
|
||||
|
||||
{{#form on="delete"}}
|
||||
{{#select
|
||||
trans.id
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN !table ON $$.credit_line_id = line.id
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
WHERE $$.type =
|
||||
"credit_link" AND $$.immo_doc_id = :immo_doc_id
|
||||
;
|
||||
!table = $module.table
|
||||
:immo_doc_id = $_GET.immo_doc_id|intval
|
||||
}}
|
||||
{{:assign var="linked_trans." value=$id}}
|
||||
{{/select}}
|
||||
|
||||
{{:debug linked_trans=$linked_trans}}
|
||||
{{if $linked_trans != null}}
|
||||
{{* chercher et supprimer les écritures liées *}}
|
||||
{{#select
|
||||
CASE links.id_related = trans.id
|
||||
WHEN true THEN links.id_transaction
|
||||
WHEN false THEN links.id_related
|
||||
END as linked_id
|
||||
FROM acc_transactions AS trans
|
||||
INNER JOIN acc_transactions_links as links
|
||||
ON (links.id_transaction = trans.id OR links.id_related = trans.id)
|
||||
WHERE trans.id = :immo_trans_id
|
||||
;
|
||||
:immo_trans_id=$ligne_immo.immo_trans_id
|
||||
}}
|
||||
{{if ! $linked_trans|has:$linked_id}}
|
||||
{{:assign var="linked_transactions." value=$linked_id}}
|
||||
{{/if}}
|
||||
{{/select}}
|
||||
|
||||
{{* enregistrer les liaisons restantes *}}
|
||||
{{:api
|
||||
method="POST"
|
||||
path="accounting/transaction/%s/transactions"|args:$ligne_immo.immo_trans_id
|
||||
assign="result"
|
||||
assign_code="result_code"
|
||||
transactions=$linked_transactions
|
||||
}}
|
||||
|
||||
{{* supprimer les docs de liaison *}}
|
||||
{{:delete type="immo_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{* supprimer les infos de l'immobilisation *}}
|
||||
{{:delete id=$_GET.immo_doc_id|intval}}
|
||||
{{:redirect force="index.html?ok=1&msg=suppr_infos&type_immo=other"}}
|
||||
{{/form}}
|
||||
|
||||
|
||||
{{:admin_header title="Supprimer" current="module_amortization"}}
|
||||
{{:form_errors}}
|
||||
{{:delete_form
|
||||
legend="Immobilisation « #%s %s »"|args:$ligne_immo.immo_trans_id:$immo_label
|
||||
warning="Supprimer les paramètres de l'immobilisation « #%s %s » ?"|args:$ligne_immo.immo_trans_id:$immo_label
|
||||
info="L'écriture d'immobilisation ne sera pas supprimée ; les nouveaux paramètres pourront être saisis depuis l'onglet « À classer »"
|
||||
}}
|
||||
|
||||
{{:admin_footer}}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture au crédit du compte d'immobilisation
|
||||
@param immo_line_id : id de la ligne d'immo
|
||||
@param credit__line_id : id de la ligne de crédit
|
||||
@param immo_doc_id : id du doc associé à l'immo
|
||||
*}}
|
||||
{{:debug get=$_GET}}
|
||||
{{* chercher l'écriture d'immobilisation *}}
|
||||
{{#select
|
||||
id_transaction
|
||||
FROM acc_transactions_lines
|
||||
WHERE id = :line_id;
|
||||
:line_id = $_GET.immo_line_id|intval
|
||||
}}
|
||||
{{:assign immo_trans_id=$id_transaction}}
|
||||
{{else}}
|
||||
{{:error message="Immobilisation non trouvée"}}
|
||||
{{/select}}
|
||||
|
||||
{{* chercher l'écriture au crédit *}}
|
||||
{{#select
|
||||
id_transaction
|
||||
FROM acc_transactions_lines
|
||||
WHERE id = :line_id;
|
||||
:line_id = $_GET.credit_line_id|intval
|
||||
}}
|
||||
{{:assign credit_id=$id_transaction}}
|
||||
{{else}}
|
||||
{{:error message="Écriture au crédit non trouvée"}}
|
||||
{{/select}}
|
||||
|
||||
{{*
|
||||
chercher les liaisons de l'écriture d'immobilisation
|
||||
et supprimer la liaison avec l'écriture au crédit
|
||||
*}}
|
||||
{{#select
|
||||
CASE links.id_related = :immo_trans_id
|
||||
WHEN true THEN links.id_transaction
|
||||
WHEN false THEN links.id_related
|
||||
END as linked_id
|
||||
FROM acc_transactions_links as links
|
||||
WHERE id_transaction = :immo_trans_id or id_related = :immo_trans_id;
|
||||
:immo_trans_id = $immo_trans_id
|
||||
}}
|
||||
{{if $linked_id != $credit_id}}
|
||||
{{:assign var="linked_transactions." value=$linked_id}}
|
||||
{{/if}}
|
||||
{{/select}}
|
||||
{{:debug linked_transactions=$linked_transactions}}
|
||||
{{* Enregistrer les liaisons *}}
|
||||
{{:api
|
||||
method="POST"
|
||||
path="accounting/transaction/%s/transactions"|args:$immo_trans_id
|
||||
assign="result"
|
||||
assign_code="result_code"
|
||||
transactions=$linked_transactions
|
||||
}}
|
||||
|
||||
{{* supprimer le doc de liaison entre les lignes *}}
|
||||
{{#load type="credit_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id AND $$.credit_line_id = :credit_line_id"
|
||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
||||
:credit_line_id = $_GET.credit_line_id|intval
|
||||
}}
|
||||
{{:delete id=$id}}
|
||||
{{/load}}
|
||||
|
||||
{{:redirect
|
||||
to="details_immo.html?immo_doc_id=%s&ok=1&msg=detach&"|args:$_GET.immo_doc_id}}
|
||||
*}}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{*
|
||||
Afficher les détails d'une immmo
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
account.code as account_code,
|
||||
account.label as account_label
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
INNER join acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
INNER JOIN acc_accounts AS account ON line.id_account = account.id
|
||||
WHERE line.id = :line_id;
|
||||
:line_id = $info_immo.line
|
||||
|
|
@ -43,7 +44,7 @@
|
|||
|
||||
{{:assign var="info_immo.amount" value=$info_immo.amount|or:$ligne_immo.montant}}
|
||||
{{:assign var="info_immo.date_achat" value=$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign var="info_immo.date_mes" value=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign var="info_immo.date_mes" value=$info_immo.date_mes|or:$ligne_immo.date_achat}}
|
||||
{{:assign var="info_immo.label" value=$info_immo.label|or:$ligne_immo.label}}
|
||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $info_immo.label}}
|
||||
{{:assign var="info_immo.label" value=$info_immo.label|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
|
|
@ -55,21 +56,19 @@
|
|||
*}}
|
||||
{{:assign linked_immos=null}}
|
||||
{{:assign total_credits=0}}
|
||||
{{#load type="credit_link" where="$$.immo_doc_id=:immo_doc_id" :immo_doc_id=$_GET.immo_doc_id|intval}}
|
||||
{{#load type="immo_link" where="$$.immo_doc_id=:immo_doc_id" :immo_doc_id=$_GET.immo_doc_id|intval}}
|
||||
{{#select
|
||||
line.credit,
|
||||
line.id as line_id,
|
||||
trans.id as trans_id,
|
||||
trans.label,
|
||||
trans.date
|
||||
trans.id
|
||||
FROM acc_transactions_lines AS line
|
||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||
WHERE line.id = :credit_line_id;
|
||||
:credit_line_id=$credit_line_id
|
||||
}}
|
||||
{{:assign credit=$credit}}
|
||||
{{:assign var="linked_immos." trans_id=$trans_id credit_line_id=$line_id label=$label amount=$credit date=$date}}
|
||||
{{:assign credit_trans_id=$id}}
|
||||
{{/select}}
|
||||
{{:assign var="linked_immos." value=$credit_trans_id}}
|
||||
{{if $amount == null}}
|
||||
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
||||
{{else}}
|
||||
|
|
@ -95,48 +94,24 @@
|
|||
{{/if}}
|
||||
{{/load}}
|
||||
|
||||
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{*
|
||||
{{* barre de navigation *}}
|
||||
{{if ! $dialog}}
|
||||
{{:assign subsubcurrent=null}}
|
||||
{{if $total_credits == 0 && $total_amort == 0}}
|
||||
{{:assign subsubcurrent="credit"}}
|
||||
{{/if}}
|
||||
{{if $total_amort == 0}}
|
||||
{{:assign subsubcurrent=$subsubcurrent|cat:"-modif"}}
|
||||
{{else}}
|
||||
{{:assign subsubcurrent=null}}
|
||||
{{/if}}
|
||||
{{:include file="_nav.html" current="index" subcurrent="details" subsubcurrent=$subsubcurrent}}
|
||||
{{/if}}
|
||||
*}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.immo_trans_id}}
|
||||
|
||||
<nav class="tabs">
|
||||
<aside>
|
||||
{{*if $total_credits == 0*}}
|
||||
{{:linkbutton label="Rattacher une écriture d'immobilisation" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
||||
{{*/if*}}
|
||||
</aside>
|
||||
<nav style="margin-bottom: 1em;">
|
||||
{{*:linkbutton shape="left" label="Retour à la liste des immobilisations" href="index.html*}}
|
||||
{{if $total_amort == 0}}
|
||||
{{:linkbutton label="Modifier les paramètres" href="modify_infos.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="edit" target="_dialog"}}
|
||||
{{:linkbutton label="Supprimer les paramètres" href="delete_infos.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="delete" target="_dialog"}}
|
||||
{{/if}}
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
{{if $_GET.ok}}
|
||||
{{if $_GET.msg|match:"attach_amort"}}
|
||||
{{:assign msg="Écriture d'amortissement attachée"}}
|
||||
{{:assign msg="Attachement amortissement effectué"}}
|
||||
{{elseif $_GET.msg|match:"attach_immo"}}
|
||||
{{:assign msg="Écriture au crédit attachée"}}
|
||||
{{:assign msg="Attachement avoir effectué"}}
|
||||
{{elseif $_GET.msg|match:"info"}}
|
||||
{{:assign msg="Données de l'immobilisation enregistrées"}}
|
||||
{{elseif $_GET.msg|match:"detach"}}
|
||||
{{:assign msg="Écriture au crédit détachée"}}
|
||||
{{else}}
|
||||
{{:assign msg="Opération effectuée avec succès"}}
|
||||
{{/if}}
|
||||
<p class="block confirm">{{$msg}}</p>
|
||||
{{elseif $_GET.err}}
|
||||
|
|
@ -145,39 +120,31 @@
|
|||
{{/if}}
|
||||
|
||||
<h3 class="ruler">
|
||||
Immobilisation
|
||||
Paramètres de l'immobilisation
|
||||
<span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span>
|
||||
{{$info_immo.label}}
|
||||
</h3>
|
||||
{{if $linked_immos != null}}
|
||||
<aside class="right">
|
||||
<table class="list">
|
||||
<caption>Écritures d'avoir liées</caption>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_immos item="line"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.label}}</td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||
<td>
|
||||
{{:linkbutton label="Détacher" href="detach_immo.html?credit_line_id=%d&immo_line_id=%d&immo_doc_id=%s"|args:$line.credit_line_id:$ligne_immo.immo_line_id:$_GET.immo_doc_id shape="minus"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</aside>
|
||||
{{/if}}
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
{{*
|
||||
<dt>Immobilisation</dt>
|
||||
<dd><span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span><span class="label"> {{$info_immo.label}}</span></dd>
|
||||
*}}
|
||||
<dd><span class="num"><a href="{{$trans_url}}">#{{$ligne_immo.immo_trans_id}}</a></span> {{$info_immo.label}}</dd>
|
||||
<dt>Compte d'immobilisation</dt>
|
||||
<dd>{{$ligne_immo.account_code}} — {{$ligne_immo.account_label}}</dd>
|
||||
<dt>Montant de l'immobilisation</dt>
|
||||
<dd class="money strong">{{"%f"|math:$info_immo.amount|money_currency_html:false|raw}}</dd>
|
||||
{{if $total_credits > 0}}
|
||||
<dt>Montant des avoirs</dt>
|
||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||
<dt>Écritures d'avoir</dt>
|
||||
<dd>
|
||||
{{#foreach from=$linked_immos item="id"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$id}}
|
||||
<span class="num"><a href="{{$url}}">#{{$id}}</a></span>
|
||||
{{/foreach}}
|
||||
{{*:debug linked_immos=$linked_immos*}}
|
||||
</dd>
|
||||
<dt>Montant à amortir</dt>
|
||||
<dd class="money strong">{{"%f"|math:$solde|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
<dt>Date d'acquisition</dt>
|
||||
<dd>{{$info_immo.date_achat|date_short}}</dd>
|
||||
{{if $info_immo.date_mes != null && $info_immo.date_mes != $info_immo.date_achat}}
|
||||
|
|
@ -186,28 +153,7 @@
|
|||
{{/if}}
|
||||
<dt>Durée d'amortissement</dt>
|
||||
<dd>{{$info_immo.duration}} ans</dd>
|
||||
<dt>Montant de l'immobilisation</dt>
|
||||
<dd class="money">{{"%f"|math:$info_immo.amount|money_currency_html:false|raw}}</dd>
|
||||
{{if $total_credits > 0}}
|
||||
<dt>Montant des avoirs</dt>
|
||||
<dd class="money">{{"%f"|math:$total_credits|money_currency_html:false|raw}}</dd>
|
||||
{{*
|
||||
<dt>Écritures d'avoir</dt>
|
||||
<dd>
|
||||
{{#foreach from=$linked_immos item="line"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.id}}
|
||||
<span class="num"><a href="{{$url}}">#{{$line.id}}</a></span>
|
||||
{{/foreach}}
|
||||
</dd>
|
||||
*}}
|
||||
<dt>Montant à amortir</dt>
|
||||
<dd class="money">{{"%f"|math:$solde|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
{{if $total_amort > 0}}
|
||||
<dt>Montant des amortissements</dt>
|
||||
<dd>{{$total_amort|money_currency_html:false|raw}}</dd>
|
||||
<dt>Valeur nette comptable</dt>
|
||||
<dd>{{"%d-%d-%d"|math:$info_immo.amount:$total_credits:$total_amort|money_currency_html:false|raw}}</dd>
|
||||
{{/if}}
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -91,30 +91,22 @@
|
|||
{{:assign date_mes=null}}
|
||||
{{:assign status="ignored"}}
|
||||
{{else}}
|
||||
{{if $_POST.date_achat == null || $_POST.date_achat|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_achat=null}}
|
||||
{{elseif $_POST.date_achat|parse_date == $info_immo.date_achat}}
|
||||
{{:assign date_achat=$info_immo.date_achat}}
|
||||
{{else}}
|
||||
{{:assign date_achat=$_POST.date_achat|parse_date}}
|
||||
{{/if}}
|
||||
{{if $_POST.date_achat|parse_date > $ligne_immo.date_achat}}
|
||||
{{:assign da=$ligne_immo.date_achat|date_short}}
|
||||
{{:error message="Erreur : la date d'achat (%s) ne peut être postérieure à la date de l'écriture d'immobilisation (%s)"|args:$_POST.date_achat:$da}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_POST.date_achat == null || $_POST.date_achat|parse_date == $info_immo.date_achat}}
|
||||
{{:assign date_achat=$info_immo.date_achat}}
|
||||
{{elseif $_POST.date_achat|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_achat=null}}
|
||||
{{else}}
|
||||
{{:assign date_achat=$_POST.date_achat|parse_date}}
|
||||
{{/if}}
|
||||
|
||||
{{* TODO : simplifier ? *}}
|
||||
{{if $_POST.date_mes == null || $_POST.date_mes|parse_date == $info_immo.date_mes}}
|
||||
{{:assign date_mes=$info_immo.date_mes}}
|
||||
{{if $_POST.date_mes == null || $_POST.date_mes|parse_date == $ligne_immo.date_achat}}
|
||||
{{:assign date_mes=null}}
|
||||
{{elseif $_POST.date_mes|parse_date == $info_immo.date_achat}}
|
||||
{{:assign date_mes=null}}
|
||||
{{elseif $_POST.date_mes|parse_date == $ligne_immo.date_achat}}
|
||||
{{if $info_immo.date_achat == null}}
|
||||
{{:assign date_mes=null}}
|
||||
{{else}}
|
||||
{{:assign date_mes=$ligne_immo.date_achat}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:assign date_mes=$_POST.date_mes|parse_date}}
|
||||
{{:assign date_achat_comp=$ligne_immo.date_achat}}
|
||||
|
|
@ -258,7 +250,7 @@
|
|||
{{:input type="text" name="libelle" label="Libellé" default=$info_immo.label}}
|
||||
{{if $info_immo.amount != null}}
|
||||
{{:assign max_aff="%f"|math:$max_disponible|money_currency:false}}
|
||||
{{:input type="money" name="montant" label="Montant de l'immobilisation" default=$montant_immo help="Montant maximum : %s"|args:$max_aff}}
|
||||
{{:input type="money" name="montant" label="Montant de l'immobilisation" default=$montant_immo help="Montant maximum = %s"|args:$max_aff}}
|
||||
{{/if}}
|
||||
{{:input type="date" name="date_achat" label="Date d'acquisition" default=$info_immo.date_achat}}
|
||||
{{:input type="date" name="date_mes" label="Date de mise en service" default=$info_immo.date_mes}}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@
|
|||
|
||||
{{#load id=$_GET.immo_doc_id|intval assign="info_immo"}}
|
||||
{{:assign duree=$duration}}
|
||||
{{if $date_achat != null}}
|
||||
{{:assign date_debut=$date_achat}}
|
||||
{{/if}}
|
||||
{{if $date_mes != null}}
|
||||
{{:assign date_debut=$date_mes}}
|
||||
{{/if}}
|
||||
|
|
@ -45,7 +42,6 @@
|
|||
{{else}}
|
||||
{{:error message="Informations de l'immobilisation « %s » non trouvées ; vous devez d'abord les renseigner"|args:$ligne_immo.label}}
|
||||
{{/load}}
|
||||
|
||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $amort_label}}
|
||||
{{:assign amort_label=$amort_label|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
{{/if}}
|
||||
|
|
@ -87,7 +83,6 @@
|
|||
{{#select
|
||||
line.credit,
|
||||
trans.date as amort_date,
|
||||
COALESCE(trans.label, line.label) as amort_label,
|
||||
account.code as account_code,
|
||||
account.label as account_label
|
||||
FROM acc_transactions_lines AS line
|
||||
|
|
@ -111,7 +106,6 @@
|
|||
{{:assign date_debut=$line.amort_date}}
|
||||
{{:assign code_amort=$line.account_code}}
|
||||
{{:assign amort_account_label=$line.account_label}}
|
||||
{{:assign amort_label=$amort_label}}
|
||||
{{/foreach}}
|
||||
|
||||
{{if $valeur_residuelle == 0}}
|
||||
|
|
|
|||
|
|
@ -98,12 +98,3 @@ html.dark .block.alert {
|
|||
span.input-list.avoirs label {
|
||||
padding : 0.4rem 0.6rem;
|
||||
}
|
||||
|
||||
aside.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.label {
|
||||
font-size : 120%;
|
||||
font-weight : bold;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue