@silexpert/core 1.1.215 → 1.1.218

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 (80) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/api/resources/SalariesFile.d.ts +1 -1
  3. package/dist/cjs/api/resources/SalariesFile.d.ts.map +1 -1
  4. package/dist/cjs/api/resources/SalariesFile.js +11 -2
  5. package/dist/cjs/api/resources/SalariesFile.js.map +1 -1
  6. package/dist/cjs/types/Enum/PriceGridClementine.d.ts +55 -0
  7. package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  8. package/dist/cjs/types/Enum/PriceGridClementine.js +42 -0
  9. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  10. package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts +17 -0
  11. package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
  12. package/dist/cjs/types/Enum/PriceGridLegalstart.js +16 -0
  13. package/dist/cjs/types/Enum/PriceGridLegalstart.js.map +1 -1
  14. package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts +18 -0
  15. package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
  16. package/dist/cjs/types/Enum/PriceGridPourcentage.js +96 -0
  17. package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  18. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
  19. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  20. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  21. package/dist/cjs/utils/exercice.d.ts +4 -0
  22. package/dist/cjs/utils/exercice.d.ts.map +1 -0
  23. package/dist/cjs/utils/exercice.js +25 -0
  24. package/dist/cjs/utils/exercice.js.map +1 -0
  25. package/dist/cjs/utils/index.d.ts +1 -0
  26. package/dist/cjs/utils/index.d.ts.map +1 -1
  27. package/dist/cjs/utils/index.js +1 -0
  28. package/dist/cjs/utils/index.js.map +1 -1
  29. package/dist/cjs/utils/prestation.d.ts +3 -3
  30. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  31. package/dist/cjs/utils/prestation.js +20 -10
  32. package/dist/cjs/utils/prestation.js.map +1 -1
  33. package/dist/cjs/utils/vat/3517/century23.d.ts.map +1 -1
  34. package/dist/cjs/utils/vat/3517/century23.js +9 -8
  35. package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
  36. package/dist/mjs/api/resources/SalariesFile.d.ts +1 -1
  37. package/dist/mjs/api/resources/SalariesFile.d.ts.map +1 -1
  38. package/dist/mjs/api/resources/SalariesFile.js +11 -2
  39. package/dist/mjs/api/resources/SalariesFile.js.map +1 -1
  40. package/dist/mjs/types/Enum/PriceGridClementine.d.ts +55 -0
  41. package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  42. package/dist/mjs/types/Enum/PriceGridClementine.js +42 -0
  43. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  44. package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts +17 -0
  45. package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
  46. package/dist/mjs/types/Enum/PriceGridLegalstart.js +16 -0
  47. package/dist/mjs/types/Enum/PriceGridLegalstart.js.map +1 -1
  48. package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts +18 -0
  49. package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
  50. package/dist/mjs/types/Enum/PriceGridPourcentage.js +96 -0
  51. package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  52. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
  53. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  54. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  55. package/dist/mjs/utils/exercice.d.ts +4 -0
  56. package/dist/mjs/utils/exercice.d.ts.map +1 -0
  57. package/dist/mjs/utils/exercice.js +22 -0
  58. package/dist/mjs/utils/exercice.js.map +1 -0
  59. package/dist/mjs/utils/index.d.ts +1 -0
  60. package/dist/mjs/utils/index.d.ts.map +1 -1
  61. package/dist/mjs/utils/index.js +1 -0
  62. package/dist/mjs/utils/index.js.map +1 -1
  63. package/dist/mjs/utils/prestation.d.ts +3 -3
  64. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  65. package/dist/mjs/utils/prestation.js +13 -3
  66. package/dist/mjs/utils/prestation.js.map +1 -1
  67. package/dist/mjs/utils/vat/3517/century23.d.ts.map +1 -1
  68. package/dist/mjs/utils/vat/3517/century23.js +2 -1
  69. package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
  70. package/package-lock.json +1 -1
  71. package/package.json +1 -1
  72. package/ts/api/resources/SalariesFile.ts +12 -2
  73. package/ts/types/Enum/PriceGridClementine.ts +42 -0
  74. package/ts/types/Enum/PriceGridLegalstart.ts +16 -0
  75. package/ts/types/Enum/PriceGridPourcentage.ts +96 -0
  76. package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +2 -0
  77. package/ts/utils/exercice.ts +25 -0
  78. package/ts/utils/index.ts +1 -0
  79. package/ts/utils/prestation.ts +93 -4
  80. package/ts/utils/vat/3517/century23.ts +2 -1
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.129",
3
+ "version": "1.1.217",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.215",
3
+ "version": "1.1.218",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -8,8 +8,18 @@ export class SalariesFile extends Resource {
8
8
  return this.axios.$post('salariesFile', params);
9
9
  }
