@silexpert/core 1.1.77 → 1.1.78

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 (53) hide show
  1. package/es/api/resources/SocietyConfigBalanceSheet.d.ts +1 -0
  2. package/es/api/resources/SocietyConfigBalanceSheet.d.ts.map +1 -1
  3. package/es/api/resources/SocietyConfigBalanceSheet.js +3 -0
  4. package/es/api/resources/SocietyConfigBalanceSheet.js.map +1 -1
  5. package/es/types/Enum/Activity.d.ts +12 -0
  6. package/es/types/Enum/Activity.d.ts.map +1 -1
  7. package/es/types/Enum/Activity.js +13 -0
  8. package/es/types/Enum/Activity.js.map +1 -1
  9. package/es/types/Enum/DepositDocumentType.d.ts +9 -0
  10. package/es/types/Enum/DepositDocumentType.d.ts.map +1 -1
  11. package/es/types/Enum/DepositDocumentType.js +37 -0
  12. package/es/types/Enum/DepositDocumentType.js.map +1 -1
  13. package/es/types/Enum/Ged.d.ts +21 -1
  14. package/es/types/Enum/Ged.d.ts.map +1 -1
  15. package/es/types/Enum/Ged.js +34 -0
  16. package/es/types/Enum/Ged.js.map +1 -1
  17. package/es/types/Interface/api/society/SocietyWithStatsCaParams.d.ts +2 -0
  18. package/es/types/Interface/api/society/SocietyWithStatsCaParams.d.ts.map +1 -1
  19. package/es/types/Interface/api/society/SocietyWithStatsCaParams.js.map +1 -1
  20. package/es/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.d.ts +2 -0
  21. package/es/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.d.ts.map +1 -1
  22. package/es/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js +11 -3
  23. package/es/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js.map +1 -1
  24. package/es/types/Interface/models/ISocietyConfigBalanceSheet.d.ts +2 -1
  25. package/es/types/Interface/models/ISocietyConfigBalanceSheet.d.ts.map +1 -1
  26. package/es/types/Interface/models/ISocietyConfigBalanceSheet.js.map +1 -1
  27. package/es/utils/vat/utils.d.ts +1 -1
  28. package/es/utils/vat/utils.d.ts.map +1 -1
  29. package/es/utils/vat/utils.js +8 -1
  30. package/es/utils/vat/utils.js.map +1 -1
  31. package/js/api/resources/SocietyConfigBalanceSheet.js +3 -0
  32. package/js/api/resources/SocietyConfigBalanceSheet.js.map +1 -1
  33. package/js/types/Enum/Activity.js +26 -12
  34. package/js/types/Enum/Activity.js.map +1 -1
  35. package/js/types/Enum/DepositDocumentType.js +31 -1
  36. package/js/types/Enum/DepositDocumentType.js.map +1 -1
  37. package/js/types/Enum/Ged.js +28 -0
  38. package/js/types/Enum/Ged.js.map +1 -1
  39. package/js/types/Interface/api/society/SocietyWithStatsCaParams.js.map +1 -1
  40. package/js/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js +3 -1
  41. package/js/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js.map +1 -1
  42. package/js/types/Interface/models/ISocietyConfigBalanceSheet.js.map +1 -1
  43. package/js/utils/vat/utils.js +6 -1
  44. package/js/utils/vat/utils.js.map +1 -1
  45. package/package.json +1 -1
  46. package/ts/api/resources/SocietyConfigBalanceSheet.ts +4 -0
  47. package/ts/types/Enum/Activity.ts +14 -0
  48. package/ts/types/Enum/DepositDocumentType.ts +39 -1
  49. package/ts/types/Enum/Ged.ts +36 -0
  50. package/ts/types/Interface/api/society/SocietyWithStatsCaParams.ts +3 -1
  51. package/ts/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.ts +10 -3
  52. package/ts/types/Interface/models/ISocietyConfigBalanceSheet.ts +2 -1
  53. package/ts/utils/vat/utils.ts +8 -1
