Feat: add individual percentage and individualize functions on months

This commit is contained in:
2021-08-12 14:12:24 +02:00
parent db21bc1275
commit d690bcac56
7 changed files with 63 additions and 102 deletions

View File

@@ -10,9 +10,8 @@ import { mapGetters } from 'vuex'
import {
notInvoiced,
caPro,
remuneration,
retrocession,
caPersoUntouch,
sum,
} from '../../lib/months'
export default {
@@ -43,11 +42,11 @@ export default {
{
label: "Difference CA perso et remuneration",
data: [
caPro(this.months, this.caProPercentage),
notInvoiced(this.months),
retrocession(this.months),
remuneration(this.months),
caPersoUntouch(this.months, this.caProPercentage),
sum(Object.values(this.months).map(a => caPro(a))),
sum(Object.values(this.months).map(a => notInvoiced(a))),
sum(Object.values(this.months).map(a => a.retro)),
sum(Object.values(this.months).map(a => a.remuneration)),
sum(Object.values(this.months).map(a => caPersoUntouch(a))),
],
},
],