Amélioration présentation montants

This commit is contained in:
Jean-Christophe Engel 2025-12-19 11:35:25 +01:00
parent aec5a83eef
commit 846a651008
13 changed files with 59 additions and 60 deletions

View file

@ -82,7 +82,7 @@
<td>{{$trans_date|date_short}}</td>
<td>{{$exit_date|date_short}}</td>
<td>{{$trans_label}}</td>
<td class="money">{{"%f"|math:$debit|money:false}}</td>
<td class="money">{{"%f"|math:$debit|money_html:false|raw}}</td>
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
<td>{{$account_label}}</td>
<td>{{$project_label}}</td>
@ -124,7 +124,7 @@
<td></td>
<td></td>
<td>Total du compte {{$code}}</td>
<td class="money">{{$value|money}}</td>
<td class="money">{{$value|money_html:false|raw}}</td>
<td></td>
<td></td>
<td></td>
@ -135,8 +135,8 @@
<td></td>
<td></td>
<td></td>
<td>Total des immobilisations</td>
<td class="money"><span class="strong">{{$total_immo|money}}</span></td>
<td class="strong">Total des immobilisations</td>
<td class="money strong">{{$total_immo|money_html:false|raw}}</td>
<td></td>
<td></td>
<td></td>
@ -153,7 +153,7 @@
<td></td>
<td></td>
<td>Cessions du compte {{$code}}</td>
<td class="money">{{$value|money}}</td>
<td class="money">{{$value|money_html:false|raw}}</td>
<td></td>
<td></td>
<td></td>
@ -164,8 +164,8 @@
<td></td>
<td></td>
<td></td>
<td>Total des cessions</td>
<td class="money"><span class="strong">{{$total_cessions|money}}</span></td>
<td class="strong">Total des cessions</td>
<td class="money strong">{{$total_cessions|money_html:false|raw}}</td>
<td></td>
<td></td>
<td></td>

View file

@ -157,10 +157,10 @@
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
<td>{{$trans_date|date_short}}</td>
<td>{{$trans_label}}</td>
<td class="money">{{$debit|money}}</td>
<td class="money">{{$debit|money_html:false|raw}}</td>
<td class="money">{{if $duration != null}}{{$duration}}{{/if}}</td>
<td class="money">{{$amort_amount|money|or:"0,00"}}</td>
<td class="money">{{"%d-%d"|math:$debit:$amort_amount|money|or:"0,00"}}</td>
<td class="money">{{$amort_amount|money_html:false|raw}}</td>
<td class="money">{{"%d-%d"|math:$debit:$amort_amount|money_html:false|raw}}</td>
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
<td class="actions">
{{if ! $exist_amort}}
@ -194,7 +194,7 @@
<td></td>
<td></td>
<td>Total du compte {{$code}}</td>
<td class="money">{{$value|money}}</td>
<td class="money">{{$value|money_html:false|raw}}</td>
<td></td>
<td></td>
<td></td>
@ -205,8 +205,8 @@
<tr>
<td></td>
<td></td>
<td>Total des immobilisations</td>
<td class="money"><span class="strong">{{$total_immo|money}}</span></td>
<td class="strong">Total des immobilisations</td>
<td class="money strong">{{$total_immo|money_html|raw}}</td>
<td></td>
<td></td>
<td></td>

View file

@ -126,7 +126,7 @@
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
<td>{{$trans_date|date_short}}</td>
<td>{{$trans_label}}</td>
<td class="money">{{"%f"|math:$debit|money:false}}</td>
<td class="money">{{"%f"|math:$debit|money_html:false|raw}}</td>
<td><a href={{$compte_url}}>{{$account_code}}</a></td>
<td>{{$account_label}}</td>
<td class="actions">

View file

@ -26,11 +26,11 @@
{{if $subsubcurrent == "amortization"}}
<ul class="sub">
<li class="title"><strong>Amortissements</strong></li>
<li class="title strong">Amortissements</li>
</ul>
{{elseif $subsubcurrent == "balance_exit"}}
<ul class="sub">
<li class="title"><strong>Sortie de bilan</strong></li>
<li class="title strong">Sortie de bilan</li>
</ul>
{{/if}}

View file

