🐛 corrige l'erreur critique lors de la selection de la CCN sport
Corrige également le plafond SS (non proratisé en cas d'assiette forfaitaire)pull/843/head
parent
2e43b6789d
commit
c802e3e852
|
@ -232,11 +232,13 @@ let TargetInputOrValue = ({
|
|||
const inversionFail = useSelector(analysisWithDefaultsSelector)?.cache._meta
|
||||
.inversionFail
|
||||
const value =
|
||||
targetWithValue?.nodeValue != null && !inversionFail
|
||||
? Math.round(targetWithValue?.nodeValue)
|
||||
targetWithValue.nodeValue != null && !inversionFail
|
||||
? Math.round(targetWithValue.nodeValue)
|
||||
: undefined
|
||||
|
||||
const blurValue = inversionFail && !isActiveInput
|
||||
if (Number.isNaN(value)) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<span
|
||||
className="targetInputOrValue"
|
||||
|
|
|
@ -144,7 +144,7 @@ export let evaluateObject = (objectShape, effect) => (
|
|||
let transforms = map(k => [k, evaluateOne], keys(objectShape)),
|
||||
automaticExplanation = evolve(fromPairs(transforms))(node.explanation)
|
||||
// the result of effect can either be just a nodeValue, or an object {additionalExplanation, nodeValue}. The latter is useful for a richer JSX visualisation of the mecanism : the view should not duplicate code to recompute intermediate values (e.g. for a marginal 'barème', the marginal 'tranche')
|
||||
let evaluated = effect(automaticExplanation, cache),
|
||||
let evaluated = effect(automaticExplanation, cache, situationGate, parsedRules),
|
||||
explanation = is(Object, evaluated)
|
||||
? { ...automaticExplanation, ...evaluated.additionalExplanation }
|
||||
: automaticExplanation,
|
||||
|
|
|
@ -231,7 +231,6 @@ let doInversion = (oldCache, situationGate, parsedRules, v, dottedName) => {
|
|||
nodeValue = 0
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
nodeValue,
|
||||
missingVariables: {},
|
||||
|
|
|
@ -2,6 +2,7 @@ import { defaultNode, evaluateObject, parseObject } from 'Engine/evaluation'
|
|||
import { decompose } from 'Engine/mecanisms/utils'
|
||||
import variations from 'Engine/mecanisms/variations'
|
||||
import Barème from 'Engine/mecanismViews/Barème'
|
||||
import { evaluateNode } from 'Engine/evaluation'
|
||||
import { val } from 'Engine/traverse-common-functions'
|
||||
import { parseUnit } from 'Engine/units'
|
||||
import { desugarScale } from './barème'
|
||||
|
@ -31,7 +32,7 @@ export default (recurse, k, v) => {
|
|||
multiplicateur: defaultNode(1)
|
||||
}
|
||||
|
||||
let effect = ({ assiette, multiplicateur, tranches }) => {
|
||||
let effect = ({ assiette, multiplicateur, tranches }, cache, situationGate, parsedRules) => {
|
||||
if (val(assiette) === null) return null
|
||||
|
||||
let roundedAssiette = Math.round(val(assiette))
|
||||
|
@ -49,11 +50,14 @@ export default (recurse, k, v) => {
|
|||
? matchedTranche.taux.nodeValue
|
||||
: (matchedTranche.taux.nodeValue / 100) * val(assiette)
|
||||
} else {
|
||||
matchedTranche.montant = evaluateNode(cache, situationGate, parsedRules, matchedTranche.montant)
|
||||
nodeValue = matchedTranche.montant.nodeValue
|
||||
}
|
||||
|
||||
return {
|
||||
nodeValue,
|
||||
additionalExplanation: {
|
||||
matchedTranche,
|
||||
unit: returnRate
|
||||
? parseUnit('%')
|
||||
: (v['unité'] && parseUnit(v['unité'])) || explanation.assiette.unit
|
||||
|
|
|
@ -5687,19 +5687,19 @@ contrat salarié . convention collective . sport . cotisations . assiette forfai
|
|||
unité: heures/mois
|
||||
tranches:
|
||||
- en-dessous de: 45
|
||||
montant: 5 * SMIC horaire
|
||||
montant: 5
|
||||
- de: 45
|
||||
à: 60
|
||||
montant: 15 * SMIC horaire
|
||||
montant: 15
|
||||
- de: 60
|
||||
à: 80
|
||||
montant: 25 * SMIC horaire
|
||||
montant: 25
|
||||
- de: 80
|
||||
à: 100
|
||||
montant: 35 * SMIC horaire
|
||||
montant: 35
|
||||
- de: 100
|
||||
à: 115
|
||||
montant: 50 * SMIC horaire
|
||||
montant: 50
|
||||
|
||||
contrat salarié . convention collective . sport . primes . nombre de manifestations:
|
||||
question: Combien de manifestations rémunérées le joueur a-t'il effectué ?
|
||||
|
@ -6008,6 +6008,8 @@ contrat salarié . cotisations . assiette forfaitaire . montant:
|
|||
- assiette CSG et CRDS . assiette abattue
|
||||
- règle: réduction générale
|
||||
par: non
|
||||
- règle: plafond sécurité sociale
|
||||
par: plafond sécurité sociale temps plein
|
||||
formule:
|
||||
encadrement:
|
||||
valeur: assiette forfaitaire
|
||||
|
@ -6015,6 +6017,7 @@ contrat salarié . cotisations . assiette forfaitaire . montant:
|
|||
références:
|
||||
exception agirc-arco (fiche 3): https://www.agirc-arrco.fr/fileadmin/agircarrco/documents/circulaires/agirc_arrco/2019/2019-1-DRJ_Reglementation__applicable_aux_entreprises.pdf
|
||||
CSG et CRDS: https://www.urssaf.fr/portail/home/employeur/calculer-les-cotisations/la-base-de-calcul/assiette-csg-crds.html
|
||||
plafond de sécurité sociale (urssaf.fr): https://www.urssaf.fr/portail/home/employeur/calculer-les-cotisations/la-base-de-calcul/lassiette-maximale/salarie-a-temps-partiel.html#FilAriane
|
||||
|
||||
contrat salarié . cotisations . assiette forfaitaire . minimum:
|
||||
description: >
|
||||
|
|
Loading…
Reference in New Issue