@silexpert/core 1.2.27 → 1.2.28

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 (377) hide show
  1. package/dist/cjs/api/index.d.ts.map +1 -1
  2. package/dist/cjs/api/index.js +8 -3
  3. package/dist/cjs/api/index.js.map +1 -1
  4. package/dist/cjs/api/resources/Employee.d.ts.map +1 -1
  5. package/dist/cjs/api/resources/Employee.js +1 -0
  6. package/dist/cjs/api/resources/Employee.js.map +1 -1
  7. package/dist/cjs/api/resources/Task.d.ts.map +1 -1
  8. package/dist/cjs/api/resources/Task.js +1 -0
  9. package/dist/cjs/api/resources/Task.js.map +1 -1
  10. package/dist/cjs/index.d.ts.map +1 -1
  11. package/dist/cjs/index.js +0 -1
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/cjs/types/Enum/Aspone.js +32 -32
  14. package/dist/cjs/types/Enum/Aspone.js.map +1 -1
  15. package/dist/cjs/types/Enum/BalanceSheet.js +1 -1
  16. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  17. package/dist/cjs/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
  18. package/dist/cjs/types/Enum/BalanceSheetQuestion.js +2 -0
  19. package/dist/cjs/types/Enum/BalanceSheetQuestion.js.map +1 -1
  20. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
  21. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js +1 -0
  22. package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  23. package/dist/cjs/types/Enum/RevisionGuide.d.ts.map +1 -1
  24. package/dist/cjs/types/Enum/RevisionGuide.js +5 -0
  25. package/dist/cjs/types/Enum/RevisionGuide.js.map +1 -1
  26. package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
  27. package/dist/cjs/types/Enum/Role.js +1 -0
  28. package/dist/cjs/types/Enum/Role.js.map +1 -1
  29. package/dist/cjs/types/Enum/SalesContractBrandClementine.js +4 -4
  30. package/dist/cjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
  31. package/dist/cjs/types/Enum/SalesContractBrandPourcentage.d.ts +1 -26
  32. package/dist/cjs/types/Enum/SalesContractBrandPourcentage.d.ts.map +1 -1
  33. package/dist/cjs/types/Enum/SalesContractBrandPourcentage.js +6 -6
  34. package/dist/cjs/types/Enum/SalesContractBrandPourcentage.js.map +1 -1
  35. package/dist/cjs/types/Enum/TransactionKind.d.ts.map +1 -1
  36. package/dist/cjs/types/Enum/TransactionKind.js.map +1 -1
  37. package/dist/cjs/types/Enum/TransactionStatus.d.ts.map +1 -1
  38. package/dist/cjs/types/Enum/TransactionStatus.js.map +1 -1
  39. package/dist/cjs/types/Enum/TypePayment.d.ts.map +1 -1
  40. package/dist/cjs/types/Enum/TypePayment.js +1 -0
  41. package/dist/cjs/types/Enum/TypePayment.js.map +1 -1
  42. package/dist/cjs/types/Interface/api/accountingFiles/Ocr.d.ts.map +1 -1
  43. package/dist/cjs/types/Interface/api/accountingFiles/Ocr.js.map +1 -1
  44. package/dist/cjs/types/Interface/api/checklist/Read.d.ts +1 -0
  45. package/dist/cjs/types/Interface/api/checklist/Read.d.ts.map +1 -1
  46. package/dist/cjs/types/Interface/api/checklist/Read.js.map +1 -1
  47. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +282 -0
  48. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -0
  49. package/dist/cjs/types/Interface/api/config/ConfigType.js +3 -0
  50. package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -0
  51. package/dist/cjs/types/Interface/api/crisp/GetCrisp.d.ts.map +1 -1
  52. package/dist/cjs/types/Interface/api/crisp/GetCrisp.js.map +1 -1
  53. package/dist/cjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.d.ts.map +1 -1
  54. package/dist/cjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js +3 -1
  55. package/dist/cjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -1
  56. package/dist/cjs/types/Interface/api/journal/Journals.d.ts.map +1 -1
  57. package/dist/cjs/types/Interface/api/journal/Journals.js.map +1 -1
  58. package/dist/cjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.d.ts.map +1 -1
  59. package/dist/cjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js +3 -1
  60. package/dist/cjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js.map +1 -1
  61. package/dist/cjs/types/Interface/api/notion/NotionResponse.d.ts +4 -4
  62. package/dist/cjs/types/Interface/api/notion/NotionResponse.d.ts.map +1 -1
  63. package/dist/cjs/types/Interface/api/notion/NotionResponse.js.map +1 -1
  64. package/dist/cjs/types/Interface/api/pappers/QueryPappers.d.ts.map +1 -1
  65. package/dist/cjs/types/Interface/api/pappers/QueryPappers.js.map +1 -1
  66. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
  67. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +3 -1
  68. package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
  69. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +1 -1
  70. package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +1 -1
  71. package/dist/cjs/types/Interface/api/shopify/ShopifyFinancialStatus.d.ts.map +1 -1
  72. package/dist/cjs/types/Interface/api/shopify/ShopifyFinancialStatus.js.map +1 -1
  73. package/dist/cjs/types/Interface/api/shopify/ShopifyOrder.d.ts.map +1 -1
  74. package/dist/cjs/types/Interface/api/shopify/ShopifyOrder.js.map +1 -1
  75. package/dist/cjs/types/Interface/api/shopify/discount_code.d.ts.map +1 -1
  76. package/dist/cjs/types/Interface/api/shopify/discount_code.js.map +1 -1
  77. package/dist/cjs/types/Interface/api/shopify/shipping_line.d.ts.map +1 -1
  78. package/dist/cjs/types/Interface/api/shopify/shipping_line.js.map +1 -1
  79. package/dist/cjs/types/Interface/models/IBalanceSheetQuestion.d.ts.map +1 -1
  80. package/dist/cjs/types/Interface/models/IBalanceSheetQuestion.js.map +1 -1
  81. package/dist/cjs/types/Interface/models/IFecFile.d.ts.map +1 -1
  82. package/dist/cjs/types/Interface/models/IFecFile.js.map +1 -1
  83. package/dist/cjs/types/Interface/models/IRegistration.d.ts.map +1 -1
  84. package/dist/cjs/types/Interface/models/IRegistration.js.map +1 -1
  85. package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
  86. package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
  87. package/dist/cjs/types/index.d.ts +1 -0
  88. package/dist/cjs/types/index.d.ts.map +1 -1
  89. package/dist/cjs/types/index.js +1 -0
  90. package/dist/cjs/types/index.js.map +1 -1
  91. package/dist/cjs/utils/brands.d.ts.map +1 -1
  92. package/dist/cjs/utils/brands.js +5 -0
  93. package/dist/cjs/utils/brands.js.map +1 -1
  94. package/dist/cjs/utils/checkup.d.ts.map +1 -1
  95. package/dist/cjs/utils/checkup.js +5 -0
  96. package/dist/cjs/utils/checkup.js.map +1 -1
  97. package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
  98. package/dist/cjs/utils/commercialManagement/document.js +6 -5
  99. package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
  100. package/dist/cjs/utils/commercialManagement/recurrence.js +2 -2
  101. package/dist/cjs/utils/commercialManagement/recurrence.js.map +1 -1
  102. package/dist/cjs/utils/commercialManagement/vat.d.ts.map +1 -1
  103. package/dist/cjs/utils/commercialManagement/vat.js +1 -0
  104. package/dist/cjs/utils/commercialManagement/vat.js.map +1 -1
  105. package/dist/cjs/utils/date.d.ts.map +1 -1
  106. package/dist/cjs/utils/date.js +9 -0
  107. package/dist/cjs/utils/date.js.map +1 -1
  108. package/dist/cjs/utils/decorators.d.ts.map +1 -1
  109. package/dist/cjs/utils/decorators.js +3 -4
  110. package/dist/cjs/utils/decorators.js.map +1 -1
  111. package/dist/cjs/utils/email.d.ts.map +1 -1
  112. package/dist/cjs/utils/email.js +22 -0
  113. package/dist/cjs/utils/email.js.map +1 -1
  114. package/dist/cjs/utils/isUrl.d.ts.map +1 -1
  115. package/dist/cjs/utils/isUrl.js +1 -2
  116. package/dist/cjs/utils/isUrl.js.map +1 -1
  117. package/dist/cjs/utils/noLodash.d.ts.map +1 -1
  118. package/dist/cjs/utils/noLodash.js +10 -2
  119. package/dist/cjs/utils/noLodash.js.map +1 -1
  120. package/dist/cjs/utils/objectUtils/flattenObject.d.ts.map +1 -1
  121. package/dist/cjs/utils/objectUtils/flattenObject.js +1 -0
  122. package/dist/cjs/utils/objectUtils/flattenObject.js.map +1 -1
  123. package/dist/cjs/utils/objectUtils/fullFlattenObject.d.ts.map +1 -1
  124. package/dist/cjs/utils/objectUtils/fullFlattenObject.js +1 -0
  125. package/dist/cjs/utils/objectUtils/fullFlattenObject.js.map +1 -1
  126. package/dist/cjs/utils/objectUtils/unflattenObject.d.ts.map +1 -1
  127. package/dist/cjs/utils/objectUtils/unflattenObject.js +0 -1
  128. package/dist/cjs/utils/objectUtils/unflattenObject.js.map +1 -1
  129. package/dist/cjs/utils/payment.d.ts.map +1 -1
  130. package/dist/cjs/utils/payment.js +6 -1
  131. package/dist/cjs/utils/payment.js.map +1 -1
  132. package/dist/cjs/utils/phone.d.ts.map +1 -1
  133. package/dist/cjs/utils/phone.js +1 -0
  134. package/dist/cjs/utils/phone.js.map +1 -1
  135. package/dist/cjs/utils/quotation.js +2 -2
  136. package/dist/cjs/utils/quotation.js.map +1 -1
  137. package/dist/cjs/utils/social.js +0 -1
  138. package/dist/cjs/utils/social.js.map +1 -1
  139. package/dist/cjs/utils/statutsGeneration.js +2 -2
  140. package/dist/cjs/utils/statutsGeneration.js.map +1 -1
  141. package/dist/cjs/utils/tests/payment.spec.js +30 -39
  142. package/dist/cjs/utils/tests/payment.spec.js.map +1 -1
  143. package/dist/cjs/utils/transforms/boolean.transform.d.ts.map +1 -1
  144. package/dist/cjs/utils/transforms/boolean.transform.js +3 -1
  145. package/dist/cjs/utils/transforms/boolean.transform.js.map +1 -1
  146. package/dist/cjs/utils/vat/3310/century23.d.ts.map +1 -1
  147. package/dist/cjs/utils/vat/3310/century23.js +23 -0
  148. package/dist/cjs/utils/vat/3310/century23.js.map +1 -1
  149. package/dist/cjs/utils/vat/3310/century24.d.ts.map +1 -1
  150. package/dist/cjs/utils/vat/3310/century24.js +23 -0
  151. package/dist/cjs/utils/vat/3310/century24.js.map +1 -1
  152. package/dist/cjs/utils/vat/3517/century23.d.ts.map +1 -1
  153. package/dist/cjs/utils/vat/3517/century23.js +4 -0
  154. package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
  155. package/dist/cjs/utils/vat/registration.d.ts.map +1 -1
  156. package/dist/cjs/utils/vat/registration.js +0 -1
  157. package/dist/cjs/utils/vat/registration.js.map +1 -1
  158. package/dist/mjs/api/index.d.ts.map +1 -1
  159. package/dist/mjs/api/index.js +7 -1
  160. package/dist/mjs/api/index.js.map +1 -1
  161. package/dist/mjs/api/resources/Employee.d.ts.map +1 -1
  162. package/dist/mjs/api/resources/Employee.js +1 -0
  163. package/dist/mjs/api/resources/Employee.js.map +1 -1
  164. package/dist/mjs/api/resources/Task.d.ts.map +1 -1
  165. package/dist/mjs/api/resources/Task.js +1 -0
  166. package/dist/mjs/api/resources/Task.js.map +1 -1
  167. package/dist/mjs/index.d.ts.map +1 -1
  168. package/dist/mjs/index.js +0 -1
  169. package/dist/mjs/index.js.map +1 -1
  170. package/dist/mjs/types/Enum/Aspone.js +32 -32
  171. package/dist/mjs/types/Enum/Aspone.js.map +1 -1
  172. package/dist/mjs/types/Enum/BalanceSheet.js +1 -1
  173. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  174. package/dist/mjs/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
  175. package/dist/mjs/types/Enum/BalanceSheetQuestion.js +2 -0
  176. package/dist/mjs/types/Enum/BalanceSheetQuestion.js.map +1 -1
  177. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
  178. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js +1 -0
  179. package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  180. package/dist/mjs/types/Enum/RevisionGuide.d.ts.map +1 -1
  181. package/dist/mjs/types/Enum/RevisionGuide.js +5 -0
  182. package/dist/mjs/types/Enum/RevisionGuide.js.map +1 -1
  183. package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
  184. package/dist/mjs/types/Enum/Role.js +1 -0
  185. package/dist/mjs/types/Enum/Role.js.map +1 -1
  186. package/dist/mjs/types/Enum/SalesContractBrandClementine.js +4 -4
  187. package/dist/mjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
  188. package/dist/mjs/types/Enum/SalesContractBrandPourcentage.d.ts +1 -26
  189. package/dist/mjs/types/Enum/SalesContractBrandPourcentage.d.ts.map +1 -1
  190. package/dist/mjs/types/Enum/SalesContractBrandPourcentage.js +6 -6
  191. package/dist/mjs/types/Enum/SalesContractBrandPourcentage.js.map +1 -1
  192. package/dist/mjs/types/Enum/TransactionKind.d.ts.map +1 -1
  193. package/dist/mjs/types/Enum/TransactionKind.js.map +1 -1
  194. package/dist/mjs/types/Enum/TransactionStatus.d.ts.map +1 -1
  195. package/dist/mjs/types/Enum/TransactionStatus.js.map +1 -1
  196. package/dist/mjs/types/Enum/TypePayment.d.ts.map +1 -1
  197. package/dist/mjs/types/Enum/TypePayment.js +1 -0
  198. package/dist/mjs/types/Enum/TypePayment.js.map +1 -1
  199. package/dist/mjs/types/Interface/api/accountingFiles/Ocr.d.ts.map +1 -1
  200. package/dist/mjs/types/Interface/api/accountingFiles/Ocr.js.map +1 -1
  201. package/dist/mjs/types/Interface/api/checklist/Read.d.ts +1 -0
  202. package/dist/mjs/types/Interface/api/checklist/Read.d.ts.map +1 -1
  203. package/dist/mjs/types/Interface/api/checklist/Read.js.map +1 -1
  204. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +282 -0
  205. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -0
  206. package/dist/mjs/types/Interface/api/config/ConfigType.js +2 -0
  207. package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -0
  208. package/dist/mjs/types/Interface/api/crisp/GetCrisp.d.ts.map +1 -1
  209. package/dist/mjs/types/Interface/api/crisp/GetCrisp.js.map +1 -1
  210. package/dist/mjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.d.ts.map +1 -1
  211. package/dist/mjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js +3 -1
  212. package/dist/mjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -1
  213. package/dist/mjs/types/Interface/api/journal/Journals.d.ts.map +1 -1
  214. package/dist/mjs/types/Interface/api/journal/Journals.js.map +1 -1
  215. package/dist/mjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.d.ts.map +1 -1
  216. package/dist/mjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js +3 -1
  217. package/dist/mjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js.map +1 -1
  218. package/dist/mjs/types/Interface/api/notion/NotionResponse.d.ts +4 -4
  219. package/dist/mjs/types/Interface/api/notion/NotionResponse.d.ts.map +1 -1
  220. package/dist/mjs/types/Interface/api/notion/NotionResponse.js.map +1 -1
  221. package/dist/mjs/types/Interface/api/pappers/QueryPappers.d.ts.map +1 -1
  222. package/dist/mjs/types/Interface/api/pappers/QueryPappers.js +3 -0
  223. package/dist/mjs/types/Interface/api/pappers/QueryPappers.js.map +1 -1
  224. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
  225. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +4 -1
  226. package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
  227. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +1 -1
  228. package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +1 -1
  229. package/dist/mjs/types/Interface/api/shopify/ShopifyFinancialStatus.d.ts.map +1 -1
  230. package/dist/mjs/types/Interface/api/shopify/ShopifyFinancialStatus.js.map +1 -1
  231. package/dist/mjs/types/Interface/api/shopify/ShopifyOrder.d.ts.map +1 -1
  232. package/dist/mjs/types/Interface/api/shopify/ShopifyOrder.js.map +1 -1
  233. package/dist/mjs/types/Interface/api/shopify/discount_code.d.ts.map +1 -1
  234. package/dist/mjs/types/Interface/api/shopify/discount_code.js.map +1 -1
  235. package/dist/mjs/types/Interface/api/shopify/shipping_line.d.ts.map +1 -1
  236. package/dist/mjs/types/Interface/api/shopify/shipping_line.js.map +1 -1
  237. package/dist/mjs/types/Interface/models/IBalanceSheetQuestion.d.ts.map +1 -1
  238. package/dist/mjs/types/Interface/models/IBalanceSheetQuestion.js.map +1 -1
  239. package/dist/mjs/types/Interface/models/IFecFile.d.ts.map +1 -1
  240. package/dist/mjs/types/Interface/models/IFecFile.js.map +1 -1
  241. package/dist/mjs/types/Interface/models/IRegistration.d.ts.map +1 -1
  242. package/dist/mjs/types/Interface/models/IRegistration.js.map +1 -1
  243. package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
  244. package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
  245. package/dist/mjs/types/index.d.ts +1 -0
  246. package/dist/mjs/types/index.d.ts.map +1 -1
  247. package/dist/mjs/types/index.js +1 -0
  248. package/dist/mjs/types/index.js.map +1 -1
  249. package/dist/mjs/utils/brands.d.ts.map +1 -1
  250. package/dist/mjs/utils/brands.js +5 -0
  251. package/dist/mjs/utils/brands.js.map +1 -1
  252. package/dist/mjs/utils/checkup.d.ts.map +1 -1
  253. package/dist/mjs/utils/checkup.js +5 -0
  254. package/dist/mjs/utils/checkup.js.map +1 -1
  255. package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
  256. package/dist/mjs/utils/commercialManagement/document.js +2 -1
  257. package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
  258. package/dist/mjs/utils/commercialManagement/recurrence.js +2 -2
  259. package/dist/mjs/utils/commercialManagement/recurrence.js.map +1 -1
  260. package/dist/mjs/utils/commercialManagement/vat.d.ts.map +1 -1
  261. package/dist/mjs/utils/commercialManagement/vat.js +1 -0
  262. package/dist/mjs/utils/commercialManagement/vat.js.map +1 -1
  263. package/dist/mjs/utils/date.d.ts.map +1 -1
  264. package/dist/mjs/utils/date.js +9 -0
  265. package/dist/mjs/utils/date.js.map +1 -1
  266. package/dist/mjs/utils/decorators.d.ts.map +1 -1
  267. package/dist/mjs/utils/decorators.js +3 -4
  268. package/dist/mjs/utils/decorators.js.map +1 -1
  269. package/dist/mjs/utils/email.d.ts.map +1 -1
  270. package/dist/mjs/utils/email.js +22 -0
  271. package/dist/mjs/utils/email.js.map +1 -1
  272. package/dist/mjs/utils/isUrl.d.ts.map +1 -1
  273. package/dist/mjs/utils/isUrl.js +1 -2
  274. package/dist/mjs/utils/isUrl.js.map +1 -1
  275. package/dist/mjs/utils/noLodash.d.ts.map +1 -1
  276. package/dist/mjs/utils/noLodash.js +8 -1
  277. package/dist/mjs/utils/noLodash.js.map +1 -1
  278. package/dist/mjs/utils/objectUtils/flattenObject.d.ts.map +1 -1
  279. package/dist/mjs/utils/objectUtils/flattenObject.js +1 -0
  280. package/dist/mjs/utils/objectUtils/flattenObject.js.map +1 -1
  281. package/dist/mjs/utils/objectUtils/fullFlattenObject.d.ts.map +1 -1
  282. package/dist/mjs/utils/objectUtils/fullFlattenObject.js +1 -0
  283. package/dist/mjs/utils/objectUtils/fullFlattenObject.js.map +1 -1
  284. package/dist/mjs/utils/objectUtils/unflattenObject.d.ts.map +1 -1
  285. package/dist/mjs/utils/objectUtils/unflattenObject.js +0 -1
  286. package/dist/mjs/utils/objectUtils/unflattenObject.js.map +1 -1
  287. package/dist/mjs/utils/payment.d.ts.map +1 -1
  288. package/dist/mjs/utils/payment.js +6 -1
  289. package/dist/mjs/utils/payment.js.map +1 -1
  290. package/dist/mjs/utils/phone.d.ts.map +1 -1
  291. package/dist/mjs/utils/phone.js +1 -0
  292. package/dist/mjs/utils/phone.js.map +1 -1
  293. package/dist/mjs/utils/quotation.js +1 -1
  294. package/dist/mjs/utils/quotation.js.map +1 -1
  295. package/dist/mjs/utils/social.js +0 -1
  296. package/dist/mjs/utils/social.js.map +1 -1
  297. package/dist/mjs/utils/statutsGeneration.js +2 -2
  298. package/dist/mjs/utils/statutsGeneration.js.map +1 -1
  299. package/dist/mjs/utils/tests/payment.spec.js +15 -15
  300. package/dist/mjs/utils/tests/payment.spec.js.map +1 -1
  301. package/dist/mjs/utils/transforms/boolean.transform.d.ts.map +1 -1
  302. package/dist/mjs/utils/transforms/boolean.transform.js +3 -1
  303. package/dist/mjs/utils/transforms/boolean.transform.js.map +1 -1
  304. package/dist/mjs/utils/vat/3310/century23.d.ts.map +1 -1
  305. package/dist/mjs/utils/vat/3310/century23.js +23 -0
  306. package/dist/mjs/utils/vat/3310/century23.js.map +1 -1
  307. package/dist/mjs/utils/vat/3310/century24.d.ts.map +1 -1
  308. package/dist/mjs/utils/vat/3310/century24.js +23 -0
  309. package/dist/mjs/utils/vat/3310/century24.js.map +1 -1
  310. package/dist/mjs/utils/vat/3517/century23.d.ts.map +1 -1
  311. package/dist/mjs/utils/vat/3517/century23.js +4 -0
  312. package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
  313. package/dist/mjs/utils/vat/registration.d.ts.map +1 -1
  314. package/dist/mjs/utils/vat/registration.js +0 -1
  315. package/dist/mjs/utils/vat/registration.js.map +1 -1
  316. package/eslint.config.mjs +47 -0
  317. package/package.json +7 -10
  318. package/ts/api/index.ts +9 -2
  319. package/ts/api/resources/Employee.ts +1 -0
  320. package/ts/api/resources/Task.ts +1 -0
  321. package/ts/index.ts +0 -1
  322. package/ts/types/Enum/Aspone.ts +32 -32
  323. package/ts/types/Enum/BalanceSheet.ts +1 -1
  324. package/ts/types/Enum/BalanceSheetQuestion.ts +2 -0
  325. package/ts/types/Enum/BalanceSheetQuestionWording.ts +1 -0
  326. package/ts/types/Enum/RevisionGuide.ts +5 -0
  327. package/ts/types/Enum/Role.ts +1 -0
  328. package/ts/types/Enum/SalesContractBrandClementine.ts +4 -4
  329. package/ts/types/Enum/SalesContractBrandPourcentage.ts +7 -7
  330. package/ts/types/Enum/TransactionKind.ts +1 -0
  331. package/ts/types/Enum/TransactionStatus.ts +1 -0
  332. package/ts/types/Enum/TypePayment.ts +1 -0
  333. package/ts/types/Interface/api/accountingFiles/Ocr.ts +1 -0
  334. package/ts/types/Interface/api/checklist/Read.ts +1 -0
  335. package/ts/types/Interface/api/config/ConfigType.ts +325 -0
  336. package/ts/types/Interface/api/crisp/GetCrisp.ts +2 -0
  337. package/ts/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.ts +1 -0
  338. package/ts/types/Interface/api/journal/Journals.ts +0 -1
  339. package/ts/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.ts +1 -0
  340. package/ts/types/Interface/api/notion/NotionResponse.ts +2 -4
  341. package/ts/types/Interface/api/pappers/QueryPappers.ts +9 -0
  342. package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +1 -0
  343. package/ts/types/Interface/api/promoCode/ReadDefaultPromotion.ts +1 -0
  344. package/ts/types/Interface/api/shopify/ShopifyFinancialStatus.ts +1 -0
  345. package/ts/types/Interface/api/shopify/ShopifyOrder.ts +2 -0
  346. package/ts/types/Interface/api/shopify/discount_code.ts +1 -0
  347. package/ts/types/Interface/api/shopify/shipping_line.ts +2 -0
  348. package/ts/types/Interface/models/IBalanceSheetQuestion.ts +1 -0
  349. package/ts/types/Interface/models/IFecFile.ts +1 -0
  350. package/ts/types/Interface/models/IRegistration.ts +1 -0
  351. package/ts/types/Interface/models/IUser.ts +1 -0
  352. package/ts/types/index.ts +1 -0
  353. package/ts/utils/brands.ts +5 -0
  354. package/ts/utils/checkup.ts +5 -0
  355. package/ts/utils/commercialManagement/document.ts +3 -2
  356. package/ts/utils/commercialManagement/recurrence.ts +2 -2
  357. package/ts/utils/commercialManagement/vat.ts +1 -0
  358. package/ts/utils/date.ts +9 -0
  359. package/ts/utils/decorators.ts +5 -4
  360. package/ts/utils/email.ts +22 -1
  361. package/ts/utils/isUrl.ts +1 -2
  362. package/ts/utils/noLodash.ts +7 -1
  363. package/ts/utils/objectUtils/flattenObject.ts +1 -0
  364. package/ts/utils/objectUtils/fullFlattenObject.ts +1 -0
  365. package/ts/utils/objectUtils/unflattenObject.ts +0 -1
  366. package/ts/utils/payment.ts +8 -3
  367. package/ts/utils/phone.ts +1 -0
  368. package/ts/utils/quotation.ts +1 -1
  369. package/ts/utils/social.ts +1 -1
  370. package/ts/utils/statutsGeneration.ts +4 -4
  371. package/ts/utils/tests/payment.spec.ts +15 -15
  372. package/ts/utils/transforms/boolean.transform.ts +1 -0
  373. package/ts/utils/vat/3310/century23.ts +24 -0
  374. package/ts/utils/vat/3310/century24.ts +23 -0
  375. package/ts/utils/vat/3517/century23.ts +4 -0
  376. package/ts/utils/vat/registration.ts +0 -1
  377. package/tsconfig-base.json +1 -2
