@silexpert/core 0.4.115 → 0.4.118

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 (140) hide show
  1. package/es/api/resources/Cerfa.d.ts +8 -1
  2. package/es/api/resources/Cerfa.d.ts.map +1 -1
  3. package/es/api/resources/Cerfa.js +5 -0
  4. package/es/api/resources/Cerfa.js.map +1 -1
  5. package/es/api/resources/Provision.d.ts +12 -0
  6. package/es/api/resources/Provision.d.ts.map +1 -0
  7. package/es/api/resources/Provision.js +19 -0
  8. package/es/api/resources/Provision.js.map +1 -0
  9. package/es/api/resources.d.ts +2 -0
  10. package/es/api/resources.d.ts.map +1 -1
  11. package/es/api/resources.js +2 -0
  12. package/es/api/resources.js.map +1 -1
  13. package/es/types/Enum/ProvisionType.d.ts +12 -0
  14. package/es/types/Enum/ProvisionType.d.ts.map +1 -0
  15. package/es/types/Enum/ProvisionType.js +115 -0
  16. package/es/types/Enum/ProvisionType.js.map +1 -0
  17. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.d.ts +1 -0
  18. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.d.ts.map +1 -1
  19. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js +7 -0
  20. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js.map +1 -1
  21. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.d.ts +1 -0
  22. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.d.ts.map +1 -1
  23. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js +7 -0
  24. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js.map +1 -1
  25. package/es/types/Interface/api/cerfa/ReadCerfa.d.ts +6 -0
  26. package/es/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -0
  27. package/es/types/Interface/api/cerfa/ReadCerfa.js +2 -0
  28. package/es/types/Interface/api/cerfa/ReadCerfa.js.map +1 -0
  29. package/es/types/Interface/api/provision/CreateProvisionForm.d.ts +8 -0
  30. package/es/types/Interface/api/provision/CreateProvisionForm.d.ts.map +1 -0
  31. package/es/types/Interface/api/provision/CreateProvisionForm.js +38 -0
  32. package/es/types/Interface/api/provision/CreateProvisionForm.js.map +1 -0
  33. package/es/types/Interface/api/provision/QueryGetProvisions.d.ts +6 -0
  34. package/es/types/Interface/api/provision/QueryGetProvisions.d.ts.map +1 -0
  35. package/es/types/Interface/api/provision/QueryGetProvisions.js +28 -0
  36. package/es/types/Interface/api/provision/QueryGetProvisions.js.map +1 -0
  37. package/es/types/Interface/api/provision/QueryProvisions.d.ts +8 -0
  38. package/es/types/Interface/api/provision/QueryProvisions.d.ts.map +1 -0
  39. package/es/types/Interface/api/provision/QueryProvisions.js +47 -0
  40. package/es/types/Interface/api/provision/QueryProvisions.js.map +1 -0
  41. package/es/types/Interface/api/provision/ReadProvision.d.ts +11 -0
  42. package/es/types/Interface/api/provision/ReadProvision.d.ts.map +1 -0
  43. package/es/types/Interface/api/provision/ReadProvision.js +3 -0
  44. package/es/types/Interface/api/provision/ReadProvision.js.map +1 -0
  45. package/es/types/Interface/api/provision/UpdateProvisionForm.d.ts +7 -0
  46. package/es/types/Interface/api/provision/UpdateProvisionForm.d.ts.map +1 -0
  47. package/es/types/Interface/api/provision/UpdateProvisionForm.js +35 -0
  48. package/es/types/Interface/api/provision/UpdateProvisionForm.js.map +1 -0
  49. package/es/types/Interface/models/IAccountingTransaction.d.ts +2 -0
  50. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  51. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  52. package/es/types/Interface/models/IBalanceSheet.d.ts +4 -2
  53. package/es/types/Interface/models/IBalanceSheet.d.ts.map +1 -1
  54. package/es/types/Interface/models/IBalanceSheet.js.map +1 -1
  55. package/es/types/Interface/models/IBalanceSheetHistory.d.ts +0 -6
  56. package/es/types/Interface/models/IBalanceSheetHistory.d.ts.map +1 -1
  57. package/es/types/Interface/models/IBalanceSheetHistory.js.map +1 -1
  58. package/es/types/Interface/models/IBalanceSheetModule.d.ts +1 -0
  59. package/es/types/Interface/models/IBalanceSheetModule.d.ts.map +1 -1
  60. package/es/types/Interface/models/IBalanceSheetModule.js.map +1 -1
  61. package/es/types/Interface/models/IExercicePrestation.d.ts +3 -6
  62. package/es/types/Interface/models/IExercicePrestation.d.ts.map +1 -1
  63. package/es/types/Interface/models/IExercicePrestation.js.map +1 -1
  64. package/es/types/Interface/models/IRelatedAccountingTransaction.d.ts +12 -0
  65. package/es/types/Interface/models/IRelatedAccountingTransaction.d.ts.map +1 -0
  66. package/es/types/Interface/models/IRelatedAccountingTransaction.js +2 -0
  67. package/es/types/Interface/models/IRelatedAccountingTransaction.js.map +1 -0
  68. package/es/types/Interface/models/ISupervision.d.ts +5 -7
  69. package/es/types/Interface/models/ISupervision.d.ts.map +1 -1
  70. package/es/types/Interface/models/ISupervision.js.map +1 -1
  71. package/es/types/index.d.ts +8 -2
  72. package/es/types/index.d.ts.map +1 -1
  73. package/es/types/index.js +8 -2
  74. package/es/types/index.js.map +1 -1
  75. package/es/utils/cerfa.d.ts +6 -0
  76. package/es/utils/cerfa.d.ts.map +1 -0
  77. package/es/utils/cerfa.js +20 -0
  78. package/es/utils/cerfa.js.map +1 -0
  79. package/js/api/resources/Cerfa.js +12 -0
  80. package/js/api/resources/Cerfa.js.map +1 -1
  81. package/js/api/resources/Provision.js +36 -0
  82. package/js/api/resources/Provision.js.map +1 -0
  83. package/js/api/resources.js +3 -0
  84. package/js/api/resources.js.map +1 -1
  85. package/js/types/Enum/ProvisionType.js +120 -0
  86. package/js/types/Enum/ProvisionType.js.map +1 -0
  87. package/js/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js +2 -0
  88. package/js/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js.map +1 -1
  89. package/js/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js +2 -0
  90. package/js/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js.map +1 -1
  91. package/js/types/Interface/{models/IBalanceSheetPartial.js → api/cerfa/ReadCerfa.js} +1 -1
  92. package/js/types/Interface/{models/IBalanceSheetPartial.js.map → api/cerfa/ReadCerfa.js.map} +1 -1
  93. package/js/types/Interface/api/provision/CreateProvisionForm.js +39 -0
  94. package/js/types/Interface/api/provision/CreateProvisionForm.js.map +1 -0
  95. package/js/types/Interface/api/provision/QueryGetProvisions.js +33 -0
  96. package/js/types/Interface/api/provision/QueryGetProvisions.js.map +1 -0
  97. package/js/types/Interface/api/provision/QueryProvisions.js +41 -0
  98. package/js/types/Interface/api/provision/QueryProvisions.js.map +1 -0
  99. package/js/types/Interface/api/provision/ReadProvision.js +10 -0
  100. package/js/types/Interface/api/provision/ReadProvision.js.map +1 -0
  101. package/js/types/Interface/api/provision/UpdateProvisionForm.js +37 -0
  102. package/js/types/Interface/api/provision/UpdateProvisionForm.js.map +1 -0
  103. package/js/types/Interface/models/{IBalanceSheetLiquidation.js → IRelatedAccountingTransaction.js} +1 -1
  104. package/js/types/Interface/models/{IBalanceSheetLiquidation.js.map → IRelatedAccountingTransaction.js.map} +1 -1
  105. package/js/types/index.js +96 -24
  106. package/js/types/index.js.map +1 -1
  107. package/js/utils/cerfa.js +33 -0
  108. package/js/utils/cerfa.js.map +1 -0
  109. package/package.json +1 -1
  110. package/ts/api/resources/Cerfa.ts +11 -1
  111. package/ts/api/resources/Provision.ts +26 -0
  112. package/ts/api/resources.ts +2 -0
  113. package/ts/types/Enum/ProvisionType.ts +126 -0
  114. package/ts/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.ts +6 -0
  115. package/ts/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.ts +6 -0
  116. package/ts/types/Interface/api/cerfa/ReadCerfa.ts +6 -0
  117. package/ts/types/Interface/api/provision/CreateProvisionForm.ts +27 -0
  118. package/ts/types/Interface/api/provision/QueryGetProvisions.ts +15 -0
  119. package/ts/types/Interface/api/provision/QueryProvisions.ts +34 -0
  120. package/ts/types/Interface/api/provision/ReadProvision.ts +11 -0
  121. package/ts/types/Interface/api/provision/UpdateProvisionForm.ts +25 -0
  122. package/ts/types/Interface/models/IAccountingTransaction.ts +2 -0
  123. package/ts/types/Interface/models/IBalanceSheet.ts +4 -2
  124. package/ts/types/Interface/models/IBalanceSheetHistory.ts +0 -6
  125. package/ts/types/Interface/models/IBalanceSheetModule.ts +1 -0
  126. package/ts/types/Interface/models/IExercicePrestation.ts +3 -6
  127. package/ts/types/Interface/models/IRelatedAccountingTransaction.ts +15 -0
  128. package/ts/types/Interface/models/ISupervision.ts +5 -7
  129. package/ts/types/index.ts +8 -2
  130. package/ts/utils/cerfa.ts +26 -0
  131. package/es/types/Interface/models/IBalanceSheetLiquidation.d.ts +0 -14
  132. package/es/types/Interface/models/IBalanceSheetLiquidation.d.ts.map +0 -1
  133. package/es/types/Interface/models/IBalanceSheetLiquidation.js +0 -2
  134. package/es/types/Interface/models/IBalanceSheetLiquidation.js.map +0 -1
  135. package/es/types/Interface/models/IBalanceSheetPartial.d.ts +0 -14
  136. package/es/types/Interface/models/IBalanceSheetPartial.d.ts.map +0 -1
  137. package/es/types/Interface/models/IBalanceSheetPartial.js +0 -2
  138. package/es/types/Interface/models/IBalanceSheetPartial.js.map +0 -1
  139. package/ts/types/Interface/models/IBalanceSheetLiquidation.ts +0 -17
  140. package/ts/types/Interface/models/IBalanceSheetPartial.ts +0 -17
