@silexpert/core 1.2.11 → 1.2.15

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 (201) hide show
  1. package/dist/cjs/api/resources/FIle.d.ts +1 -0
  2. package/dist/cjs/api/resources/FIle.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/FIle.js +3 -0
  4. package/dist/cjs/api/resources/FIle.js.map +1 -1
  5. package/dist/cjs/api/resources/Society.d.ts +3 -2
  6. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Society.js +6 -3
  8. package/dist/cjs/api/resources/Society.js.map +1 -1
  9. package/dist/cjs/api/resources/Wallet.d.ts +2 -1
  10. package/dist/cjs/api/resources/Wallet.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/Wallet.js +3 -0
  12. package/dist/cjs/api/resources/Wallet.js.map +1 -1
  13. package/dist/cjs/types/Enum/BalanceSheet.d.ts +2 -0
  14. package/dist/cjs/types/Enum/BalanceSheet.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/BalanceSheet.js +3 -1
  16. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  17. package/dist/cjs/types/Enum/BrandClementine.js +1 -1
  18. package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
  19. package/dist/cjs/types/Enum/BrandLegalstart.js +1 -1
  20. package/dist/cjs/types/Enum/BrandLegalstart.js.map +1 -1
  21. package/dist/cjs/types/Enum/ReasonTerminationType.d.ts +2 -1
  22. package/dist/cjs/types/Enum/ReasonTerminationType.d.ts.map +1 -1
  23. package/dist/cjs/types/Enum/ReasonTerminationType.js +6 -0
  24. package/dist/cjs/types/Enum/ReasonTerminationType.js.map +1 -1
  25. package/dist/cjs/types/Enum/Sepa.d.ts +7 -0
  26. package/dist/cjs/types/Enum/Sepa.d.ts.map +1 -0
  27. package/dist/cjs/types/Enum/Sepa.js +46 -0
  28. package/dist/cjs/types/Enum/Sepa.js.map +1 -0
  29. package/dist/cjs/types/Enum/StatusRating.d.ts.map +1 -1
  30. package/dist/cjs/types/Enum/StatusRating.js +1 -0
  31. package/dist/cjs/types/Enum/StatusRating.js.map +1 -1
  32. package/dist/cjs/types/Enum/TimeCounterType.d.ts +8 -0
  33. package/dist/cjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  34. package/dist/cjs/types/Enum/TimeCounterType.js +8 -0
  35. package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
  36. package/dist/cjs/types/Enum/UnpaidReason.d.ts +12 -0
  37. package/dist/cjs/types/Enum/UnpaidReason.d.ts.map +1 -0
  38. package/dist/cjs/types/Enum/UnpaidReason.js +34 -0
  39. package/dist/cjs/types/Enum/UnpaidReason.js.map +1 -0
  40. package/dist/cjs/types/Interface/api/cerfa/2035.d.ts +2 -0
  41. package/dist/cjs/types/Interface/api/cerfa/2035.d.ts.map +1 -1
  42. package/dist/cjs/types/Interface/api/cerfa/2035.js.map +1 -1
  43. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts +1 -0
  44. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts.map +1 -1
  45. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js +6 -0
  46. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js.map +1 -1
  47. package/dist/cjs/types/Interface/api/society/QueryUnpaid.d.ts +10 -0
  48. package/dist/cjs/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -0
  49. package/dist/cjs/types/Interface/api/society/QueryUnpaid.js +62 -0
  50. package/dist/cjs/types/Interface/api/society/QueryUnpaid.js.map +1 -0
  51. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts +5 -0
  52. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts.map +1 -0
  53. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.js +3 -0
  54. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.js.map +1 -0
  55. package/dist/cjs/types/Interface/api/society/UpdateSociety.d.ts +1 -0
  56. package/dist/cjs/types/Interface/api/society/UpdateSociety.d.ts.map +1 -1
  57. package/dist/cjs/types/Interface/api/society/UpdateSociety.js +7 -0
  58. package/dist/cjs/types/Interface/api/society/UpdateSociety.js.map +1 -1
  59. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js +2 -2
  60. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  61. package/dist/cjs/types/Interface/models/IPaymentRecovery.d.ts +0 -3
  62. package/dist/cjs/types/Interface/models/IPaymentRecovery.d.ts.map +1 -1
  63. package/dist/cjs/types/Interface/models/IPaymentRecovery.js.map +1 -1
  64. package/dist/cjs/types/index.d.ts +4 -0
  65. package/dist/cjs/types/index.d.ts.map +1 -1
  66. package/dist/cjs/types/index.js +4 -0
  67. package/dist/cjs/types/index.js.map +1 -1
  68. package/dist/cjs/utils/brands.d.ts +1 -0
  69. package/dist/cjs/utils/brands.d.ts.map +1 -1
  70. package/dist/cjs/utils/brands.js.map +1 -1
  71. package/dist/cjs/utils/checklist.d.ts.map +1 -1
  72. package/dist/cjs/utils/checklist.js +0 -4
  73. package/dist/cjs/utils/checklist.js.map +1 -1
  74. package/dist/cjs/utils/commercialManagement/recovery.d.ts +5 -0
  75. package/dist/cjs/utils/commercialManagement/recovery.d.ts.map +1 -1
  76. package/dist/cjs/utils/commercialManagement/recovery.js +5 -0
  77. package/dist/cjs/utils/commercialManagement/recovery.js.map +1 -1
  78. package/dist/cjs/utils/documents.d.ts.map +1 -1
  79. package/dist/cjs/utils/documents.js +1 -4
  80. package/dist/cjs/utils/documents.js.map +1 -1
  81. package/dist/cjs/utils/payment.d.ts.map +1 -1
  82. package/dist/cjs/utils/payment.js +8 -1
  83. package/dist/cjs/utils/payment.js.map +1 -1
  84. package/dist/cjs/utils/vat/3310/century23.js +1 -1
  85. package/dist/cjs/utils/vat/3310/century23.js.map +1 -1
  86. package/dist/cjs/utils/vat/3310/century24.js +1 -1
  87. package/dist/cjs/utils/vat/3310/century24.js.map +1 -1
  88. package/dist/mjs/api/resources/FIle.d.ts +1 -0
  89. package/dist/mjs/api/resources/FIle.d.ts.map +1 -1
  90. package/dist/mjs/api/resources/FIle.js +3 -0
  91. package/dist/mjs/api/resources/FIle.js.map +1 -1
  92. package/dist/mjs/api/resources/Society.d.ts +3 -2
  93. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  94. package/dist/mjs/api/resources/Society.js +11 -3
  95. package/dist/mjs/api/resources/Society.js.map +1 -1
  96. package/dist/mjs/api/resources/Wallet.d.ts +2 -1
  97. package/dist/mjs/api/resources/Wallet.d.ts.map +1 -1
  98. package/dist/mjs/api/resources/Wallet.js +6 -0
  99. package/dist/mjs/api/resources/Wallet.js.map +1 -1
  100. package/dist/mjs/types/Enum/BalanceSheet.d.ts +2 -0
  101. package/dist/mjs/types/Enum/BalanceSheet.d.ts.map +1 -1
  102. package/dist/mjs/types/Enum/BalanceSheet.js +3 -1
  103. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  104. package/dist/mjs/types/Enum/BrandClementine.js +1 -1
  105. package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
  106. package/dist/mjs/types/Enum/BrandLegalstart.js +1 -1
  107. package/dist/mjs/types/Enum/BrandLegalstart.js.map +1 -1
  108. package/dist/mjs/types/Enum/ReasonTerminationType.d.ts +2 -1
  109. package/dist/mjs/types/Enum/ReasonTerminationType.d.ts.map +1 -1
  110. package/dist/mjs/types/Enum/ReasonTerminationType.js +6 -0
  111. package/dist/mjs/types/Enum/ReasonTerminationType.js.map +1 -1
  112. package/dist/mjs/types/Enum/Sepa.d.ts +7 -0
  113. package/dist/mjs/types/Enum/Sepa.d.ts.map +1 -0
  114. package/dist/mjs/types/Enum/Sepa.js +43 -0
  115. package/dist/mjs/types/Enum/Sepa.js.map +1 -0
  116. package/dist/mjs/types/Enum/StatusRating.d.ts.map +1 -1
  117. package/dist/mjs/types/Enum/StatusRating.js +1 -0
  118. package/dist/mjs/types/Enum/StatusRating.js.map +1 -1
  119. package/dist/mjs/types/Enum/TimeCounterType.d.ts +8 -0
  120. package/dist/mjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  121. package/dist/mjs/types/Enum/TimeCounterType.js +8 -0
  122. package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
  123. package/dist/mjs/types/Enum/UnpaidReason.d.ts +12 -0
  124. package/dist/mjs/types/Enum/UnpaidReason.d.ts.map +1 -0
  125. package/dist/mjs/types/Enum/UnpaidReason.js +31 -0
  126. package/dist/mjs/types/Enum/UnpaidReason.js.map +1 -0
  127. package/dist/mjs/types/Interface/api/cerfa/2035.d.ts +2 -0
  128. package/dist/mjs/types/Interface/api/cerfa/2035.d.ts.map +1 -1
  129. package/dist/mjs/types/Interface/api/cerfa/2035.js.map +1 -1
  130. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts +1 -0
  131. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts.map +1 -1
  132. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js +7 -0
  133. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js.map +1 -1
  134. package/dist/mjs/types/Interface/api/society/QueryUnpaid.d.ts +10 -0
  135. package/dist/mjs/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -0
  136. package/dist/mjs/types/Interface/api/society/QueryUnpaid.js +65 -0
  137. package/dist/mjs/types/Interface/api/society/QueryUnpaid.js.map +1 -0
  138. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts +5 -0
  139. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts.map +1 -0
  140. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.js +2 -0
  141. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.js.map +1 -0
  142. package/dist/mjs/types/Interface/api/society/UpdateSociety.d.ts +1 -0
  143. package/dist/mjs/types/Interface/api/society/UpdateSociety.d.ts.map +1 -1
  144. package/dist/mjs/types/Interface/api/society/UpdateSociety.js +9 -1
  145. package/dist/mjs/types/Interface/api/society/UpdateSociety.js.map +1 -1
  146. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js +2 -2
  147. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  148. package/dist/mjs/types/Interface/models/IPaymentRecovery.d.ts +0 -3
  149. package/dist/mjs/types/Interface/models/IPaymentRecovery.d.ts.map +1 -1
  150. package/dist/mjs/types/Interface/models/IPaymentRecovery.js.map +1 -1
  151. package/dist/mjs/types/index.d.ts +4 -0
  152. package/dist/mjs/types/index.d.ts.map +1 -1
  153. package/dist/mjs/types/index.js +4 -0
  154. package/dist/mjs/types/index.js.map +1 -1
  155. package/dist/mjs/utils/brands.d.ts +1 -0
  156. package/dist/mjs/utils/brands.d.ts.map +1 -1
  157. package/dist/mjs/utils/brands.js.map +1 -1
  158. package/dist/mjs/utils/checklist.d.ts.map +1 -1
  159. package/dist/mjs/utils/checklist.js +0 -4
  160. package/dist/mjs/utils/checklist.js.map +1 -1
  161. package/dist/mjs/utils/commercialManagement/recovery.d.ts +5 -0
  162. package/dist/mjs/utils/commercialManagement/recovery.d.ts.map +1 -1
  163. package/dist/mjs/utils/commercialManagement/recovery.js +5 -0
  164. package/dist/mjs/utils/commercialManagement/recovery.js.map +1 -1
  165. package/dist/mjs/utils/documents.d.ts.map +1 -1
  166. package/dist/mjs/utils/documents.js +1 -4
  167. package/dist/mjs/utils/documents.js.map +1 -1
  168. package/dist/mjs/utils/payment.d.ts.map +1 -1
  169. package/dist/mjs/utils/payment.js +8 -1
  170. package/dist/mjs/utils/payment.js.map +1 -1
  171. package/dist/mjs/utils/vat/3310/century23.js +1 -1
  172. package/dist/mjs/utils/vat/3310/century23.js.map +1 -1
  173. package/dist/mjs/utils/vat/3310/century24.js +1 -1
  174. package/dist/mjs/utils/vat/3310/century24.js.map +1 -1
  175. package/package.json +1 -1
  176. package/ts/api/resources/FIle.ts +4 -0
  177. package/ts/api/resources/Society.ts +14 -3
  178. package/ts/api/resources/Wallet.ts +8 -1
  179. package/ts/types/Enum/BalanceSheet.ts +6 -1
  180. package/ts/types/Enum/BrandClementine.ts +1 -1
  181. package/ts/types/Enum/BrandLegalstart.ts +1 -1
  182. package/ts/types/Enum/ReasonTerminationType.ts +6 -0
  183. package/ts/types/Enum/Sepa.ts +48 -0
  184. package/ts/types/Enum/StatusRating.ts +1 -0
  185. package/ts/types/Enum/TimeCounterType.ts +8 -0
  186. package/ts/types/Enum/UnpaidReason.ts +30 -0
  187. package/ts/types/Interface/api/cerfa/2035.ts +2 -0
  188. package/ts/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.ts +5 -0
  189. package/ts/types/Interface/api/society/QueryUnpaid.ts +41 -0
  190. package/ts/types/Interface/api/society/ReadSocietyUnpaidStats.ts +4 -0
  191. package/ts/types/Interface/api/society/UpdateSociety.ts +7 -1
  192. package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +2 -2
  193. package/ts/types/Interface/models/IPaymentRecovery.ts +0 -3
  194. package/ts/types/index.ts +4 -0
  195. package/ts/utils/brands.ts +1 -0
  196. package/ts/utils/checklist.ts +0 -4
  197. package/ts/utils/commercialManagement/recovery.ts +5 -0
  198. package/ts/utils/documents.ts +1 -4
  199. package/ts/utils/payment.ts +9 -1
  200. package/ts/utils/vat/3310/century23.ts +1 -1
  201. package/ts/utils/vat/3310/century24.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.2.11",