package/ts/utils/date.ts CHANGED
@@ -20,10 +20,13 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
20
20
  const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`;
21
21
 
22
22
  // on cherche la bonne specialhour pour comparer les horaires
23
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
23
24
  const hoursOfPeriod = hoursObject.filter((h) => (h.endTime && (dateToCompareStart - new Date(`${textDate} ${h.endTime}`).getTime() <= 0)) && (h.startTime && (dateToCompareEnd - new Date(`${textDate} ${h.startTime}`).getTime() >= 0)));
24
25
 
25
26
  if (hoursOfPeriod?.length > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {
27
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
26
28
  const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();
29
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
27
30
  const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime();
28
31
 
29
32
  // on check si les horaires de l'event sont dans les horaires du collab sinon on les fait commencer à l'heure à laquelle il s'est connecté
@@ -38,6 +41,7 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
38
41
  id: i,
39
42
  start: true,
40
43
  end: false,
44
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
41
45
  diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].startTime}`).getTime()),
42
46
  });
43
47
  // ajout de la différence entre la date de début de notre événement et la date de fin de notre période
@@ -45,6 +49,7 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
45
49
  id: i,
46
50
  start: false,
47
51
  end: true,
52
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
48
53
  diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].endTime}`).getTime()),
49
54
  });
50
55
  }
@@ -54,13 +59,17 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
54
59
  // date de début event = date de début période
55
60
  // date de fin event = date de début période + 1 heure
56
61
  if (hoursDiff[0].start) {
62
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
57
63
  res.dateStart = new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`);