@@ -0,0 +1,27 @@
1
+ import {
2
+ IsNumber, IsOptional, IsString, Min,
3
+ } from 'class-validator';
4
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
+ import { ProvisionType } from '../../../Enum/ProvisionType';
6
+
7
+ export class CreateProvisionForm {
8
+ @ApiProperty({ description: 'Désignation' })
9
+ @IsString()
10
+ designation: string;
11
+
12
+ @ApiProperty()
13
+ @IsNumber()
14
+ @Min(0, {
15
+ message: 'Amount should be positive',
16
+ })
17
+ amount: number;
18
+
19
+ @ApiProperty()
20
+ @IsString()
21
+ type: keyof typeof ProvisionType;
22
+
23
+ @ApiPropertyOptional()
24
+ @IsOptional()
25
+ @IsNumber()
26
+ idPreviousProvision?: number;
27
+ }
@@ -0,0 +1,15 @@
1
+ import { IsOptional } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class QueryGetProvisions {
5
+ @ApiPropertyOptional()
6
+ idExercice?: number;
7
+
8
+ @ApiPropertyOptional()
9
+ @IsOptional()
10
+ previousExercice?: boolean;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ filterAlreadyProceed?: boolean;
15
+ }
@@ -0,0 +1,34 @@
1
+ import {
2
+ IsDateString, IsNumber, IsOptional, Min,
3
+ } from 'class-validator';
4
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
+
6
+ export class QueryGetProvisions {
7
+ @ApiProperty()
8
+ @IsNumber()
9
+ @Min(0, {
10
+ message: 'page should be positive',
11
+ })
12
+ page: number;
13
+
14
+ @ApiProperty()
15
+ @IsNumber()
16
+ @Min(0, {
17
+ message: 'limit should be positive',
18
+ })
19
+ limit: number;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsDateString()
23
+ startDate?: string;
24
+
25
+ @ApiPropertyOptional()
26
+ @IsDateString()
27
+ @IsOptional()
28
+ endDate?: string;
29
+
30
+ @ApiPropertyOptional()
31
+ @IsNumber()
32
+ @IsOptional()
33
+ idExercice?: string;
34
+ }
@@ -0,0 +1,11 @@
1
+ import { ProvisionType } from '../../../Enum/ProvisionType';
2
+
3
+ export class ReadProvision {
4
+ idAccountingTransaction: number;
5
+ idParentTransaction: number | null;
6
+ idExercice: number;
7
+ idSociety: number;
8
+ designation: string;
9
+ amount: number;
10
+ type: keyof typeof ProvisionType;
11
+ }
@@ -0,0 +1,25 @@
1
+ import {
2
+ IsString, IsNumber, Min, IsOptional,
3
+ } from 'class-validator';
4
+ import { ApiPropertyOptional } from '../../../../utils';
5
+ import { ProvisionType } from '../../../Enum/ProvisionType';
6
+
7
+ export class UpdateProvisionForm {
8
+ @ApiPropertyOptional({ description: 'Désignation' })
9
+ @IsString()
10
+ @IsOptional()
11
+ designation?: string;
12
+
13
+ @ApiPropertyOptional()
14
+ @IsOptional()
15
+ @IsNumber()
16
+ @Min(0, {
17
+ message: 'Amount should be positive',
18
+ })
19
+ amount?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsString()
23
+ @IsOptional()
24
+ type?: keyof typeof ProvisionType;
25
+ }
@@ -69,4 +69,6 @@ export interface IAccountingTransaction {
69
69
  typeComptum?: IComptaType;
70
70
  lettering?: ILettering;
71
71
  partnersTransaction: IPartnerTransaction | null;
72
+ parents?: IAccountingTransaction[];
73
+ childs?: IAccountingTransaction[];
72
74
  }