10
10
 
11
- createForSociety(idSociety: number): Promise<ReadSalariesFile> {
12
- return this.axios.$post(`/societies/${idSociety}/salary-files`);
11
+ createForSociety(idSociety: number, params: CreateSalariesFile): Promise<ReadSalariesFile> {
12
+ const formData = new FormData();
13
+ Object.entries(params).forEach(([key, value]) => {
14
+ if (value || value === false || value === 0) {
15
+ if (key === 'file')
16
+ formData.append('file', value);
17
+ else
18
+ formData.append(key, `${value}`);
19
+ }
20
+ });
21
+
22
+ return this.axios.$post(`/societies/${idSociety}/salary-files`, formData, { headers: { 'Content-Type': 'multipart/form-data' } });
13
23
  }
14
24
 
15
25
 
@@ -2,6 +2,7 @@ import { VatRegime } from './VatRegime';
2
2
  import { ClosingType } from './ClosingType';
3
3
  import { PrestationType } from './PrestationType';
4
4
  import { TaxSystem } from './TaxSystem';
5
+ import { LegalFormTypeEnum } from './LegalForm';
5
6
 
6
7
  export const PriceGridClementine = [
7
8
  {
@@ -330,6 +331,22 @@ export const PriceGridClementine = [
330
331
  },
331
332
  ],
332
333
  },
334
+ {
335
+ /* Assurance Control Fiscal */
336
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
337
+ exerciceNbr: [
338
+ {
339
+ minimum: 1,
340
+ maximum: 2,
341
+ price: 149,
342
+ },
343
+ {
344
+ minimum: 3,
345
+ maximum: 1000,
346
+ price: 299,
347
+ },
348
+ ],
349
+ },
333
350
  ],
334
351
  },
335
352
  {
@@ -521,6 +538,31 @@ export const PriceGridClementine = [
521
538
  },
522
539
  ],
523
540
  },
541
+ {
542
+ /* Social */
543
+ idPrestationList: [PrestationType.SOCIAL],
544
+ employeeByLegalForm: [
545
+ {
546
+ idLegalForm: LegalFormTypeEnum.EI,
547
+ price: 33,
548
+ },
549
+ {
550
+ idLegalForm: LegalFormTypeEnum.AUTO_ENTREPRENEUR,
551
+ price: 36,
552
+ },
553
+ ],
554
+ },
555
+ {
556
+ /* Assurance Control Fiscal */
557
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
558
+ exerciceNbr: [
559
+ {
560
+ minimum: 1,
561
+ maximum: 1000,
562
+ price: 199,
563
+ },
564
+ ],
565
+ },
524
566
  ],
525
567
  },
526
568
  ];
@@ -147,6 +147,22 @@ export const PriceGridLegalstart = [
147
147
  },
148
148
  ],
149
149
  },
150
+ {
151
+ /* Assurance Control Fiscal */
152
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
153
+ exerciceNbr: [
154
+ {
155
+ minimum: 1,
156
+ maximum: 2,
157
+ price: 149,
158
+ },
159
+ {
160
+ minimum: 3,
161
+ maximum: 1000,
162
+ price: 299,
163
+ },
164
+ ],
165
+ },
150
166
  ],
151
167
  },
152
168
  ];
@@ -311,6 +311,22 @@ export const PriceGridPourcentage = [
311
311
  },
312
312
  ],
313
313
  },
314
+ {
315
+ /* Assurance Control Fiscal */
316
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
317
+ exerciceNbr: [
318
+ {
319
+ minimum: 1,
320
+ maximum: 2,
321
+ price: 149,
322
+ },
323
+ {
324
+ minimum: 3,
325
+ maximum: 1000,
326
+ price: 299,
327
+ },
328
+ ],
329
+ },
314
330
  ],
315
331
  },
316
332
  {
@@ -621,6 +637,22 @@ export const PriceGridPourcentage = [
621
637
  },
622
638
  ],
623
639
  },
640
+ {
641
+ /* Assurance Control Fiscal */
642
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
643
+ exerciceNbr: [
644
+ {
645
+ minimum: 1,
646
+ maximum: 2,
647
+ price: 149,
648
+ },
649
+ {
650
+ minimum: 3,
651
+ maximum: 1000,
652
+ price: 299,
653
+ },
654
+ ],
655
+ },
624
656
  ],
