@socialgouv/modeles-social 4.105.0 → 4.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/bin/modeles/common/factory/seniority.js +2 -0
  3. package/bin/modeles/common/supported-agreements.d.ts +1 -0
  4. package/bin/modeles/common/supported-agreements.js +2 -1
  5. package/bin/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/anciennete.spec.d.ts +1 -0
  6. package/bin/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/anciennete.spec.js +22 -0
  7. package/bin/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/indemnite.spec.d.ts +1 -0
  8. package/bin/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/indemnite.spec.js +464 -0
  9. package/bin/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/missing-args.spec.d.ts +1 -0
  10. package/bin/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/missing-args.spec.js +25 -0
  11. package/bin/modeles/conventions/176_industrie_pharmaceutique/index.d.ts +1 -0
  12. package/bin/modeles/conventions/176_industrie_pharmaceutique/index.js +17 -0
  13. package/bin/modeles/conventions/176_industrie_pharmaceutique/seniority.d.ts +7 -0
  14. package/bin/modeles/conventions/176_industrie_pharmaceutique/seniority.js +70 -0
  15. package/bin/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/formule.spec.js +1 -1
  16. package/bin/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/indemnite.spec.js +1 -1
  17. package/bin/modeles/conventions/index.d.ts +1 -0
  18. package/bin/modeles/conventions/index.js +1 -0
  19. package/lib/modeles/common/factory/seniority.js +2 -0
  20. package/lib/modeles/common/supported-agreements.d.ts +1 -0
  21. package/lib/modeles/common/supported-agreements.js +2 -1
  22. package/lib/modeles/common/utils/ccn-supported.json +1 -1
  23. package/lib/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/anciennete.spec.d.ts +1 -0
  24. package/lib/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/anciennete.spec.js +22 -0
  25. package/lib/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/indemnite.spec.d.ts +1 -0
  26. package/lib/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/indemnite.spec.js +464 -0
  27. package/lib/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/missing-args.spec.d.ts +1 -0
  28. package/lib/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/missing-args.spec.js +25 -0
  29. package/lib/modeles/conventions/176_industrie_pharmaceutique/index.d.ts +1 -0
  30. package/lib/modeles/conventions/176_industrie_pharmaceutique/index.js +17 -0
  31. package/lib/modeles/conventions/176_industrie_pharmaceutique/seniority.d.ts +7 -0
  32. package/lib/modeles/conventions/176_industrie_pharmaceutique/seniority.js +70 -0
  33. package/lib/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/formule.spec.js +1 -1
  34. package/lib/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/indemnite.spec.js +1 -1
  35. package/lib/modeles/conventions/index.d.ts +1 -0
  36. package/lib/modeles/conventions/index.js +1 -0
  37. package/lib/modeles/modeles-indemnite-licenciement.json +1573 -3
  38. package/package.json +2 -2
  39. package/src/modeles/base/indemnite-licenciement.yaml +1 -1
  40. package/src/modeles/common/factory/seniority.ts +3 -0
  41. package/src/modeles/common/supported-agreements.ts +2 -1
  42. package/src/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/anciennete.spec.ts +32 -0
  43. package/src/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/indemnite.spec.ts +497 -0
  44. package/src/modeles/conventions/176_industrie_pharmaceutique/__tests__/indemnite-licenciement/missing-args.spec.ts +37 -0
  45. package/src/modeles/conventions/176_industrie_pharmaceutique/indemnite-licenciement.yaml +1034 -0
  46. package/src/modeles/conventions/176_industrie_pharmaceutique/index.ts +1 -0
  47. package/src/modeles/conventions/176_industrie_pharmaceutique/seniority.ts +102 -0
  48. package/src/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/formule.spec.ts +1 -1
  49. package/src/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/indemnite.spec.ts +1 -1
  50. package/src/modeles/conventions/2148_telecommunications/indemnite-licenciement.yaml +3 -3
  51. package/src/modeles/conventions/index.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.106.0](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.105.1...v4.106.0) (2023-08-09)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **indemnite-licenciement:** cc 2148 majoration ([#5283](https://github.com/SocialGouv/code-du-travail-numerique/issues/5283)) ([6078aaa](https://github.com/SocialGouv/code-du-travail-numerique/commit/6078aaa9e19917ec37e511ad7fb509b4294808ee))
11
+
12
+ ### Features
13
+
14
+ - indemnite licenciement 176 ([#5234](https://github.com/SocialGouv/code-du-travail-numerique/issues/5234)) ([d803a58](https://github.com/SocialGouv/code-du-travail-numerique/commit/d803a582db59c9e644db94b9c6c4afbd1624da9e))
15
+ - **indemnite-licenciement:** activation de nouvelles CC ([#5300](https://github.com/SocialGouv/code-du-travail-numerique/issues/5300)) ([8c513d5](https://github.com/SocialGouv/code-du-travail-numerique/commit/8c513d56a7562ddb4a48e4c6bba356353181e840))
16
+
17
+ ## [4.105.1](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.105.0...v4.105.1) (2023-07-19)
18
+
19
+ **Note:** Version bump only for package @socialgouv/modeles-social
20
+
6
21
  # [4.105.0](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.104.2...v4.105.0) (2023-07-17)
7
22
 
8
23
  ### Features
@@ -70,6 +70,8 @@ var SeniorityFactory = /** @class */ (function () {
70
70
  return new conventions_1.Seniority1740();
71
71
  case index_1.SupportedCcIndemniteLicenciement.IDCC2148:
72
72
  return new conventions_1.Seniority2148();
73
+ case index_1.SupportedCcIndemniteLicenciement.IDCC0176:
74
+ return new conventions_1.Seniority176();
73
75
  case index_1.SupportedCcIndemniteLicenciement.IDCC2120:
74
76
  return new conventions_1.Seniority2120();
75
77
  case index_1.SupportedCcIndemniteLicenciement.default:
@@ -45,6 +45,7 @@ export declare enum SupportedCcIndemniteLicenciement {
45
45
  IDCC2148 = "2148",
46
46
  IDCC1483 = "1483",
47
47
  IDCC1740 = "1740",
48
+ IDCC0176 = "176",
48
49
  IDCC2120 = "2120",
49
50
  default = "default"
50
51
  }
@@ -50,6 +50,7 @@ var SupportedCcIndemniteLicenciement;
50
50
  SupportedCcIndemniteLicenciement["IDCC2148"] = "2148";
51
51
  SupportedCcIndemniteLicenciement["IDCC1483"] = "1483";
52
52
  SupportedCcIndemniteLicenciement["IDCC1740"] = "1740";
53
+ SupportedCcIndemniteLicenciement["IDCC0176"] = "176";
53
54
  SupportedCcIndemniteLicenciement["IDCC2120"] = "2120";
54
55
  SupportedCcIndemniteLicenciement["default"] = "default";
55
56
  })(SupportedCcIndemniteLicenciement || (exports.SupportedCcIndemniteLicenciement = SupportedCcIndemniteLicenciement = {}));
@@ -57,7 +58,7 @@ exports.INDEMNITE_LICENCIEMENT_PRODUCTION_READY_CC = [
57
58
  16, 29, 44, 413, 573, 650, 1090, 1351, 1486, 1501, 1518, 1527, 1596, 1597,
58
59
  1979, 2216, 2264, 2941, 3043, 3127, 3239, 1517, 2098, 2511, 2609, 787, 843,
59
60
  675, 1996, 1505, 1147, 1702, 1266, 1672, 275, 86, 2614, 2596, 1043, 1483,
60
- 1516, 1606, 2148,
61
+ 1516, 1606, 2148, 1404, 292,
61
62
  ];
62
63
  var getSupportedAgreement = function (idcc) {
63
64
  for (var _i = 0, _a = Object.values(SupportedCcIndemniteLicenciement); _i < _a.length; _i++) {
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var common_1 = require("../../../../common");
8
+ describe("CC 176", function () {
9
+ describe("Calcul de l'ancienneté", function () {
10
+ test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n absences | entryDate | exitDate | expectedAnciennete\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n absences | entryDate | exitDate | expectedAnciennete\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), [], "20/02/2020", "20/02/2021", 1, [{ durationInMonth: 5, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "20/04/2020" }], "20/02/2020", "20/02/2021", 1, [{ durationInMonth: 7, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "01/04/2020" }], "20/02/2020", "20/02/2021", 11 / 12, [{ durationInMonth: 4, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "01/03/2020" }, { durationInMonth: 3, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "01/10/2020" }], "01/08/2020", "01/08/2021", 11 / 12)("Calcul de l'ancienneté avec $entryDate et $exitDate en attendant $expectedAnciennete an", function (_a) {
11
+ var absences = _a.absences, entryDate = _a.entryDate, exitDate = _a.exitDate, expectedAnciennete = _a.expectedAnciennete;
12
+ var seniority = new common_1.SeniorityFactory().create(common_1.SupportedCcIndemniteLicenciement.IDCC0176);
13
+ var result = seniority.computeSeniority({
14
+ absencePeriods: absences,
15
+ dateEntree: entryDate,
16
+ dateSortie: exitDate,
17
+ });
18
+ expect(result.value).toEqual(expectedAnciennete);
19
+ });
20
+ });
21
+ });
22
+ var templateObject_1;
@@ -0,0 +1,464 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var date_fns_1 = require("date-fns");
4
+ var publicodes_1 = require("../../../../../publicodes");
5
+ var engine = new publicodes_1.IndemniteLicenciementPublicodes(modelsIndemniteLicenciement, "176");
6
+ var expectedReferences = [
7
+ {
8
+ article: "Article 36",
9
+ url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000041494327?idConteneur=KALICONT000005635184",
10
+ },
11
+ {
12
+ article: "Article 25",
13
+ url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000039117073?idConteneur=KALICONT000005635184&origin=list#KALIARTI000039117073",
14
+ },
15
+ ];
16
+ describe("Calcul de l'indemnité de licenciement pour CC 176", function () {
17
+ describe("CDI classique", function () {
18
+ test.each([
19
+ {
20
+ age: 40,
21
+ entryDate: "01/07/2019",
22
+ expectedCompensation: 556,
23
+ expectedFormula: "0.3 * Sref * A",
24
+ seniority: 8 / 12,
25
+ seniorityRight: 8 / 12,
26
+ },
27
+ {
28
+ age: 40,
29
+ entryDate: "01/07/2019",
30
+ expectedCompensation: 2502,
31
+ expectedFormula: "0.3 * Sref * A",
32
+ seniority: 3,
33
+ seniorityRight: 3,
34
+ },
35
+ {
36
+ age: 45,
37
+ entryDate: "01/07/2019",
38
+ expectedCompensation: 3336,
39
+ expectedFormula: "(0.3 * Sref * A) + (1 * Sref)",
40
+ seniority: 8 / 12,
41
+ seniorityRight: 8 / 12,
42
+ },
43
+ {
44
+ age: 45,
45
+ entryDate: "01/07/2019",
46
+ expectedCompensation: 5282,
47
+ expectedFormula: "(0.3 * Sref * A) + (1 * Sref)",
48
+ seniority: 3,
49
+ seniorityRight: 3,
50
+ },
51
+ {
52
+ age: 50,
53
+ entryDate: "01/07/2019",
54
+ expectedCompensation: 6116,
55
+ expectedFormula: "(0.3 * Sref * A) + (2 * Sref)",
56
+ seniority: 8 / 12,
57
+ seniorityRight: 8 / 12,
58
+ },
59
+ {
60
+ age: 50,
61
+ entryDate: "01/07/2019",
62
+ expectedCompensation: 8062,
63
+ expectedFormula: "(0.3 * Sref * A) + (2 * Sref)",
64
+ seniority: 3,
65
+ seniorityRight: 3,
66
+ },
67
+ {
68
+ age: 40,
69
+ entryDate: "01/07/2019",
70
+ expectedCompensation: 4726,
71
+ expectedFormula: "0.34 * Sref * A",
72
+ seniority: 5,
73
+ seniorityRight: 5,
74
+ },
75
+ {
76
+ age: 40,
77
+ entryDate: "01/07/2019",
78
+ expectedCompensation: 7561.6,
79
+ expectedFormula: "0.34 * Sref * A",
80
+ seniority: 8,
81
+ seniorityRight: 8,
82
+ },
83
+ {
84
+ age: 45,
85
+ entryDate: "01/07/2019",
86
+ expectedCompensation: 7506,
87
+ expectedFormula: "(0.34 * Sref * A) + (1 * Sref)",
88
+ seniority: 5,
89
+ seniorityRight: 5,
90
+ },
91
+ {
92
+ age: 45,
93
+ entryDate: "01/07/2019",
94
+ expectedCompensation: 10341.6,
95
+ expectedFormula: "(0.34 * Sref * A) + (1 * Sref)",
96
+ seniority: 8,
97
+ seniorityRight: 8,
98
+ },
99
+ {
100
+ age: 50,
101
+ entryDate: "01/07/2019",
102
+ expectedCompensation: 10286,
103
+ expectedFormula: "(0.34 * Sref * A) + (2 * Sref)",
104
+ seniority: 5,
105
+ seniorityRight: 5,
106
+ },
107
+ {
108
+ age: 50,
109
+ entryDate: "01/07/2019",
110
+ expectedCompensation: 13121.6,
111
+ expectedFormula: "(0.34 * Sref * A) + (2 * Sref)",
112
+ seniority: 8,
113
+ seniorityRight: 8,
114
+ },
115
+ {
116
+ age: 40,
117
+ entryDate: "01/07/2019",
118
+ expectedCompensation: 10564,
119
+ expectedFormula: "0.38 * Sref * A",
120
+ seniority: 10,
121
+ seniorityRight: 10,
122
+ },
123
+ {
124
+ age: 45,
125
+ entryDate: "01/07/2019",
126
+ expectedCompensation: 13344,
127
+ expectedFormula: "(0.38 * Sref * A) + (1 * Sref)",
128
+ seniority: 10,
129
+ seniorityRight: 10,
130
+ },
131
+ {
132
+ age: 50,
133
+ entryDate: "01/07/2019",
134
+ expectedCompensation: 16124,
135
+ expectedFormula: "(0.38 * Sref * A) + (2 * Sref)",
136
+ seniority: 10,
137
+ seniorityRight: 10,
138
+ },
139
+ {
140
+ age: 45,
141
+ entryDate: "01/07/2019",
142
+ expectedCompensation: 20294,
143
+ expectedFormula: "(0.42 * Sref * A) + (1 * Sref)",
144
+ seniority: 15,
145
+ seniorityRight: 15,
146
+ },
147
+ {
148
+ age: 50,
149
+ entryDate: "01/07/2019",
150
+ expectedCompensation: 23074,
151
+ expectedFormula: "(0.42 * Sref * A) + (2 * Sref)",
152
+ seniority: 15,
153
+ seniorityRight: 15,
154
+ },
155
+ {
156
+ age: 45,
157
+ entryDate: "01/07/2019",
158
+ expectedCompensation: 27800,
159
+ expectedFormula: "(0.45 * Sref * A) + (1 * Sref)",
160
+ seniority: 20,
161
+ seniorityRight: 20,
162
+ },
163
+ {
164
+ age: 50,
165
+ entryDate: "01/07/2019",
166
+ expectedCompensation: 30580,
167
+ expectedFormula: "(0.45 * Sref * A) + (2 * Sref)",
168
+ seniority: 20,
169
+ seniorityRight: 20,
170
+ },
171
+ {
172
+ age: 45,
173
+ entryDate: "01/07/2019",
174
+ expectedCompensation: 36140,
175
+ expectedFormula: "(0.48 * Sref * A) + (1 * Sref)",
176
+ seniority: 25,
177
+ seniorityRight: 25,
178
+ },
179
+ {
180
+ age: 50,
181
+ entryDate: "01/07/2019",
182
+ expectedCompensation: 38920,
183
+ expectedFormula: "(0.48 * Sref * A) + (2 * Sref)",
184
+ seniority: 25,
185
+ seniorityRight: 25,
186
+ },
187
+ {
188
+ age: 45,
189
+ entryDate: "01/07/2019",
190
+ expectedCompensation: 43646,
191
+ expectedFormula: "(0.49 * Sref * A) + (1 * Sref)",
192
+ seniority: 30,
193
+ seniorityRight: 30,
194
+ },
195
+ {
196
+ age: 50,
197
+ entryDate: "01/07/2019",
198
+ expectedCompensation: 46426,
199
+ expectedFormula: "(0.49 * Sref * A) + (2 * Sref)",
200
+ seniority: 30,
201
+ seniorityRight: 30,
202
+ },
203
+ {
204
+ age: 45,
205
+ entryDate: "01/07/2019",
206
+ expectedCompensation: 51430,
207
+ expectedFormula: "(0.5 * Sref * A) + (1 * Sref)",
208
+ seniority: 35,
209
+ seniorityRight: 35,
210
+ },
211
+ {
212
+ age: 50,
213
+ entryDate: "01/07/2019",
214
+ expectedCompensation: 54210,
215
+ expectedFormula: "(0.5 * Sref * A) + (2 * Sref)",
216
+ seniority: 35,
217
+ seniorityRight: 35,
218
+ },
219
+ {
220
+ age: 45,
221
+ entryDate: "01/07/1978",
222
+ expectedCompensation: 58380,
223
+ expectedFormula: "21 * Sref",
224
+ seniority: 40,
225
+ seniorityRight: 40,
226
+ },
227
+ {
228
+ age: 50,
229
+ entryDate: "01/07/1978",
230
+ expectedCompensation: 61160,
231
+ expectedFormula: "22 * Sref",
232
+ seniority: 40,
233
+ seniorityRight: 40,
234
+ },
235
+ {
236
+ age: 40,
237
+ entryDate: "30/06/2019",
238
+ expectedCompensation: 625.5,
239
+ expectedFormula: "0.3 * Sref * A",
240
+ notificationDate: "30/03/2020",
241
+ seniority: 0.75,
242
+ seniorityRight: 0.75,
243
+ },
244
+ {
245
+ age: 40,
246
+ entryDate: "30/06/2019",
247
+ expectedCompensation: 834,
248
+ expectedFormula: "0.3 * Sref * A",
249
+ notificationDate: "30/06/2020",
250
+ seniority: 1,
251
+ seniorityRight: 1,
252
+ },
253
+ {
254
+ age: 40,
255
+ entryDate: "01/07/2011",
256
+ expectedCompensation: 16099.91,
257
+ expectedFormula: "(9 / 30 * Sref * A1) + (12 / 30 * Sref * A2) + (14 / 30 * Sref * A3)",
258
+ notificationDate: "01/06/2026",
259
+ seniority: 14.91,
260
+ seniorityRight: 14.91,
261
+ },
262
+ {
263
+ age: 40,
264
+ entryDate: "01/06/2011",
265
+ expectedCompensation: 20294,
266
+ expectedFormula: "(0.42 * Sref * A) + (1 * Sref)",
267
+ notificationDate: "01/06/2026",
268
+ seniority: 15,
269
+ seniorityRight: 15,
270
+ },
271
+ {
272
+ age: 40,
273
+ entryDate: "01/06/2011",
274
+ expectedCompensation: 26039.33,
275
+ expectedFormula: "(9 / 30 * Sref * A1) + (12 / 30 * Sref * A2) + (14 / 30 * Sref * A3) + (16 / 30 * Sref * A4) + (1 * Sref)",
276
+ notificationDate: "01/06/2026",
277
+ seniority: 19.75,
278
+ seniorityRight: 19.75,
279
+ },
280
+ {
281
+ age: 40,
282
+ entryDate: "01/06/2011",
283
+ expectedCompensation: 27800,
284
+ expectedFormula: "(0.45 * Sref * A) + (1 * Sref)",
285
+ notificationDate: "01/06/2026",
286
+ seniority: 20,
287
+ seniorityRight: 20,
288
+ },
289
+ {
290
+ age: 40,
291
+ entryDate: "01/07/1986",
292
+ expectedCompensation: 58380,
293
+ expectedFormula: "21 * Sref",
294
+ notificationDate: "01/06/2026",
295
+ seniority: 40,
296
+ seniorityRight: 40,
297
+ },
298
+ {
299
+ age: 45,
300
+ entryDate: "30/06/2019",
301
+ expectedCompensation: 3405.5,
302
+ expectedFormula: "(0.3 * Sref * A) + (1 * Sref)",
303
+ notificationDate: "30/03/2020",
304
+ seniority: 9 / 12,
305
+ seniorityRight: 9 / 12,
306
+ },
307
+ {
308
+ age: 45,
309
+ entryDate: "30/06/2019",
310
+ expectedCompensation: 3614,
311
+ expectedFormula: "(0.3 * Sref * A) + (1 * Sref)",
312
+ notificationDate: "30/06/2020",
313
+ seniority: 1,
314
+ seniorityRight: 1,
315
+ },
316
+ {
317
+ age: 45,
318
+ entryDate: "01/07/2011",
319
+ expectedCompensation: 18879.91,
320
+ expectedFormula: "(9 / 30 * Sref * A1) + (12 / 30 * Sref * A2) + (14 / 30 * Sref * A3) + (1 * Sref)",
321
+ notificationDate: "01/06/2026",
322
+ seniority: 14.91,
323
+ seniorityRight: 14.91,
324
+ },
325
+ {
326
+ age: 45,
327
+ entryDate: "01/06/2011",
328
+ expectedCompensation: 20294,
329
+ expectedFormula: "(0.42 * Sref * A) + (1 * Sref)",
330
+ notificationDate: "01/06/2026",
331
+ seniority: 15,
332
+ seniorityRight: 15,
333
+ },
334
+ {
335
+ age: 45,
336
+ entryDate: "01/09/2006",
337
+ expectedCompensation: 26039.33,
338
+ expectedFormula: "(9 / 30 * Sref * A1) + (12 / 30 * Sref * A2) + (14 / 30 * Sref * A3) + (16 / 30 * Sref * A4) + (1 * Sref)",
339
+ notificationDate: "01/06/2026",
340
+ seniority: 19.75,
341
+ seniorityRight: 19.75,
342
+ },
343
+ {
344
+ age: 45,
345
+ entryDate: "01/06/2006",
346
+ expectedCompensation: 27800,
347
+ expectedFormula: "(0.45 * Sref * A) + (1 * Sref)",
348
+ notificationDate: "01/06/2026",
349
+ seniority: 20,
350
+ seniorityRight: 20,
351
+ },
352
+ {
353
+ age: 45,
354
+ entryDate: "01/06/2001",
355
+ expectedCompensation: 36140,
356
+ expectedFormula: "(0.48 * Sref * A) + (1 * Sref)",
357
+ notificationDate: "01/06/2026",
358
+ seniority: 25,
359
+ seniorityRight: 25,
360
+ },
361
+ {
362
+ age: 45,
363
+ entryDate: "01/07/1986",
364
+ expectedCompensation: 58380,
365
+ expectedFormula: "21 * Sref",
366
+ notificationDate: "01/06/2026",
367
+ seniority: 40,
368
+ seniorityRight: 40,
369
+ },
370
+ {
371
+ age: 50,
372
+ entryDate: "30/06/2019",
373
+ expectedCompensation: 6185.5,
374
+ expectedFormula: "(0.3 * Sref * A) + (2 * Sref)",
375
+ notificationDate: "30/03/2020",
376
+ seniority: 9 / 12,
377
+ seniorityRight: 9 / 12,
378
+ },
379
+ {
380
+ age: 50,
381
+ entryDate: "30/06/2019",
382
+ expectedCompensation: 6394,
383
+ expectedFormula: "(0.3 * Sref * A) + (2 * Sref)",
384
+ notificationDate: "30/06/2020",
385
+ seniority: 1,
386
+ seniorityRight: 1,
387
+ },
388
+ {
389
+ age: 50,
390
+ entryDate: "01/07/2011",
391
+ expectedCompensation: 21659.91,
392
+ expectedFormula: "(9 / 30 * Sref * A1) + (12 / 30 * Sref * A2) + (14 / 30 * Sref * A3) + (2 * Sref)",
393
+ notificationDate: "01/06/2026",
394
+ seniority: 14.91,
395
+ seniorityRight: 14.91,
396
+ },
397
+ {
398
+ age: 50,
399
+ entryDate: "01/07/2011",
400
+ expectedCompensation: 23074,
401
+ expectedFormula: "(0.42 * Sref * A) + (2 * Sref)",
402
+ notificationDate: "01/06/2026",
403
+ seniority: 15,
404
+ seniorityRight: 15,
405
+ },
406
+ {
407
+ age: 50,
408
+ entryDate: "01/07/2011",
409
+ expectedCompensation: 28819.33,
410
+ expectedFormula: "(9 / 30 * Sref * A1) + (12 / 30 * Sref * A2) + (14 / 30 * Sref * A3) + (16 / 30 * Sref * A4) + (2 * Sref)",
411
+ notificationDate: "01/06/2026",
412
+ seniority: 19.75,
413
+ seniorityRight: 19.75,
414
+ },
415
+ {
416
+ age: 50,
417
+ entryDate: "01/06/2006",
418
+ expectedCompensation: 30580,
419
+ expectedFormula: "(0.45 * Sref * A) + (2 * Sref)",
420
+ notificationDate: "01/06/2026",
421
+ seniority: 20,
422
+ seniorityRight: 20,
423
+ },
424
+ {
425
+ age: 50,
426
+ entryDate: "01/06/2001",
427
+ expectedCompensation: 38920,
428
+ expectedFormula: "(0.48 * Sref * A) + (2 * Sref)",
429
+ notificationDate: "01/06/2026",
430
+ seniority: 25,
431
+ seniorityRight: 25,
432
+ },
433
+ {
434
+ age: 50,
435
+ entryDate: "01/07/1986",
436
+ expectedCompensation: 61160,
437
+ expectedFormula: "22 * Sref",
438
+ notificationDate: "01/06/2026",
439
+ seniority: 40,
440
+ seniorityRight: 40,
441
+ },
442
+ ])("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
443
+ var _b;
444
+ var seniorityRight = _a.seniorityRight, entryDate = _a.entryDate, notificationDate = _a.notificationDate, age = _a.age, expectedCompensation = _a.expectedCompensation, seniority = _a.seniority, expectedFormula = _a.expectedFormula;
445
+ var _c = engine.setSituation({
446
+ "contrat salarié . convention collective": "'IDCC0176'",
447
+ "contrat salarié . convention collective . industrie pharmaceutique . age": age.toString(),
448
+ "contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority.toString(),
449
+ "contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight.toString(),
450
+ "contrat salarié . indemnité de licenciement . date d'entrée": entryDate,
451
+ "contrat salarié . indemnité de licenciement . date de notification": notificationDate !== null && notificationDate !== void 0 ? notificationDate : (0, date_fns_1.format)((0, date_fns_1.addYears)(new Date(entryDate), seniority), "dd/MM/yyyy"),
452
+ "contrat salarié . indemnité de licenciement . salaire de référence conventionnel": "2780",
453
+ }, "contrat salarié . indemnité de licenciement . résultat conventionnel"), missingArgs = _c.missingArgs, result = _c.result;
454
+ var formule = engine.getFormule();
455
+ expect(formule.formula).toEqual(expectedFormula);
456
+ expect(missingArgs).toEqual([]);
457
+ expect(result.value).toEqual(expectedCompensation);
458
+ expect((_b = result.unit) === null || _b === void 0 ? void 0 : _b.numerators).toEqual(["€"]);
459
+ var references = engine.getReferences("résultat conventionnel");
460
+ expect(references).toHaveLength(expectedReferences.length);
461
+ expect(references).toEqual(expect.arrayContaining(expectedReferences));
462
+ });
463
+ });
464
+ });
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var publicodes_1 = require("../../../../../publicodes");
4
+ var engine = new publicodes_1.IndemniteLicenciementPublicodes(modelsIndemniteLicenciement, "176");
5
+ describe("CC 176 - Affiche les questions", function () {
6
+ it("doit demander l'age", function () {
7
+ var result = engine.setSituation({
8
+ "contrat salarié . convention collective": "'IDCC0176'",
9
+ "contrat salarié . indemnité de licenciement . date d'entrée": "01/07/2019",
10
+ }, "contrat salarié . indemnité de licenciement . résultat conventionnel");
11
+ expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . industrie pharmaceutique . age");
12
+ });
13
+ });
14
+ var getFirstMissing = function (missingVariables) {
15
+ var missingVars = missingVariables
16
+ .filter(function (arg) { return arg.rawNode.cdtn !== undefined; })
17
+ .sort(function (a, b) { return b.indice - a.indice; });
18
+ if (missingVars.length === 0) {
19
+ return null;
20
+ }
21
+ return replaceAll(missingVars[0].name, " - ", " . ");
22
+ };
23
+ var replaceAll = function (string, search, replace) {
24
+ return string.split(search).join(replace);
25
+ };
@@ -0,0 +1 @@
1
+ export * from "./seniority";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./seniority"), exports);
@@ -0,0 +1,7 @@
1
+ import type { ISeniority, Motif, RequiredSeniorityResult, SeniorityProps, SeniorityRequiredProps, SeniorityResult, SupportedCcIndemniteLicenciement } from "../../common";
2
+ export declare class Seniority176 implements ISeniority<SupportedCcIndemniteLicenciement.IDCC0176> {
3
+ computeSeniority({ dateEntree, dateSortie, absencePeriods, }: SeniorityProps<SupportedCcIndemniteLicenciement.IDCC0176>): SeniorityResult;
4
+ computeRequiredSeniority({ dateEntree, dateNotification, absencePeriods, }: SeniorityRequiredProps): RequiredSeniorityResult;
5
+ getMotifs(): Motif[];
6
+ private compute;
7
+ }