Feat: add unit and percent to real percent

This commit is contained in:
Bertrand Benjamin 2021-08-12 14:21:25 +02:00
parent d690bcac56
commit cdbc5f9d51
5 changed files with 19 additions and 11 deletions

View File

@ -17,7 +17,7 @@
<ul v-show="!editing"> <ul v-show="!editing">
<li v-for="cara in monthDesc" :key='cara.name'> <li v-for="cara in monthDesc" :key='cara.name'>
<label :for='cara.name'>{{ cara.desc }}</label> <label :for='cara.name'>{{ cara.desc }}</label>
<span class="value" >{{ TheMonth.[cara.name] ?? "∅"}}</span> <span class="value" >{{ TheMonth.[cara.name] ?? "∅"}} {{cara.unit}}</span>
</li> </li>
</ul> </ul>
<ul v-show="editing"> <ul v-show="editing">

View File

@ -15,12 +15,12 @@ export function notInvoiced (month) {
export function caPro (month) { export function caPro (month) {
// Compute the part of the CA to go pro usage // Compute the part of the CA to go pro usage
return ca(month) * month.proPercentage return ca(month) * month.proPercentage / 100
} }
export function caPerso (month) { export function caPerso (month) {
// Compute the part of the CA to go personnal usage // Compute the part of the CA to go personnal usage
return ca(month) * (1 - month.proPercentage) return ca(month) * (1 - month.proPercentage / 100)
} }
export function caPersoUntouch (month) { export function caPersoUntouch (month) {

View File

@ -16,42 +16,49 @@ const config = {
desc: 'CA "scéances effectuées"', desc: 'CA "scéances effectuées"',
type: 'base', type: 'base',
name: 'caTheo', name: 'caTheo',
unit: '€',
}, },
{ {
color: '', color: '',
desc: 'CA "Séances facturées"', desc: 'CA "Séances facturées"',
type: 'base', type: 'base',
name: 'caRetro', name: 'caRetro',
unit: '€',
}, },
{ {
color: '', color: '',
desc: 'CA "Séances facturées" réactualisé', desc: 'CA "Séances facturées" réactualisé',
type: 'base', type: 'base',
name: 'caReact', name: 'caReact',
unit: '€',
}, },
{ {
color: '', color: '',
desc: 'Nombre de séances effectuées', desc: 'Nombre de séances effectuées',
type: 'base', type: 'base',
name: 'sessionQty', name: 'sessionQty',
unit: '',
}, },
{ {
color: '', color: '',
desc: 'Montant de la rétrocession', desc: 'Montant de la rétrocession',
type: 'base', type: 'base',
name: 'retro', name: 'retro',
unit: '€',
}, },
{ {
color: '', color: '',
desc: 'Rémuneration', desc: 'Rémuneration',
type: 'base', type: 'base',
name: 'remu', name: 'remueration',
unit: '€',
}, },
{ {
color: '', color: '',
desc: 'Pourcentage du CA pour la partie pro', desc: 'Pourcentage du CA pour la partie pro',
type: 'base', type: 'base',
name: 'proPercentage', name: 'proPercentage',
unit: '%',
}, },
], ],
} }

View File

@ -13,6 +13,7 @@ const travail = {
caReact: null, // ca réactualisé caReact: null, // ca réactualisé
retro: 0, // montant de la rétrocession retro: 0, // montant de la rétrocession
remuneration: 0, // rémunération décidée remuneration: 0, // rémunération décidée
proPercentage: 50, // Pourcentage du CA pour la partie pro
}, },
months: { months: {
}, },

View File

@ -1,8 +1,8 @@
caTheo,sessionQty,caRetro,caReact,retro,remuneration,date,proPercentage caTheo,sessionQty,caRetro,caReact,retro,remuneration,date,proPercentage
7000,,6747,,893,2000,2021-01,0.5 7000,,6747,,893,2000,2021-01,50
5200,,5183,,665,1500,2021-02,0.5 5200,,5183,,665,1500,2021-02,50
7100,,7088,,855,2000,2021-03,0.5 7100,,7088,,855,2000,2021-03,50
5700,,4194,5630,627,2000,2021-04,0.5 5700,,4194,5630,627,2000,2021-04,50
6500,,5564,6335,699,2800,2021-05,0.5 6500,,5564,6335,699,2800,2021-05,50
6725,235,5442,6376,638,2800,2021-06,0.5 6725,235,5442,6376,638,2800,2021-06,50
2176,81,1274,,172,2000,2021-07,0.5 2176,81,1274,,172,2000,2021-07,50

1 caTheo sessionQty caRetro caReact retro remuneration date proPercentage
2 7000 6747 893 2000 2021-01 0.5 50
3 5200 5183 665 1500 2021-02 0.5 50
4 7100 7088 855 2000 2021-03 0.5 50
5 5700 4194 5630 627 2000 2021-04 0.5 50
6 6500 5564 6335 699 2800 2021-05 0.5 50
7 6725 235 5442 6376 638 2800 2021-06 0.5 50
8 2176 81 1274 172 2000 2021-07 0.5 50