625
657
  },
626
658
  {
@@ -931,6 +963,22 @@ export const PriceGridPourcentage = [
931
963
  },
932
964
  ],
933
965
  },
966
+ {
967
+ /* Assurance Control Fiscal */
968
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
969
+ exerciceNbr: [
970
+ {
971
+ minimum: 1,
972
+ maximum: 2,
973
+ price: 149,
974
+ },
975
+ {
976
+ minimum: 3,
977
+ maximum: 1000,
978
+ price: 299,
979
+ },
980
+ ],
981
+ },
934
982
  ],
935
983
  },
936
984
  {
@@ -1241,6 +1289,22 @@ export const PriceGridPourcentage = [
1241
1289
  },
1242
1290
  ],
1243
1291
  },
1292
+ {
1293
+ /* Assurance Control Fiscal */
1294
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
1295
+ exerciceNbr: [
1296
+ {
1297
+ minimum: 1,
1298
+ maximum: 2,
1299
+ price: 149,
1300
+ },
1301
+ {
1302
+ minimum: 3,
1303
+ maximum: 1000,
1304
+ price: 299,
1305
+ },
1306
+ ],
1307
+ },
1244
1308
  ],
1245
1309
  },
1246
1310
  {
@@ -1551,6 +1615,22 @@ export const PriceGridPourcentage = [
1551
1615
  },
1552
1616
  ],
1553
1617
  },
1618
+ {
1619
+ /* Assurance Control Fiscal */
1620
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
1621
+ exerciceNbr: [
1622
+ {
1623
+ minimum: 1,
1624
+ maximum: 2,
1625
+ price: 149,
1626
+ },
1627
+ {
1628
+ minimum: 3,
1629
+ maximum: 1000,
1630
+ price: 299,
1631
+ },
1632
+ ],
1633
+ },
1554
1634
  ],
1555
1635
  },
1556
1636
  {
@@ -1861,6 +1941,22 @@ export const PriceGridPourcentage = [
1861
1941
  },
1862
1942
  ],
1863
1943
  },
1944
+ {
1945
+ /* Assurance Control Fiscal */
1946
+ idPrestationList: [PrestationType.ASSURANCE_CONTROLE_FISCAL],
1947
+ exerciceNbr: [
1948
+ {
1949
+ minimum: 1,
1950
+ maximum: 2,
1951
+ price: 149,
1952
+ },
1953
+ {
1954
+ minimum: 3,
1955
+ maximum: 1000,
1956
+ price: 299,
1957
+ },
1958
+ ],
1959
+ },
1864
1960
  ],
1865
1961
  },
1866
1962
  ];
