Skip to content

Commit

Permalink
chore: met à jour Publicodes -> 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JalilArfaoui committed Sep 12, 2024
1 parent f478bc1 commit c427b26
Show file tree
Hide file tree
Showing 15 changed files with 5,190 additions and 436 deletions.
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@apidevtools/swagger-cli": "^4.0.4",
"@koa/cors": "^4.0.0",
"@koa/router": "^12.0.0",
"@publicodes/rest-api": "^1.2.0",
"@publicodes/rest-api": "^1.5.0",
"@sentry/node": "^7.70.0",
"@sentry/utils": "^7.70.0",
"got": "^13.0.0",
Expand All @@ -43,7 +43,7 @@
"modele-social": "workspace:^",
"nodemon": "^3.0.1",
"piano-analytics-js": "^6.13.0",
"publicodes": "^1.2.0",
"publicodes": "^1.5.1",
"rate-limiter-flexible": "^2.4.2",
"swagger-ui-dist": "^5.7.2"
},
Expand Down
5,291 changes: 4,981 additions & 310 deletions api/source/test-e2e/__snapshots__/index.test.ts.snap

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions modele-social/règles/entreprise/entreprise.publicodes
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ entreprise . TVA . franchise de TVA . notification:
type: notification
experimental: oui
toutes ces conditions:
- dirigeant
- seuils dépassés = non
- chiffre d'affaires != 0
résumé: |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@actions/github": "^5.1.1",
"@ianvs/prettier-plugin-sort-imports": "^4.1.0",
"@publicodes/codemod": "^1.1.0",
"@publicodes/tools": "^1.0.7",
"@publicodes/tools": "^1.2.5",
"@types/got": "^9.6.12",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
Expand All @@ -52,7 +52,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-vitest": "^0.3.22",
"prettier": "^3.0.3",
"publicodes": "^1.2.0",
"publicodes": "^1.5.1",
"rimraf": "^5.0.1"
},
"resolutions": {
Expand Down
6 changes: 3 additions & 3 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@internationalized/number": "^3.2.1",
"@juggle/resize-observer": "^3.4.0",
"@leeoniya/ufuzzy": "^1.0.10",
"@publicodes/react-ui": "^1.2.0",
"@publicodes/react-ui": "^1.5.2",
"@react-aria/accordion": "^3.0.0-alpha.17",
"@react-pdf/renderer": "^3.1.12",
"@sentry/integrations": "^7.70.0",
Expand All @@ -68,13 +68,13 @@
"effect": "^3.0.0",
"exoneration-covid": "workspace:^",
"focus-trap-react": "^10.2.1",
"fuse.js": "^6.6.2",
"fuse.js": "^7.0.0",
"iframe-resizer": "^4.3.7",
"isbot": "^3.7.0",
"markdown-to-jsx": "^7.3.2",
"modele-social": "workspace:^",
"piano-analytics-js": "^6.13.0",
"publicodes": "^1.2.0",
"publicodes": "^1.5.1",
"react": "^18.2.0",
"react-aria": "^3.24.0",
"react-day-picker": "^8.8.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const ISSimulationConfig: SimulationConfig = {
'unité par défaut': '€/an',
situation: {
salarié: 'non',
'entreprise . catégorie juridique': "''",
'entreprise . imposition': "'IS'",
'entreprise . imposition . IS . éligible taux réduit': 'oui',
'entreprise . TVA . franchise de TVA': 'non',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const configIndépendant: SimulationConfig = {
situation: {
'dirigeant . régime social': "'indépendant'",
'entreprise . imposition': "'IR'",
'entreprise . catégorie juridique': "''",
'entreprise . catégorie juridique': "'SARL'",
salarié: 'non',
},
}
Expand Down
2 changes: 1 addition & 1 deletion site/source/pages/simulateurs/salarié/simulationConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export const configSalarié: SimulationConfig = {
"situation personnelle . domiciliation fiscale à l'étranger",
'salarié . régimes spécifiques . impatriés',
],
'liste noire': ['entreprise . catégorie juridique'],
},
'unité par défaut': '€/mois',
situation: {
dirigeant: 'non',
'entreprise . catégorie juridique': "''",
'entreprise . imposition': 'non',
'salarié . activité partielle': 'non',
'impôt . méthode de calcul . par défaut': {
Expand Down
44 changes: 12 additions & 32 deletions site/test/regressions/__snapshots__/artiste-auteur.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,64 @@

exports[`calculate simulations-artiste-auteur > bnc 1`] = `
"artiste-auteur . cotisations: 1230
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 0"
`;

exports[`calculate simulations-artiste-auteur > bnc 2`] = `
"artiste-auteur . cotisations: 1863
artiste-auteur . cotisations . IRCEC: 920
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 920"
`;

exports[`calculate simulations-artiste-auteur > bnc 3`] = `
"artiste-auteur . cotisations: 931
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : artiste-auteur . cotisations . avertissement trimestres retraite, entreprise . TVA . franchise de TVA . notification"
Notifications affichées : artiste-auteur . cotisations . avertissement trimestres retraite"
`;

exports[`calculate simulations-artiste-auteur > option surcotisation 1`] = `
"artiste-auteur . cotisations: 487
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 0"
`;

exports[`calculate simulations-artiste-auteur > option surcotisation 2`] = `
"artiste-auteur . cotisations: 479
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 0"
`;

exports[`calculate simulations-artiste-auteur > option surcotisation 3`] = `
"artiste-auteur . cotisations: 438
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 0"
`;

exports[`calculate simulations-artiste-auteur > option surcotisation 4`] = `
"artiste-auteur . cotisations: 430
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 0"
`;

exports[`calculate simulations-artiste-auteur > salarié 1`] = `
"artiste-auteur . cotisations: 160
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : artiste-auteur . cotisations . avertissement trimestres retraite, entreprise . TVA . franchise de TVA . notification"
Notifications affichées : artiste-auteur . cotisations . avertissement trimestres retraite"
`;

exports[`calculate simulations-artiste-auteur > salarié 2`] = `
"artiste-auteur . cotisations: 1523
artiste-auteur . cotisations . IRCEC: 0
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 0"
`;

exports[`calculate simulations-artiste-auteur > salarié 3`] = `
"artiste-auteur . cotisations: 1683
artiste-auteur . cotisations . IRCEC: 840
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 840"
`;

exports[`calculate simulations-artiste-auteur > salarié 4`] = `
"artiste-auteur . cotisations: 1061
artiste-auteur . cotisations . IRCEC: 8000
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 8000"
`;

exports[`calculate simulations-artiste-auteur > salarié 5`] = `
"artiste-auteur . cotisations: 1390
artiste-auteur . cotisations . IRCEC: 11128
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
artiste-auteur . cotisations . IRCEC: 11128"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ salarié . coût total employeur: 906
salarié . rémunération . net . payé après impôt: 593
salarié . rémunération . net . à payer avant impôt: 593
Notifications affichées : salarié . rémunération . assiette de vérification du SMIC . contrôle, salarié . convention collective . avertissement convention collective"
Notifications affichées : salarié . convention collective . avertissement convention collective, salarié . rémunération . assiette de vérification du SMIC . contrôle"
`;

exports[`calculate simulations-salarié > CCN sport 2`] = `
Expand Down
60 changes: 30 additions & 30 deletions site/test/regressions/__snapshots__/indépendant.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -112,70 +112,70 @@ Notifications affichées : entreprise . TVA . franchise de TVA . notification"

exports[`calculate simulations-indépendant > conjoint collaborateur 2`] = `
"dirigeant . indépendant . cotisations et contributions . début activité: null
dirigeant . indépendant . revenu professionnel: 52124
dirigeant . rémunération . cotisations: 28372
dirigeant . indépendant . revenu professionnel: 52018
dirigeant . rémunération . cotisations: 28319
dirigeant . rémunération . net: 50000
dirigeant . rémunération . net . après impôt: 41077
dirigeant . rémunération . totale: 78372
dirigeant . rémunération . net . après impôt: 41108
dirigeant . rémunération . totale: 78319
entreprise . charges: 0
entreprise . chiffre d'affaires: 78372
impôt . montant: 8923
entreprise . chiffre d'affaires: 78319
impôt . montant: 8892
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
`;

exports[`calculate simulations-indépendant > conjoint collaborateur 3`] = `
"dirigeant . indépendant . cotisations et contributions . début activité: null
dirigeant . indépendant . revenu professionnel: 52192
dirigeant . rémunération . cotisations: 30891
dirigeant . indépendant . revenu professionnel: 52018
dirigeant . rémunération . cotisations: 30797
dirigeant . rémunération . net: 50000
dirigeant . rémunération . net . après impôt: 41056
dirigeant . rémunération . totale: 80891
dirigeant . rémunération . net . après impôt: 41108
dirigeant . rémunération . totale: 80797
entreprise . charges: 0
entreprise . chiffre d'affaires: 80891
impôt . montant: 8944
entreprise . chiffre d'affaires: 80797
impôt . montant: 8892
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
`;

exports[`calculate simulations-indépendant > conjoint collaborateur 4`] = `
"dirigeant . indépendant . cotisations et contributions . début activité: null
dirigeant . indépendant . revenu professionnel: 52016
dirigeant . rémunération . cotisations: 24406
dirigeant . indépendant . revenu professionnel: 51910
dirigeant . rémunération . cotisations: 24345
dirigeant . rémunération . net: 50000
dirigeant . rémunération . net . après impôt: 41109
dirigeant . rémunération . totale: 74406
dirigeant . rémunération . net . après impôt: 41141
dirigeant . rémunération . totale: 74345
entreprise . charges: 0
entreprise . chiffre d'affaires: 74406
impôt . montant: 8891
entreprise . chiffre d'affaires: 74345
impôt . montant: 8859
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
`;

exports[`calculate simulations-indépendant > conjoint collaborateur 5`] = `
"dirigeant . indépendant . cotisations et contributions . début activité: null
dirigeant . indépendant . revenu professionnel: 52016
dirigeant . rémunération . cotisations: 24406
dirigeant . indépendant . revenu professionnel: 51842
dirigeant . rémunération . cotisations: 24304
dirigeant . rémunération . net: 50000
dirigeant . rémunération . net . après impôt: 41109
dirigeant . rémunération . totale: 74406
dirigeant . rémunération . net . après impôt: 41161
dirigeant . rémunération . totale: 74304
entreprise . charges: 0
entreprise . chiffre d'affaires: 74406
impôt . montant: 8891
entreprise . chiffre d'affaires: 74304
impôt . montant: 8839
Notifications affichées : entreprise . TVA . franchise de TVA . notification"
`;

exports[`calculate simulations-indépendant > conjoint collaborateur 6`] = `
"dirigeant . indépendant . cotisations et contributions . début activité: null
dirigeant . indépendant . revenu professionnel: 517934
dirigeant . rémunération . cotisations: 160626
dirigeant . indépendant . revenu professionnel: 517276
dirigeant . rémunération . cotisations: 160470
dirigeant . rémunération . net: 500000
dirigeant . rémunération . net . après impôt: 281568
dirigeant . rémunération . totale: 660626
dirigeant . rémunération . net . après impôt: 281890
dirigeant . rémunération . totale: 660470
entreprise . charges: 0
entreprise . chiffre d'affaires: 660626
impôt . montant: 218432"
entreprise . chiffre d'affaires: 660470
impôt . montant: 218110"
`;

exports[`calculate simulations-indépendant > cotisations facultatives 1`] = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,46 +84,46 @@ protection sociale . retraite . trimestres: 4"
`;

exports[`calculate simulations-professions-libérales > CIPAV conjoint collaborateur 2`] = `
"dirigeant . indépendant . cotisations et contributions: 30891
"dirigeant . indépendant . cotisations et contributions: 30869
dirigeant . rémunération . net: 60000
dirigeant . rémunération . net . après impôt: 47975
entreprise . chiffre d'affaires: 90891
impôt . montant: 12025
dirigeant . rémunération . net . après impôt: 47984
entreprise . chiffre d'affaires: 90869
impôt . montant: 12016
protection sociale . retraite . base: 340
protection sociale . retraite . complémentaire: 392
protection sociale . retraite . trimestres: 4"
`;

exports[`calculate simulations-professions-libérales > CIPAV conjoint collaborateur 3`] = `
"dirigeant . indépendant . cotisations et contributions: 30565
"dirigeant . indépendant . cotisations et contributions: 30540
dirigeant . rémunération . net: 60000
dirigeant . rémunération . net . après impôt: 47977
entreprise . chiffre d'affaires: 90565
impôt . montant: 12023
dirigeant . rémunération . net . après impôt: 47987
entreprise . chiffre d'affaires: 90540
impôt . montant: 12013
protection sociale . retraite . base: 452
protection sociale . retraite . complémentaire: 392
protection sociale . retraite . complémentaire: 391
protection sociale . retraite . trimestres: 4"
`;

exports[`calculate simulations-professions-libérales > CIPAV conjoint collaborateur 4`] = `
"dirigeant . indépendant . cotisations et contributions: 34911
"dirigeant . indépendant . cotisations et contributions: 34847
dirigeant . rémunération . net: 60000
dirigeant . rémunération . net . après impôt: 47942
entreprise . chiffre d'affaires: 94911
impôt . montant: 12058
dirigeant . rémunération . net . après impôt: 47966
entreprise . chiffre d'affaires: 94847
impôt . montant: 12034
protection sociale . retraite . base: 340
protection sociale . retraite . complémentaire: 393
protection sociale . retraite . complémentaire: 392
protection sociale . retraite . trimestres: 4"
`;

exports[`calculate simulations-professions-libérales > CIPAV conjoint collaborateur 5`] = `
"dirigeant . indépendant . cotisations et contributions: 32865
"dirigeant . indépendant . cotisations et contributions: 32792
dirigeant . rémunération . net: 60000
dirigeant . rémunération . net . après impôt: 47959
entreprise . chiffre d'affaires: 92865
impôt . montant: 12041
dirigeant . rémunération . net . après impôt: 47983
entreprise . chiffre d'affaires: 92792
impôt . montant: 12017
protection sociale . retraite . base: 457
protection sociale . retraite . complémentaire: 393
protection sociale . retraite . complémentaire: 392
protection sociale . retraite . trimestres: 4"
`;

Expand Down
8 changes: 8 additions & 0 deletions site/test/regressions/salarié.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ it('calculate simulations-salarié', () => {
)
).toMatchInlineSnapshot(`
[
"entreprise . associés . unique",
"entreprise . catégorie juridique",
"entreprise . catégorie juridique . EI",
"entreprise . catégorie juridique . EI . auto-entrepreneur",
"entreprise . catégorie juridique . SAS",
"entreprise . catégorie juridique . SELARL",
"entreprise . catégorie juridique . SELAS",
"entreprise . catégorie juridique . remplacements . profession libérale reglementée",
"impôt . méthode de calcul",
"salarié . contrat",
"salarié . contrat . statut cadre",
Expand Down
4 changes: 3 additions & 1 deletion site/test/regressions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export const runSimulations = (
.map((node) => node.dottedName)

const snapshotedDisplayedNotifications = evaluatedNotifications.length
? `\n\nNotifications affichées : ${evaluatedNotifications.join(', ')}`
? `\n\nNotifications affichées : ${evaluatedNotifications
.sort()
.join(', ')}`
: ''
// Display result in a single line in the snapshot,
// which reduce the number of lines of this snapshot
Expand Down
Loading

0 comments on commit c427b26

Please sign in to comment.