@@ -171,4 +171,42 @@ export const DepositDocumentType = [
171
171
  },
172
172
  ],
173
173
  },
174
- ];
174
+ ];
175
+
176
+ export const JuridicalDepositDocumentType = [
177
+ {
178
+ id: TypeFile.IDENTITY_CARD_RECTO,
179
+ name: 'Justificatif d’identité recto',
180
+ idGedFolder: GedFolder.FORMALISM,
181
+ },
182
+ {
183
+ id: TypeFile.IDENTITY_CARD_VERSO,
184
+ name: 'Justificatif d’identité verso',
185
+ idGedFolder: GedFolder.FORMALISM,
186
+ },
187
+ {
188
+ id: TypeFile.RESIDENCE_CERTIFICATE,
189
+ name: 'Attestation domicile',
190
+ idGedFolder: GedFolder.FORMALISM,
191
+ },
192
+ {
193
+ id: TypeFile.NO_CONDEMNATION,
194
+ name: 'Attestation non condamnation',
195
+ idGedFolder: GedFolder.JURIDICAL,
196
+ },
197
+ {
198
+ id: TypeFile.CAPITAL_DEPOSIT,
199
+ name: 'Attestation dépôt de capital',
200
+ idGedFolder: GedFolder.JURIDICAL,
201
+ },
202
+ {
203
+ id: TypeFile.DOMICILIATION,
204
+ name: 'Contrat domiciliation',
205
+ idGedFolder: GedFolder.FORMALISM,
206
+ },
207
+ ];
208
+
209
+ export enum DocumentConfigurationType {
210
+ BALANCESHEET = 1,
211
+ JURIDICAL = 2,
212
+ }
@@ -77,6 +77,16 @@ export enum TypeFile {
77
77
  FUND_TO_SIGN = 26,
78
78
  SUPPLIER_BOOK_TO_SIGN = 27,
79
79
  CLIENT_BOOK_TO_SIGN = 28,
80
+ STATUTES_PROJECT = 29,
81
+ IDENTITY_CARD_RECTO = 30,
82
+ IDENTITY_CARD_VERSO = 31,
83
+ RESIDENCE_CERTIFICATE = 32,
84
+ NO_CONDEMNATION = 33,
85
+ CAPITAL_DEPOSIT = 34,
86
+ DOMICILIATION = 35,
87
+ DEFINITIVE_STATUTES = 36,
88
+ LEGAL_ANNOUNCEMENT = 37,
89
+ DEPOSIT_GREFFE = 38,
80
90
  }
81
91
 
82
92
  export enum GedFileType {
@@ -130,6 +140,32 @@ export const SignFileDetail = [
130
140
  },
131
141
  ];
132
142
 