@@ -18,6 +18,8 @@ export interface SpecialHours {
18
18
  export interface TimeSlots {
19
19
  startDate: Date,
20
20
  endDate: Date
21
+ startDateLocal?: Date,
22
+ endDateLocal?: Date
21
23
  }
22
24
 
23
25
 
@@ -0,0 +1,25 @@
1
+ import { IExercice } from '../types';
2
+ import * as dayjs from 'dayjs';
3
+
4
+
5
+ const exerciceNumber = (endDate: Date, exerciceList: IExercice[]): number => {
6
+ let currentExercice: number = 0;
7
+ exerciceList.sort((a, b) => {
8
+ if (dayjs(a.startDate).format('YYYY-MM-DD') > dayjs(b.startDate).format('YYYY-MM-DD')) {
9
+ return 1;
10
+ } else if (dayjs(a.startDate).format('YYYY-MM-DD') < dayjs(b.startDate).format('YYYY-MM-DD')) {
11
+ return -1;
12
+ } else {
13
+ return 0;
14
+ }
15
+ }).forEach((exercice, index) => {
16
+ if (dayjs(endDate).isSame(dayjs(exercice.endDate))) {
17
+ currentExercice = index + 1;
18
+ }
19
+ });
20
+ return currentExercice;
21
+ };
22
+
23
+ export {
24
+ exerciceNumber,
25
+ };
package/ts/utils/index.ts CHANGED
@@ -8,6 +8,7 @@ export * from './balanceSheetModule';
8
8
  export * from './siretValidation';
9
9
  export * from './statutsGeneration';
10
10
  export * from './email';
11
+ export * from './exercice';
11
12
  export * from './prestation';
12
13
  export * from './task';
13
14
  export * from './social';
@@ -1,4 +1,4 @@
1
- import { IPrestation, IPrestationList } from '../types';
1
+ import { IExercice, IPrestation, IPrestationList } from '../types';
2
2
  import { intersection } from './noLodash';
3
3
  import { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';
4
4
  import { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption';
@@ -9,6 +9,7 @@ import { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress';
9
9
  import { ClosingType } from '../types/Enum/ClosingType';
10
10
  import { getBrandNameByNodeEnv } from './brands';
11
11
  import * as dayjs from 'dayjs';
12
+ import { exerciceNumber } from './exercice';
12
13
 
13
14
  type priceGridBrand = {
14
15
  idTypeBrand: number,
@@ -18,6 +19,7 @@ type priceGridBrand = {
18
19
  type priceGrid = {
19
20
  idPrestationList: number[],
20
21
  monthlyNbr?: monthlyNbr[],
22
+ exerciceNbr?: exerciceNbr[],
21
23
  turnoverCreatedYear?: turnover[],
22
24
  turnoverPastYear?: turnover[],
23
25
  turnoverMonthly?: turnover[],
@@ -29,6 +31,7 @@ type priceGrid = {
29
31
  vatRegimeYearly?: vatRegime[],
30
32
  taxSystem?: taxSystem[],
31
33
  legalForm?: legalForm[],
34
+ employeeByLegalForm?: employeeByLegalForm[],
32
35
  };
33
36
 
34
37
  type monthlyNbr = {
@@ -38,6 +41,12 @@ type monthlyNbr = {
38
41
  closingType: number[],
39
42
  };
40
43
 
44
+ type exerciceNbr = {
45
+ minimum: number,
46
+ maximum: number,
47
+ price: number,
48
+ };
49
+
41
50
  type turnover = {
42
51
  turnoverValue: number,
43
52
  price: number,
@@ -54,6 +63,11 @@ type employee = {
54
63
  price: number,
55
64
  };
56
65
 
66
+ type employeeByLegalForm = {
67
+ idLegalForm: number,
68
+ price: number,
69
+ };
70
+
57
71
  type propertie = {
58
72
  amount: number,
59
73
  price: number,
@@ -136,7 +150,30 @@ const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid
136
150
  return currentPriceGrid;
137
151
  };
138
152
 
139
- const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, isYearly: boolean, totalMonth: number, idTaxSystem: number, idLegalForm: number, balanceSheetOffered: number = 0): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, monthNbr: number, price: number } => {
153
+ const calculatePrestationPriceWithPriceGrid = (
154
+ idPrestationList: number,
155
+ endDate: string,
156
+ NbrMonth: number,
157
+ turnover: number,
158
+ rentsNumber: number,
159
+ employeesNumber: number,
160
+ associatesNumber: number,
161
+ idTypeBrand: number,
162
+ idVatRegime: number,
163
+ pastBalanceSheet: boolean,
164
+ isYearly: boolean,
165
+ totalMonth: number,
166
+ idTaxSystem: number,
167
+ idLegalForm: number,
168
+ exerciceNbr: number,
169
+ balanceSheetOffered: number = 0,
170
+ ): {
171
+ totalPrestation: number,
172
+ reduceMonth: number,
173
+ canBeCreated: boolean,
174
+ monthNbr: number,
175
+ price: number
176
+ } => {
140
177
  let totalPrestation: number = 0;
141
178
  let reduceMonth: number = 0;
142
179
  let monthNbr: number = NbrMonth;
@@ -166,11 +203,15 @@ const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate
166
203
  else if (currentPriceGrid.employee) {
167
204
  monthlyPrice = currentPriceGrid.employee?.find(emp => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber)?.price;
168
205
  monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;
206
+ } else if (currentPriceGrid.employeeByLegalForm) {
207
+ monthlyPrice = currentPriceGrid.employeeByLegalForm?.find(emp => emp.idLegalForm === idLegalForm)?.price;
208
+ monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;
169
209
  } else if (currentPriceGrid.turnoverYearly && isYearly) yearlyPrice = currentPriceGrid.turnoverYearly?.find(turn => turnover < turn.turnoverValue)?.price;
170
210
  else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear) yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find(turn => turnover < turn.turnoverValue)?.price;
171
211
  else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear) yearlyPrice = currentPriceGrid.turnoverPastYear?.find(turn => turnover < turn.turnoverValue)?.price;
172
212
  else if (currentPriceGrid.partner) yearlyPrice = currentPriceGrid.partner?.find(part => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber)?.price;
173
213
  else if (currentPriceGrid.legalForm) yearlyPrice = currentPriceGrid.legalForm?.find(form => form.idLegalForm === idLegalForm)?.price;
214
+ else if (currentPriceGrid.exerciceNbr) yearlyPrice = currentPriceGrid.exerciceNbr?.find(el => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum )?.price;
174
215
  finalMonthlyPrice = (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);
175
216
 
176
217
  /* Gestion des mois */
@@ -215,7 +256,36 @@ const calculatePrestationPriceWithPrestationList = (prestationList: IPrestationL
215
256
  return totalPrestation;
216
257
  };
217
258
 
218
- const calculatePrestationPrice = (idPrestationList: number, prestationList: IPrestationList, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, optionsList: number[], totalPercentage: number, totalAmount: number, totalMonth: number, isWithApplicationFees: boolean, idTaxSystem: number, idLegalForm: number, isYearly: boolean = false, balanceSheetOffered: number = 0): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, calculDetail: string, monthlyPrice: string, price: number } => {
259
+ const calculatePrestationPrice = (
260
+ idPrestationList: number,
261
+ prestationList: IPrestationList,
262
+ endDate: string,
263
+ NbrMonth: number,
264
+ turnover: number,
265
+ rentsNumber: number,
266
+ employeesNumber: number,
267
+ associatesNumber: number,
268
+ idTypeBrand: number,
269
+ idVatRegime: number,
270
+ pastBalanceSheet: boolean,
271
+ optionsList: number[],
272
+ totalPercentage: number,
273
+ totalAmount: number,
274
+ totalMonth: number,
275
+ isWithApplicationFees: boolean,
276
+ idTaxSystem: number,
277
+ idLegalForm: number,
278
+ isYearly: boolean = false,
279
+ balanceSheetOffered: number = 0,
280
+ exerciceList: IExercice[] = [],
281
+ ): {
282
+ totalPrestation: number,
283
+ reduceMonth: number,
284
+ canBeCreated: boolean,
285
+ calculDetail: string,
286
+ monthlyPrice: string,
287
+ price: number
288
+ } => {
219
289
  let totalPrestation: number = 0;
220
290
  let reduceMonth: number = 0;
221
291
  let canBeCreated: boolean = true;
@@ -251,7 +321,26 @@ const calculatePrestationPrice = (idPrestationList: number, prestationList: IPre
251
321
  PrestationType.STATUTS_OPTION_2,
252
322
  ].includes(idPrestationList)
253
323
  ) {
254
- totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth, idTaxSystem, idLegalForm, balanceSheetOffered);
324
+ let exerciceNbr: number = 0;
325
+ if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);
326
+ totalWithReduce = calculatePrestationPriceWithPriceGrid(
327
+ idPrestationList,
328
+ endDate,
329
+ NbrMonth,
330
+ turnover,
331
+ rentsNumber,
332
+ employeesNumber,
333
+ associatesNumber,
334
+ idTypeBrand,
335
+ idVatRegime,
336
+ pastBalanceSheet,
337
+ isYearly,
338
+ totalMonth,
339
+ idTaxSystem,
340
+ idLegalForm,
341
+ exerciceNbr,
342
+ balanceSheetOffered,
343
+ );
255
344
  totalPrestation = totalWithReduce.totalPrestation;
256
345
  reduceMonth = totalWithReduce.reduceMonth;
257
346
  canBeCreated = totalWithReduce.canBeCreated;
@@ -286,7 +286,7 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
286
286
  recapitulation: {
287
287
  balance: 0, // Calculé plus bas
288
288
  refund: isNil ? 0 : _round(payload.refund?.asked ?? 0),
289
- creditToReport: isNil ? 0 : _round(payload.deductible?.previousCredit ?? 0),
289
+ creditToReport: 0, // Calculé plus bas
290
290
  imputedCredit: isNil ? 0 : _round(payload.recapitulation?.imputedCredit ?? 0),
291
291
  ticRefunded: 0, // Calculé plus bas
292
292
  imputeOnVat: 0, // Calculé plus bas
@@ -338,6 +338,7 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
338
338
 
339
339
  data.recapitulation.balance = data.net.balanceSurplus;
340
340
  data.recapitulation.ticRefunded = data.tic.total.refund;
341
+ data.recapitulation.creditToReport = isNil ? 0 : data.recapitulation.balance - data.recapitulation.refund;
341
342
  data.recapitulation.imputeOnVat = data.tic.total.imputed;
342
343
  data.recapitulation.consumsion = data.tic.total.tax;
343
344
  data.recapitulation.vatNetDue = data.net.balance;