64
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
58
65
  res.dateEnd = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`).getTime() + 3600000);
59
66
  // si proche de la date de fin :
60
67
  // date de début event = date de fin période - 1 heure
61
68
  // date de fin event = date de fin période
62
69
  } else if (hoursDiff[0].end) {
70
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
63
71
  res.dateStart = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`).getTime() - 3600000);
72
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
64
73
  res.dateEnd = new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`);
65
74
  }
66
75
  }
@@ -1,3 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/no-require-imports */
2
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
1
3
  import { isNode } from 'browser-or-node';
2
4
 
3
5
  enum Library {
@@ -5,17 +7,16 @@ enum Library {
5
7
  CLASS_TRANSFORMER = 'node_modules/class-transformer/cjs/index.js',
6
8
  }
7
9
 
8
- // eslint-disable-next-line global-require
10
+
9
11
  const retrieveDecorator = (library: Library, name: 'ApiPropertyOptional' | 'ApiProperty' | 'Type') => {
10
12
  if (!isNode) {
11
13
  return (target: any, key: string) => {};
12
14
  }
13
15
  try {
14
- // eslint-disable-next-line global-require
16
+
15
17
  const path = require('path');
16
- // eslint-disable-next-line global-require,import/no-dynamic-require
17
18
  return require(path.resolve(process.cwd(), library))[name];
18
- } catch (e) {
19
+ } catch {
19
20
  return (target: any, key: string) => {};
20
21
  }
21
22
  };
package/ts/utils/email.ts CHANGED
@@ -8,26 +8,42 @@ import { getBrandConfig, isItThisEnv } from './brands';
8
8
  import { signatureTemplate } from './email/templates/signature';
9
9
  import { intersection } from './noLodash';
10
10
 
11
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
11
12
  const ejs = require('ejs');
12
13
 
13
14
  function getRoleSignature(user:any) {
15
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
14
16
  if (user.positionLabel) return user.positionLabel;
15
17
 
18
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
16
19
  const isStagiaireOrAlternant = user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);
20
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
17
21
  const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);
18
-
22
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19
23
  const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
20
25
  const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);
26
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
21
27
  const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);
28
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
22
29
  const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
23
31
  const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);
32
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
24
33
  const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);
34
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
25
35
  const isTermination = user.roles.map((r: any) => r.id).includes(Role.TERMINATION);
36
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
26
37
  const isLitige = user.roles.map((r: any) => r.id).includes(Role.LITIGE);
38
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
27
39
  const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);
40
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
28
41
  const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);
42
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
29
43
  const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);
44
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
30
45
  const isTechnicalAdvisor = user.roles.map((r: any) => r.id).includes(Role.TECHNICAL_ADVISOR);
46
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
31
47
  const isFront = !!intersection(user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS]).length;
32
48
 
33
49
  if (isSales && isManager) { return 'Responsable commercial'; }
@@ -128,12 +144,15 @@ function getMailSignature(user:any, idTypeBrand:number) {
128
144
  objectWaited: 'listMails.bonjour',
129
145
  }) as unknown as string;
130
146
 
147
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
131
148
  if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) { return informatiqueMail; }
149
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
132
150
  if (user && !!intersection(user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.COMMERCIAL, Role.TECHNICAL_ADVISOR]).length) return user.email;
133
151
  return bonjourMail;
134
152
  }
135
153
 
136
154
  function getPhoneSignature(user:any) {
155
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
137
156
  if (user.phone !== '0383931414') { return user.phone.replace(/\B(?=(\d{2})+(?!\d))/g, '&nbsp;'); }
138
157
  return null;
139
158
  }
@@ -229,6 +248,7 @@ export function generateSignature(params: any): string {
229
248
  };
230
249
  mailSignature = dataOfficerMail;
231
250
  roleSignature = '';
251
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
232
252
  } else if (intersection((user?.roles ?? []).map((r: any) => r.id), [Role.FRONT_OFFICE, Role.SENIOR]).length === 2) { // Signature front senior
233
253
  user = {
234
254
  firstname: `L'équipe ${commercialName}`,