@@ -1,5 +1,6 @@
1
1
  import { IExercice } from './IExercice';
2
2
  import { ICalendarEvent } from './ICalendarEvent';
3
+ import { ISupervision } from './ISupervision';
3
4
 
4
5
  // balanceSheet
5
6
  export interface IBalanceSheet {
@@ -13,6 +14,7 @@ export interface IBalanceSheet {
13
14
  updatedAt?: Date | null;
14
15
 
15
16
  // Associations
16
- exercice: IExercice;
17
- calendarEvent: ICalendarEvent;
17
+ exercice?: IExercice;
18
+ calendarEvent?: ICalendarEvent;
19
+ supervision: ISupervision;
18
20
  }
@@ -1,19 +1,13 @@
1
1
  import { IBalanceSheet } from './IBalanceSheet';
2
- import { IBalanceSheetPartial } from './IBalanceSheetPartial';
3
- import { IBalanceSheetLiquidation } from './IBalanceSheetLiquidation';
4
2
 
5
3
  // balanceSheetHistory
6
4
  export interface IBalanceSheetHistory {
7
5
  id?: number;
8
6
  idState: number;
9
7
  idBalanceSheet: number | null;
10
- idBalanceSheetPartial: number | null;
11
- idBalanceSheetLiquidation: number | null;
12
8
  createdAt?: Date | null;
13
9
  updatedAt?: Date | null;
14
10
 
15
11
  // Associations
16
12
  balanceSheet: IBalanceSheet;
17
- balanceSheetPartial: IBalanceSheetPartial;
18
- balanceSheetLiquidation: IBalanceSheetLiquidation;
19
13
  }
@@ -3,6 +3,7 @@ export interface IBalanceSheetModule {
3
3
  id?: number;
4
4
  inventory: boolean;
5
5
  loanToDeclare: boolean;
6
+ provisionToDeclare: boolean;
6
7
  // deadlinerecoveryImmobilization: boolean;
7
8
  salariesFile: boolean;
8
9
  hasCustomerInvoiceToEstablish?: boolean | null;
@@ -1,6 +1,5 @@
1
1
  import { IPrestation } from './IPrestation';
2
- import { IBalanceSheetPartial } from './IBalanceSheetPartial';
3
- import { IBalanceSheetLiquidation } from './IBalanceSheetLiquidation';
2
+ import { IBalanceSheet } from './IBalanceSheet';
4
3
 
5
4
  // exercicesPrestations
6
5
  export interface IExercicePrestation {
@@ -11,8 +10,7 @@ export interface IExercicePrestation {
11
10
  amountSocial: number | null;
12
11
  monthOffers: number | null;
13
12
  isInCA: boolean;
14
- idBalanceSheetPartial: number | null;
15
- idBalanceSheetLiquidation: number | null;
13
+ idBalanceSheet: number | null;
16
14
  createdAt?: Date | null;
17
15
  updatedAt?: Date | null;
18
16
  idExercice: number | null;
@@ -20,6 +18,5 @@ export interface IExercicePrestation {
20
18
 
21
19
  // Associations
22
20
  prestation: IPrestation;
23
- balanceSheetPartial: IBalanceSheetPartial;
24
- balanceSheetLiquidation: IBalanceSheetLiquidation;
21
+ balanceSheet?: IBalanceSheet;
25
22
  }
@@ -0,0 +1,15 @@
1
+ import { IAccountingTransaction } from './IAccountingTransaction';
2
+
3
+ // accountingTransactions
4
+ export interface IRelatedAccountingTransaction {
5
+ id?: number;
6
+ idChild:number;
7
+ idParent:number
8
+ createdAt?: Date | null;
9
+ updatedAt?: Date | null;
10
+ deletedAt?: Date | null;
11
+
12
+ // Associations
13
+ parent?: IAccountingTransaction
14
+ child?: IAccountingTransaction
15
+ }
@@ -1,11 +1,11 @@
1
1
  import { IExercice } from './IExercice';
2
2
  import { ISupervisionJob } from './ISupervisionJob';
3
3
  import { IUser } from './IUser';
4
- import { IBalanceSheetPartial } from './IBalanceSheetPartial';
5
- import { IBalanceSheetLiquidation } from './IBalanceSheetLiquidation';
4
+ import { IBalanceSheet } from './IBalanceSheet';
6
5
  import { IFile } from './IFile';
7
6
  import { IPendingPoint } from './IPendingPoint';
8
7
  import { IJob } from './IJob';
8
+ import { ILetter } from './ILetter';
9
9
 
10
10
  // supervisions
11
11
  export interface ISupervision {
@@ -22,8 +22,7 @@ export interface ISupervision {
22
22
  idFile: number | null;
23
23
  idLetter: number | null;
24
24
  checkDateRecommandation: Date | null;
25
- idBalanceSheetPartial: number | null;
26
- idBalanceSheetLiquidation: number | null;
25
+ idBalanceSheet: number | null;
27
26
  createdAt?: Date | null;
28
27
  updatedAt?: Date | null;
29
28
 
@@ -33,10 +32,9 @@ export interface ISupervision {
33
32
  supervisionUsers: IUser;
34
33
  supervisionExpertUsers: IUser;
35
34
  supervisionAccountant: IUser;
36
- balanceSheetPartial: IBalanceSheetPartial;
37
- balanceSheetLiquidation: IBalanceSheetLiquidation;
35
+ balanceSheet: IBalanceSheet;
38
36
  file: IFile;
39
- letter: IFile;
37
+ letter: ILetter;
40
38
  pendingPoints: IPendingPoint[];
41
39
  jobs: IJob[];
42
40
  }
package/ts/types/index.ts CHANGED
@@ -29,8 +29,6 @@ export * from './Interface/models/IAutoLoginToken';
29
29
  export * from './Interface/models/IBalanceBankAccount';
30
30
  export * from './Interface/models/IBalanceSheet';
31
31
  export * from './Interface/models/IBalanceSheetHistory';
32
- export * from './Interface/models/IBalanceSheetLiquidation';
33
- export * from './Interface/models/IBalanceSheetPartial';
34
32
  export * from './Interface/models/IBankAccountSynchroHistory';
35
33
  export * from './Interface/models/IBankAccount';
36
34
  export * from './Interface/models/IBankConnection';
@@ -295,6 +293,7 @@ export * from './Interface/models/IAnswerType';
295
293
  export * from './Interface/models/IAnswerTypeValue';
296
294
  export * from './Interface/models/IBalanceSheetQuestion';
297
295
  export * from './Interface/models/IExerciceQuestion';
296
+ export * from './Interface/models/IRelatedAccountingTransaction';
298
297
 
299
298
  // Forms
300
299
  export * from './Form/FormAuthenticate';
@@ -302,6 +301,7 @@ export * from './Form/FormConnector';
302
301
 
303
302
  // Enums
304
303
  export * from './Enum/Tax';
304
+ export * from './Enum/ProfitsType';
305
305
  export * from './Enum/RegistrationSource';
306
306
  export * from './Enum/Log';
307
307
  export * from './Enum/Quality';
@@ -377,10 +377,12 @@ export * from './Enum/MimeType';
377
377
  export * from './Enum/BalanceSheetQuestion';
378
378
  export * from './Enum/AnswerTypeValue';
379
379
  export * from './Enum/PartneredAccountantServiceType';
380
+ export * from './Enum/ProvisionType';
380
381
 
381
382
  // Interfaces API
382
383
  export * from './Interface/api/businessPartner/ReadBusinessPartner';
383
384
  export * from './Interface/api/simulation/CreateSimulation';
385
+ export * from './Interface/api/cerfa/ReadCerfa';
384
386
  export * from './Interface/api/accountingEntry/AnnotateAccountingTransaction';
385
387
  export * from './Interface/api/accountingEntry/CreateManualEntry';
386
388
  export * from './Interface/api/immobilization/ReadFormattedImmobilization';
@@ -566,3 +568,7 @@ export * from './Interface/api/mealExpense/CreateMealExpense';
566
568
  export * from './Interface/api/mealExpense/ReadMealExpense';
567
569
  export * from './Interface/api/exerciceQuestion/QueryQuestion';
568
570
  export * from './Interface/api/exerciceQuestion/CreateExerciceQuestion';
571
+ export * from './Interface/api/provision/ReadProvision';
572
+ export * from './Interface/api/provision/CreateProvisionForm';
573
+ export * from './Interface/api/provision/UpdateProvisionForm';
574
+ export * from './Interface/api/provision/QueryGetProvisions';
@@ -0,0 +1,26 @@
1
+ import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';
2
+ import { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';
3
+ import { ProfitsType, FiscalRegime, TaxSystem } from '../types';
4
+
5
+ export function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {
6
+ const globalRegimes = Object.values(GlobalRegime);
7
+ const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
8
+
9
+ if (!selectedGlobalRegime) throw Error('Missing informations to retrieve CERFA informations');
10
+
11
+ const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
12
+
13
+ if (choiceIndex < 0) throw Error('Missing informations to retrieve CERFA informations');
14
+
15
+ const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
16
+
17
+ return { declaration, annex: annexe ?? null };
18
+ }
19
+
20
+ export function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {
21
+ const globalRegimes = Object.values(GlobalRegime);
22
+ const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
23
+
24
+ if (!selectedGlobalRegime) throw Error(`LegalForm #${idLegalForm} not implemented`);
25
+ return selectedGlobalRegime;
26
+ }
@@ -1,14 +0,0 @@
1
- import { ICalendarEvent } from './ICalendarEvent';
2
- import { ISupervision } from './ISupervision';
3
- export interface IBalanceSheetLiquidation {
4
- id?: number;
5
- dateEnd: Date | null;
6
- state: number;
7
- deadline: Date | null;
8
- idCalendarEvent: number | null;
9
- createdAt?: Date | null;
10
- updatedAt?: Date | null;
11
- calendarEvent: ICalendarEvent;
12
- supervision: ISupervision;
13
- }
14
- //# sourceMappingURL=IBalanceSheetLiquidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IBalanceSheetLiquidation.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IBalanceSheetLiquidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,wBAAwB;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,aAAa,EAAE,cAAc,CAAC;IAC9B,WAAW,EAAE,YAAY,CAAC;CAC3B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IBalanceSheetLiquidation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IBalanceSheetLiquidation.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IBalanceSheetLiquidation.ts"],"names":[],"mappings":"","sourcesContent":["import { ICalendarEvent } from './ICalendarEvent';\nimport { ISupervision } from './ISupervision';\n\n// balanceSheetLiquidation\nexport interface IBalanceSheetLiquidation {\n id?: number;\n dateEnd: Date | null;\n state: number;\n deadline: Date | null;\n idCalendarEvent: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n calendarEvent: ICalendarEvent;\n supervision: ISupervision;\n}\n"]}
@@ -1,14 +0,0 @@
1
- import { ICalendarEvent } from './ICalendarEvent';
2
- import { ISupervision } from './ISupervision';
3
- export interface IBalanceSheetPartial {
4
- id?: number;
5
- dateEnd: Date | null;
6
- state: number;
7
- deadline: Date | null;
8
- idCalendarEvent: number | null;
9
- createdAt?: Date | null;
10
- updatedAt?: Date | null;
11
- calendarEvent: ICalendarEvent;
12
- supervision: ISupervision;
13
- }
14
- //# sourceMappingURL=IBalanceSheetPartial.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IBalanceSheetPartial.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IBalanceSheetPartial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,aAAa,EAAE,cAAc,CAAC;IAC9B,WAAW,EAAE,YAAY,CAAC;CAC3B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IBalanceSheetPartial.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IBalanceSheetPartial.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IBalanceSheetPartial.ts"],"names":[],"mappings":"","sourcesContent":["import { ICalendarEvent } from './ICalendarEvent';\nimport { ISupervision } from './ISupervision';\n\n// balanceSheetPartial\nexport interface IBalanceSheetPartial {\n id?: number;\n dateEnd: Date | null;\n state: number;\n deadline: Date | null;\n idCalendarEvent: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n calendarEvent: ICalendarEvent;\n supervision: ISupervision;\n}\n"]}
@@ -1,17 +0,0 @@
1
- import { ICalendarEvent } from './ICalendarEvent';
2
- import { ISupervision } from './ISupervision';
3
-
4
- // balanceSheetLiquidation
5
- export interface IBalanceSheetLiquidation {
6
- id?: number;
7
- dateEnd: Date | null;
8
- state: number;
9
- deadline: Date | null;
10
- idCalendarEvent: number | null;
11
- createdAt?: Date | null;
12
- updatedAt?: Date | null;
13
-
14
- // Associations
15
- calendarEvent: ICalendarEvent;
16
- supervision: ISupervision;
17
- }
@@ -1,17 +0,0 @@
1
- import { ICalendarEvent } from './ICalendarEvent';
2
- import { ISupervision } from './ISupervision';
3
-
4
- // balanceSheetPartial
5
- export interface IBalanceSheetPartial {
6
- id?: number;
7
- dateEnd: Date | null;
8
- state: number;
9
- deadline: Date | null;
10
- idCalendarEvent: number | null;
11
- createdAt?: Date | null;
12
- updatedAt?: Date | null;
13
-
14
- // Associations
15
- calendarEvent: ICalendarEvent;
16
- supervision: ISupervision;
17
- }