3
+ "version": "1.2.15",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -28,6 +28,10 @@ export class File extends Resource {
28
28
  return this.axios.$get(`societies/${idSociety}/files/${id}/buffer`, { responseType: 'blob' });
29
29
  }
30
30
 
31
+ getConfigBuffer(id: number): Promise<Buffer> {
32
+ return this.axios.$get(`/files/${id}/buffer`, { responseType: 'arraybuffer' });
33
+ }
34
+
31
35
  update(id: number, payload: Partial<IFile>): Promise<IFile> {
32
36
  return this.axios.$patch(`files/${id}`, payload);
33
37
  }
@@ -25,6 +25,8 @@ import {
25
25
  QueryExportSociety,
26
26
  QueryAccountingExport,
27
27
  GetSocietyState,
28
+ QueryUnpaidSociety,
29
+ ReadSocietyUnpaidStats,
28
30
  } from '../../types';
29
31
  import { CancelToken } from 'axios';
30
32
 
@@ -79,9 +81,6 @@ export class Society extends Resource {
79
81
  synchronize(id: number, params: CreateSynchronization): Promise<string> {
80
82
  return this.axios.$post(`/society/${id}/synchronize`, params);
81
83
  }
82
- autoImportationTransactions(): Promise<void> {
83
- return this.axios.$post('/society/bankAccount/autoImportationTransactions');
84
- }
85
84
  importBalanceBankAccount(idSociety: number, idBankAccount: number, params: CreateBudgetBalanceBankAccount): Promise<number> {
86
85
  return this.axios.$post(`/society/${idSociety}/bankAccount/${idBankAccount}/importBalance`, params);
87
86
  }
@@ -119,6 +118,18 @@ export class Society extends Resource {
119
118
  return this.axios.$get('/society/archived', { params: query });
120
119
  }
121
120
 
121
+ getUnpaids(query: QueryUnpaidSociety, cancelToken?: CancelToken): Promise<ISociety[]> {
122
+ return this.axios.$get('/society/unpaids', {
123
+ ...(cancelToken ? { cancelToken } : {}),
124
+ params: query });
125
+ }
126
+
127
+ getUnpaidsStats(cancelToken?: CancelToken): Promise<ReadSocietyUnpaidStats> {
128
+ return this.axios.$get('/society/unpaids/stats', {
129
+ ...(cancelToken ? { cancelToken } : {}),
130
+ });
131
+ }
132
+
122
133
  public getPaginatedNewJuridical(params: QueryPaginatedSociety, cancelToken?: CancelToken): Promise<BasePaginate<ISociety>> {
123
134
  return this.axios.$get('/society/paginated-juridical', {
124
135
  ...(cancelToken ? { cancelToken } : {}),
@@ -1,4 +1,4 @@
1
- import { CancelToken } from 'axios';
1
+ import { AxiosResponse, CancelToken } from 'axios';
2
2
  import { Resource } from '../Resource';
3
3
  import { UpdateAttribution } from '../../types/Interface/api/wallet/UpdateAttribution';
4
4
  import {
@@ -16,6 +16,13 @@ export class Wallet extends Resource {
16
16
  });
17
17
  }
18
18
 
19
+ getAccountantCsv(idUser: number, cancelToken?: CancelToken, signal?: AbortSignal): Promise<AxiosResponse> {
20
+ return this.axios.$get(`/accountant-wallets/${idUser}/csv`, {
21
+ ...(cancelToken ? { cancelToken } : {}),
22
+ ...(signal ? { signal } : {}),
23
+ });
24
+ }
25
+
19
26
  update(idUser: number, payload: UpdateAttribution): Promise<{ message: string }> {
20
27
  return this.axios.$put(`/users/${idUser}/wallets`, payload);
21
28
  }
@@ -261,6 +261,9 @@ export type BalanceSheetField = {
261
261
  accounts?: string[];
262
262
  accountsDeducted?: string[]; // Liste des comptes pour la colonne "Amortissements et provisions"
263
263
 
264
+ accountsForceToDeduce?: string[]; // Liste des comptes qui doivent être déduit par rapport aux autres comptes
265
+ totalValueToDeduce?: number; // Liste des comptes qui doivent être déduit par rapport aux autres comptes
266
+
264
267
  isCategory?: boolean; // Ne calcule pas le total, affiché en gras sur le PDF
265
268
  isSubcategory?: boolean; // Ne calcule pas de montant
266
269
  isTotal?: boolean; // Affiche le total, affiché comme une catégorie
@@ -752,7 +755,9 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
752
755
  {
753
756
  name: 'Autres dettes',
754
757
  key: 'OtherDebts',
755
- accounts: ['411', '418', '4196', '4197', '4198', '464', '467', '4686', '471', '472', '478', '509'],
758
+ accounts: ['411', '418', '4196', '4197', '464', '467', '4686', '471', '472', '478', '509'],
759
+ accountsDeducted: ['4198'],
760
+ accountsForceToDeduce: ['4198'],
756
761
  // PASSIF Autres = lorsque l'entreprise doit de l'argent au client = somme débit > crédit (modifié)
757
762
  idThirdPartyTypeToAdd: [ThirdPartyType.CUSTOMER, MathematicalSign.LESS],
758
763
  isSubcategory: true,
@@ -163,7 +163,7 @@ export const BrandClementine: Brand[] = [
163
163
  urlApp: 'https://app.compta-clementine.fr',
164
164
  urlApi1: 'https://api-legalstart.compta-clementine.fr',
165
165
  urlApi2: 'https://api-next-legalstart.compta-clementine.fr',
166
- urlExpert: 'https://pro.comptalib.com',
166
+ urlExpert: 'https://expert.compta-clementine.fr',
167
167
  urlClient: 'https://www.compta-clementine.fr',
168
168
  bank: {
169
169
  IBAN: 'FR7616106840138646838239863',
@@ -66,7 +66,7 @@ export const BrandLegalstart: Brand[] = [
66
66
  urlApp: 'https://gestion.legalstart.fr',
67
67
  urlApi1: 'https://api-legalstart.compta-clementine.fr',
68
68
  urlApi2: 'https://api-next-legalstart.compta-clementine.fr',
69
- urlExpert: 'https://pro.comptalib.com',
69
+ urlExpert: 'https://pro.comptastartier.com',
70
70
  urlClient: 'https://clementine.fr',
71
71
  bank: {
72
72
  IBAN: 'FR7616106840138646838239863',
@@ -22,6 +22,7 @@ export enum ReasonTerminationType {
22
22
  NA = 21,
23
23
  LACK_OF_COMMUNICATION = 22,
24
24
  NO_NEED_FOR_A_CERTIFIED_ACCOUNTANT = 23,
25
+ ERROR_ON_PRESTATION = 24,
25
26
  }
26
27
 
27
28
  export const ReasonTerminationTypeDetail = [
@@ -140,4 +141,9 @@ export const ReasonTerminationTypeDetail = [
140
141
  label: 'Plus besoin d\'un expert-comptable',
141
142
  active: true,
142
143
  },
144
+ {
145
+ id:ReasonTerminationType.ERROR_ON_PRESTATION,
146
+ label: 'Erreur sur prestation',
147
+ active: true,
148
+ },
143
149
  ];
@@ -0,0 +1,48 @@
1
+ type ErrorCodeSepaType = {
2
+ refXml:string,
3
+ motifXml:string,
4
+ };
5
+
6
+ export const ErrorCodeSepa:ErrorCodeSepaType[] = [
7
+ { refXml: 'AC01', motifXml: 'Coordonnées bancaires inexploitables' },
8
+ { refXml: 'RC01', motifXml: 'Code BIC erroné' },
9
+ {
10
+ refXml: 'RR01',
11
+ motifXml: 'Motif réglementaire - Le compte ou identifiant débiteur est insuffisant ou manquant.',
12
+ },
13
+ {
14
+ refXml: 'RR02',
15
+ motifXml:
16
+ 'Motif réglementaire - Les renseignements du nom ou de l’adresse du débiteur sont insuffisants ou manquants.',
17
+ },
18
+ { refXml: 'RR04', motifXml: 'Motif réglementaire - Autre' },
19
+ {
20
+ refXml: 'BE01',
21
+ motifXml: 'Le nom du débiteur ne correspond pas au nom du titulaire du compte',
22
+ },
23
+ { refXml: 'AM05', motifXml: 'Prélèvement en double' },
24
+ { refXml: 'BE05', motifXml: 'Identifiant créancier incorrect' },
25
+ { refXml: 'FF01', motifXml: 'Code de transaction incorrect ou format fichier invalide' },
26
+ { refXml: 'FF05', motifXml: 'Type de prélèvement incorrect' },
27
+ { refXml: 'MD02', motifXml: 'Données du mandat manquantes ou inexactes' },
28
+ {
29
+ refXml: 'RR03',
30
+ motifXml: 'Motif réglementaire - Le nom ou l\'adresse du créancier est incorrect ou manquant.',
31
+ },
32
+ { refXml: 'AG02', motifXml: 'Code de transaction incorrect ou erreur de séquence' },
33
+ { refXml: 'MD01', motifXml: 'Aucun mandat valide ou opération non autorisée' },
34
+ {
35
+ refXml: 'AG01',
36
+ motifXml: 'Prélèvements interdits sur ce compte pour des raisons législatives',
37
+ },
38
+ { refXml: 'AC04', motifXml: 'Compte fermé' },
39
+ { refXml: 'MD07', motifXml: 'Débiteur décédé' },
40
+ { refXml: 'AC06', motifXml: 'Compte bloqué pour les prélèvements SEPA par le débiteur' },
41
+ { refXml: 'SL01', motifXml: 'Service spécifique' },
42
+ { refXml: 'AC13', motifXml: 'Le compte débiteur est le compte d\'une personne physique' },
43
+ { refXml: 'AM04', motifXml: 'Fonds insuffisants' },
44
+ { refXml: 'MS02', motifXml: 'Prélèvement refusé par le débiteur' },
45
+ { refXml: 'MS03', motifXml: 'Raison non précisée' },
46
+ { refXml: 'MD06', motifXml: 'Opération autorisée contestée' },
47
+ { refXml: 'MD01', motifXml: 'Aucun mandat valide ou opération non autorisée' },
48
+ ];
@@ -4,4 +4,5 @@ export const StatusRating = [
4
4
  { value: 2, text: 'Avis supprimé' },
5
5
  { value: 3, text: 'Refus de supprimer' },
6
6
  { value: 4, text: 'Non concerné' },
7
+ { value: 5, text: 'Résolu' },
7
8
  ];
@@ -356,4 +356,12 @@ export const TimeCounterType = {
356
356
  color: 'guacamole',
357
357
  isOverlappable: true,
358
358
  },
359
+ PRO_ACTIVE_APPOINTMENT: {
360
+ id: 45,
361
+ label: 'Rdv client pro actif',
362
+ aberrantTime: 15,
363
+ limitedRoles: null,
364
+ color: 'fern-dark',
365
+ isOverlappable: false,
366
+ },
359
367
  };
@@ -0,0 +1,30 @@
1
+ export enum UnpaidReason {
2
+ INSUFFICIENT_PROVISION = 1,
3
+ LITIGE = 2,
4
+ TRANSACTION_ERROR = 3,
5
+ INCORRECT_RIB = 4,
6
+ IMPORT_XML = 5,
7
+ }
8
+
9
+ export const UnpaidReasonList: Array<{ value: UnpaidReason; text: string }> = [
10
+ {
11
+ value: UnpaidReason.INSUFFICIENT_PROVISION,
12
+ text: 'Provision insuffisante',
13
+ },
14
+ {
15
+ value: UnpaidReason.LITIGE,
16
+ text: 'Litige',
17
+ },
18
+ {
19
+ value: UnpaidReason.TRANSACTION_ERROR,
20
+ text: 'Erreur transaction',
21
+ },
22
+ {
23
+ value: UnpaidReason.INCORRECT_RIB,
24
+ text: 'RIB incorrect',
25
+ },
26
+ {
27
+ value: UnpaidReason.IMPORT_XML,
28
+ text: 'Import XML',
29
+ },
30
+ ];
@@ -282,6 +282,7 @@ export interface Cerfa2035 {
282
282
  isPageENil: boolean;
283
283
  isPageFNil: boolean;
284
284
  isPageGNil: boolean;
285
+ isSuiteNil?: boolean;
285
286
  society: Cerfa2035Society;
286
287
  immobilizations: number;
287
288
  professionalRecipes: Cerfa2035ProfessionalRecipes;
@@ -643,6 +644,7 @@ export interface Cerfa2035_2024 {
643
644
  isPageENil: boolean;
644
645
  isPageFNil: boolean;
645
646
  isPageGNil: boolean;
647
+ isSuiteNil?: boolean;
646
648
  society: Cerfa2035Society;
647
649
  immobilizations: number;
648
650
  professionalRecipes: Cerfa2035ProfessionalRecipes;
@@ -83,6 +83,11 @@ export class MaritalStatusInfos {
83
83
  @IsString()
84
84
  notaryAddress?: string;
85
85
 
86
+ @ApiPropertyOptional()
87
+ @IsOptional()
88
+ @IsString()
89
+ spouseFirstname?: string;
90
+
86
91
  @ApiPropertyOptional()
87
92
  @IsOptional()
88
93
  @IsString()
@@ -0,0 +1,41 @@
1
+ import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class QueryUnpaidSociety {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsString()
9
+ search?: string;
10
+
11
+ @ApiPropertyOptional()
12
+ @IsOptional()
13
+ @IsInt()
14
+ nbUnpaid?: number;
15
+
16
+ @ApiPropertyOptional()
17
+ @IsOptional()
18
+ @IsBoolean()
19
+ @ToBoolean()
20
+ isExoExpress?: boolean;
21
+
22
+ @ApiPropertyOptional()
23
+ @IsOptional()
24
+ @IsString()
25
+ unpaidReason?: string;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsOptional()
29
+ @IsInt({ each: true })
30
+ listIdPrestationList?: number[];
31
+
32
+ @ApiPropertyOptional({ default: 25 })
33
+ @IsOptional()
34
+ @IsInt()
35
+ limit?: number;
36
+
37
+ @ApiPropertyOptional({ default: 1 })
38
+ @IsOptional()
39
+ @IsInt()
40
+ page?: number;
41
+ }
@@ -0,0 +1,4 @@
1
+ export type ReadSocietyUnpaidStats = {
2
+ amount:number,
3
+ count:number
4
+ };
@@ -1,7 +1,8 @@
1
- import { IsBoolean, IsOptional } from 'class-validator';
1
+ import { IsBoolean, IsEnum, IsOptional } from 'class-validator';
2
2
  import { ApiPropertyOptional } from '../../../../utils';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
4
  import { ISociety } from '../../models/ISociety';
5
+ import { LogType } from '../../../Enum/Log';
5
6
 
6
7
  export class UpdateSociety {
7
8
  @ApiPropertyOptional()
@@ -79,4 +80,9 @@ export class UpdateSociety {
79
80
  export class UpdateSocietyPayload {
80
81
  @ApiPropertyOptional()
81
82
  society: Partial<ISociety>;
83
+
84
+ @ApiPropertyOptional()
85
+ @IsOptional()
86
+ @IsEnum(LogType)
87
+ idLogType?: number;
82
88
  }
@@ -76,7 +76,7 @@ export class CreateTerminationList {
76
76
 
77
77
  @ApiPropertyOptional()
78
78
  @IsOptional()
79
- @IsInt()
79
+ @IsNumber()
80
80
  monthOffer?: number;
81
81
 
82
82
  @ApiPropertyOptional()
@@ -173,7 +173,7 @@ export class UpdateTerminationList {
173
173
 
174
174
  @ApiPropertyOptional()
175
175
  @IsOptional()
176
- @IsInt()
176
+ @IsNumber()
177
177
  monthOffer?: number;
178
178
 
179
179
  @ApiPropertyOptional()
@@ -1,6 +1,5 @@
1
1
  import { PaymentRecoveryStatus } from '../../Enum/PaymentRecovery';
2
2
  import { IFile } from './IFile';
3
- import { IPayment } from './IPayment';
4
3
 
5
4
  export interface IPaymentRecovery {
6
5
  id?: number;
@@ -9,10 +8,8 @@ export interface IPaymentRecovery {
9
8
  lastSync: Date | null;
10
9
  metadata: { askCertificate?: Date; cancellation?: Date; recovered?: Date; } | null;
11
10
  idFile: number;
12
- idPayment: number | null;
13
11
  createdAt?: Date;
14
12
  updatedAt?: Date;
15
13
 
16
14
  file?: IFile;
17
- payment?: IPayment | null;
18
15
  }
package/ts/types/index.ts CHANGED
@@ -429,6 +429,7 @@ export * from './Enum/StatisticType';
429
429
  export * from './Enum/StockType';
430
430
  export * from './Enum/SaleType';
431
431
  export * from './Enum/TypePayment';
432
+ export * from './Enum/UnpaidReason';
432
433
  export * from './Enum/Consistency';
433
434
  export * from './Enum/Account';
434
435
  export * from './Enum/TypeCustomerProviderOperation';
@@ -530,6 +531,7 @@ export * from './Enum/FollowList';
530
531
  export * from './Enum/ClientOrProspect';
531
532
  export * from './Enum/ClosingType';
532
533
  export * from './Enum/MissionAcceptation';
534
+ export * from './Enum/Sepa';
533
535
  export * from './Enum/Bank';
534
536
  export * from './Enum/VatControl';
535
537
  export * from './Enum/Cycle';
@@ -661,6 +663,7 @@ export * from './Interface/api/society/ListUserSociety';
661
663
  export * from './Interface/api/society/CreateUserToSocietyWithPermission';
662
664
  export * from './Interface/api/society/UpdateUserToSocietyWithPermission';
663
665
  export * from './Interface/api/society/ReadSocietyUsers';
666
+ export * from './Interface/api/society/ReadSocietyUnpaidStats';
664
667
  export * from './Interface/api/BasePaginate';
665
668
  export * from './Interface/api/BaseRequest';
666
669
  export * from './Interface/api/generalLedger/IGeneralLedgerAccount';
@@ -1060,6 +1063,7 @@ export * from './Interface/api/accountsSectors/Query';
1060
1063
  export * from './Interface/api/visualizedInformation/Query';
1061
1064
  export * from './Interface/api/visualizedInformation/Update';
1062
1065
  export * from './Interface/api/society/QueryArchived';
1066
+ export * from './Interface/api/society/QueryUnpaid';
1063
1067
  export * from './Interface/api/vatControl/CreateVatControl';
1064
1068
  export * from './Interface/api/vatControl/QueryVatControl';
1065
1069
  export * from './Interface/api/terminationList/QueryPaginateTerminationList';
@@ -89,6 +89,7 @@ export type Brand = {
89
89
  codeGuichet?: string;
90
90
  numeroCompte?: string;
91
91
  cleRib?: string;
92
+ ribIdFile?: number;
92
93
  },
93
94
  internalInvoicing?: {
94
95
  lastUsedNumber?: number;
@@ -10,10 +10,6 @@ export function getAllBlockingIssues(checklist: IChecklist, meta: QueryGetAllBlo
10
10
 
11
11
  blockingQuestions.forEach((question) => {
12
12
  const answer = answers.find((a) => a.idTypeChecklist === question.id);
13
- if (question.id === 51) {
14
- console.log(question);
15
- console.log(answer);
16
- }
17
13
 
18
14
  if (!answer) {
19
15
  blockingIssues.push(question);
@@ -16,6 +16,11 @@ export const CAARL_WAITING_STATUS: PaymentRecoveryStatus[] = [
16
16
  export const CAARL_RECOVERED_STATUS: PaymentRecoveryStatus[] = [PaymentRecoveryStatus.PAYED];
17
17
  export const CAARL_NOT_RECOVERED_STATUS: PaymentRecoveryStatus[] = [PaymentRecoveryStatus.CLOSED];
18
18
 
19
+ /**
20
+ *
21
+ * @param amount amount x 100
22
+ * @returns
23
+ */
19
24
  export function getRecoveryFeesFromAmountTotalTaxIncluded(amount: number): number {
20
25
 
21
26
  const rate = amount >= CAARL_MINIMUM_AMOUNT_FOR_REDUCED_FEES ? CARL_RECOVERY_REDUCED_FEES_PERCENTAGE : CARL_RECOVERY_FEES_PERCENTAGE;
@@ -42,7 +42,7 @@ const requiredListDocs = (params: RequiredDocsType): GedFileType[] => {
42
42
  }
43
43
 
44
44
  if ([LegalForm.SELARLU.id, LegalForm.EURL.id, LegalForm.SASU.id, LegalForm.SA.id,
45
- LegalForm.SAS.id, LegalForm.SARL.id, LegalForm.SCI.id, LegalForm.EARL.id, LegalForm.GIE.id].includes(idLegalForm)) {
45
+ LegalForm.SAS.id, LegalForm.SARL.id, LegalForm.SCI.id, LegalForm.EARL.id, LegalForm.GIE.id, LegalForm.SOCIETE_CIVILE.id].includes(idLegalForm)) {
46
46
  return [...generique, GedFileType.KBIS, GedFileType.STATUTES, GedFileType.DBE2, GedFileType.SEPA];
47
47
  }
48
48
  if ([LegalForm.SELARL.id].includes(idLegalForm)) {
@@ -58,9 +58,6 @@ const requiredListDocs = (params: RequiredDocsType): GedFileType[] => {
58
58
  return [...generique, GedFileType.RULES_OF_PROCEDURE, GedFileType.REGISTRATION_OF_THE_ASSOCIATION_AT_THE_PREFECTURE, GedFileType.REPRESENTATIVE_OF_THE_ASSOCIATION];
59
59
  }
60
60
 
61
- if ([LegalForm.SOCIETE_CIVILE.id].includes(idLegalForm)) {
62
- return [...generique, GedFileType.KBIS, GedFileType.DBE2];
63
- }
64
61
  return generique;
65
62
  };
66
63
 
@@ -211,7 +211,7 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
211
211
 
212
212
  //express : on étale en countExpressMonthlyPayment (nb de mensualités)
213
213
  let remainingAmountByExercicePrestation = remainingAmount; //TTC
214
- let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 3; //TTC
214
+ let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 1; //TTC
215
215
  //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)
216
216
  if (indexEP === 0 && sumRegulations > 0) countExpressMonthlyPayment -= 1;
217
217
 
@@ -256,6 +256,14 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
256
256
  let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
257
257
  if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;
258
258
 
259
+ // Si un client signe un Express dans les 3 derniers mois de l'année (par exemple en décembre 2024)
260
+ // on ne doit pas générer l'année 2025 sur 13 mois à partir du 12/24
261
+ // mais on doit attendre le début de l'exercice concerné (ici, 01/25)
262
+ if (countMonthsBeforeExerciceEnd > 12) {
263
+ paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
264
+ continue;
265
+ }
266
+
259
267
  const exoAmount = isFirstNonExpress ? yearlyAmountNonExpressClone : nextYearlyAmountNonExpress;
260
268
  const remainingBeforeThisExo = remainingAmount;
261
269
  remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);
@@ -115,7 +115,7 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
115
115
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
116
116
  const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
117
117
 
118
- const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport > 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
118
+ const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport >= 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
119
119
  const coefficient = _round(payload.vat?.deductible?.coefficient ?? 100, 2);
120
120
  const isNil = payload.isNil === true;
121
121
  const isHolidayDeposit = payload.isHolidayDeposit === true;
@@ -115,7 +115,7 @@ export function getCerfa3310Century24Payload(accountingEntries: IAccountingEntry
115
115
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
116
116
  const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
117
117
 
118
- const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport > 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
118
+ const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport >= 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
119
119
  const coefficient = _round(payload.vat?.deductible?.coefficient ?? 100, 2);
120
120
  const isNil = payload.isNil === true;
121
121
  const isHolidayDeposit = payload.isHolidayDeposit === true;