@@ -294,6 +314,7 @@ export function generateSignature(params: any): string {
294
314
  user.calendlyUrl = `${urlApp}/appointment?uuid=${society?.externalId ? society.externalId : ''}&idType=${idType}`;
295
315
  }
296
316
 
317
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
297
318
  return ejs.render(signatureTemplate, {
298
319
  forceRole,
299
320
  isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,
package/ts/utils/isUrl.ts CHANGED
@@ -5,10 +5,9 @@
5
5
  */
6
6
  export function isUrl(value: string): boolean {
7
7
  try {
8
- // eslint-disable-next-line no-new
9
8
  new URL(value);
10
9
  return true;
11
- } catch (_) {
10
+ } catch {
12
11
  return false;
13
12
  }
14
13
  }
@@ -21,6 +21,7 @@ export function intersection<T>(arr1: T[], arr2: T[]): T[] {
21
21
  return [...set1].filter((element) => set2.has(element));
22
22
  }
23
23
 
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
24
25
  export const difference = (arr1: any[], arr2: any[]) => arr1.filter((x) => !arr2.includes(x));
25
26
 
26
27
  export const uniqBy = <T>(arr: T[], key: keyof T): T[] => {
@@ -28,6 +29,7 @@ export const uniqBy = <T>(arr: T[], key: keyof T): T[] => {
28
29
  arr.reduce(
29
30
  (map, item) => ({
30
31
  ...map,
32
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-base-to-string
31
33
  [`${item[key]}`]: item,
32
34
  }),
33
35
  {},
@@ -45,6 +47,7 @@ export const sumBy = <T extends PropertyKey>(
45
47
  // À contrôler
46
48
  export const sortBy = (key: any, cb: (a: any, b: any) => any) => {
47
49
  if (!cb) cb = () => 0;
50
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
48
51
  return (a?: any, b?: any) => (a[key] > b[key]) ? 1
49
52
  : ((b[key] > a[key]) ? -1 : cb(a, b));
50
53
  };
@@ -52,6 +55,7 @@ export const sortBy = (key: any, cb: (a: any, b: any) => any) => {
52
55
  // À contrôler
53
56
  export const sortByDesc = (key: any, cb: (a: any, b: any) => any) => {
54
57
  if (!cb) cb = () => 0;
58
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
55
59
  return (b?: any, a?: any) => (a[key] > b[key]) ? 1
56
60
  : ((b[key] > a[key]) ? -1 : cb(b, a));
57
61
  };
@@ -96,8 +100,10 @@ export function getValue<
96
100
  .split(/[.[\]]/)
97
101
  .filter(Boolean)
98
102
  .reduce<GetFieldType<TData, TPath>>(
103
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
99
104
  (v, key) => (v as any)?.[key],
100
105
  data as any,
101
106
  );
102
- return value !== undefined ? value : (defaultValue as TDefault);
107
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
108
+ return value !== undefined ? value : (defaultValue as any);
103
109
  }
@@ -9,6 +9,7 @@ import { isValidObject } from './isValidObject';
9
9
  * @param separator the string used to separate paths in keys
10
10
  */
11
11
  export function flattenObject(object: any, separator = '.'): any {
12
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
12
13
  const walker = (child: { [key: string]: any }, path: Array<string> = []): any => Object.assign({}, ...Object.keys(child).map((key) => (isValidObject(child[key])
13
14
  ? walker(child[key], path.concat([key]))
14
15
  : { [path.concat([key]).join(separator)]: child[key] })));
@@ -5,6 +5,7 @@ import { isValidObject } from './isValidObject';
5
5
  * @param object the object to full flatten
6
6
  */
7
7
  export function fullFlattenObject(object: any): any {
8
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
8
9
  const walker = (child: { [key: string]: any }): any => Object.assign({}, ...Object.keys(child).map((key: string) => (isValidObject(child[key])
9
10
  ? walker(child[key]) : { [key]: child[key] })));
10
11
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable */
2
1
  /**
3
2
  * Unflattens a flattened `object`.
4
3
  * @param object the flattened object with "pathed" keys.
@@ -96,13 +96,18 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
96
96
 
97
97
  if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');
98
98
 
99
- let initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 15 */
99
+ // Si on est dans les 3 derniers jours du mois actuel,
100
+ // on ne le compte pas et on facture à partir du début de mois suivant
101
+ let initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 14 */
100
102
  ? dayjs().add(2, 'month').startOf('month').toDate()
101
103
  : dayjs().add(1, 'month').startOf('month').toDate();
102
104
 
103
105
  //Si date de reprise, alors on initialise à cette date
104
106
  if (recoveryDate && dayjs(recoveryDate).isAfter(dayjs(), 'month')) {
105
107
  initializedPaymentDate = dayjs(recoveryDate).startOf('month').toDate();
108
+
109
+ //Si jour de la date de reprise >= 14, alors on débute la facturation 1 mois plus tard
110
+ if (dayjs(initializedPaymentDate).date() >= 14) initializedPaymentDate = dayjs(initializedPaymentDate).add(1, 'month').startOf('month').toDate();
106
111
  }
107
112
 
108
113
  // On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC
@@ -153,8 +158,8 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
153
158
 
154
159
  //On order les exercicePrestation par startDate ASC et id ASC
155
160
  listPartialExercicePrestationExpress.sort((a, b) => {
156
- const aStartDate = a?.startDate as Date;
157
- const bStartDate = b?.startDate as Date;
161
+ const aStartDate = a?.startDate;
162
+ const bStartDate = b?.startDate;
158
163
  return dayjs(aStartDate).diff(bStartDate);
159
164
  });
160
165
 
package/ts/utils/phone.ts CHANGED
@@ -22,6 +22,7 @@ export function formatPhoneNumberToE164(phoneNumber: string | null, prefix = '+3
22
22
  export function getPhoneNumberWithoutPrefix(phoneNumber: string): string {
23
23
  let number = phoneNumber;
24
24
  // @ts-ignore
25
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
25
26
  Object.keys(PhonePrefix).map((index) => PhonePrefix[index].prefix).forEach((prefix) => {
26
27
  number = number.replace(prefix, '');
27
28
  });
@@ -289,7 +289,7 @@ export function getClientQuotation(society: ISociety, otherSocieties: ISociety[]
289
289
  return {
290
290
  cotation: quotation,
291
291
  data: detailQuotation,
292
- idSociety: society.id as number,
292
+ idSociety: society.id ?? 0,
293
293
  };
294
294
  }
295
295
 
@@ -7,7 +7,7 @@ const diffHours = (start: Date, end: Date): number => {
7
7
  export function getBusinessDatesCount(startDate: Date, endDate: Date): number {
8
8
  const day = startDate;
9
9
  let businessDays = 0;
10
- // eslint-disable-next-line no-unmodified-loop-condition
10
+
11
11
  while (day <= endDate) {
12
12
  if (day.getDay() !== 0 && day.getDay() !== 6) {
13
13
  if (diffHours(day, endDate) <= 4) {
@@ -110,12 +110,12 @@ export const creaEIMicro = {
110
110
  export const offers = [justCreation, creaEIMicro, justStatuts, creaSociete];
111
111
 
112
112
  export const getStatutsAmount = (idLegalForm: LegalFormTypeEnum, idPrestationList: PrestationType): number => {
113
- const offer = offers.find((e) => e.id === idPrestationList)!;
113
+ const offer = offers.find((e) => e.id === idPrestationList);
114
114
 
115
- const price =
116
- typeof offer.price === 'object'
115
+ const price: number =
116
+ typeof offer?.price === 'object'
117
117
  ? offer.price[idLegalForm]
118
- : offer.price;
118
+ : offer?.price || 0;
119
119
 
120
120
  return price +
121
121
  legalNoticesCosts[idLegalForm] +
@@ -103,7 +103,7 @@ describe('Payment', () => {
103
103
  // logical
104
104
  // =====================
105
105
  // express
106
- test('if only one express, monthly payments of actual exo should be in parallel of express monthly payments, smoothed in number of remaining months (mini 3 months) (if not in 3 last month)', async () => {
106
+ test('if only one express, monthly payments of actual exo should be in parallel of express monthly payments, smoothed in number of remaining months (mini 3 months) (if not in 3 last month)', () => {
107
107
  const payments = calculatePaymentsAuto({
108
108
  idTypeBrand: 1,
109
109
  firstExerciceNonExpresssEndDate,
@@ -121,7 +121,7 @@ describe('Payment', () => {
121
121
  const firstNonExpressDatePayment = payments.filter(p => dayjs(p.closingDate).diff(firstExerciceNonExpresssEndDate) === 0)[0].datePayment;
122
122
  expect(dayjs(firstNonExpressDatePayment).diff(firstExpressDatePayment, 'month')).toStrictEqual(0);
123
123
  });
124
- test('if more than one express, monthly payments of actual exo should be in a row of express monthly payments and smoothed, smoothed in number of remaining months after express monthly payments (mini 3 months) (if in 3 last month of exercice)', async () => {
124
+ test('if more than one express, monthly payments of actual exo should be in a row of express monthly payments and smoothed, smoothed in number of remaining months after express monthly payments (mini 3 months) (if in 3 last month of exercice)', () => {
125
125
  const payments = calculatePaymentsAuto({
126
126
  idTypeBrand: 1,
127
127
  firstExerciceNonExpresssEndDate,
@@ -140,7 +140,7 @@ describe('Payment', () => {
140
140
  expect(dayjs(firstNonExpressDatePayment).diff(lastExpressDatePayment, 'month')).toStrictEqual(1);
141
141
  });
142
142
  // non express
143
- test('should return a number of payments equal to nb of remaining months in exercice (if not in 3 last months)', async () => {
143
+ test('should return a number of payments equal to nb of remaining months in exercice (if not in 3 last months)', () => {
144
144
  const mockedDate = dayjs('2024-05-15').toDate();
145
145
  MockDate.set(mockedDate);
146
146
 
@@ -169,7 +169,7 @@ describe('Payment', () => {
169
169
 
170
170
  MockDate.reset();
171
171
  });
172
- test('should return a number of payments equal to 3 (if in 3 last month of exercice)', async () => {
172
+ test('should return a number of payments equal to 3 (if in 3 last month of exercice)', () => {
173
173
  const nbMonthDelay = 1;
174
174
  const newFirstExerciceNonExpresssEndDate = dayjs().add(nbMonthDelay, 'month').endOf('month').toDate();
175
175
 
@@ -192,7 +192,7 @@ describe('Payment', () => {
192
192
  const listNonExpressPayments = payments.filter(p => dayjs(p.closingDate).diff(newFirstExerciceNonExpresssEndDate) === 0);
193
193
  expect(listNonExpressPayments.length).toStrictEqual(1 + 3); //On ajoute 1 pour les frais de dossier
194
194
  });
195
- test('should (yearlyAmountNonExpress - sum of listRegulations) / count of monthly payments be equal to monthly payment amount (if not in 3 last month)', async () => {
195
+ test('should (yearlyAmountNonExpress - sum of listRegulations) / count of monthly payments be equal to monthly payment amount (if not in 3 last month)', () => {
196
196
  const mockedDate = dayjs('2024-05-15').toDate();
197
197
  MockDate.set(mockedDate);
198
198
 
@@ -222,7 +222,7 @@ describe('Payment', () => {
222
222
 
223
223
  MockDate.reset();
224
224
  });
225
- test('should (totalAmount - firstPaymentAmount) / 3 be equal to monthly payment amount (if in 3 last month of exercice)', async () => {
225
+ test('should (totalAmount - firstPaymentAmount) / 3 be equal to monthly payment amount (if in 3 last month of exercice)', () => {
226
226
  const nbMonthDelay = 1;
227
227
  const newFirstExerciceNonExpresssEndDate = dayjs().add(nbMonthDelay, 'month').endOf('month').toDate();
228
228
  const newListRegulations = [{
@@ -248,7 +248,7 @@ describe('Payment', () => {
248
248
  expect(payments[1].amount).toStrictEqual(amount);
249
249
  });
250
250
  // annual price increase
251
- test('should apply annual price increase (2,75%) if signed before last 3 months of civil year', async () => {
251
+ test('should apply annual price increase (2,75%) if signed before last 3 months of civil year', () => {
252
252
  const mockedDate = dayjs('2024-08-15').toDate();
253
253
  MockDate.set(mockedDate);
254
254
 
@@ -276,7 +276,7 @@ describe('Payment', () => {
276
276
 
277
277
  MockDate.reset();
278
278
  });
279
- test('should not apply annual price increase (2,75%) if signed in last 3 months of civil year', async () => {
279
+ test('should not apply annual price increase (2,75%) if signed in last 3 months of civil year', () => {
280
280
  const mockedDate = dayjs('2024-11-15').toDate();
281
281
  MockDate.set(mockedDate);
282
282
 
@@ -304,7 +304,7 @@ describe('Payment', () => {
304
304
  MockDate.reset();
305
305
  });
306
306
 
307
- test('should apply 14,9€ HT increase for the second exercice created (only offered on first exo) (no rules for 3 last months)', async () => {
307
+ test('should apply 14,9€ HT increase for the second exercice created (only offered on first exo) (no rules for 3 last months)', () => {
308
308
  const mockedDate = dayjs('2024-06-15').toDate();
309
309
  MockDate.set(mockedDate);
310
310
 
@@ -334,7 +334,7 @@ describe('Payment', () => {
334
334
  });
335
335
 
336
336
  // misc
337
- test('should payments been generated sorted by exercices start date', async () => {
337
+ test('should payments been generated sorted by exercices start date', () => {
338
338
  const listPartialExercicePrestationExpressCloned = [...listPartialExercicePrestationExpress];
339
339
  listPartialExercicePrestationExpressCloned[0] = {
340
340
  ...listPartialExercicePrestationExpress[0],
@@ -359,7 +359,7 @@ describe('Payment', () => {
359
359
  expect(payments.length).toBeGreaterThanOrEqual(4);
360
360
  expect(dayjs(payments[payments.length - 1].datePayment).diff(dayjs(payments?.[0]?.datePayment), 'month')).toBeGreaterThan(0);
361
361
  });
362
- test('if regulations are bigger than sum exercice prestation amounts, should pass some exercice payments', async () => {
362
+ test('if regulations are bigger than sum exercice prestation amounts, should pass some exercice payments', () => {
363
363
  const mockedDate = dayjs('2024-03-15').toDate();
364
364
  MockDate.set(mockedDate);
365
365
 
@@ -397,7 +397,7 @@ describe('Payment', () => {
397
397
  });
398
398
  MockDate.reset();
399
399
  });
400
- test('should not consider actual month if signed in last 3 days of month', async () => {
400
+ test('should not consider actual month if signed in last 3 days of month', () => {
401
401
  const mockedDate = dayjs('2024-03-29').toDate();
402
402
  MockDate.set(mockedDate);
403
403
 
@@ -417,7 +417,7 @@ describe('Payment', () => {
417
417
  expect(payments?.[1]?.datePayment).toStrictEqual(dayjs().add(2, 'month').startOf('month').toDate());
418
418
  MockDate.reset();
419
419
  });
420
- test('last payment returned should be last of a year (12/XX)', async () => {
420
+ test('last payment returned should be last of a year (12/XX)', () => {
421
421
  const mockedDate = dayjs('2024-03-29').toDate();
422
422
  MockDate.set(mockedDate);
423
423
 
@@ -436,7 +436,7 @@ describe('Payment', () => {
436
436
  expect(payments.length).toBeGreaterThanOrEqual(4);
437
437
  expect(dayjs(payments[payments.length - 1].datePayment).month()).toStrictEqual(11);
438
438
  });
439
- test('first payment and last payment should have at least one year difference (ex. : 23 - 24)', async () => {
439
+ test('first payment and last payment should have at least one year difference (ex. : 23 - 24)', () => {
440
440
  const payments = calculatePaymentsAuto({
441
441
  idTypeBrand: 1,
442
442
  firstExerciceNonExpresssEndDate,
@@ -451,7 +451,7 @@ describe('Payment', () => {
451
451
  nextYearlyAmountNonExpress });
452
452
  expect(dayjs(payments.slice(-1)?.[0]?.datePayment).diff(dayjs(payments?.[0]?.datePayment), 'year', true)).toBeGreaterThan(1);
453
453
  });
454
- test('real case : idSociety 114440', async () => {
454
+ test('real case : idSociety 114440', () => {
455
455
  const payments = calculatePaymentsAuto({
456
456
  idTypeBrand: 1,
457
457
  firstExerciceNonExpresssEndDate: dayjs('2024-12-31').toDate(),
@@ -18,6 +18,7 @@ const valueToBoolean = (value: any) => {
18
18
 
19
19
  const ToBoolean = () => {
20
20
  const toPlain = Transform(
21
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
21
22
  ({ value }) => value,
22
23
  {
23
24
  toPlainOnly: true,
@@ -21,10 +21,15 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
21
21
  // On désactive les automatismes des déclarations précédentes dans le contrôle de TVA
22
22
  if (isVatControl) payload.previousVatDeclaration = null;
23
23
 
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
24
25
  const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
26
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
25
27
  const withTaxVat = vats.filter((v) => v.value > 0).map((v) => v.id);
28
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
26
29
  const intracomVat = vats.filter((v) => v.isVatIntracom && !v.isVatImportation).map((v) => v.id);
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
27
31
  const withoutTaxVat = vats.filter((v) => v.value === 0).map((v) => v.id);
32
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
28
33
  const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
29
34
 
30
35
  const vatEntries = uniqBy(accountingEntries.filter((ae) => typeof ae.idVat === 'number'), 'id') as Array<IAccountingEntry & { idVat: number }>;
@@ -75,44 +80,63 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
75
80
  const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true)) + (payload?.vatControl?.untaxed?.intracomunity ?? 0);
76
81
  const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
77
82
  // TVA brute
83
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
78
84
  const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
85
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
79
86
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base20 ?? 0) + (payload?.vatControl?.other?.base20 ?? 0);
80
87
 
81
88
  const normalRateTax = _round(normalRate * 0.2);
82
89
 
90
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
83
91
  const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
92
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
84
93
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base5Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
85
94
  const reducedRate5Dot5Tax = _round(reducedRate5Dot5 * 0.055);
86
95
 
96
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
87
97
  const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
98
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
88
99
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base10 ?? 0) + (payload?.vatControl?.other?.base10 ?? 0);
89
100
  const reducedRate10Tax = _round(reducedRate10 * 0.1);
90
101
 
102
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
91
103
  const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
104
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
92
105
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base8Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
93
106
  const reducedRate8Dot5Tax = _round(reducedRate8Dot5 * 0.085);
94
107
 
108
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
95
109
  const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
110
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
96
111
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base2Dot1 ?? 0) + (payload?.vatControl?.other?.base2Dot1 ?? 0);
97
112
  const reducedRate2Dot1Tax = _round(reducedRate2Dot1 * 0.021);
98
113
 
114
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
99
115
  const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base20 ?? 0);
116
+
100
117
  const importNormalRateTax = _round(importNormalRate * 0.2);
118
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
101
119
  const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base10 ?? 0);
102
120
  const importReducedRate10Tax = _round(importReducedRate10 * 0.1);
121
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
103
122
  const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base8Dot5 ?? 0);
104
123
  const importReducedRate8Dot5Tax = _round(importReducedRate8Dot5 * 0.085);
124
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
105
125
  const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base5Dot5 ?? 0);
106
126
  const importReducedRate5Dot5Tax = _round(importReducedRate8Dot5 * 0.055);
127
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
107
128
  const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base2Dot1 ?? 0);
108
129
  const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
130
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
109
131
  const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
110
132
  const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
111
133
  const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
112
134
 
113
135
  // TVA Déductible
114
136
  const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2'])) + (payload?.vatControl?.deducted?.immobilization ?? 0);
137
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
115
138
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
139
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
116
140
  const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
117
141
 
118
142
  const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport >= 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
@@ -21,10 +21,15 @@ export function getCerfa3310Century24Payload(accountingEntries: IAccountingEntry
21
21
  // On désactive les automatismes des déclarations précédentes dans le contrôle de TVA
22
22
  if (isVatControl) payload.previousVatDeclaration = null;
23
23
 
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
24
25
  const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
26
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
25
27
  const withTaxVat = vats.filter((v) => v.value > 0).map((v) => v.id);
28
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
26
29
  const intracomVat = vats.filter((v) => v.isVatIntracom && !v.isVatImportation).map((v) => v.id);
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
27
31
  const withoutTaxVat = vats.filter((v) => v.value === 0).map((v) => v.id);
32
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
28
33
  const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
29
34
 
30
35
  const vatEntries = uniqBy(accountingEntries.filter((ae) => typeof ae.idVat === 'number'), 'id') as Array<IAccountingEntry & { idVat: number }>;
@@ -75,44 +80,62 @@ export function getCerfa3310Century24Payload(accountingEntries: IAccountingEntry
75
80
  const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true)) + (payload?.vatControl?.untaxed?.intracomunity ?? 0);
76
81
  const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
77
82
  // TVA brute
83
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
78
84
  const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
85
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
79
86
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base20 ?? 0) + (payload?.vatControl?.other?.base20 ?? 0);
80
87
 
81
88
  const normalRateTax = _round(normalRate * 0.2);
82
89
 
90
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
83
91
  const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
92
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
84
93
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base5Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
85
94
  const reducedRate5Dot5Tax = _round(reducedRate5Dot5 * 0.055);
86
95
 
96
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
87
97
  const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
98
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
88
99
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base10 ?? 0) + (payload?.vatControl?.other?.base10 ?? 0);
89
100
  const reducedRate10Tax = _round(reducedRate10 * 0.1);
90
101
 
102
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
91
103
  const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
104
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
92
105
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base8Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
93
106
  const reducedRate8Dot5Tax = _round(reducedRate8Dot5 * 0.085);
94
107
 
108
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
95
109
  const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
110
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
96
111
  + getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base2Dot1 ?? 0) + (payload?.vatControl?.other?.base2Dot1 ?? 0);
97
112
  const reducedRate2Dot1Tax = _round(reducedRate2Dot1 * 0.021);
98
113
 
114
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
99
115
  const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base20 ?? 0);
100
116
  const importNormalRateTax = _round(importNormalRate * 0.2);
117
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
101
118
  const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base10 ?? 0);
102
119
  const importReducedRate10Tax = _round(importReducedRate10 * 0.1);
120
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
103
121
  const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base8Dot5 ?? 0);
104
122
  const importReducedRate8Dot5Tax = _round(importReducedRate8Dot5 * 0.085);
123
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
105
124
  const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base5Dot5 ?? 0);
106
125
  const importReducedRate5Dot5Tax = _round(importReducedRate8Dot5 * 0.055);
126
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
107
127
  const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base2Dot1 ?? 0);
108
128
  const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
129
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
109
130
  const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
110
131
  const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
111
132
  const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
112
133
 
113
134
  // TVA Déductible
114
135
  const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2'])) + (payload?.vatControl?.deducted?.immobilization ?? 0);
136
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
115
137
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
138
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
116
139
  const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
117
140
 
118
141
  const report = (isDefined(payload.vat?.deductible?.toReport) && payload.vat?.deductible?.toReport >= 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);