@silexpert/core 2.0.28-0 → 2.0.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 (649) hide show
  1. package/dist/api/resources/Alert.d.ts +7 -0
  2. package/dist/api/resources/Alert.d.ts.map +1 -0
  3. package/dist/api/resources/Alert.js +10 -0
  4. package/dist/api/resources/Alert.js.map +1 -0
  5. package/dist/api/resources/ExerciceNote.d.ts +10 -0
  6. package/dist/api/resources/ExerciceNote.d.ts.map +1 -0
  7. package/dist/api/resources/ExerciceNote.js +13 -0
  8. package/dist/api/resources/ExerciceNote.js.map +1 -0
  9. package/dist/api/resources/GeneralLedger.d.ts +4 -0
  10. package/dist/api/resources/GeneralLedger.d.ts.map +1 -1
  11. package/dist/api/resources/GeneralLedger.js +12 -0
  12. package/dist/api/resources/GeneralLedger.js.map +1 -1
  13. package/dist/api/resources/Mail.d.ts +10 -0
  14. package/dist/api/resources/Mail.d.ts.map +1 -1
  15. package/dist/api/resources/Mail.js +6 -0
  16. package/dist/api/resources/Mail.js.map +1 -1
  17. package/dist/api/resources/SocietyEvent.d.ts +7 -0
  18. package/dist/api/resources/SocietyEvent.d.ts.map +1 -0
  19. package/dist/api/resources/SocietyEvent.js +10 -0
  20. package/dist/api/resources/SocietyEvent.js.map +1 -0
  21. package/dist/api/resources/UnpaidCallHistory.d.ts +6 -0
  22. package/dist/api/resources/UnpaidCallHistory.d.ts.map +1 -0
  23. package/dist/api/resources/UnpaidCallHistory.js +7 -0
  24. package/dist/api/resources/UnpaidCallHistory.js.map +1 -0
  25. package/dist/api/resources/UserSpecialDay.d.ts +10 -0
  26. package/dist/api/resources/UserSpecialDay.d.ts.map +1 -0
  27. package/dist/api/resources/UserSpecialDay.js +24 -0
  28. package/dist/api/resources/UserSpecialDay.js.map +1 -0
  29. package/dist/api/resources.d.ts +10 -0
  30. package/dist/api/resources.d.ts.map +1 -1
  31. package/dist/api/resources.js +10 -0
  32. package/dist/api/resources.js.map +1 -1
  33. package/dist/types/Enum/CommercialGrade.d.ts +5 -0
  34. package/dist/types/Enum/CommercialGrade.d.ts.map +1 -1
  35. package/dist/types/Enum/CommercialGrade.js +6 -0
  36. package/dist/types/Enum/CommercialGrade.js.map +1 -1
  37. package/dist/types/Enum/Constitution.d.ts +7 -0
  38. package/dist/types/Enum/Constitution.d.ts.map +1 -0
  39. package/dist/types/Enum/Constitution.js +8 -0
  40. package/dist/types/Enum/Constitution.js.map +1 -0
  41. package/dist/types/Enum/ExerciceNoteType.d.ts +5 -0
  42. package/dist/types/Enum/ExerciceNoteType.d.ts.map +1 -0
  43. package/dist/types/Enum/ExerciceNoteType.js +6 -0
  44. package/dist/types/Enum/ExerciceNoteType.js.map +1 -0
  45. package/dist/types/Enum/{JuridicalSocietyEnum.d.ts → JuridicalSociety.d.ts} +1 -1
  46. package/dist/types/Enum/JuridicalSociety.d.ts.map +1 -0
  47. package/dist/types/Enum/{JuridicalSocietyEnum.js → JuridicalSociety.js} +1 -1
  48. package/dist/types/Enum/JuridicalSociety.js.map +1 -0
  49. package/dist/types/Enum/UnpaidCallHistoryType.d.ts +10 -0
  50. package/dist/types/Enum/UnpaidCallHistoryType.d.ts.map +1 -0
  51. package/dist/types/Enum/UnpaidCallHistoryType.js +21 -0
  52. package/dist/types/Enum/UnpaidCallHistoryType.js.map +1 -0
  53. package/dist/types/Enum/VatDeclarationType.d.ts +2 -0
  54. package/dist/types/Enum/VatDeclarationType.d.ts.map +1 -1
  55. package/dist/types/Enum/VatDeclarationType.js +228 -0
  56. package/dist/types/Enum/VatDeclarationType.js.map +1 -1
  57. package/dist/types/Form/FormAuthenticate.d.ts +1 -0
  58. package/dist/types/Form/FormAuthenticate.d.ts.map +1 -1
  59. package/dist/types/Form/FormAuthenticate.js +6 -0
  60. package/dist/types/Form/FormAuthenticate.js.map +1 -1
  61. package/dist/types/Interface/api/SocietyApproval.d.ts +1 -0
  62. package/dist/types/Interface/api/SocietyApproval.d.ts.map +1 -1
  63. package/dist/types/Interface/api/SocietyApproval.js +7 -0
  64. package/dist/types/Interface/api/SocietyApproval.js.map +1 -1
  65. package/dist/types/Interface/api/alert/CreateAlert.d.ts +13 -0
  66. package/dist/types/Interface/api/alert/CreateAlert.d.ts.map +1 -0
  67. package/dist/types/Interface/api/alert/CreateAlert.js +95 -0
  68. package/dist/types/Interface/api/alert/CreateAlert.js.map +1 -0
  69. package/dist/types/Interface/api/calendarEvent/createCalendarEvent.d.ts +1 -0
  70. package/dist/types/Interface/api/calendarEvent/createCalendarEvent.d.ts.map +1 -1
  71. package/dist/types/Interface/api/calendarEvent/createCalendarEvent.js +5 -0
  72. package/dist/types/Interface/api/calendarEvent/createCalendarEvent.js.map +1 -1
  73. package/dist/types/Interface/api/calendarEvent/createCalendarEventForUsers.d.ts +1 -0
  74. package/dist/types/Interface/api/calendarEvent/createCalendarEventForUsers.d.ts.map +1 -1
  75. package/dist/types/Interface/api/calendarEvent/createCalendarEventForUsers.js +5 -0
  76. package/dist/types/Interface/api/calendarEvent/createCalendarEventForUsers.js.map +1 -1
  77. package/dist/types/Interface/api/calendarEvent/query.js +1 -1
  78. package/dist/types/Interface/api/calendarEvent/query.js.map +1 -1
  79. package/dist/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts +1 -0
  80. package/dist/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts.map +1 -1
  81. package/dist/types/Interface/api/calendarEvent/updateCalendarEvent.js +5 -0
  82. package/dist/types/Interface/api/calendarEvent/updateCalendarEvent.js.map +1 -1
  83. package/dist/types/Interface/api/checklist/Read.d.ts +1 -0
  84. package/dist/types/Interface/api/checklist/Read.d.ts.map +1 -1
  85. package/dist/types/Interface/api/checklist/Read.js.map +1 -1
  86. package/dist/types/Interface/api/commercialManagement/Create.d.ts +7 -0
  87. package/dist/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  88. package/dist/types/Interface/api/commercialManagement/Create.js +32 -0
  89. package/dist/types/Interface/api/commercialManagement/Create.js.map +1 -1
  90. package/dist/types/Interface/api/config/ConfigType.d.ts +2 -0
  91. package/dist/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  92. package/dist/types/Interface/api/config/ConfigType.js.map +1 -1
  93. package/dist/types/Interface/api/exerciceNote/CreateExerciceNote.d.ts +9 -0
  94. package/dist/types/Interface/api/exerciceNote/CreateExerciceNote.d.ts.map +1 -0
  95. package/dist/types/Interface/api/exerciceNote/CreateExerciceNote.js +31 -0
  96. package/dist/types/Interface/api/exerciceNote/CreateExerciceNote.js.map +1 -0
  97. package/dist/types/Interface/api/exerciceNote/QueryExerciceNote.d.ts +5 -0
  98. package/dist/types/Interface/api/exerciceNote/QueryExerciceNote.d.ts.map +1 -0
  99. package/dist/types/Interface/api/exerciceNote/QueryExerciceNote.js +19 -0
  100. package/dist/types/Interface/api/exerciceNote/QueryExerciceNote.js.map +1 -0
  101. package/dist/types/Interface/api/payment/Util.d.ts.map +1 -1
  102. package/dist/types/Interface/api/payment/Util.js.map +1 -1
  103. package/dist/types/Interface/api/prestation/Query.d.ts +1 -0
  104. package/dist/types/Interface/api/prestation/Query.d.ts.map +1 -1
  105. package/dist/types/Interface/api/prestation/Query.js +8 -0
  106. package/dist/types/Interface/api/prestation/Query.js.map +1 -1
  107. package/dist/types/Interface/api/registration/CreateRegistration.d.ts +4 -0
  108. package/dist/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  109. package/dist/types/Interface/api/registration/CreateRegistration.js +14 -0
  110. package/dist/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  111. package/dist/types/Interface/api/revision/Read.d.ts +2 -0
  112. package/dist/types/Interface/api/revision/Read.d.ts.map +1 -1
  113. package/dist/types/Interface/api/revision/Read.js.map +1 -1
  114. package/dist/types/Interface/api/society/QuerySociety.d.ts.map +1 -1
  115. package/dist/types/Interface/api/society/QuerySociety.js +1 -0
  116. package/dist/types/Interface/api/society/QuerySociety.js.map +1 -1
  117. package/dist/types/Interface/api/societyConfig/update.d.ts +13 -0
  118. package/dist/types/Interface/api/societyConfig/update.d.ts.map +1 -1
  119. package/dist/types/Interface/api/societyConfig/update.js +100 -0
  120. package/dist/types/Interface/api/societyConfig/update.js.map +1 -1
  121. package/dist/types/Interface/api/societyEvent/CreateSocietyEvent.d.ts +6 -0
  122. package/dist/types/Interface/api/societyEvent/CreateSocietyEvent.d.ts.map +1 -0
  123. package/dist/types/Interface/api/societyEvent/CreateSocietyEvent.js +24 -0
  124. package/dist/types/Interface/api/societyEvent/CreateSocietyEvent.js.map +1 -0
  125. package/dist/types/Interface/api/societyEvent/QuerySocietyEvent.d.ts +5 -0
  126. package/dist/types/Interface/api/societyEvent/QuerySocietyEvent.d.ts.map +1 -0
  127. package/dist/types/Interface/api/societyEvent/QuerySocietyEvent.js +18 -0
  128. package/dist/types/Interface/api/societyEvent/QuerySocietyEvent.js.map +1 -0
  129. package/dist/types/Interface/api/terminationList/CreateTerminationList.d.ts +2 -0
  130. package/dist/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -1
  131. package/dist/types/Interface/api/terminationList/CreateTerminationList.js +16 -0
  132. package/dist/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  133. package/dist/types/Interface/api/terminationList/DestroyTerminationList.d.ts +2 -0
  134. package/dist/types/Interface/api/terminationList/DestroyTerminationList.d.ts.map +1 -1
  135. package/dist/types/Interface/api/terminationList/DestroyTerminationList.js +16 -0
  136. package/dist/types/Interface/api/terminationList/DestroyTerminationList.js.map +1 -1
  137. package/dist/types/Interface/api/terminationList/QueryTerminationList.d.ts +2 -0
  138. package/dist/types/Interface/api/terminationList/QueryTerminationList.d.ts.map +1 -1
  139. package/dist/types/Interface/api/terminationList/QueryTerminationList.js +16 -0
  140. package/dist/types/Interface/api/terminationList/QueryTerminationList.js.map +1 -1
  141. package/dist/types/Interface/api/user/Permissions.d.ts +2 -0
  142. package/dist/types/Interface/api/user/Permissions.d.ts.map +1 -1
  143. package/dist/types/Interface/api/user/Permissions.js.map +1 -1
  144. package/dist/types/Interface/api/user/UpdateCoworker.d.ts +5 -1
  145. package/dist/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -1
  146. package/dist/types/Interface/api/user/UpdateCoworker.js +11 -1
  147. package/dist/types/Interface/api/user/UpdateCoworker.js.map +1 -1
  148. package/dist/types/Interface/api/userSpecialDay/BodyUserSpecialDay.d.ts +14 -0
  149. package/dist/types/Interface/api/userSpecialDay/BodyUserSpecialDay.d.ts.map +1 -0
  150. package/dist/types/Interface/api/userSpecialDay/BodyUserSpecialDay.js +66 -0
  151. package/dist/types/Interface/api/userSpecialDay/BodyUserSpecialDay.js.map +1 -0
  152. package/dist/types/Interface/api/userSpecialDay/QueryUserSpecialDay.d.ts +8 -0
  153. package/dist/types/Interface/api/userSpecialDay/QueryUserSpecialDay.d.ts.map +1 -0
  154. package/dist/types/Interface/api/userSpecialDay/QueryUserSpecialDay.js +41 -0
  155. package/dist/types/Interface/api/userSpecialDay/QueryUserSpecialDay.js.map +1 -0
  156. package/dist/types/Interface/api/webmail/MigrateMailAddresses.d.ts +9 -0
  157. package/dist/types/Interface/api/webmail/MigrateMailAddresses.d.ts.map +1 -0
  158. package/dist/types/Interface/api/webmail/MigrateMailAddresses.js +42 -0
  159. package/dist/types/Interface/api/webmail/MigrateMailAddresses.js.map +1 -0
  160. package/dist/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.d.ts +15 -0
  161. package/dist/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.d.ts.map +1 -1
  162. package/dist/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.js +69 -1
  163. package/dist/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.js.map +1 -1
  164. package/dist/types/Interface/models/IAccount.d.ts +4 -1
  165. package/dist/types/Interface/models/IAccount.d.ts.map +1 -1
  166. package/dist/types/Interface/models/IAccount.js +4 -1
  167. package/dist/types/Interface/models/IAccount.js.map +1 -1
  168. package/dist/types/Interface/models/IAccountantTracker.d.ts +12 -0
  169. package/dist/types/Interface/models/IAccountantTracker.d.ts.map +1 -0
  170. package/dist/types/Interface/models/IAccountantTracker.js +13 -0
  171. package/dist/types/Interface/models/IAccountantTracker.js.map +1 -0
  172. package/dist/types/Interface/models/IAccountingFile.d.ts +2 -1
  173. package/dist/types/Interface/models/IAccountingFile.d.ts.map +1 -1
  174. package/dist/types/Interface/models/IAccountingFile.js +1 -0
  175. package/dist/types/Interface/models/IAccountingFile.js.map +1 -1
  176. package/dist/types/Interface/models/IAccountingState.d.ts +19 -0
  177. package/dist/types/Interface/models/IAccountingState.d.ts.map +1 -0
  178. package/dist/types/Interface/models/IAccountingState.js +18 -0
  179. package/dist/types/Interface/models/IAccountingState.js.map +1 -0
  180. package/dist/types/Interface/models/IAccountingStateType.d.ts +7 -0
  181. package/dist/types/Interface/models/IAccountingStateType.d.ts.map +1 -0
  182. package/dist/types/Interface/models/IAccountingStateType.js +8 -0
  183. package/dist/types/Interface/models/IAccountingStateType.js.map +1 -0
  184. package/dist/types/Interface/models/IAccountingTransaction.d.ts +5 -0
  185. package/dist/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  186. package/dist/types/Interface/models/IAccountingTransaction.js +5 -0
  187. package/dist/types/Interface/models/IAccountingTransaction.js.map +1 -1
  188. package/dist/types/Interface/models/IAlert.d.ts +17 -0
  189. package/dist/types/Interface/models/IAlert.d.ts.map +1 -0
  190. package/dist/types/Interface/models/IAlert.js +18 -0
  191. package/dist/types/Interface/models/IAlert.js.map +1 -0
  192. package/dist/types/Interface/models/IAppConfig.d.ts +8 -0
  193. package/dist/types/Interface/models/IAppConfig.d.ts.map +1 -0
  194. package/dist/types/Interface/models/IAppConfig.js +9 -0
  195. package/dist/types/Interface/models/IAppConfig.js.map +1 -0
  196. package/dist/types/Interface/models/IAreasInvoice.d.ts +13 -0
  197. package/dist/types/Interface/models/IAreasInvoice.d.ts.map +1 -0
  198. package/dist/types/Interface/models/IAreasInvoice.js +14 -0
  199. package/dist/types/Interface/models/IAreasInvoice.js.map +1 -0
  200. package/dist/types/Interface/models/IAttachmentFile.d.ts +17 -0
  201. package/dist/types/Interface/models/IAttachmentFile.d.ts.map +1 -0
  202. package/dist/types/Interface/models/IAttachmentFile.js +16 -0
  203. package/dist/types/Interface/models/IAttachmentFile.js.map +1 -0
  204. package/dist/types/Interface/models/IBalanceSheetCompletion.d.ts +2 -1
  205. package/dist/types/Interface/models/IBalanceSheetCompletion.d.ts.map +1 -1
  206. package/dist/types/Interface/models/IBalanceSheetCompletion.js +1 -0
  207. package/dist/types/Interface/models/IBalanceSheetCompletion.js.map +1 -1
  208. package/dist/types/Interface/models/IBalanceSheetStatus.d.ts +7 -0
  209. package/dist/types/Interface/models/IBalanceSheetStatus.d.ts.map +1 -0
  210. package/dist/types/Interface/models/IBalanceSheetStatus.js +7 -0
  211. package/dist/types/Interface/models/IBalanceSheetStatus.js.map +1 -0
  212. package/dist/types/Interface/models/IBankList.d.ts +10 -0
  213. package/dist/types/Interface/models/IBankList.d.ts.map +1 -1
  214. package/dist/types/Interface/models/IBankList.js +10 -0
  215. package/dist/types/Interface/models/IBankList.js.map +1 -1
  216. package/dist/types/Interface/models/IBusinessLine.d.ts +2 -0
  217. package/dist/types/Interface/models/IBusinessLine.d.ts.map +1 -1
  218. package/dist/types/Interface/models/IBusinessLine.js +3 -0
  219. package/dist/types/Interface/models/IBusinessLine.js.map +1 -1
  220. package/dist/types/Interface/models/ICalendarEvent.d.ts +5 -0
  221. package/dist/types/Interface/models/ICalendarEvent.d.ts.map +1 -1
  222. package/dist/types/Interface/models/ICalendarEvent.js +3 -0
  223. package/dist/types/Interface/models/ICalendarEvent.js.map +1 -1
  224. package/dist/types/Interface/models/ICategory.d.ts +9 -0
  225. package/dist/types/Interface/models/ICategory.d.ts.map +1 -0
  226. package/dist/types/Interface/models/ICategory.js +10 -0
  227. package/dist/types/Interface/models/ICategory.js.map +1 -0
  228. package/dist/types/Interface/models/ICerfaValue.d.ts +11 -0
  229. package/dist/types/Interface/models/ICerfaValue.d.ts.map +1 -0
  230. package/dist/types/Interface/models/ICerfaValue.js +12 -0
  231. package/dist/types/Interface/models/ICerfaValue.js.map +1 -0
  232. package/dist/types/Interface/models/IChecklist.d.ts +2 -0
  233. package/dist/types/Interface/models/IChecklist.d.ts.map +1 -1
  234. package/dist/types/Interface/models/IChecklist.js +1 -0
  235. package/dist/types/Interface/models/IChecklist.js.map +1 -1
  236. package/dist/types/Interface/models/IColor.d.ts +7 -0
  237. package/dist/types/Interface/models/IColor.d.ts.map +1 -0
  238. package/dist/types/Interface/models/IColor.js +8 -0
  239. package/dist/types/Interface/models/IColor.js.map +1 -0
  240. package/dist/types/Interface/models/ICustomerVat.d.ts +3 -0
  241. package/dist/types/Interface/models/ICustomerVat.d.ts.map +1 -1
  242. package/dist/types/Interface/models/ICustomerVat.js +2 -0
  243. package/dist/types/Interface/models/ICustomerVat.js.map +1 -1
  244. package/dist/types/Interface/models/ICustomisation.d.ts +11 -0
  245. package/dist/types/Interface/models/ICustomisation.d.ts.map +1 -0
  246. package/dist/types/Interface/models/ICustomisation.js +12 -0
  247. package/dist/types/Interface/models/ICustomisation.js.map +1 -0
  248. package/dist/types/Interface/models/ICustomizationType.d.ts +7 -0
  249. package/dist/types/Interface/models/ICustomizationType.d.ts.map +1 -0
  250. package/dist/types/Interface/models/ICustomizationType.js +8 -0
  251. package/dist/types/Interface/models/ICustomizationType.js.map +1 -0
  252. package/dist/types/Interface/models/IDay.d.ts +7 -0
  253. package/dist/types/Interface/models/IDay.d.ts.map +1 -0
  254. package/dist/types/Interface/models/IDay.js +8 -0
  255. package/dist/types/Interface/models/IDay.js.map +1 -0
  256. package/dist/types/Interface/models/IDetailedLogBi.d.ts +19 -0
  257. package/dist/types/Interface/models/IDetailedLogBi.d.ts.map +1 -0
  258. package/dist/types/Interface/models/IDetailedLogBi.js +20 -0
  259. package/dist/types/Interface/models/IDetailedLogBi.js.map +1 -0
  260. package/dist/types/Interface/models/IEmployee.d.ts +3 -0
  261. package/dist/types/Interface/models/IEmployee.d.ts.map +1 -1
  262. package/dist/types/Interface/models/IEmployee.js +2 -0
  263. package/dist/types/Interface/models/IEmployee.js.map +1 -1
  264. package/dist/types/Interface/models/IEstimateInvoice.d.ts +4 -1
  265. package/dist/types/Interface/models/IEstimateInvoice.d.ts.map +1 -1
  266. package/dist/types/Interface/models/IEstimateInvoice.js +3 -1
  267. package/dist/types/Interface/models/IEstimateInvoice.js.map +1 -1
  268. package/dist/types/Interface/models/IEstimateInvoiceRepeat.d.ts +13 -0
  269. package/dist/types/Interface/models/IEstimateInvoiceRepeat.d.ts.map +1 -0
  270. package/dist/types/Interface/models/IEstimateInvoiceRepeat.js +14 -0
  271. package/dist/types/Interface/models/IEstimateInvoiceRepeat.js.map +1 -0
  272. package/dist/types/Interface/models/IExerciceNote.d.ts +15 -0
  273. package/dist/types/Interface/models/IExerciceNote.d.ts.map +1 -0
  274. package/dist/types/Interface/models/IExerciceNote.js +13 -0
  275. package/dist/types/Interface/models/IExerciceNote.js.map +1 -0
  276. package/dist/types/Interface/models/IFailedLoginAttempt.d.ts +10 -0
  277. package/dist/types/Interface/models/IFailedLoginAttempt.d.ts.map +1 -0
  278. package/dist/types/Interface/models/IFailedLoginAttempt.js +11 -0
  279. package/dist/types/Interface/models/IFailedLoginAttempt.js.map +1 -0
  280. package/dist/types/Interface/models/IFile.d.ts +2 -0
  281. package/dist/types/Interface/models/IFile.d.ts.map +1 -1
  282. package/dist/types/Interface/models/IFile.js +1 -0
  283. package/dist/types/Interface/models/IFile.js.map +1 -1
  284. package/dist/types/Interface/models/IFileMissing.d.ts +13 -0
  285. package/dist/types/Interface/models/IFileMissing.d.ts.map +1 -0
  286. package/dist/types/Interface/models/IFileMissing.js +14 -0
  287. package/dist/types/Interface/models/IFileMissing.js.map +1 -0
  288. package/dist/types/Interface/models/IFrequency.d.ts +7 -0
  289. package/dist/types/Interface/models/IFrequency.d.ts.map +1 -0
  290. package/dist/types/Interface/models/IFrequency.js +8 -0
  291. package/dist/types/Interface/models/IFrequency.js.map +1 -0
  292. package/dist/types/Interface/models/IInternalEstimate.d.ts +14 -0
  293. package/dist/types/Interface/models/IInternalEstimate.d.ts.map +1 -0
  294. package/dist/types/Interface/models/IInternalEstimate.js +15 -0
  295. package/dist/types/Interface/models/IInternalEstimate.js.map +1 -0
  296. package/dist/types/Interface/models/IKilometricAllowanceScale.d.ts +10 -0
  297. package/dist/types/Interface/models/IKilometricAllowanceScale.d.ts.map +1 -0
  298. package/dist/types/Interface/models/IKilometricAllowanceScale.js +11 -0
  299. package/dist/types/Interface/models/IKilometricAllowanceScale.js.map +1 -0
  300. package/dist/types/Interface/models/ILabelPaymentWaiting.d.ts +7 -0
  301. package/dist/types/Interface/models/ILabelPaymentWaiting.d.ts.map +1 -0
  302. package/dist/types/Interface/models/ILabelPaymentWaiting.js +8 -0
  303. package/dist/types/Interface/models/ILabelPaymentWaiting.js.map +1 -0
  304. package/dist/types/Interface/models/ILastUpdateConnection.d.ts +11 -0
  305. package/dist/types/Interface/models/ILastUpdateConnection.d.ts.map +1 -0
  306. package/dist/types/Interface/models/ILastUpdateConnection.js +11 -0
  307. package/dist/types/Interface/models/ILastUpdateConnection.js.map +1 -0
  308. package/dist/types/Interface/models/ILogBi.d.ts +12 -0
  309. package/dist/types/Interface/models/ILogBi.d.ts.map +1 -0
  310. package/dist/types/Interface/models/ILogBi.js +13 -0
  311. package/dist/types/Interface/models/ILogBi.js.map +1 -0
  312. package/dist/types/Interface/models/IMail.d.ts +1 -0
  313. package/dist/types/Interface/models/IMail.d.ts.map +1 -1
  314. package/dist/types/Interface/models/IMail.js +1 -0
  315. package/dist/types/Interface/models/IMail.js.map +1 -1
  316. package/dist/types/Interface/models/IMailRelation.d.ts +12 -0
  317. package/dist/types/Interface/models/IMailRelation.d.ts.map +1 -0
  318. package/dist/types/Interface/models/IMailRelation.js +12 -0
  319. package/dist/types/Interface/models/IMailRelation.js.map +1 -0
  320. package/dist/types/Interface/models/IMobileNotificationLog.d.ts +4 -0
  321. package/dist/types/Interface/models/IMobileNotificationLog.d.ts.map +1 -1
  322. package/dist/types/Interface/models/IMobileNotificationLog.js +4 -0
  323. package/dist/types/Interface/models/IMobileNotificationLog.js.map +1 -1
  324. package/dist/types/Interface/models/IMonth.d.ts +7 -0
  325. package/dist/types/Interface/models/IMonth.d.ts.map +1 -0
  326. package/dist/types/Interface/models/IMonth.js +8 -0
  327. package/dist/types/Interface/models/IMonth.js.map +1 -0
  328. package/dist/types/Interface/models/INote.d.ts +8 -0
  329. package/dist/types/Interface/models/INote.d.ts.map +1 -0
  330. package/dist/types/Interface/models/INote.js +9 -0
  331. package/dist/types/Interface/models/INote.js.map +1 -0
  332. package/dist/types/Interface/models/IPayPlan.d.ts +7 -0
  333. package/dist/types/Interface/models/IPayPlan.d.ts.map +1 -0
  334. package/dist/types/Interface/models/IPayPlan.js +8 -0
  335. package/dist/types/Interface/models/IPayPlan.js.map +1 -0
  336. package/dist/types/Interface/models/IPaymentDelay.d.ts +7 -0
  337. package/dist/types/Interface/models/IPaymentDelay.d.ts.map +1 -0
  338. package/dist/types/Interface/models/IPaymentDelay.js +8 -0
  339. package/dist/types/Interface/models/IPaymentDelay.js.map +1 -0
  340. package/dist/types/Interface/models/IPaymentWaiting.d.ts +19 -0
  341. package/dist/types/Interface/models/IPaymentWaiting.d.ts.map +1 -0
  342. package/dist/types/Interface/models/IPaymentWaiting.js +19 -0
  343. package/dist/types/Interface/models/IPaymentWaiting.js.map +1 -0
  344. package/dist/types/Interface/models/IPermission.d.ts +2 -0
  345. package/dist/types/Interface/models/IPermission.d.ts.map +1 -1
  346. package/dist/types/Interface/models/IPermission.js +2 -0
  347. package/dist/types/Interface/models/IPermission.js.map +1 -1
  348. package/dist/types/Interface/models/IPhoneNumber.d.ts +10 -0
  349. package/dist/types/Interface/models/IPhoneNumber.d.ts.map +1 -0
  350. package/dist/types/Interface/models/IPhoneNumber.js +11 -0
  351. package/dist/types/Interface/models/IPhoneNumber.js.map +1 -0
  352. package/dist/types/Interface/models/IPhonePrefix.d.ts +10 -0
  353. package/dist/types/Interface/models/IPhonePrefix.d.ts.map +1 -0
  354. package/dist/types/Interface/models/IPhonePrefix.js +11 -0
  355. package/dist/types/Interface/models/IPhonePrefix.js.map +1 -0
  356. package/dist/types/Interface/models/IPhonePrefixChild.d.ts +8 -0
  357. package/dist/types/Interface/models/IPhonePrefixChild.d.ts.map +1 -0
  358. package/dist/types/Interface/models/IPhonePrefixChild.js +9 -0
  359. package/dist/types/Interface/models/IPhonePrefixChild.js.map +1 -0
  360. package/dist/types/Interface/models/IPrestation.d.ts +2 -0
  361. package/dist/types/Interface/models/IPrestation.d.ts.map +1 -1
  362. package/dist/types/Interface/models/IPrestation.js +3 -0
  363. package/dist/types/Interface/models/IPrestation.js.map +1 -1
  364. package/dist/types/Interface/models/IQuotaLead.d.ts +14 -0
  365. package/dist/types/Interface/models/IQuotaLead.d.ts.map +1 -0
  366. package/dist/types/Interface/models/IQuotaLead.js +15 -0
  367. package/dist/types/Interface/models/IQuotaLead.js.map +1 -0
  368. package/dist/types/Interface/models/IRefundMotif.d.ts +7 -0
  369. package/dist/types/Interface/models/IRefundMotif.d.ts.map +1 -0
  370. package/dist/types/Interface/models/IRefundMotif.js +9 -0
  371. package/dist/types/Interface/models/IRefundMotif.js.map +1 -0
  372. package/dist/types/Interface/models/IRegion.d.ts +7 -0
  373. package/dist/types/Interface/models/IRegion.d.ts.map +1 -0
  374. package/dist/types/Interface/models/IRegion.js +8 -0
  375. package/dist/types/Interface/models/IRegion.js.map +1 -0
  376. package/dist/types/Interface/models/IRegistrationCertificate.d.ts +3 -0
  377. package/dist/types/Interface/models/IRegistrationCertificate.d.ts.map +1 -1
  378. package/dist/types/Interface/models/IRegistrationCertificate.js +2 -0
  379. package/dist/types/Interface/models/IRegistrationCertificate.js.map +1 -1
  380. package/dist/types/Interface/models/IRepeatType.d.ts +7 -0
  381. package/dist/types/Interface/models/IRepeatType.d.ts.map +1 -0
  382. package/dist/types/Interface/models/IRepeatType.js +8 -0
  383. package/dist/types/Interface/models/IRepeatType.js.map +1 -0
  384. package/dist/types/Interface/models/IRoom.d.ts +7 -0
  385. package/dist/types/Interface/models/IRoom.d.ts.map +1 -0
  386. package/dist/types/Interface/models/IRoom.js +8 -0
  387. package/dist/types/Interface/models/IRoom.js.map +1 -0
  388. package/dist/types/Interface/models/ISchedule.d.ts +12 -0
  389. package/dist/types/Interface/models/ISchedule.d.ts.map +1 -0
  390. package/dist/types/Interface/models/ISchedule.js +13 -0
  391. package/dist/types/Interface/models/ISchedule.js.map +1 -0
  392. package/dist/types/Interface/models/IService.d.ts +7 -0
  393. package/dist/types/Interface/models/IService.d.ts.map +1 -0
  394. package/dist/types/Interface/models/IService.js +8 -0
  395. package/dist/types/Interface/models/IService.js.map +1 -0
  396. package/dist/types/Interface/models/ISheetMonthSchedule.d.ts +2 -0
  397. package/dist/types/Interface/models/ISheetMonthSchedule.d.ts.map +1 -1
  398. package/dist/types/Interface/models/ISheetMonthSchedule.js +1 -0
  399. package/dist/types/Interface/models/ISheetMonthSchedule.js.map +1 -1
  400. package/dist/types/Interface/models/ISociety.d.ts +47 -1
  401. package/dist/types/Interface/models/ISociety.d.ts.map +1 -1
  402. package/dist/types/Interface/models/ISociety.js +41 -0
  403. package/dist/types/Interface/models/ISociety.js.map +1 -1
  404. package/dist/types/Interface/models/ISocietyApproval.d.ts +3 -0
  405. package/dist/types/Interface/models/ISocietyApproval.d.ts.map +1 -1
  406. package/dist/types/Interface/models/ISocietyApproval.js +2 -0
  407. package/dist/types/Interface/models/ISocietyApproval.js.map +1 -1
  408. package/dist/types/Interface/models/ISocietyBudgetConnection.d.ts +9 -0
  409. package/dist/types/Interface/models/ISocietyBudgetConnection.d.ts.map +1 -0
  410. package/dist/types/Interface/models/ISocietyBudgetConnection.js +10 -0
  411. package/dist/types/Interface/models/ISocietyBudgetConnection.js.map +1 -0
  412. package/dist/types/Interface/models/ISocietyConfig.d.ts +14 -0
  413. package/dist/types/Interface/models/ISocietyConfig.d.ts.map +1 -1
  414. package/dist/types/Interface/models/ISocietyConfig.js +14 -0
  415. package/dist/types/Interface/models/ISocietyConfig.js.map +1 -1
  416. package/dist/types/Interface/models/ISocietyDetail.d.ts +58 -0
  417. package/dist/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
  418. package/dist/types/Interface/models/ISocietyDetail.js +58 -0
  419. package/dist/types/Interface/models/ISocietyDetail.js.map +1 -1
  420. package/dist/types/Interface/models/ISocietyEvent.d.ts +12 -0
  421. package/dist/types/Interface/models/ISocietyEvent.d.ts.map +1 -0
  422. package/dist/types/Interface/models/ISocietyEvent.js +11 -0
  423. package/dist/types/Interface/models/ISocietyEvent.js.map +1 -0
  424. package/dist/types/Interface/models/ISocietyFile.d.ts +16 -0
  425. package/dist/types/Interface/models/ISocietyFile.d.ts.map +1 -0
  426. package/dist/types/Interface/models/ISocietyFile.js +17 -0
  427. package/dist/types/Interface/models/ISocietyFile.js.map +1 -0
  428. package/dist/types/Interface/models/ISocietyGescom.d.ts +6 -0
  429. package/dist/types/Interface/models/ISocietyGescom.d.ts.map +1 -1
  430. package/dist/types/Interface/models/ISocietyGescom.js +6 -0
  431. package/dist/types/Interface/models/ISocietyGescom.js.map +1 -1
  432. package/dist/types/Interface/models/ISocietyNote.d.ts +7 -0
  433. package/dist/types/Interface/models/ISocietyNote.d.ts.map +1 -0
  434. package/dist/types/Interface/models/ISocietyNote.js +8 -0
  435. package/dist/types/Interface/models/ISocietyNote.js.map +1 -0
  436. package/dist/types/Interface/models/IStripeEvent.d.ts +12 -0
  437. package/dist/types/Interface/models/IStripeEvent.d.ts.map +1 -0
  438. package/dist/types/Interface/models/IStripeEvent.js +13 -0
  439. package/dist/types/Interface/models/IStripeEvent.js.map +1 -0
  440. package/dist/types/Interface/models/IStripeEventType.d.ts +7 -0
  441. package/dist/types/Interface/models/IStripeEventType.d.ts.map +1 -0
  442. package/dist/types/Interface/models/IStripeEventType.js +8 -0
  443. package/dist/types/Interface/models/IStripeEventType.js.map +1 -0
  444. package/dist/types/Interface/models/ITeam.d.ts +2 -0
  445. package/dist/types/Interface/models/ITeam.d.ts.map +1 -1
  446. package/dist/types/Interface/models/ITeam.js +1 -0
  447. package/dist/types/Interface/models/ITeam.js.map +1 -1
  448. package/dist/types/Interface/models/ITeamBusinessLine.d.ts +8 -0
  449. package/dist/types/Interface/models/ITeamBusinessLine.d.ts.map +1 -0
  450. package/dist/types/Interface/models/ITeamBusinessLine.js +9 -0
  451. package/dist/types/Interface/models/ITeamBusinessLine.js.map +1 -0
  452. package/dist/types/Interface/models/ITerminationList.d.ts +2 -0
  453. package/dist/types/Interface/models/ITerminationList.d.ts.map +1 -1
  454. package/dist/types/Interface/models/ITerminationList.js +4 -0
  455. package/dist/types/Interface/models/ITerminationList.js.map +1 -1
  456. package/dist/types/Interface/models/ITimeRecorder.d.ts.map +1 -1
  457. package/dist/types/Interface/models/ITimeRecorder.js +1 -0
  458. package/dist/types/Interface/models/ITimeRecorder.js.map +1 -1
  459. package/dist/types/Interface/models/IUnpaidCallHistory.d.ts +14 -0
  460. package/dist/types/Interface/models/IUnpaidCallHistory.d.ts.map +1 -0
  461. package/dist/types/Interface/models/IUnpaidCallHistory.js +13 -0
  462. package/dist/types/Interface/models/IUnpaidCallHistory.js.map +1 -0
  463. package/dist/types/Interface/models/IUpToDateBankAccount.d.ts +9 -0
  464. package/dist/types/Interface/models/IUpToDateBankAccount.d.ts.map +1 -1
  465. package/dist/types/Interface/models/IUpToDateBankAccount.js +7 -0
  466. package/dist/types/Interface/models/IUpToDateBankAccount.js.map +1 -1
  467. package/dist/types/Interface/models/IUser.d.ts +22 -0
  468. package/dist/types/Interface/models/IUser.d.ts.map +1 -1
  469. package/dist/types/Interface/models/IUser.js +23 -0
  470. package/dist/types/Interface/models/IUser.js.map +1 -1
  471. package/dist/types/Interface/models/IUserSpecialDay.d.ts +14 -0
  472. package/dist/types/Interface/models/IUserSpecialDay.d.ts.map +1 -0
  473. package/dist/types/Interface/models/IUserSpecialDay.js +14 -0
  474. package/dist/types/Interface/models/IUserSpecialDay.js.map +1 -0
  475. package/dist/types/Interface/models/IVatDeclaration.d.ts +118 -0
  476. package/dist/types/Interface/models/IVatDeclaration.d.ts.map +1 -0
  477. package/dist/types/Interface/models/IVatDeclaration.js +113 -0
  478. package/dist/types/Interface/models/IVatDeclaration.js.map +1 -0
  479. package/dist/types/Interface/models/IWebMail.d.ts +64 -0
  480. package/dist/types/Interface/models/IWebMail.d.ts.map +1 -0
  481. package/dist/types/Interface/models/IWebMail.js +61 -0
  482. package/dist/types/Interface/models/IWebMail.js.map +1 -0
  483. package/dist/types/Interface/models/IWebMailAttachment.d.ts +8 -0
  484. package/dist/types/Interface/models/IWebMailAttachment.d.ts.map +1 -0
  485. package/dist/types/Interface/models/IWebMailAttachment.js +9 -0
  486. package/dist/types/Interface/models/IWebMailAttachment.js.map +1 -0
  487. package/dist/types/Interface/models/IWebMailStat.d.ts +9 -0
  488. package/dist/types/Interface/models/IWebMailStat.d.ts.map +1 -0
  489. package/dist/types/Interface/models/IWebMailStat.js +10 -0
  490. package/dist/types/Interface/models/IWebMailStat.js.map +1 -0
  491. package/dist/types/Interface/models/IWebMailType.d.ts +7 -0
  492. package/dist/types/Interface/models/IWebMailType.d.ts.map +1 -0
  493. package/dist/types/Interface/models/IWebMailType.js +8 -0
  494. package/dist/types/Interface/models/IWebMailType.js.map +1 -0
  495. package/dist/types/index.d.ts +67 -1
  496. package/dist/types/index.d.ts.map +1 -1
  497. package/dist/types/index.js +68 -1
  498. package/dist/types/index.js.map +1 -1
  499. package/dist/utils/commercialManagement/document.js +1 -1
  500. package/dist/utils/commercialManagement/document.js.map +1 -1
  501. package/dist/utils/payment.d.ts +1 -0
  502. package/dist/utils/payment.d.ts.map +1 -1
  503. package/dist/utils/payment.js +30 -3
  504. package/dist/utils/payment.js.map +1 -1
  505. package/dist/utils/prestation.d.ts +10 -2
  506. package/dist/utils/prestation.d.ts.map +1 -1
  507. package/dist/utils/prestation.js +27 -3
  508. package/dist/utils/prestation.js.map +1 -1
  509. package/dist/utils/societyApproval.d.ts +7 -0
  510. package/dist/utils/societyApproval.d.ts.map +1 -1
  511. package/dist/utils/societyApproval.js +12 -0
  512. package/dist/utils/societyApproval.js.map +1 -1
  513. package/dist/utils/tests/payment.spec.js +32 -0
  514. package/dist/utils/tests/payment.spec.js.map +1 -1
  515. package/package.json +1 -1
  516. package/ts/api/resources/Alert.ts +12 -0
  517. package/ts/api/resources/ExerciceNote.ts +16 -0
  518. package/ts/api/resources/GeneralLedger.ts +13 -0
  519. package/ts/api/resources/Mail.ts +8 -0
  520. package/ts/api/resources/SocietyEvent.ts +12 -0
  521. package/ts/api/resources/UnpaidCallHistory.ts +8 -0
  522. package/ts/api/resources/UserSpecialDay.ts +29 -0
  523. package/ts/api/resources.ts +10 -0
  524. package/ts/types/Enum/CommercialGrade.ts +6 -0
  525. package/ts/types/Enum/Constitution.ts +6 -0
  526. package/ts/types/Enum/ExerciceNoteType.ts +4 -0
  527. package/ts/types/Enum/UnpaidCallHistoryType.ts +20 -0
  528. package/ts/types/Enum/VatDeclarationType.ts +230 -0
  529. package/ts/types/Form/FormAuthenticate.ts +4 -0
  530. package/ts/types/Interface/api/SocietyApproval.ts +5 -0
  531. package/ts/types/Interface/api/alert/CreateAlert.ts +65 -0
  532. package/ts/types/Interface/api/calendarEvent/createCalendarEvent.ts +3 -0
  533. package/ts/types/Interface/api/calendarEvent/createCalendarEventForUsers.ts +3 -0
  534. package/ts/types/Interface/api/calendarEvent/query.ts +1 -1
  535. package/ts/types/Interface/api/calendarEvent/updateCalendarEvent.ts +3 -0
  536. package/ts/types/Interface/api/checklist/Read.ts +1 -0
  537. package/ts/types/Interface/api/commercialManagement/Create.ts +24 -0
  538. package/ts/types/Interface/api/config/ConfigType.ts +2 -0
  539. package/ts/types/Interface/api/exerciceNote/CreateExerciceNote.ts +15 -0
  540. package/ts/types/Interface/api/exerciceNote/QueryExerciceNote.ts +7 -0
  541. package/ts/types/Interface/api/payment/Util.ts +2 -0
  542. package/ts/types/Interface/api/prestation/Query.ts +6 -0
  543. package/ts/types/Interface/api/registration/CreateRegistration.ts +10 -0
  544. package/ts/types/Interface/api/revision/Read.ts +2 -0
  545. package/ts/types/Interface/api/society/QuerySociety.ts +1 -0
  546. package/ts/types/Interface/api/societyConfig/update.ts +74 -0
  547. package/ts/types/Interface/api/societyEvent/CreateSocietyEvent.ts +10 -0
  548. package/ts/types/Interface/api/societyEvent/QuerySocietyEvent.ts +7 -0
  549. package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +12 -0
  550. package/ts/types/Interface/api/terminationList/DestroyTerminationList.ts +12 -0
  551. package/ts/types/Interface/api/terminationList/QueryTerminationList.ts +12 -0
  552. package/ts/types/Interface/api/user/Permissions.ts +2 -0
  553. package/ts/types/Interface/api/user/UpdateCoworker.ts +10 -1
  554. package/ts/types/Interface/api/userSpecialDay/BodyUserSpecialDay.ts +40 -0
  555. package/ts/types/Interface/api/userSpecialDay/QueryUserSpecialDay.ts +23 -0
  556. package/ts/types/Interface/api/webmail/MigrateMailAddresses.ts +23 -0
  557. package/ts/types/Interface/api/webmail/PostAttachmentEmailFromLambdaParams.ts +49 -1
  558. package/ts/types/Interface/models/IAccount.ts +4 -1
  559. package/ts/types/Interface/models/IAccountantTracker.ts +12 -0
  560. package/ts/types/Interface/models/IAccountingFile.ts +2 -1
  561. package/ts/types/Interface/models/IAccountingState.ts +22 -0
  562. package/ts/types/Interface/models/IAccountingStateType.ts +7 -0
  563. package/ts/types/Interface/models/IAccountingTransaction.ts +5 -0
  564. package/ts/types/Interface/models/IAlert.ts +17 -0
  565. package/ts/types/Interface/models/IAppConfig.ts +8 -0
  566. package/ts/types/Interface/models/IAreasInvoice.ts +16 -0
  567. package/ts/types/Interface/models/IAttachmentFile.ts +20 -0
  568. package/ts/types/Interface/models/IBalanceSheetCompletion.ts +2 -1
  569. package/ts/types/Interface/models/IBalanceSheetStatus.ts +7 -0
  570. package/ts/types/Interface/models/IBankList.ts +10 -0
  571. package/ts/types/Interface/models/IBusinessLine.ts +6 -0
  572. package/ts/types/Interface/models/ICalendarEvent.ts +5 -0
  573. package/ts/types/Interface/models/ICategory.ts +9 -0
  574. package/ts/types/Interface/models/ICerfaValue.ts +14 -0
  575. package/ts/types/Interface/models/IChecklist.ts +2 -0
  576. package/ts/types/Interface/models/IColor.ts +7 -0
  577. package/ts/types/Interface/models/ICustomerVat.ts +3 -0
  578. package/ts/types/Interface/models/ICustomisation.ts +11 -0
  579. package/ts/types/Interface/models/ICustomizationType.ts +7 -0
  580. package/ts/types/Interface/models/IDay.ts +7 -0
  581. package/ts/types/Interface/models/IDetailedLogBi.ts +19 -0
  582. package/ts/types/Interface/models/IEmployee.ts +3 -0
  583. package/ts/types/Interface/models/IEstimateInvoice.ts +4 -1
  584. package/ts/types/Interface/models/IEstimateInvoiceRepeat.ts +13 -0
  585. package/ts/types/Interface/models/IExerciceNote.ts +17 -0
  586. package/ts/types/Interface/models/IFailedLoginAttempt.ts +13 -0
  587. package/ts/types/Interface/models/IFile.ts +2 -0
  588. package/ts/types/Interface/models/IFileMissing.ts +13 -0
  589. package/ts/types/Interface/models/IFrequency.ts +7 -0
  590. package/ts/types/Interface/models/IInternalEstimate.ts +14 -0
  591. package/ts/types/Interface/models/IKilometricAllowanceScale.ts +10 -0
  592. package/ts/types/Interface/models/ILabelPaymentWaiting.ts +7 -0
  593. package/ts/types/Interface/models/ILastUpdateConnection.ts +13 -0
  594. package/ts/types/Interface/models/ILogBi.ts +12 -0
  595. package/ts/types/Interface/models/IMail.ts +1 -0
  596. package/ts/types/Interface/models/IMailRelation.ts +15 -0
  597. package/ts/types/Interface/models/IMobileNotificationLog.ts +4 -0
  598. package/ts/types/Interface/models/IMonth.ts +7 -0
  599. package/ts/types/Interface/models/INote.ts +8 -0
  600. package/ts/types/Interface/models/IPayPlan.ts +7 -0
  601. package/ts/types/Interface/models/IPaymentDelay.ts +7 -0
  602. package/ts/types/Interface/models/IPaymentWaiting.ts +22 -0
  603. package/ts/types/Interface/models/IPermission.ts +2 -0
  604. package/ts/types/Interface/models/IPhoneNumber.ts +10 -0
  605. package/ts/types/Interface/models/IPhonePrefix.ts +13 -0
  606. package/ts/types/Interface/models/IPhonePrefixChild.ts +8 -0
  607. package/ts/types/Interface/models/IPrestation.ts +3 -0
  608. package/ts/types/Interface/models/IQuotaLead.ts +17 -0
  609. package/ts/types/Interface/models/IRefundMotif.ts +8 -0
  610. package/ts/types/Interface/models/IRegion.ts +7 -0
  611. package/ts/types/Interface/models/IRegistrationCertificate.ts +3 -0
  612. package/ts/types/Interface/models/IRepeatType.ts +7 -0
  613. package/ts/types/Interface/models/IRoom.ts +7 -0
  614. package/ts/types/Interface/models/ISchedule.ts +12 -0
  615. package/ts/types/Interface/models/IService.ts +7 -0
  616. package/ts/types/Interface/models/ISheetMonthSchedule.ts +2 -0
  617. package/ts/types/Interface/models/ISociety.ts +47 -0
  618. package/ts/types/Interface/models/ISocietyApproval.ts +3 -0
  619. package/ts/types/Interface/models/ISocietyBudgetConnection.ts +9 -0
  620. package/ts/types/Interface/models/ISocietyConfig.ts +14 -0
  621. package/ts/types/Interface/models/ISocietyDetail.ts +58 -0
  622. package/ts/types/Interface/models/ISocietyEvent.ts +14 -0
  623. package/ts/types/Interface/models/ISocietyFile.ts +19 -0
  624. package/ts/types/Interface/models/ISocietyGescom.ts +6 -0
  625. package/ts/types/Interface/models/ISocietyNote.ts +7 -0
  626. package/ts/types/Interface/models/IStripeEvent.ts +12 -0
  627. package/ts/types/Interface/models/IStripeEventType.ts +7 -0
  628. package/ts/types/Interface/models/ITeam.ts +2 -0
  629. package/ts/types/Interface/models/ITeamBusinessLine.ts +8 -0
  630. package/ts/types/Interface/models/ITerminationList.ts +4 -0
  631. package/ts/types/Interface/models/ITimeRecorder.ts +2 -0
  632. package/ts/types/Interface/models/IUnpaidCallHistory.ts +16 -0
  633. package/ts/types/Interface/models/IUpToDateBankAccount.ts +9 -0
  634. package/ts/types/Interface/models/IUser.ts +23 -0
  635. package/ts/types/Interface/models/IUserSpecialDay.ts +16 -0
  636. package/ts/types/Interface/models/IVatDeclaration.ts +121 -0
  637. package/ts/types/Interface/models/IWebMail.ts +67 -0
  638. package/ts/types/Interface/models/IWebMailAttachment.ts +8 -0
  639. package/ts/types/Interface/models/IWebMailStat.ts +9 -0
  640. package/ts/types/Interface/models/IWebMailType.ts +7 -0
  641. package/ts/types/index.ts +69 -1
  642. package/ts/utils/commercialManagement/document.ts +1 -1
  643. package/ts/utils/payment.ts +29 -2
  644. package/ts/utils/prestation.ts +28 -1
  645. package/ts/utils/societyApproval.ts +16 -0
  646. package/ts/utils/tests/payment.spec.ts +32 -0
  647. package/dist/types/Enum/JuridicalSocietyEnum.d.ts.map +0 -1
  648. package/dist/types/Enum/JuridicalSocietyEnum.js.map +0 -1
  649. /package/ts/types/Enum/{JuridicalSocietyEnum.ts → JuridicalSociety.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,oDAAoD,EACpD,gBAAgB,EAChB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAwB,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,M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AC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAExG,OAAO,IAAI,CAAC;;YACT,OAAO,KAAK,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,gBAAwB,EAA4B,EAAE;IACzF,IAAI,oDAAoD,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAAE,OAAO,UAAU,CAAC;IACvG,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,qCAAqC,EACrC,2BAA2B,GAC5B,CAAC","sourcesContent":["import { IExercice, IPrestation, IPrestationList } from '../types/index.js';\nimport { Vat } from '../types/Enum/Vat.js';\nimport { ReasonTerminationType } from '../types/Enum/ReasonTerminationType.js';\nimport { intersection } from './noLodash.js';\nimport {\n ClementineSubscriptionAccountancySoftwarePrestations,\n PrestationDetail,\n PrestationType,\n} from '../types/Enum/PrestationType.js';\nimport { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption.js';\nimport { PriceGridClementine } from '../types/Enum/PriceGridClementine.js';\nimport { PriceGridPourcentage } from '../types/Enum/PriceGridPourcentage.js';\nimport { PriceGridLegalstart } from '../types/Enum/PriceGridLegalstart.js';\nimport { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress.js';\nimport { ClosingType } from '../types/Enum/ClosingType.js';\nimport { getBrandNameByNodeEnv } from './brands.js';\nimport dayjs from 'dayjs';\nimport { exerciceNumber } from './exercice.js';\n\ntype priceGridBrand = {\n idTypeBrand: number;\n price: priceGrid[];\n};\n\ntype priceGrid = {\n idPrestationList: number[];\n priceWithTaxesIncluded: boolean;\n applicationCost: number;\n monthlyNbr?: monthlyNbr[];\n exerciceNbr?: exerciceNbr[];\n turnoverCreatedYear?: turnover[];\n turnoverPastYear?: turnover[];\n turnoverMonthly?: turnover[];\n turnoverYearly?: turnover[];\n employee?: employee[];\n partner?: employee[];\n properties?: propertie[];\n vatRegimeMonthly?: vatRegime[];\n vatRegimeYearly?: vatRegime[];\n taxSystem?: taxSystem[];\n legalForm?: legalForm[];\n employeeByLegalForm?: employeeByLegalForm[];\n};\n\ntype monthlyNbr = {\n minimum: number;\n maximum: number;\n value: number;\n closingType: number[];\n};\n\ntype exerciceNbr = {\n minimum: number;\n maximum: number;\n price: number;\n};\n\ntype turnover = {\n turnoverValue: number;\n price: number;\n};\n\ntype legalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype employee = {\n amountMinimum: number;\n amountMaximum: number;\n price: number;\n};\n\ntype employeeByLegalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype propertie = {\n amount: number;\n price: number;\n};\n\ntype vatRegime = {\n type: number;\n price: number;\n};\n\ntype taxSystem = {\n id: number;\n price: number;\n};\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean =>\n [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL,\n ].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique: boolean, isCatalog: boolean, idPrestationList: number): boolean =>\n idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean =>\n idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden: boolean, isCatalog: boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL),\n ).length;\n\nconst isOnlySocial = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [\n PrestationType.CREATION_SOCIETE,\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ]).length;\n\nconst isFromStatutsExpress = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ].includes(idPL),\n ).length;\n\nconst isExpress = (idPrestationList: number): boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr: any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst isConsultingHour = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.CONSULTING_HOUR]).length;\n\nconst isSoftwarePrestation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.STEERING, PrestationType.VAT, PrestationType.BALANCESHEET])\n .length; /* &&\n idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge\n\nconst calculateScoringOfPrestation = (\n idPrestationType: PrestationType,\n prestations: IPrestation[],\n currentIdPrestation: number,\n): number => {\n const prestationsSignedPaid = prestations.filter(\n (prestation) =>\n prestation.paid &&\n prestation.signed &&\n (prestation.terminationList === null ||\n prestation.terminationList?.idReasonTermination?.includes(ReasonTerminationType.CHANGES_NEW_OFFERS)) &&\n prestation.id !== currentIdPrestation,\n );\n\n const currentPrestation = prestations.find(\n (el) => el.idPrestationList === idPrestationType && el.terminationList === null,\n );\n\n // SPECIAL CASE:\n // If current prestation is a software prestation\n // and the current prestation is an annual payment, return 0 point\n if (\n isSoftwarePrestation([idPrestationType]) &&\n currentPrestation?.exercices?.length &&\n //@ts-expect-error\n (currentPrestation?.exercices[0].ExercicePrestation?.totalPrestation < 72 ||\n //@ts-expect-error\n currentPrestation?.exercices[0].ExercicePrestation?.monthNumber !== 1)\n ) {\n return 0;\n }\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter(\n (p) =>\n p.isComptable &&\n !p.isCatalog &&\n p.id &&\n ![PrestationType.BALANCESHEET, PrestationType.VAT, PrestationType.STEERING].includes(p.id),\n );\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the new prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n let numberPoint = prestaDetails?.point || 0;\n\n // For each back exercices, add 100 points\n // -> for new prestations only\n if (\n [\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.GESTION_IMMO,\n PrestationType.EI,\n PrestationType.MICRO,\n ].includes(idPrestationType) &&\n currentPrestation?.exercices?.length &&\n currentPrestation?.exercices.find((el) => el.isBack)\n ) {\n numberPoint += (currentPrestation?.exercices.filter((el) => el.isBack).length ?? 1) * 100;\n }\n\n // Get list of prestations that are already done\n // and check if one of them is in the list of prestations that are half price\n const prestationsExistIds = prestationsSignedPaid.map((prestation) => prestation.idPrestationList);\n const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));\n\n // If one of the prestations already done is in the list of prestations that are half price and if the idPrestationType is in prestationHalfPriceIds, return 50% of points\n if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType))\n return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nexport const calculateMonthlyAmount = (params: {\n monthlyPrice: number;\n monthNumber: number;\n monthOffer: number;\n idVatForInternalInvoicing?: number | null;\n returnTaxesIncludedValue?: boolean;\n}): number => {\n const { monthlyPrice, monthNumber, monthOffer, idVatForInternalInvoicing, returnTaxesIncludedValue = true } = params;\n\n if (!idVatForInternalInvoicing && returnTaxesIncludedValue)\n throw new Error('Taux de TVA manquant pour calculer le montant TTC');\n\n if (!idVatForInternalInvoicing || !returnTaxesIncludedValue) return monthlyPrice * (monthNumber - monthOffer);\n\n return (\n monthlyPrice *\n (monthNumber - monthOffer) *\n (1 + Object.values(Vat).find((el) => el.id === idVatForInternalInvoicing).value / 100)\n );\n};\n\nexport const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid | undefined => {\n let currentBrandPriceGrid: priceGridBrand | undefined;\n let currentPriceGrid: priceGrid | undefined;\n\n const currentEnvName = getBrandNameByNodeEnv(process.env.NODE_ENV);\n const listEnvEnum = {\n PriceGridClementine,\n PriceGridPourcentage,\n PriceGridLegalstart,\n PriceGridStatutsExpress,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile)\n currentBrandPriceGrid = currentPriceGridFile.find(\n (priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand,\n );\n if (currentBrandPriceGrid)\n currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) =>\n price.idPrestationList.includes(idPrestationList),\n );\n return currentPriceGrid;\n};\n\nconst calculatePrestationPriceWithPriceGrid = (\n idPrestationList: number,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n isYearly: boolean /* Prestation annuel ou mensuel */,\n totalMonth: number /* Nbr de moiis offer */,\n idTaxSystem: number,\n idLegalForm: number,\n exerciceNbr: number,\n balanceSheetOffered: number = 0 /* montant du bilan offer */,\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let monthNbr: number = NbrMonth;\n let yearlyPrice: number | undefined;\n let finalMonthlyPrice: number | undefined;\n const canBeCreated: boolean = true;\n let recalculateMonthly: boolean = false;\n\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n\n if (currentPriceGrid) {\n let monthlyPrice: number | undefined;\n let vatRegimePrice: number | undefined;\n let taxSystemPrice: number | undefined;\n\n /* Gestion du régime de TVA */\n if (currentPriceGrid.vatRegimeMonthly && !isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find((regime) => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find((regime) => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem)\n taxSystemPrice = currentPriceGrid.taxSystem?.find((tax) => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n /* Récupératioin des prix mensuels */\n if (currentPriceGrid.turnoverMonthly && !isYearly)\n monthlyPrice = currentPriceGrid.turnoverMonthly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties)\n monthlyPrice = currentPriceGrid.properties?.find((property) => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) {\n monthlyPrice = currentPriceGrid.employee?.find(\n (emp) => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber,\n )?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n } else if (currentPriceGrid.employeeByLegalForm) {\n monthlyPrice = currentPriceGrid.employeeByLegalForm?.find((emp) => emp.idLegalForm === idLegalForm)?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n /* Récupération des prix annuels */\n } else if (currentPriceGrid.turnoverYearly && isYearly)\n yearlyPrice = currentPriceGrid.turnoverYearly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)\n yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)\n yearlyPrice = currentPriceGrid.turnoverPastYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner)\n yearlyPrice = currentPriceGrid.partner?.find(\n (part) => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber,\n )?.price;\n else if (currentPriceGrid.legalForm)\n yearlyPrice = currentPriceGrid.legalForm?.find((form) => form.idLegalForm === idLegalForm)?.price;\n else if (currentPriceGrid.exerciceNbr)\n yearlyPrice = currentPriceGrid.exerciceNbr?.find(\n (el) => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum,\n )?.price;\n /* Calcul du prix mensuel final */\n finalMonthlyPrice =\n (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);\n\n /* Gestion des mois */\n let cloturedPast: boolean = false;\n if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;\n let monthlyNbrList: monthlyNbr[] | undefined;\n let monthlyNbr: monthlyNbr | undefined;\n if (currentPriceGrid.monthlyNbr) {\n monthlyNbrList = currentPriceGrid.monthlyNbr?.filter((el) =>\n el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS),\n );\n if (monthlyNbrList) {\n monthlyNbr = monthlyNbrList.find((el) => el.minimum <= monthNbr && monthNbr <= el.maximum);\n if (monthlyNbr) {\n monthNbr = monthlyNbr.value;\n }\n }\n }\n\n /* Gestion des offres, mois offer */\n if (totalMonth > 0) {\n if (isYearly) {\n yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);\n monthNbr = monthNbr - totalMonth;\n } else {\n monthNbr = monthNbr - totalMonth;\n }\n }\n\n /* Calcul du nombre de mois soustraient */\n reduceMonth = monthNbr === NbrMonth - totalMonth ? totalMonth : 0;\n\n /* Gestion des offres, bilan offer */\n if (balanceSheetOffered > 0) {\n yearlyPrice = undefined;\n recalculateMonthly = false;\n finalMonthlyPrice = balanceSheetOffered / monthNbr;\n }\n\n /* Prix Final */\n totalPrestation = yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr;\n }\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr,\n price: yearlyPrice\n ? yearlyPrice\n : recalculateMonthly\n ? totalPrestation / monthNbr\n : finalMonthlyPrice\n ? finalMonthlyPrice\n : 0,\n };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList?.price || 0;\n\n return totalPrestation;\n};\n\nconst calculatePrestationPrice = (\n idPrestationList: number,\n prestationList: IPrestationList,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n optionsList: number[],\n totalPercentage: number /* total pourcentage offer (%) */,\n totalAmount: number /* total montant offer (€) */,\n totalMonth: number /* total mois offer (mois) */,\n idTaxSystem: number,\n idLegalForm: number,\n isYearly: boolean = false /* prestation annuel ou mensuel */,\n isSubPrestation: boolean = false,\n balanceSheetOffered: number = 0,\n exerciceList: IExercice[] = [],\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n calculDetail: string;\n monthlyPrice: string;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let canBeCreated: boolean = true;\n let monthNbr: number = 0;\n let price: number = 0;\n let totalWithReduce: {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n } = { totalPrestation: 0, reduceMonth: 0, canBeCreated: true, monthNbr: 0, price: 0 };\n\n /* Gestion du prix en fonction de la prestation */\n if (\n [\n PrestationType.COMPTA_PRO,\n PrestationType.COMPTA_PRO_EXPRESS,\n PrestationType.COMPTA_ENTREPRISE,\n PrestationType.COMPTA_ENTREPRISE_EXPRESS,\n PrestationType.COMPTA_SCI,\n PrestationType.COMPTA_SCI_EXPRESS,\n PrestationType.BILAN_PREVISIONNEL,\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n PrestationType.COMPTA_POURCENTAGE,\n PrestationType.COMPTA_POURCENTAGE_EXPRESS,\n PrestationType.SOCIAL,\n PrestationType.GESTION_JURIDIQUE,\n PrestationType.COMPTA_PRO_COMPTASTART,\n PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,\n PrestationType.COMPTA_EI_KLEMS,\n PrestationType.COMPTA_EI_KLEMS_EXPRESS,\n PrestationType.COMPTA_MICRO_KLEMS,\n PrestationType.COMPTA_MICRO_KLEMS_EXPRESS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS_EXPRESS,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.EI,\n PrestationType.MICRO,\n PrestationType.GESTION_IMMO,\n ].includes(idPrestationList)\n ) {\n let exerciceNbr: number = 0;\n if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);\n totalWithReduce = calculatePrestationPriceWithPriceGrid(\n idPrestationList,\n endDate,\n NbrMonth,\n turnover,\n rentsNumber,\n employeesNumber,\n associatesNumber,\n idTypeBrand,\n idVatRegime,\n pastBalanceSheet,\n isYearly,\n totalMonth,\n idTaxSystem,\n idLegalForm,\n exerciceNbr,\n balanceSheetOffered,\n );\n totalPrestation = totalWithReduce.totalPrestation;\n reduceMonth = totalWithReduce.reduceMonth;\n canBeCreated = totalWithReduce.canBeCreated;\n monthNbr = totalWithReduce.monthNbr;\n price = totalWithReduce.price;\n } else {\n totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);\n if ([PrestationType.CREATION_SOCIETE].includes(idPrestationList) && !isSubPrestation) {\n // totalPrestation += 50;\n // La création est offerte désormais\n // inutile d'ajouter les frais de greffe et d'annonce légale,\n // car ne compte pas dans le calcul pour les sales\n }\n }\n /* Gestion des offres */\n /* Offre montant offer */\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n /* Offre pourcentage offer */\n if (totalPercentage > 0) totalPrestation = totalPrestation - totalPrestation * (totalPercentage / 100);\n /* Gesstioin du prix minimum acceptable pour la prestation */\n if (prestationList && prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)\n totalPrestation = prestationList.minimumPrice;\n /* Gestion des options */\n let OptionTotalPrice: number = 0;\n if (optionsList.length) {\n optionsList.forEach((optionId) => {\n const optionPrice: number | undefined = Object.values(PrestationOption).find(\n (option) => option.id === optionId,\n )?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += OptionTotalPrice ? OptionTotalPrice : 0;\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + Math.round(price * 100) / 100 + '€' : Math.round(price * 100) / 100 + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''}`;\n\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n calculDetail,\n monthlyPrice: monthNbr > 0 ? Math.round(price * 100) / 100 + '€/mois' : Math.round(price * 100) / 100 + '€',\n price,\n };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter((option) =>\n option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)),\n );\n return PrestationOptionList.filter((option) => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (\n idTypeBrand: number,\n idPrestationList: number,\n turnover: number,\n pastBalanceSheet: boolean,\n): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n if (\n [\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n ].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n !pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover\n )\n return true;\n else return false;\n }\n return false;\n};\n\nconst idPrestationListToOfferType = (idPrestationList: number): 'software' | 'expertise' => {\n if (ClementineSubscriptionAccountancySoftwarePrestations.includes(idPrestationList)) return 'software';\n return 'expertise';\n};\n\nexport {\n isOtherAccountingMissions,\n isOtherJuridicalMissions,\n isAdditionalPresta,\n isOtherSocialMission,\n isOnlyPrevi,\n isOnlySocial,\n isOnlyJuridic,\n isCreation,\n isFromStatutsExpress,\n isExpress,\n isConsultingHour,\n isSoftwarePrestation,\n calculateScoringOfPrestation,\n calculatePrestationPrice,\n getPrestationOptions,\n isAbleToUpdatePrice,\n calculatePrestationPriceWithPriceGrid,\n idPrestationListToOfferType,\n};\n"]}
1
+ {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,oDAAoD,EACpD,gBAAgB,EAChB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAwB,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,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2B,GAC5B,CAAC","sourcesContent":["import { IExercice, IPrestation, IPrestationList } from '../types/index.js';\nimport { Vat } from '../types/Enum/Vat.js';\nimport { ReasonTerminationType } from '../types/Enum/ReasonTerminationType.js';\nimport { getTaxesIncludedAmount } from './vat/utils.js';\nimport { intersection } from './noLodash.js';\nimport {\n ClementineSubscriptionAccountancySoftwarePrestations,\n PrestationDetail,\n PrestationType,\n} from '../types/Enum/PrestationType.js';\nimport { LegalFormTypeEnum } from '../types/Enum/LegalForm.js';\nimport { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption.js';\nimport { PriceGridClementine } from '../types/Enum/PriceGridClementine.js';\nimport { PriceGridPourcentage } from '../types/Enum/PriceGridPourcentage.js';\nimport { PriceGridLegalstart } from '../types/Enum/PriceGridLegalstart.js';\nimport { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress.js';\nimport { ClosingType } from '../types/Enum/ClosingType.js';\nimport { getBrandNameByNodeEnv } from './brands.js';\nimport dayjs from 'dayjs';\nimport { exerciceNumber } from './exercice.js';\n\ntype priceGridBrand = {\n idTypeBrand: number;\n price: priceGrid[];\n};\n\ntype priceGrid = {\n idPrestationList: number[];\n priceWithTaxesIncluded: boolean;\n applicationCost: number;\n monthlyNbr?: monthlyNbr[];\n exerciceNbr?: exerciceNbr[];\n turnoverCreatedYear?: turnover[];\n turnoverPastYear?: turnover[];\n turnoverMonthly?: turnover[];\n turnoverYearly?: turnover[];\n employee?: employee[];\n partner?: employee[];\n properties?: propertie[];\n vatRegimeMonthly?: vatRegime[];\n vatRegimeYearly?: vatRegime[];\n taxSystem?: taxSystem[];\n legalForm?: legalForm[];\n employeeByLegalForm?: employeeByLegalForm[];\n};\n\ntype monthlyNbr = {\n minimum: number;\n maximum: number;\n value: number;\n closingType: number[];\n};\n\ntype exerciceNbr = {\n minimum: number;\n maximum: number;\n price: number;\n};\n\ntype turnover = {\n turnoverValue: number;\n price: number;\n};\n\ntype legalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype employee = {\n amountMinimum: number;\n amountMaximum: number;\n price: number;\n};\n\ntype employeeByLegalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype propertie = {\n amount: number;\n price: number;\n};\n\ntype vatRegime = {\n type: number;\n price: number;\n};\n\ntype taxSystem = {\n id: number;\n price: number;\n};\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean =>\n [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL,\n ].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique: boolean, isCatalog: boolean, idPrestationList: number): boolean =>\n idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean =>\n idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden: boolean, isCatalog: boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL),\n ).length;\n\nconst isOnlySocial = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [\n PrestationType.CREATION_SOCIETE,\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ]).length;\n\nconst isFromStatutsExpress = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ].includes(idPL),\n ).length;\n\nconst isExpress = (idPrestationList: number): boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr: any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst isConsultingHour = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.CONSULTING_HOUR]).length;\n\nconst isSoftwarePrestation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.STEERING, PrestationType.VAT, PrestationType.BALANCESHEET])\n .length; /* &&\n idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge\n\nconst calculateScoringOfPrestation = (\n idPrestationType: PrestationType,\n prestations: IPrestation[],\n currentIdPrestation: number,\n): number => {\n const prestationsSignedPaid = prestations.filter(\n (prestation) =>\n prestation.paid &&\n prestation.signed &&\n (prestation.terminationList === null ||\n prestation.terminationList?.idReasonTermination?.includes(ReasonTerminationType.CHANGES_NEW_OFFERS)) &&\n prestation.id !== currentIdPrestation,\n );\n\n const currentPrestation = prestations.find(\n (el) => el.idPrestationList === idPrestationType && el.terminationList === null,\n );\n\n // SPECIAL CASE:\n // If current prestation is a software prestation\n // and the current prestation is an annual payment, return 0 point\n if (\n isSoftwarePrestation([idPrestationType]) &&\n currentPrestation?.exercices?.length &&\n //@ts-expect-error\n (currentPrestation?.exercices[0].ExercicePrestation?.totalPrestation < 72 ||\n //@ts-expect-error\n currentPrestation?.exercices[0].ExercicePrestation?.monthNumber !== 1)\n ) {\n return 0;\n }\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter(\n (p) =>\n p.isComptable &&\n !p.isCatalog &&\n p.id &&\n ![PrestationType.BALANCESHEET, PrestationType.VAT, PrestationType.STEERING].includes(p.id),\n );\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the new prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n let numberPoint = prestaDetails?.point || 0;\n\n // For each back exercices, add 100 points\n // -> for new prestations only\n if (\n [\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.GESTION_IMMO,\n PrestationType.EI,\n PrestationType.MICRO,\n ].includes(idPrestationType) &&\n currentPrestation?.exercices?.length &&\n currentPrestation?.exercices.find((el) => el.isBack)\n ) {\n numberPoint += (currentPrestation?.exercices.filter((el) => el.isBack).length ?? 1) * 100;\n }\n\n // Get list of prestations that are already done\n // and check if one of them is in the list of prestations that are half price\n const prestationsExistIds = prestationsSignedPaid.map((prestation) => prestation.idPrestationList);\n const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));\n\n // If one of the prestations already done is in the list of prestations that are half price and if the idPrestationType is in prestationHalfPriceIds, return 50% of points\n if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType))\n return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nexport const calculateMonthlyAmount = (params: {\n monthlyPrice: number;\n monthNumber: number;\n monthOffer: number;\n idVatForInternalInvoicing?: number | null;\n returnTaxesIncludedValue?: boolean;\n}): number => {\n const { monthlyPrice, monthNumber, monthOffer, idVatForInternalInvoicing, returnTaxesIncludedValue = true } = params;\n\n if (!idVatForInternalInvoicing && returnTaxesIncludedValue)\n throw new Error('Taux de TVA manquant pour calculer le montant TTC');\n\n if (!idVatForInternalInvoicing || !returnTaxesIncludedValue) return monthlyPrice * (monthNumber - monthOffer);\n\n return (\n monthlyPrice *\n (monthNumber - monthOffer) *\n (1 + Object.values(Vat).find((el) => el.id === idVatForInternalInvoicing).value / 100)\n );\n};\n\nexport const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid | undefined => {\n let currentBrandPriceGrid: priceGridBrand | undefined;\n let currentPriceGrid: priceGrid | undefined;\n\n const currentEnvName = getBrandNameByNodeEnv(process.env.NODE_ENV);\n const listEnvEnum = {\n PriceGridClementine,\n PriceGridPourcentage,\n PriceGridLegalstart,\n PriceGridStatutsExpress,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile)\n currentBrandPriceGrid = currentPriceGridFile.find(\n (priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand,\n );\n if (currentBrandPriceGrid)\n currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) =>\n price.idPrestationList.includes(idPrestationList),\n );\n return currentPriceGrid;\n};\n\nconst calculatePrestationPriceWithPriceGrid = (\n idPrestationList: number,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n isYearly: boolean /* Prestation annuel ou mensuel */,\n totalMonth: number /* Nbr de moiis offer */,\n idTaxSystem: number,\n idLegalForm: number,\n exerciceNbr: number,\n balanceSheetOffered: number = 0 /* montant du bilan offer */,\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let monthNbr: number = NbrMonth;\n let yearlyPrice: number | undefined;\n let finalMonthlyPrice: number | undefined;\n const canBeCreated: boolean = true;\n let recalculateMonthly: boolean = false;\n\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n\n if (currentPriceGrid) {\n let monthlyPrice: number | undefined;\n let vatRegimePrice: number | undefined;\n let taxSystemPrice: number | undefined;\n\n /* Gestion du régime de TVA */\n if (currentPriceGrid.vatRegimeMonthly && !isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find((regime) => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find((regime) => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem)\n taxSystemPrice = currentPriceGrid.taxSystem?.find((tax) => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n /* Récupératioin des prix mensuels */\n if (currentPriceGrid.turnoverMonthly && !isYearly)\n monthlyPrice = currentPriceGrid.turnoverMonthly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties)\n monthlyPrice = currentPriceGrid.properties?.find((property) => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) {\n monthlyPrice = currentPriceGrid.employee?.find(\n (emp) => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber,\n )?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n } else if (currentPriceGrid.employeeByLegalForm) {\n monthlyPrice = currentPriceGrid.employeeByLegalForm?.find((emp) => emp.idLegalForm === idLegalForm)?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n /* Récupération des prix annuels */\n } else if (currentPriceGrid.turnoverYearly && isYearly)\n yearlyPrice = currentPriceGrid.turnoverYearly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)\n yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)\n yearlyPrice = currentPriceGrid.turnoverPastYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner)\n yearlyPrice = currentPriceGrid.partner?.find(\n (part) => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber,\n )?.price;\n else if (currentPriceGrid.legalForm)\n yearlyPrice = currentPriceGrid.legalForm?.find((form) => form.idLegalForm === idLegalForm)?.price;\n else if (currentPriceGrid.exerciceNbr)\n yearlyPrice = currentPriceGrid.exerciceNbr?.find(\n (el) => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum,\n )?.price;\n /* Calcul du prix mensuel final */\n finalMonthlyPrice =\n (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);\n\n /* Gestion des mois */\n let cloturedPast: boolean = false;\n if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;\n let monthlyNbrList: monthlyNbr[] | undefined;\n let monthlyNbr: monthlyNbr | undefined;\n if (currentPriceGrid.monthlyNbr) {\n monthlyNbrList = currentPriceGrid.monthlyNbr?.filter((el) =>\n el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS),\n );\n if (monthlyNbrList) {\n monthlyNbr = monthlyNbrList.find((el) => el.minimum <= monthNbr && monthNbr <= el.maximum);\n if (monthlyNbr) {\n monthNbr = monthlyNbr.value;\n }\n }\n }\n\n /* Gestion des offres, mois offer */\n if (totalMonth > 0) {\n if (isYearly) {\n yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);\n monthNbr = monthNbr - totalMonth;\n } else {\n monthNbr = monthNbr - totalMonth;\n }\n }\n\n /* Calcul du nombre de mois soustraient */\n reduceMonth = monthNbr === NbrMonth - totalMonth ? totalMonth : 0;\n\n /* Gestion des offres, bilan offer */\n if (balanceSheetOffered > 0) {\n yearlyPrice = undefined;\n recalculateMonthly = false;\n finalMonthlyPrice = balanceSheetOffered / monthNbr;\n }\n\n /* Prix Final */\n totalPrestation = yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr;\n }\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr,\n price: yearlyPrice\n ? yearlyPrice\n : recalculateMonthly\n ? totalPrestation / monthNbr\n : finalMonthlyPrice\n ? finalMonthlyPrice\n : 0,\n };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList?.price || 0;\n\n return totalPrestation;\n};\n\n/**\n * From idLegalForm, get application fees amount (without taxes included if no idVat passed, or with taxes included calculated by given idVat)\n * @param idLegalForm\n * @param idVat\n * @returns amount of application fees, without taxes included\n * @deprecated Application fees are not charged anymore\n */\nconst getApplicationFeesAmount = (idLegalForm: number, idVat?: number) => {\n let applicationFeesAmount = 50;\n if (idLegalForm === LegalFormTypeEnum.SCI) applicationFeesAmount = 150;\n\n //Sans tva, on envoie le montant HT\n if (!idVat) return applicationFeesAmount;\n\n //Avec tva, on envoie le montant TTC\n return getTaxesIncludedAmount(applicationFeesAmount, idVat);\n};\n\nconst calculatePrestationPrice = (\n idPrestationList: number,\n prestationList: IPrestationList,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n optionsList: number[],\n totalPercentage: number /* total pourcentage offer (%) */,\n totalAmount: number /* total montant offer (€) */,\n totalMonth: number /* total mois offer (mois) */,\n isWithApplicationFees: boolean /* frais de dossier */,\n idTaxSystem: number,\n idLegalForm: number,\n isYearly: boolean = false /* prestation annuel ou mensuel */,\n isSubPrestation: boolean = false,\n balanceSheetOffered: number = 0,\n exerciceList: IExercice[] = [],\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n calculDetail: string;\n monthlyPrice: string;\n price: number;\n} => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let canBeCreated: boolean = true;\n let monthNbr: number = 0;\n let price: number = 0;\n let totalWithReduce: {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n } = { totalPrestation: 0, reduceMonth: 0, canBeCreated: true, monthNbr: 0, price: 0 };\n\n /* Gestion du prix en fonction de la prestation */\n if (\n [\n PrestationType.COMPTA_PRO,\n PrestationType.COMPTA_PRO_EXPRESS,\n PrestationType.COMPTA_ENTREPRISE,\n PrestationType.COMPTA_ENTREPRISE_EXPRESS,\n PrestationType.COMPTA_SCI,\n PrestationType.COMPTA_SCI_EXPRESS,\n PrestationType.BILAN_PREVISIONNEL,\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n PrestationType.COMPTA_POURCENTAGE,\n PrestationType.COMPTA_POURCENTAGE_EXPRESS,\n PrestationType.SOCIAL,\n PrestationType.GESTION_JURIDIQUE,\n PrestationType.COMPTA_PRO_COMPTASTART,\n PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,\n PrestationType.COMPTA_EI_KLEMS,\n PrestationType.COMPTA_EI_KLEMS_EXPRESS,\n PrestationType.COMPTA_MICRO_KLEMS,\n PrestationType.COMPTA_MICRO_KLEMS_EXPRESS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS_EXPRESS,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.EI,\n PrestationType.MICRO,\n PrestationType.GESTION_IMMO,\n ].includes(idPrestationList)\n ) {\n let exerciceNbr: number = 0;\n if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);\n totalWithReduce = calculatePrestationPriceWithPriceGrid(\n idPrestationList,\n endDate,\n NbrMonth,\n turnover,\n rentsNumber,\n employeesNumber,\n associatesNumber,\n idTypeBrand,\n idVatRegime,\n pastBalanceSheet,\n isYearly,\n totalMonth,\n idTaxSystem,\n idLegalForm,\n exerciceNbr,\n balanceSheetOffered,\n );\n totalPrestation = totalWithReduce.totalPrestation;\n reduceMonth = totalWithReduce.reduceMonth;\n canBeCreated = totalWithReduce.canBeCreated;\n monthNbr = totalWithReduce.monthNbr;\n price = totalWithReduce.price;\n } else {\n totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);\n if ([PrestationType.CREATION_SOCIETE].includes(idPrestationList) && !isSubPrestation) {\n // totalPrestation += 50;\n // La création est offerte désormais\n // inutile d'ajouter les frais de greffe et d'annonce légale,\n // car ne compte pas dans le calcul pour les sales\n }\n }\n /* Gestion des offres */\n /* Offre montant offer */\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n /* Offre pourcentage offer */\n if (totalPercentage > 0) totalPrestation = totalPrestation - totalPrestation * (totalPercentage / 100);\n /* Gesstioin du prix minimum acceptable pour la prestation */\n if (prestationList && prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)\n totalPrestation = prestationList.minimumPrice;\n /* Gestion des options */\n let OptionTotalPrice: number = 0;\n if (optionsList.length) {\n optionsList.forEach((optionId) => {\n const optionPrice: number | undefined = Object.values(PrestationOption).find(\n (option) => option.id === optionId,\n )?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += OptionTotalPrice ? OptionTotalPrice : 0;\n /* Gestion des frais de dossier */\n // if (isWithApplicationFees) {\n // const applicationFeesAmount = getApplicationFeesAmount(idLegalForm);\n // totalPrestation += applicationFeesAmount;\n // }\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + Math.round(price * 100) / 100 + '€' : Math.round(price * 100) / 100 + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;\n\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n calculDetail,\n monthlyPrice: monthNbr > 0 ? Math.round(price * 100) / 100 + '€/mois' : Math.round(price * 100) / 100 + '€',\n price,\n };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter((option) =>\n option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)),\n );\n return PrestationOptionList.filter((option) => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (\n idTypeBrand: number,\n idPrestationList: number,\n turnover: number,\n pastBalanceSheet: boolean,\n): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n if (\n [\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n ].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n !pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover\n )\n return true;\n else return false;\n }\n return false;\n};\n\nconst idPrestationListToOfferType = (idPrestationList: number): 'software' | 'expertise' => {\n if (ClementineSubscriptionAccountancySoftwarePrestations.includes(idPrestationList)) return 'software';\n return 'expertise';\n};\n\nexport {\n isOtherAccountingMissions,\n isOtherJuridicalMissions,\n isAdditionalPresta,\n isOtherSocialMission,\n isOnlyPrevi,\n isOnlySocial,\n isOnlyJuridic,\n isCreation,\n isFromStatutsExpress,\n isExpress,\n isConsultingHour,\n isSoftwarePrestation,\n calculateScoringOfPrestation,\n calculatePrestationPrice,\n getPrestationOptions,\n isAbleToUpdatePrice,\n calculatePrestationPriceWithPriceGrid,\n getApplicationFeesAmount,\n idPrestationListToOfferType,\n};\n"]}
@@ -14,6 +14,13 @@ export declare function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallbac
14
14
  * @returns La configuration des documents ou undefined si non trouvée
15
15
  */
16
16
  export declare function getApprovalDocumentsByLegalForm(idLegalForm: LegalFormTypeEnum): SocietyApprovalDocumentConfig | undefined;
17
+ /**
18
+ * Récupère le nom du template pour un document spécifique et une forme juridique
19
+ * @param idLegalForm - L'identifiant de la forme juridique
20
+ * @param idDocumentType - Le type de document d'approbation
21
+ * @returns Le nom du template ou undefined si non trouvé
22
+ */
23
+ export declare function getApprovalDocumentTemplateName(idLegalForm: LegalFormTypeEnum, idDocumentType: SocietyApprovalDocumentType): string | undefined;
17
24
  /**
18
25
  * Récupère le nom du template pour un document spécifique et une forme juridique
19
26
  * @param idLegalForm - L'identifiant de la forme juridique
@@ -1 +1 @@
1
- {"version":3,"file":"societyApproval.d.ts","sourceRoot":"","sources":["../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAEL,2BAA2B,EAC3B,6BAA6B,EAE7B,+BAA+B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AiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,+BAA+B,GAAG,SAAS,CAG7C;AAYD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAoFhH"}
@@ -23,6 +23,18 @@ export function getLegalFormName(idLegalForm, fallback = '') {
23
23
  export function getApprovalDocumentsByLegalForm(idLegalForm) {
24
24
  return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);
25
25
  }
26
+ /**
27
+ * Récupère le nom du template pour un document spécifique et une forme juridique
28
+ * @param idLegalForm - L'identifiant de la forme juridique
29
+ * @param idDocumentType - Le type de document d'approbation
30
+ * @returns Le nom du template ou undefined si non trouvé
31
+ */
32
+ //@deprecated use getApprovalDocumentInfos instead
33
+ export function getApprovalDocumentTemplateName(idLegalForm, idDocumentType) {
34
+ const config = getApprovalDocumentsByLegalForm(idLegalForm);
35
+ const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);
36
+ return document?.templateName;
37
+ }
26
38
  /**
27
39
  * Récupère le texte de la ville du greffe
28
40
  * @param idCityOfGreffe - L'identifiant de la ville du greffe
@@ -1 +1 @@
1
- {"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EACL,qBAAqB,EAGrB,mCAAmC,GAEpC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,O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\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval.js';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval.js';\nimport { QualityList } from '../types/Enum/Quality.js';\nimport { getBrand } from './brands.js';\nimport { convertNumberToLetter } from './amount.js';\nimport dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe.js';\nimport { siretToSiren } from './siretValidation.js';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\nfunction createApprovalDecisionTitleGenerator(): () => string {\n const decisionOrdinals = ['PREMIERE', 'DEUXIEME', 'TROISIEME', 'QUATRIEME', 'CINQUIEME', 'SIXIEME'];\n let decisionNumber = 0;\n\n return () => {\n decisionNumber += 1;\n return `${decisionOrdinals[decisionNumber - 1] ?? `${decisionNumber}EME`} DECISION`;\n };\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(\n +dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('YYYY'),\n ).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('D'))} ${dayjs(\n existingApproval?.generatingDatas?.approvalDate || null,\n )\n .locale('fr')\n .format('MMMM')\n .toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n AdditionalMentionType,\n nextDecisionTitle: createApprovalDecisionTitleGenerator(),\n rates: {\n flatTax: 0.314,\n flatLevy: 0.128, //prelevement forfaitaire\n csg: 0.106,\n solidarity: 0.075,\n crds: 0.005,\n socialSecurityContributions: 0.186, //= csg + solidarity + crds\n },\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDateMore4Months: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .add(4, 'month')\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? (siretToSiren(existingApproval.exercice.society.siret)?.replace(/(\\d{3})(\\d{3})(\\d{3})/, '$1 $2 $3') ??\n null)\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
1
+ {"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EACL,qBAAqB,EAGrB,mCAAmC,GAEpC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD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;gBACpG,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK;oBAC/C,CAAC,CAAC,CAAC,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,EAAE,UAAU,CAAC;wBACpG,IAAI,CAAC;oBACP,CAAC,CAAC,IAAI;aACT;YACD,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;SACtG;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm.js';\nimport {\n AdditionalMentionType,\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval.js';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval.js';\nimport { QualityList } from '../types/Enum/Quality.js';\nimport { getBrand } from './brands.js';\nimport { convertNumberToLetter } from './amount.js';\nimport dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe.js';\nimport { siretToSiren } from './siretValidation.js';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\nfunction createApprovalDecisionTitleGenerator(): () => string {\n const decisionOrdinals = ['PREMIERE', 'DEUXIEME', 'TROISIEME', 'QUATRIEME', 'CINQUIEME', 'SIXIEME'];\n let decisionNumber = 0;\n\n return () => {\n decisionNumber += 1;\n return `${decisionOrdinals[decisionNumber - 1] ?? `${decisionNumber}EME`} DECISION`;\n };\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(\n +dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('YYYY'),\n ).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('D'))} ${dayjs(\n existingApproval?.generatingDatas?.approvalDate || null,\n )\n .locale('fr')\n .format('MMMM')\n .toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n AdditionalMentionType,\n nextDecisionTitle: createApprovalDecisionTitleGenerator(),\n rates: {\n flatTax: 0.314,\n flatLevy: 0.128, //prelevement forfaitaire\n csg: 0.106,\n solidarity: 0.075,\n crds: 0.005,\n socialSecurityContributions: 0.186, //= csg + solidarity + crds\n },\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDateMore4Months: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .add(4, 'month')\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? (siretToSiren(existingApproval.exercice.society.siret)?.replace(/(\\d{3})(\\d{3})(\\d{3})/, '$1 $2 $3') ??\n null)\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
@@ -85,6 +85,8 @@ describe('Payment', () => {
85
85
  idTypeBrand: 1,
86
86
  firstExerciceNonExpresssEndDate,
87
87
  idPrestation,
88
+ // isWithApplicationFees: true,
89
+ // idLegalForm: LegalFormTypeEnum.SARL,
88
90
  prestationList: {
89
91
  ...prestationList,
90
92
  isCatalog: true,
@@ -114,6 +116,8 @@ describe('Payment', () => {
114
116
  idTypeBrand: 1,
115
117
  firstExerciceNonExpresssEndDate,
116
118
  idPrestation,
119
+ // isWithApplicationFees: true,
120
+ // idLegalForm: LegalFormTypeEnum.SARL,
117
121
  prestationList,
118
122
  idVat,
119
123
  listPartialExercicePrestationExpress: [listPartialExercicePrestationExpress[0]],
@@ -132,6 +136,8 @@ describe('Payment', () => {
132
136
  idTypeBrand: 1,
133
137
  firstExerciceNonExpresssEndDate,
134
138
  idPrestation,
139
+ // isWithApplicationFees: true,
140
+ // idLegalForm: LegalFormTypeEnum.SARL,
135
141
  prestationList,
136
142
  idVat,
137
143
  listPartialExercicePrestationExpress,
@@ -157,6 +163,8 @@ describe('Payment', () => {
157
163
  idTypeBrand: 1,
158
164
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
159
165
  idPrestation,
166
+ // isWithApplicationFees: true,
167
+ // idLegalForm: LegalFormTypeEnum.SARL,
160
168
  prestationList,
161
169
  idVat,
162
170
  listPartialExercicePrestationExpress: [],
@@ -183,6 +191,8 @@ describe('Payment', () => {
183
191
  idTypeBrand: 1,
184
192
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
185
193
  idPrestation,
194
+ // isWithApplicationFees: true,
195
+ // idLegalForm: LegalFormTypeEnum.SARL,
186
196
  prestationList,
187
197
  idVat,
188
198
  listPartialExercicePrestationExpress: [],
@@ -215,6 +225,8 @@ describe('Payment', () => {
215
225
  idTypeBrand: 1,
216
226
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
217
227
  idPrestation,
228
+ // isWithApplicationFees: false,
229
+ // idLegalForm: LegalFormTypeEnum.SARL,
218
230
  prestationList,
219
231
  idVat,
220
232
  listPartialExercicePrestationExpress: [],
@@ -243,6 +255,8 @@ describe('Payment', () => {
243
255
  idTypeBrand: 1,
244
256
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
245
257
  idPrestation,
258
+ // isWithApplicationFees: false,
259
+ // idLegalForm: LegalFormTypeEnum.SARL,
246
260
  prestationList,
247
261
  idVat,
248
262
  listPartialExercicePrestationExpress: [],
@@ -266,6 +280,8 @@ describe('Payment', () => {
266
280
  idTypeBrand: 1,
267
281
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
268
282
  idPrestation,
283
+ // isWithApplicationFees: true,
284
+ // idLegalForm: LegalFormTypeEnum.SARL,
269
285
  prestationList,
270
286
  idVat,
271
287
  listPartialExercicePrestationExpress: [],
@@ -293,6 +309,8 @@ describe('Payment', () => {
293
309
  idTypeBrand: 1,
294
310
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
295
311
  idPrestation,
312
+ // isWithApplicationFees: true,
313
+ // idLegalForm: LegalFormTypeEnum.SARL,
296
314
  prestationList,
297
315
  idVat,
298
316
  listPartialExercicePrestationExpress: [],
@@ -319,6 +337,8 @@ describe('Payment', () => {
319
337
  idTypeBrand: 1,
320
338
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
321
339
  idPrestation,
340
+ // isWithApplicationFees: false,
341
+ // idLegalForm: LegalFormTypeEnum.SARL,
322
342
  prestationList,
323
343
  idVat,
324
344
  listPartialExercicePrestationExpress: [],
@@ -353,6 +373,8 @@ describe('Payment', () => {
353
373
  idTypeBrand: 1,
354
374
  firstExerciceNonExpresssEndDate,
355
375
  idPrestation,
376
+ // isWithApplicationFees: true,
377
+ // idLegalForm: LegalFormTypeEnum.SARL,
356
378
  prestationList,
357
379
  idVat,
358
380
  listPartialExercicePrestationExpress: listPartialExercicePrestationExpressCloned,
@@ -373,6 +395,8 @@ describe('Payment', () => {
373
395
  idTypeBrand: 1,
374
396
  firstExerciceNonExpresssEndDate,
375
397
  idPrestation,
398
+ // isWithApplicationFees: false,
399
+ // idLegalForm: LegalFormTypeEnum.SARL,
376
400
  prestationList,
377
401
  idVat,
378
402
  listPartialExercicePrestationExpress,
@@ -413,6 +437,8 @@ describe('Payment', () => {
413
437
  idTypeBrand: 1,
414
438
  firstExerciceNonExpresssEndDate,
415
439
  idPrestation,
440
+ // isWithApplicationFees: false,
441
+ // idLegalForm: LegalFormTypeEnum.SARL,
416
442
  prestationList,
417
443
  idVat,
418
444
  listPartialExercicePrestationExpress,
@@ -434,6 +460,8 @@ describe('Payment', () => {
434
460
  idTypeBrand: 1,
435
461
  firstExerciceNonExpresssEndDate,
436
462
  idPrestation,
463
+ // isWithApplicationFees: true,
464
+ // idLegalForm: LegalFormTypeEnum.SARL,
437
465
  prestationList,
438
466
  idVat,
439
467
  listPartialExercicePrestationExpress,
@@ -452,6 +480,8 @@ describe('Payment', () => {
452
480
  idTypeBrand: 1,
453
481
  firstExerciceNonExpresssEndDate,
454
482
  idPrestation,
483
+ // isWithApplicationFees: true,
484
+ // idLegalForm: LegalFormTypeEnum.SARL,
455
485
  prestationList,
456
486
  idVat,
457
487
  listPartialExercicePrestationExpress: [],
@@ -468,6 +498,8 @@ describe('Payment', () => {
468
498
  idTypeBrand: 1,
469
499
  firstExerciceNonExpresssEndDate: dayjs('2024-12-31').toDate(),
470
500
  idPrestation,
501
+ // isWithApplicationFees: true,
502
+ // idLegalForm: LegalFormTypeEnum.SARL,
471
503
  prestationList,
472
504
  idVat: Vat.TX_20.id,
473
505
  listPartialExercicePrestationExpress: [],