@ -134,7 +134,7 @@
<td class="num"><a href={{$trans_url}}>#{{$trans_id}}</a></td>
<td>{{$trans_date|date_short}}</td>
<td>{{$trans_label}}</td>
<td class="money">{{"%f"|math:$debit|money:false}}</td>
<td class="money">{{"%f"|math:$debit|money_html:false|raw}}</td>
<td class="account_code"><a href={{$compte_url}}>{{$account_code}}</a></td>
<td>{{$account_label}}</td>
<td class="actions">
@ -156,7 +156,7 @@
<td></td>
<td></td>
<td>Total du compte {{$code}}</td>
<td class="money">{{$value|money}}</td>
<td class="money">{{$value|money_html|raw}}</td>
<td></td>
<td></td>
<td class="actions"></td>
@ -166,8 +166,8 @@
<td></td>
<td></td>
<td></td>
<td>Total des immobilisations</td>
<td class="money"><span class="strong">{{$total_immo|money}}</span></td>
<td class="strong">Total des immobilisations</td>
<td class="money strong">{{$total_immo|money_html|raw}}</td>
<td></td>
<td></td>
<td class="actions"></td>

View file

@ -184,7 +184,7 @@
<dt>Immobilisation</dt>
<dd><span class="num"><a href={{$trans_url}}>#{{$ligne_immo.trans_id}}</a></span> {{$ligne_immo.label}}</dd>
<dt>Montant</dt>
<dd><strong class="money">{{"%f"|math:$ligne_immo.montant|money_currency}}</strong></dd>
<dd class="money strong">{{"%f"|math:$ligne_immo.montant|money_currency_html:false|raw}}</dd>
<dt>Début d'amortissement</dt>
<dd>{{$date_debut|date_short}}</dd>
{{if $duree != null}}
@ -193,13 +193,13 @@
{{/if}}
{{if $valeur_residuelle > 0}}
<dt>Montant des amortissements</dt>
<dd>{{"%d-%d"|math:$ligne_immo.montant:$valeur_residuelle|money_currency:false}}</dd>
<dd>{{"%d-%d"|math:$ligne_immo.montant:$valeur_residuelle|money_currency_html:false|raw}}</dd>
<dt>Valeur nette comptable</dt>
<dd>{{$valeur_residuelle|money_currency}}</dd>
<dd>{{$valeur_residuelle|money_currency_html:false|raw}}</dd>
{{/if}}
{{if $duree != null && $valeur_residuelle > 0}}
<dt>Annuité estimée</dt>
<dd>{{"%f/%d"|math:$ligne_immo.montant:$duree|money_currency}}</dd>
<dd>{{"%f/%d"|math:$ligne_immo.montant:$duree|money_currency_html:false|raw}}</dd>
{{/if}}
</dl>
</div>
@ -229,8 +229,8 @@
<tr>
<td class="num"><a href={{$trans_url}}>#{{$line.amort_trans_id}}</a></td>
<td>{{$line.amort_date|date_short}}</td>
<td class="money">{{"%f"|math:$line.amort_amount|money}}</td>
<td class="money">{{"%f"|math:$solde|money:false}}</td>
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
<td>
{{if $line.amort_label == null}}
{{$line.trans_label}}

View file

