salaire : simplification des lignes de total

This commit is contained in:
Antoine Pierlot-Garcin 2023-11-19 09:23:17 +01:00
parent 6054a6a48f
commit 2291639fb5
2 changed files with 13 additions and 14 deletions

View File

@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
export let opt : boolean = false; export let opt : boolean = false;
export let type : string; export let type : string;
export let emphase : boolean = false;
export let label : string; export let label : string;
export let taux : number = 0; export let taux : number = 0;
@ -20,7 +21,7 @@
</script> </script>
{#if valeur || !opt} {#if valeur || !opt}
<div class="grow flex text-right px-1"> <div class="grow flex text-right px-1" class:emphase>
<div class="grow text-left">{label}</div> <div class="grow text-left">{label}</div>
{#if (type === "taux" || type === "nombre")} {#if (type === "taux" || type === "nombre")}
<div class="flex-none w-24">{base.toFixed(2)}</div> <div class="flex-none w-24">{base.toFixed(2)}</div>
@ -28,4 +29,11 @@
{/if} {/if}
<div class="flex-none w-24">{valeur.toFixed(2)}</div> <div class="flex-none w-24">{valeur.toFixed(2)}</div>
</div> </div>
{/if} {/if}
<style>
.emphase {
font-weight: bold;
background-color: rgb(var(--color-surface-600) / var(--tw-bg-opacity));
}
</style>

View File

@ -300,10 +300,7 @@
nombre={nbDeplacements} nombre={nbDeplacements}
/> />
<div class="grow flex bg-surface-600 px-1 font-bold"> <LigneSalaire type="brut" emphase={true} label="&nbsp;TOTAL BRUT" base={totalBrut} />
<div class="grow text-left">&nbsp;TOTAL BRUT</div>
<div class="flex-none w-24 text-right">{totalBrut.toFixed(2)}</div>
</div>
<LigneSalaire type="taux" label="CSG déductible" base={baseCsgRds} taux={-tauxCSGDeductible} /> <LigneSalaire type="taux" label="CSG déductible" base={baseCsgRds} taux={-tauxCSGDeductible} />
<LigneSalaire <LigneSalaire
@ -335,10 +332,7 @@
/> />
{#if tauxSource} {#if tauxSource}
<div class="grow flex bg-surface-600 px-1 font-bold"> <LigneSalaire type="brut" emphase={true} label="&nbsp;TOTAL NET AVANT IMPOTS" base={totalNetAvantImpots} />
<div class="grow text-left">&nbsp;TOTAL NET AVANT IMPOTS</div>
<div class="flex-none w-24 text-right">{totalNetAvantImpots.toFixed(2)}</div>
</div>
{/if} {/if}
<LigneSalaire <LigneSalaire
@ -349,10 +343,7 @@
taux={-tauxSource} taux={-tauxSource}
/> />
<div class="grow flex bg-surface-600 px-1 font-bold"> <LigneSalaire type="brut" emphase={true} label="&nbsp;TOTAL NET" base={totalNet} />
<div class="grow text-left">&nbsp;TOTAL NET</div>
<div class="flex-none w-24 text-right">{totalNet.toFixed(2)}</div>
</div>
</div> </div>
<style> <style>