@silexpert/core 1.1.214 → 1.1.216

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 (212) hide show
  1. package/dist/cjs/api/resources/BudgetInsight.d.ts +3 -3
  2. package/dist/cjs/api/resources/BudgetInsight.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/BudgetInsight.js.map +1 -1
  4. package/dist/cjs/api/resources/Connector.d.ts +2 -1
  5. package/dist/cjs/api/resources/Connector.d.ts.map +1 -1
  6. package/dist/cjs/api/resources/Connector.js +3 -0
  7. package/dist/cjs/api/resources/Connector.js.map +1 -1
  8. package/dist/cjs/api/resources/Mobile.d.ts +1 -0
  9. package/dist/cjs/api/resources/Mobile.d.ts.map +1 -1
  10. package/dist/cjs/api/resources/Mobile.js +3 -0
  11. package/dist/cjs/api/resources/Mobile.js.map +1 -1
  12. package/dist/cjs/api/resources/Product.d.ts +1 -0
  13. package/dist/cjs/api/resources/Product.d.ts.map +1 -1
  14. package/dist/cjs/api/resources/Product.js +3 -0
  15. package/dist/cjs/api/resources/Product.js.map +1 -1
  16. package/dist/cjs/api/resources/Rule.d.ts +1 -0
  17. package/dist/cjs/api/resources/Rule.d.ts.map +1 -1
  18. package/dist/cjs/api/resources/Rule.js +3 -0
  19. package/dist/cjs/api/resources/Rule.js.map +1 -1
  20. package/dist/cjs/api/resources/SalariesFile.d.ts +1 -1
  21. package/dist/cjs/api/resources/SalariesFile.d.ts.map +1 -1
  22. package/dist/cjs/api/resources/SalariesFile.js +14 -2
  23. package/dist/cjs/api/resources/SalariesFile.js.map +1 -1
  24. package/dist/cjs/api/resources/Society.d.ts +1 -0
  25. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  26. package/dist/cjs/api/resources/Society.js +3 -0
  27. package/dist/cjs/api/resources/Society.js.map +1 -1
  28. package/dist/cjs/api/resources/Stocks.d.ts +1 -1
  29. package/dist/cjs/api/resources/Stocks.js.map +1 -1
  30. package/dist/cjs/api/resources/ThirdParty.d.ts +2 -1
  31. package/dist/cjs/api/resources/ThirdParty.d.ts.map +1 -1
  32. package/dist/cjs/api/resources/ThirdParty.js +3 -0
  33. package/dist/cjs/api/resources/ThirdParty.js.map +1 -1
  34. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts +2 -0
  35. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
  36. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js +2 -0
  37. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  38. package/dist/cjs/types/Enum/Ged.d.ts +2 -1
  39. package/dist/cjs/types/Enum/Ged.d.ts.map +1 -1
  40. package/dist/cjs/types/Enum/Ged.js +2 -0
  41. package/dist/cjs/types/Enum/Ged.js.map +1 -1
  42. package/dist/cjs/types/Enum/PrestationType.d.ts +4 -0
  43. package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
  44. package/dist/cjs/types/Enum/PrestationType.js +4 -0
  45. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  46. package/dist/cjs/types/Enum/PriceGridClementine.d.ts +55 -0
  47. package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  48. package/dist/cjs/types/Enum/PriceGridClementine.js +42 -0
  49. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  50. package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts +17 -0
  51. package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
  52. package/dist/cjs/types/Enum/PriceGridLegalstart.js +16 -0
  53. package/dist/cjs/types/Enum/PriceGridLegalstart.js.map +1 -1
  54. package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts +18 -0
  55. package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
  56. package/dist/cjs/types/Enum/PriceGridPourcentage.js +96 -0
  57. package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  58. package/dist/cjs/types/Interface/api/aspone/ReadInterchange.d.ts +1 -0
  59. package/dist/cjs/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
  60. package/dist/cjs/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
  61. package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts +1 -0
  62. package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts.map +1 -1
  63. package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.js +8 -0
  64. package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.js.map +1 -1
  65. package/dist/cjs/types/Interface/api/connector/QueryConnector.d.ts +3 -0
  66. package/dist/cjs/types/Interface/api/connector/QueryConnector.d.ts.map +1 -1
  67. package/dist/cjs/types/Interface/api/connector/QueryConnector.js +10 -1
  68. package/dist/cjs/types/Interface/api/connector/QueryConnector.js.map +1 -1
  69. package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts +3 -0
  70. package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts.map +1 -1
  71. package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.js +10 -1
  72. package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
  73. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
  74. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  75. package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  76. package/dist/cjs/types/Interface/models/ISocietyDetail.d.ts +5 -0
  77. package/dist/cjs/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
  78. package/dist/cjs/types/Interface/models/ISocietyDetail.js.map +1 -1
  79. package/dist/cjs/utils/exercice.d.ts +4 -0
  80. package/dist/cjs/utils/exercice.d.ts.map +1 -0
  81. package/dist/cjs/utils/exercice.js +25 -0
  82. package/dist/cjs/utils/exercice.js.map +1 -0
  83. package/dist/cjs/utils/index.d.ts +1 -0
  84. package/dist/cjs/utils/index.d.ts.map +1 -1
  85. package/dist/cjs/utils/index.js +1 -0
  86. package/dist/cjs/utils/index.js.map +1 -1
  87. package/dist/cjs/utils/prestation.d.ts +3 -3
  88. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  89. package/dist/cjs/utils/prestation.js +20 -10
  90. package/dist/cjs/utils/prestation.js.map +1 -1
  91. package/dist/cjs/utils/vat/3517/century23.d.ts.map +1 -1
  92. package/dist/cjs/utils/vat/3517/century23.js +9 -8
  93. package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
  94. package/dist/mjs/api/resources/BudgetInsight.d.ts +3 -3
  95. package/dist/mjs/api/resources/BudgetInsight.d.ts.map +1 -1
  96. package/dist/mjs/api/resources/BudgetInsight.js.map +1 -1
  97. package/dist/mjs/api/resources/Connector.d.ts +2 -1
  98. package/dist/mjs/api/resources/Connector.d.ts.map +1 -1
  99. package/dist/mjs/api/resources/Connector.js +3 -0
  100. package/dist/mjs/api/resources/Connector.js.map +1 -1
  101. package/dist/mjs/api/resources/Mobile.d.ts +1 -0
  102. package/dist/mjs/api/resources/Mobile.d.ts.map +1 -1
  103. package/dist/mjs/api/resources/Mobile.js +3 -0
  104. package/dist/mjs/api/resources/Mobile.js.map +1 -1
  105. package/dist/mjs/api/resources/Product.d.ts +1 -0
  106. package/dist/mjs/api/resources/Product.d.ts.map +1 -1
  107. package/dist/mjs/api/resources/Product.js +3 -0
  108. package/dist/mjs/api/resources/Product.js.map +1 -1
  109. package/dist/mjs/api/resources/Rule.d.ts +1 -0
  110. package/dist/mjs/api/resources/Rule.d.ts.map +1 -1
  111. package/dist/mjs/api/resources/Rule.js +3 -0
  112. package/dist/mjs/api/resources/Rule.js.map +1 -1
  113. package/dist/mjs/api/resources/SalariesFile.d.ts +1 -1
  114. package/dist/mjs/api/resources/SalariesFile.d.ts.map +1 -1
  115. package/dist/mjs/api/resources/SalariesFile.js +14 -2
  116. package/dist/mjs/api/resources/SalariesFile.js.map +1 -1
  117. package/dist/mjs/api/resources/Society.d.ts +1 -0
  118. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  119. package/dist/mjs/api/resources/Society.js +3 -0
  120. package/dist/mjs/api/resources/Society.js.map +1 -1
  121. package/dist/mjs/api/resources/Stocks.d.ts +1 -1
  122. package/dist/mjs/api/resources/Stocks.js.map +1 -1
  123. package/dist/mjs/api/resources/ThirdParty.d.ts +2 -1
  124. package/dist/mjs/api/resources/ThirdParty.d.ts.map +1 -1
  125. package/dist/mjs/api/resources/ThirdParty.js +3 -0
  126. package/dist/mjs/api/resources/ThirdParty.js.map +1 -1
  127. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts +2 -0
  128. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
  129. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js +2 -0
  130. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  131. package/dist/mjs/types/Enum/Ged.d.ts +2 -1
  132. package/dist/mjs/types/Enum/Ged.d.ts.map +1 -1
  133. package/dist/mjs/types/Enum/Ged.js +2 -0
  134. package/dist/mjs/types/Enum/Ged.js.map +1 -1
  135. package/dist/mjs/types/Enum/PrestationType.d.ts +4 -0
  136. package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
  137. package/dist/mjs/types/Enum/PrestationType.js +4 -0
  138. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  139. package/dist/mjs/types/Enum/PriceGridClementine.d.ts +55 -0
  140. package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  141. package/dist/mjs/types/Enum/PriceGridClementine.js +42 -0
  142. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  143. package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts +17 -0
  144. package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
  145. package/dist/mjs/types/Enum/PriceGridLegalstart.js +16 -0
  146. package/dist/mjs/types/Enum/PriceGridLegalstart.js.map +1 -1
  147. package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts +18 -0
  148. package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
  149. package/dist/mjs/types/Enum/PriceGridPourcentage.js +96 -0
  150. package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  151. package/dist/mjs/types/Interface/api/aspone/ReadInterchange.d.ts +1 -0
  152. package/dist/mjs/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
  153. package/dist/mjs/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
  154. package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts +1 -0
  155. package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts.map +1 -1
  156. package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.js +9 -0
  157. package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.js.map +1 -1
  158. package/dist/mjs/types/Interface/api/connector/QueryConnector.d.ts +3 -0
  159. package/dist/mjs/types/Interface/api/connector/QueryConnector.d.ts.map +1 -1
  160. package/dist/mjs/types/Interface/api/connector/QueryConnector.js +11 -2
  161. package/dist/mjs/types/Interface/api/connector/QueryConnector.js.map +1 -1
  162. package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts +3 -0
  163. package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts.map +1 -1
  164. package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.js +9 -0
  165. package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
  166. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
  167. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  168. package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  169. package/dist/mjs/types/Interface/models/ISocietyDetail.d.ts +5 -0
  170. package/dist/mjs/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
  171. package/dist/mjs/types/Interface/models/ISocietyDetail.js.map +1 -1
  172. package/dist/mjs/utils/exercice.d.ts +4 -0
  173. package/dist/mjs/utils/exercice.d.ts.map +1 -0
  174. package/dist/mjs/utils/exercice.js +22 -0
  175. package/dist/mjs/utils/exercice.js.map +1 -0
  176. package/dist/mjs/utils/index.d.ts +1 -0
  177. package/dist/mjs/utils/index.d.ts.map +1 -1
  178. package/dist/mjs/utils/index.js +1 -0
  179. package/dist/mjs/utils/index.js.map +1 -1
  180. package/dist/mjs/utils/prestation.d.ts +3 -3
  181. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  182. package/dist/mjs/utils/prestation.js +13 -3
  183. package/dist/mjs/utils/prestation.js.map +1 -1
  184. package/dist/mjs/utils/vat/3517/century23.d.ts.map +1 -1
  185. package/dist/mjs/utils/vat/3517/century23.js +2 -1
  186. package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
  187. package/package.json +1 -1
  188. package/ts/api/resources/BudgetInsight.ts +3 -3
  189. package/ts/api/resources/Connector.ts +5 -1
  190. package/ts/api/resources/Mobile.ts +4 -0
  191. package/ts/api/resources/Product.ts +4 -0
  192. package/ts/api/resources/Rule.ts +4 -0
  193. package/ts/api/resources/SalariesFile.ts +14 -2
  194. package/ts/api/resources/Society.ts +4 -0
  195. package/ts/api/resources/Stocks.ts +1 -1
  196. package/ts/api/resources/ThirdParty.ts +5 -0
  197. package/ts/types/Enum/BalanceSheetQuestionWording.ts +2 -0
  198. package/ts/types/Enum/Ged.ts +2 -0
  199. package/ts/types/Enum/PrestationType.ts +4 -0
  200. package/ts/types/Enum/PriceGridClementine.ts +42 -0
  201. package/ts/types/Enum/PriceGridLegalstart.ts +16 -0
  202. package/ts/types/Enum/PriceGridPourcentage.ts +96 -0
  203. package/ts/types/Interface/api/aspone/ReadInterchange.ts +1 -0
  204. package/ts/types/Interface/api/bankAccount/QueryBankAccount.ts +7 -0
  205. package/ts/types/Interface/api/connector/QueryConnector.ts +9 -2
  206. package/ts/types/Interface/api/thirdParty/QueryThirdParty.ts +7 -0
  207. package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +2 -0
  208. package/ts/types/Interface/models/ISocietyDetail.ts +5 -0
  209. package/ts/utils/exercice.ts +25 -0
  210. package/ts/utils/index.ts +1 -0
  211. package/ts/utils/prestation.ts +93 -4
  212. package/ts/utils/vat/3517/century23.ts +2 -1
@@ -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;