@ -185,7 +185,7 @@
<legend>Données de l'imobilisation</legend>
<dl class="describe">
<dt>Montant</dt>
<dd id="montant_immo" class="money">{{$ligne_immo.montant|money_currency:false}}</dd>
<dd id="montant_immo" class="money">{{$ligne_immo.montant|money_currency_html:false|raw}}</dd>
<dt>Date d'acquisition</dt>
<dd >{{$ligne_immo.date_achat|date_short}}</dd>
{{if $info_immo.date != null && $info_immo.date != $ligne_immo.date_achat}}
@ -197,9 +197,9 @@
<dd id="duree_amort" class="num">{{$info_immo.duration}} ans</dd>
{{/if}}
<dt>Montant des amortissements</dt>
<dd id="montant_amort" class="money">{{$amort_amount|money_currency:false}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dd id="montant_amort" class="money">{{$amort_amount|money_currency_html:false|raw}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dt>Valeur nette résiduelle</dt>
<dd class="money">{{$valeur_nette|money_currency:false}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dd class="money">{{$valeur_nette|money_currency_html:false|raw}} <span class="help">(à la date de début de l'exercice)</span></dd>
</dl>
</div>
{{if $valeur_nette > 0}}

View file

@ -62,7 +62,7 @@
<legend>Données de l'imobilisation</legend>
<dl class="describe">
<dt>Montant</dt>
<dd id="montant_immo" class="money">{{$ligne_immo.montant|money_currency:false}}</dd>
<dd id="montant_immo" class="money">{{$ligne_immo.montant|money_currency_html:false|raw}}</dd>
<dt>Date d'acquisition</dt>
<dd >{{$ligne_immo.date_achat|date_short}}</dd>
{{if $_GET.date_mes != $ligne_immo.date_achat|strtotime}}
@ -74,18 +74,18 @@
<dd id="duree_amort" class="num">{{$_GET.duree_amort}} ans</dd>
{{/if}}
<dt>Montant des amortissements</dt>
<dd id="montant_amort" class="money">{{$_GET.amort_amount|money_currency:false}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dd id="montant_amort" class="money">{{$_GET.amort_amount|money_currency_html:false|raw}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dt>Valeur nette résiduelle</dt>
<dd class="money">{{$valeur_nette|money_currency:false}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dd class="money">{{$valeur_nette|money_currency_html:false|raw}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dt>Date de sortie</dt>
<dd>{{$_GET.exit_date|date:"d/m/Y"}}</dd>
{{if $amort_comp > 0}}
<dt>Amortissement complémentaire</dt>
<dd class="money">{{$amort_comp|money_currency:false}} <span class="help">(jusqu'à la date de sortie)</span></dd>
<dd class="money">{{$amort_comp|money_currency_html:false|raw}} <span class="help">(jusqu'à la date de sortie)</span></dd>
<dt>Total des amortissements</dt>
<dd class="money">{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency:false}} <span class="help">(à la date de sortie)</span></dd>
<dd class="money">{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency_html:false|raw}} <span class="help">(à la date de sortie)</span></dd>
<dt>Valeur nette résiduelle</dt>
<dd class="money">{{"%f-%f"|math:$valeur_nette:$amort_comp|money_currency:false}} <span class="help">(à la date de sortie)</span></dd>
<dd class="money">{{"%f-%f"|math:$valeur_nette:$amort_comp|money_currency_html:false|raw}} <span class="help">(à la date de sortie)</span></dd>
{{/if}}
</dl>
</div>

View file

@ -64,7 +64,7 @@
<dt>Écriture</dt>
<dd><span class="num"><a href={{$trans_url}}>#{{$ligne_immo.trans_id}}</a></span> {{$ligne_immo.label}}</dd>
<dt>Montant</dt>
<dd><strong class="money">{{"%f"|math:$ligne_immo.amount|money_currency}}</strong></dd>
<dd class="money strong">{{"%f"|math:$ligne_immo.amount|money_currency_html:false|raw}}</dd>
</dl>
</div>
<dl>

View file

@ -99,7 +99,7 @@
<tr>
<td class="num"><a href={{$trans_url}}>#{{$line.t_id}}</a></td>
<td>{{$line.t_date|date_short}}</td>
<td class="money">{{"%f"|math:$line.amort_amount|money}}</td>
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
<td>{{if $line.l_label == null}}
{{$line.t_label}}
{{else}}

View file

@ -80,7 +80,7 @@ function setDateEnd(id_exercices, id_date, id_years) {
// renvoyer la valeur numérique d'un montant formaté en €
function getNumber(text) {
return Number(text.replace(/ /g, '').replace(/,/, '.').replace(/€/, ''));
return Number(text.replace(/[ \xa0]/g, '').replace(/,/, '.').replace(/€/, ''));
}
// calculer le montant d'un amortissement
@ -196,11 +196,9 @@ function addAmountLine(amount, label, parent) {
col_compte.classList.add("label");
const col_montant = document.createElement("td");
col_montant.classList.add("money");
const span = document.createElement("strong");
const montant = document.createTextNode(new Intl.NumberFormat("fr-FR", { style: "currency", currency: "EUR" }).format(amount / 100., ));
span.appendChild(montant);
col_compte.appendChild(document.createTextNode(label));
col_montant.appendChild(span);
col_montant.appendChild(montant);
node.appendChild(col_compte);
node.appendChild(col_montant);
parent.appendChild(node);

View file

@ -35,11 +35,12 @@ h2[class="aide"], h3[class="aide"] {
}
.informations dl.describe > dt {
flex: 0 0 10rem;
flex: 0 0 15rem;
margin-right: 0;
}
.informations dl.describe > dd {
flex: 0 0 calc(100% - 20rem);
margin-right: 0;
}
@ -53,7 +54,7 @@ fieldset.shortFormLeft div.informations {
border-radius: .5em;
}
span.strong {
.strong {
font-weight: bold;
}

View file

@ -324,7 +324,7 @@
<legend>Données de l'imobilisation</legend>
<dl class="describe">
<dt>Montant</dt>
<dd class="money">{{$ligne_immo.montant|money_currency:false}}</dd>
<dd class="money">{{$ligne_immo.montant|money_currency_html:false|raw}}</dd>
<dt>Date d'acquisition</dt>
<dd >{{$ligne_immo.date_achat|date_short}}</dd>
{{if $_GET.date_mes != $ligne_immo.date_achat|strtotime}}
@ -336,28 +336,28 @@
<dd class="num">{{$_GET.duree_amort}} ans</dd>
{{/if}}
<dt>Montant des amortissements</dt>
<dd class="money">{{$_GET.amort_amount|money_currency:false}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dd class="money">{{$_GET.amort_amount|money_currency_html:false|raw}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dt>Valeur nette résiduelle</dt>
<dd class="money">{{$valeur_nette|money_currency:false}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dd class="money">{{$valeur_nette|money_currency_html:false|raw}} <span class="help">(à la date de début de l'exercice)</span></dd>
<dt>Date de sortie</dt>
<dd>{{$_GET.exit_date|date:"d/m/Y"}}</dd>
{{if $amort_comp > 0}}
{{:assign valeur_nette="%f-%f"|math:$valeur_nette:$amort_comp}}
<dt>Amortissement complémentaire</dt>
<dd class="money">{{$amort_comp|money_currency:false}} <span class="help">(jusqu'à la date de sortie)</span></dd>
<dd class="money">{{$amort_comp|money_currency_html:false|raw}} <span class="help">(jusqu'à la date de sortie)</span></dd>
<dt>Total des amortissements</dt>
<dd class="money">{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency:false}} <span class="help">(à la date de sortie)</span></dd>
<dd class="money">{{"%f+%f"|math:$_GET.amort_amount:$amort_comp|money_currency_html:false|raw}} <span class="help">(à la date de sortie)</span></dd>
<dt>Valeur nette résiduelle</dt>
<dd class="money">{{$valeur_nette|money_currency:false}} <span class="help">(à la date de sortie)</span></dd>
<dd class="money">{{$valeur_nette|money_currency_html:false|raw}} <span class="help">(à la date de sortie)</span></dd>
{{/if}}
{{if $montant_cession == 0}}
{{if $amort_except > 0}}
<dt>Amortissement exceptionnel</dt>
<dd class="money">{{$amort_except|money_currency:false}}</dd>
<dd class="money">{{$amort_except|money_currency_html:false|raw}}</dd>
{{/if}}
{{else}}
<dt>Montant de la cession</dt>
<dd class="money">{{$montant_cession|money_currency:false}}</dd>
<dd class="money">{{$montant_cession|money_currency_html:false|raw}}</dd>
{{/if}}
</dl>
</div>
@ -389,7 +389,7 @@
default=$comp_account
}}
</td>
<td>{{$amort_comp|money_currency:false}}</td>
<td>{{$amort_comp|money_currency_html:false|raw}}</td>
<td></td>
</tr>
<tr>
@ -402,7 +402,7 @@
}}
</td>
<td></td>
<td>{{$amort_comp|money_currency:false}}</td>
<td>{{$amort_comp|money_currency_html:false|raw}}</td>
</tr>
</tbody>
</table>
@ -433,7 +433,7 @@
default=$except_account
}}
</td>
<td>{{$amort_except|money_currency:false}}</td>
<td>{{$amort_except|money_currency_html:false|raw}}</td>
<td></td>
</tr>
<tr>
@ -446,7 +446,7 @@
}}
</td>
<td></td>
<td>{{$amort_except|money_currency:false}}</td>
<td>{{$amort_except|money_currency_html:false|raw}}</td>
</tr>
</tbody>
</table>
@ -476,7 +476,7 @@
{{else}}
{{:assign montant="%f+%f"|math:$_GET.amort_amount:$amort_comp}}
{{/if}}
<td>{{$montant|money_currency:false}}</td>
<td>{{$montant|money_currency_html:false|raw}}</td>
<td></td>
</tr>
{{if $montant_cession > 0 && $valeur_nette > 0}}
@ -489,7 +489,7 @@
default=$vnc_account
}}
</td>
<td>{{$valeur_nette|money_currency:false}}</td>
<td>{{$valeur_nette|money_currency_html:false|raw}}</td>
<td></td>
</tr>
{{/if}}
@ -503,7 +503,7 @@
}}
</td>
<td></td>
<td>{{$ligne_immo.montant|money_currency:false}}</td>
<td>{{$ligne_immo.montant|money_currency_html:false|raw}}</td>
</tr>
</tbody>
</table>
@ -528,7 +528,7 @@
default=$creance_account
}}
</td>
<td>{{$montant_cession|money_currency:false}}</td>
<td>{{$montant_cession|money_currency_html:false|raw}}</td>
<td></td>
</tr>
<tr>
@ -541,7 +541,7 @@
}}
</td>
<td></td>
<td>{{$montant_cession|money_currency:false}}</td>
<td>{{$montant_cession|money_currency_html:false|raw}}</td>
</tr>
</tbody>
</table>