143
+ export const JuridicalSignFileDetail = [
144
+ {
145
+ id: TypeFile.STATUTES_PROJECT,
146
+ name: 'Projet de statut',
147
+ idGedFolder: GedFolder.JURIDICAL,
148
+ },
149
+ ];
150
+
151
+ export const JuridicalJuristFile = [
152
+ {
153
+ id: TypeFile.DEFINITIVE_STATUTES,
154
+ title: 'Statut définitif',
155
+ idGedFolder: GedFolder.JURIDICAL,
156
+ },
157
+ {
158
+ id: TypeFile.LEGAL_ANNOUNCEMENT,
159
+ title: 'Attestation annonce légale',
160
+ idGedFolder: GedFolder.LEGAL_ANNOUNCEMENTS,
161
+ },
162
+ {
163
+ id: TypeFile.DEPOSIT_GREFFE,
164
+ title: 'Attestation dépôt Greffe',
165
+ idGedFolder: GedFolder.JURIDICAL,
166
+ },
167
+ ];
168
+
133
169
  export const GedFileTypeDetail = {
134
170
  STATUTES: {
135
171
  id: GedFileType.STATUTES,
@@ -1,5 +1,6 @@
1
1
  import { GedFileType } from '../../../Enum/Ged';
2
2
  import { IRegulate } from '../../models/IRegulate';
3
+ import { IRegulation } from '../../models/IRegulation';
3
4
  import { ISociety } from '../../models/ISociety';
4
5
  import { ReadInvalidFieldState } from './ReadSociety';
5
6
 
@@ -9,5 +10,6 @@ export interface SocietyWithStatsCaParams extends ISociety {
9
10
  stateOfProgress?: string,
10
11
  isBillingOk?: boolean,
11
12
  labAcceptation?: boolean,
12
- regulates?: IRegulate[]
13
+ regulates?: IRegulate[],
14
+ regulation?: IRegulation
13
15
  }
@@ -1,11 +1,13 @@
1
1
  import {
2
- IsOptional, IsString, IsIn, IsInt,
2
+ IsOptional, IsString, IsIn, IsInt, IsEnum,
3
3
  } from 'class-validator';
4
- import { ApiPropertyOptional, ApiProperty } from '../../../../utils';
4
+ import { ApiPropertyOptional } from '../../../../utils';
5
+ import { DocumentConfigurationType } from '../../../Enum/DepositDocumentType';
5
6
 
6
7
  export class QueryGetAllSocietyConfigBalanceSheet {
7
- @ApiProperty()
8
+ @ApiPropertyOptional()
8
9
  @IsInt()
10
+ @IsOptional()
9
11
  idBalanceSheet?: number;
10
12
 
11
13
  @ApiPropertyOptional()
@@ -22,4 +24,9 @@ export class QueryGetAllSocietyConfigBalanceSheet {
22
24
  })
23
25
  @IsIn(['society', 'user'], { each: true })
24
26
  include?: string[];
27
+
28
+ @ApiPropertyOptional()
29
+ @IsEnum(DocumentConfigurationType)
30
+ @IsOptional()
31
+ configurationType?: DocumentConfigurationType;
25
32
  }
@@ -3,7 +3,7 @@ import { IExercice } from './IExercice';
3
3
  import { IBalanceSheet } from './IBalanceSheet';
4
4
  import { ISociety } from './ISociety';
5
5
  import { IUser } from './IUser';
6
- import { StateDepositDocument, StateClientDepositDocument } from '../../Enum/DepositDocumentType';
6
+ import { StateDepositDocument, StateClientDepositDocument, DocumentConfigurationType } from '../../Enum/DepositDocumentType';
7
7
 
8
8
  // societyConfigBalanceSheet
9
9
  export interface ISocietyConfigBalanceSheet {
@@ -13,6 +13,7 @@ export interface ISocietyConfigBalanceSheet {
13
13
  idSociety: number | null;
14
14
  comment: string | null;
15
15
  amount: number | null;
16
+ configurationType: DocumentConfigurationType;
16
17
  idTypeDocumentsWaiting?: number | null;
17
18
  idExercice: number | null;
18
19
  idBalanceSheet: number | null;
@@ -22,12 +22,18 @@ export function setZeroIfIsNegative(value: number): number {
22
22
  return value < 0 ? 0 : value;
23
23
  }
24
24
 
25
- export function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0): number {
25
+ export function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, logging = false): number {
26
26
  const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');
27
27
  return _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {
28
28
  let accTmp = acc;
29
29
  accountsNumber.some((number) => {
30
30
  if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {
31
+
32
+ // eslint-disable-next-line no-console
33
+ if (logging) console.log('\'\'');
34
+ // eslint-disable-next-line no-console
35
+ if (logging) console.log(accountingEntry);
36
+
31
37
  accTmp += ((accountingEntry.debit - accountingEntry.credit) * (((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100)));
32
38
  return true;
33
39
  }
@@ -47,6 +53,7 @@ export function textFormatting(value: any, length: number | null = null): string
47
53
  formattedValue = formattedValue.replace(/"/g, ''); // Suppression des "
48
54
  formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début
49
55
  formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin
56
+ formattedValue = formattedValue.replace(/€/g, 'EUR');
50
57
  if (length) formattedValue = formattedValue.slice(0, length);
51
58
  return formattedValue;
52
59
  }