@silexpert/core 0.4.127 → 0.4.129

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 (200) hide show
  1. package/es/api/resources/GeneralLedger.js +2 -2
  2. package/es/api/resources/GeneralLedger.js.map +1 -1
  3. package/es/api/resources/Revision.d.ts +6 -0
  4. package/es/api/resources/Revision.d.ts.map +1 -0
  5. package/es/api/resources/Revision.js +7 -0
  6. package/es/api/resources/Revision.js.map +1 -0
  7. package/es/api/resources/Transaction.d.ts +2 -1
  8. package/es/api/resources/Transaction.d.ts.map +1 -1
  9. package/es/api/resources/Transaction.js +3 -0
  10. package/es/api/resources/Transaction.js.map +1 -1
  11. package/es/api/resources/WorkingSchedule.d.ts +6 -0
  12. package/es/api/resources/WorkingSchedule.d.ts.map +1 -0
  13. package/es/api/resources/WorkingSchedule.js +12 -0
  14. package/es/api/resources/WorkingSchedule.js.map +1 -0
  15. package/es/api/resources.d.ts +4 -0
  16. package/es/api/resources.d.ts.map +1 -1
  17. package/es/api/resources.js +4 -0
  18. package/es/api/resources.js.map +1 -1
  19. package/es/types/Enum/Aspone.d.ts +2 -1
  20. package/es/types/Enum/Aspone.d.ts.map +1 -1
  21. package/es/types/Enum/Aspone.js +1 -0
  22. package/es/types/Enum/Aspone.js.map +1 -1
  23. package/es/types/Enum/BalanceSheetQuestion.d.ts +7 -1
  24. package/es/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
  25. package/es/types/Enum/BalanceSheetQuestion.js +6 -0
  26. package/es/types/Enum/BalanceSheetQuestion.js.map +1 -1
  27. package/es/types/Enum/CerfaType.d.ts +2 -1
  28. package/es/types/Enum/CerfaType.d.ts.map +1 -1
  29. package/es/types/Enum/CerfaType.js +1 -0
  30. package/es/types/Enum/CerfaType.js.map +1 -1
  31. package/es/types/Enum/Currency.d.ts +4 -0
  32. package/es/types/Enum/Currency.d.ts.map +1 -0
  33. package/es/types/Enum/Currency.js +5 -0
  34. package/es/types/Enum/Currency.js.map +1 -0
  35. package/es/types/Enum/JeDeclare.d.ts +24 -0
  36. package/es/types/Enum/JeDeclare.d.ts.map +1 -0
  37. package/es/types/Enum/JeDeclare.js +28 -0
  38. package/es/types/Enum/JeDeclare.js.map +1 -0
  39. package/es/types/Enum/PartnerTransactionType.d.ts +3 -1
  40. package/es/types/Enum/PartnerTransactionType.d.ts.map +1 -1
  41. package/es/types/Enum/PartnerTransactionType.js +2 -0
  42. package/es/types/Enum/PartnerTransactionType.js.map +1 -1
  43. package/es/types/Interface/api/accountingTransaction/DeleteInvoices.d.ts +11 -0
  44. package/es/types/Interface/api/accountingTransaction/DeleteInvoices.d.ts.map +1 -0
  45. package/es/types/Interface/api/accountingTransaction/DeleteInvoices.js +46 -0
  46. package/es/types/Interface/api/accountingTransaction/DeleteInvoices.js.map +1 -0
  47. package/es/types/Interface/api/aspone/ReadInterchange.d.ts +1 -1
  48. package/es/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
  49. package/es/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
  50. package/es/types/Interface/api/aspone/Util.d.ts +2 -0
  51. package/es/types/Interface/api/aspone/Util.d.ts.map +1 -1
  52. package/es/types/Interface/api/aspone/Util.js.map +1 -1
  53. package/es/types/Interface/api/cerfa/2572.d.ts +149 -0
  54. package/es/types/Interface/api/cerfa/2572.d.ts.map +1 -0
  55. package/es/types/Interface/api/cerfa/2572.js +5 -0
  56. package/es/types/Interface/api/cerfa/2572.js.map +1 -0
  57. package/es/types/Interface/api/cerfa/CreateCerfa.d.ts +1 -0
  58. package/es/types/Interface/api/cerfa/CreateCerfa.d.ts.map +1 -1
  59. package/es/types/Interface/api/cerfa/CreateCerfa.js +1 -0
  60. package/es/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
  61. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.d.ts +7 -0
  62. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.d.ts.map +1 -0
  63. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.js +37 -0
  64. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.js.map +1 -0
  65. package/es/types/Interface/api/jeDeclare/Util.d.ts +68 -0
  66. package/es/types/Interface/api/jeDeclare/Util.d.ts.map +1 -0
  67. package/es/types/Interface/api/jeDeclare/Util.js +2 -0
  68. package/es/types/Interface/api/jeDeclare/Util.js.map +1 -0
  69. package/es/types/Interface/api/jeDeclare/UtilCFONB.d.ts +23 -0
  70. package/es/types/Interface/api/jeDeclare/UtilCFONB.d.ts.map +1 -0
  71. package/es/types/Interface/api/jeDeclare/UtilCFONB.js +378 -0
  72. package/es/types/Interface/api/jeDeclare/UtilCFONB.js.map +1 -0
  73. package/es/types/Interface/api/log/CreateLog.d.ts +1 -0
  74. package/es/types/Interface/api/log/CreateLog.d.ts.map +1 -1
  75. package/es/types/Interface/api/log/CreateLog.js.map +1 -1
  76. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.d.ts.map +1 -1
  77. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js +0 -6
  78. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js.map +1 -1
  79. package/es/types/Interface/api/registration/CreateRegistration.d.ts +2 -1
  80. package/es/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  81. package/es/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  82. package/es/types/Interface/api/revision/QueryRevision.d.ts +6 -0
  83. package/es/types/Interface/api/revision/QueryRevision.d.ts.map +1 -0
  84. package/es/types/Interface/api/revision/QueryRevision.js +29 -0
  85. package/es/types/Interface/api/revision/QueryRevision.js.map +1 -0
  86. package/es/types/Interface/api/revision/ReadRevision.d.ts +14 -0
  87. package/es/types/Interface/api/revision/ReadRevision.d.ts.map +1 -0
  88. package/es/types/Interface/api/revision/ReadRevision.js +2 -0
  89. package/es/types/Interface/api/revision/ReadRevision.js.map +1 -0
  90. package/es/types/Interface/api/revision/Revision.d.ts +5 -0
  91. package/es/types/Interface/api/revision/Revision.d.ts.map +1 -0
  92. package/es/types/Interface/api/revision/Revision.js +2 -0
  93. package/es/types/Interface/api/revision/Revision.js.map +1 -0
  94. package/es/types/Interface/api/revision/RevisionObject.d.ts +10 -0
  95. package/es/types/Interface/api/revision/RevisionObject.d.ts.map +1 -0
  96. package/es/types/Interface/api/revision/RevisionObject.js +2 -0
  97. package/es/types/Interface/api/revision/RevisionObject.js.map +1 -0
  98. package/es/types/Interface/api/woocommerce/InvoicesWoocommerce.d.ts +1 -0
  99. package/es/types/Interface/api/woocommerce/InvoicesWoocommerce.d.ts.map +1 -1
  100. package/es/types/Interface/api/woocommerce/InvoicesWoocommerce.js +4 -0
  101. package/es/types/Interface/api/woocommerce/InvoicesWoocommerce.js.map +1 -1
  102. package/es/types/Interface/models/IApiError.d.ts +2 -1
  103. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  104. package/es/types/Interface/models/IApiError.js +2 -0
  105. package/es/types/Interface/models/IApiError.js.map +1 -1
  106. package/es/types/Interface/models/IUser.d.ts +1 -0
  107. package/es/types/Interface/models/IUser.d.ts.map +1 -1
  108. package/es/types/Interface/models/IUser.js.map +1 -1
  109. package/es/types/Interface/models/IWorkingSchedule.d.ts +3 -1
  110. package/es/types/Interface/models/IWorkingSchedule.d.ts.map +1 -1
  111. package/es/types/Interface/models/IWorkingSchedule.js.map +1 -1
  112. package/es/types/index.d.ts +10 -0
  113. package/es/types/index.d.ts.map +1 -1
  114. package/es/types/index.js +10 -0
  115. package/es/types/index.js.map +1 -1
  116. package/js/api/resources/GeneralLedger.js +2 -2
  117. package/js/api/resources/GeneralLedger.js.map +1 -1
  118. package/js/api/resources/Revision.js +20 -0
  119. package/js/api/resources/Revision.js.map +1 -0
  120. package/js/api/resources/Transaction.js +6 -0
  121. package/js/api/resources/Transaction.js.map +1 -1
  122. package/js/api/resources/WorkingSchedule.js +23 -0
  123. package/js/api/resources/WorkingSchedule.js.map +1 -0
  124. package/js/api/resources.js +7 -1
  125. package/js/api/resources.js.map +1 -1
  126. package/js/types/Enum/Aspone.js +1 -0
  127. package/js/types/Enum/Aspone.js.map +1 -1
  128. package/js/types/Enum/BalanceSheetQuestion.js +7 -0
  129. package/js/types/Enum/BalanceSheetQuestion.js.map +1 -1
  130. package/js/types/Enum/CerfaType.js +1 -0
  131. package/js/types/Enum/CerfaType.js.map +1 -1
  132. package/js/types/Enum/Currency.js +11 -0
  133. package/js/types/Enum/Currency.js.map +1 -0
  134. package/js/types/Enum/JeDeclare.js +40 -0
  135. package/js/types/Enum/JeDeclare.js.map +1 -0
  136. package/js/types/Enum/PartnerTransactionType.js +2 -0
  137. package/js/types/Enum/PartnerTransactionType.js.map +1 -1
  138. package/js/types/Interface/api/accountingTransaction/DeleteInvoices.js +41 -0
  139. package/js/types/Interface/api/accountingTransaction/DeleteInvoices.js.map +1 -0
  140. package/js/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
  141. package/js/types/Interface/api/aspone/Util.js.map +1 -1
  142. package/js/types/Interface/api/cerfa/2572.js +14 -0
  143. package/js/types/Interface/api/cerfa/2572.js.map +1 -0
  144. package/js/types/Interface/api/cerfa/CreateCerfa.js +12 -0
  145. package/js/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
  146. package/js/types/Interface/api/jeDeclare/CreateDocumentsParams.js +37 -0
  147. package/js/types/Interface/api/jeDeclare/CreateDocumentsParams.js.map +1 -0
  148. package/js/types/Interface/api/jeDeclare/Util.js +6 -0
  149. package/js/types/Interface/api/jeDeclare/Util.js.map +1 -0
  150. package/js/types/Interface/api/jeDeclare/UtilCFONB.js +394 -0
  151. package/js/types/Interface/api/jeDeclare/UtilCFONB.js.map +1 -0
  152. package/js/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js +2 -6
  153. package/js/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js.map +1 -1
  154. package/js/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  155. package/js/types/Interface/api/revision/QueryRevision.js +33 -0
  156. package/js/types/Interface/api/revision/QueryRevision.js.map +1 -0
  157. package/js/types/Interface/api/revision/ReadRevision.js +6 -0
  158. package/js/types/Interface/api/revision/ReadRevision.js.map +1 -0
  159. package/js/types/Interface/api/revision/Revision.js +6 -0
  160. package/js/types/Interface/api/revision/Revision.js.map +1 -0
  161. package/js/types/Interface/api/revision/RevisionObject.js +6 -0
  162. package/js/types/Interface/api/revision/RevisionObject.js.map +1 -0
  163. package/js/types/Interface/api/woocommerce/InvoicesWoocommerce.js +2 -0
  164. package/js/types/Interface/api/woocommerce/InvoicesWoocommerce.js.map +1 -1
  165. package/js/types/Interface/models/IApiError.js +3 -1
  166. package/js/types/Interface/models/IApiError.js.map +1 -1
  167. package/js/types/index.js +120 -0
  168. package/js/types/index.js.map +1 -1
  169. package/package.json +1 -1
  170. package/ts/api/resources/GeneralLedger.ts +2 -2
  171. package/ts/api/resources/Revision.ts +8 -0
  172. package/ts/api/resources/Transaction.ts +5 -1
  173. package/ts/api/resources/WorkingSchedule.ts +12 -0
  174. package/ts/api/resources.ts +4 -0
  175. package/ts/types/Enum/Aspone.ts +1 -0
  176. package/ts/types/Enum/BalanceSheetQuestion.ts +7 -0
  177. package/ts/types/Enum/CerfaType.ts +1 -0
  178. package/ts/types/Enum/Currency.ts +3 -0
  179. package/ts/types/Enum/JeDeclare.ts +26 -0
  180. package/ts/types/Enum/PartnerTransactionType.ts +2 -0
  181. package/ts/types/Interface/api/accountingTransaction/DeleteInvoices.ts +37 -0
  182. package/ts/types/Interface/api/aspone/ReadInterchange.ts +1 -1
  183. package/ts/types/Interface/api/aspone/Util.ts +3 -0
  184. package/ts/types/Interface/api/cerfa/2572.ts +150 -0
  185. package/ts/types/Interface/api/cerfa/CreateCerfa.ts +1 -0
  186. package/ts/types/Interface/api/jeDeclare/CreateDocumentsParams.ts +23 -0
  187. package/ts/types/Interface/api/jeDeclare/Util.ts +69 -0
  188. package/ts/types/Interface/api/jeDeclare/UtilCFONB.ts +387 -0
  189. package/ts/types/Interface/api/log/CreateLog.ts +1 -0
  190. package/ts/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.ts +0 -6
  191. package/ts/types/Interface/api/registration/CreateRegistration.ts +2 -1
  192. package/ts/types/Interface/api/revision/QueryRevision.ts +16 -0
  193. package/ts/types/Interface/api/revision/ReadRevision.ts +14 -0
  194. package/ts/types/Interface/api/revision/Revision.ts +5 -0
  195. package/ts/types/Interface/api/revision/RevisionObject.ts +10 -0
  196. package/ts/types/Interface/api/woocommerce/InvoicesWoocommerce.ts +2 -0
  197. package/ts/types/Interface/models/IApiError.ts +2 -0
  198. package/ts/types/Interface/models/IUser.ts +1 -0
  199. package/ts/types/Interface/models/IWorkingSchedule.ts +3 -1
  200. package/ts/types/index.ts +10 -1
@@ -0,0 +1,150 @@
1
+ type BaseAndAmount = {
2
+ base: number;
3
+ amount: number;
4
+ };
5
+
6
+ type Tax = {
7
+ normalRate: BaseAndAmount;
8
+ normalRate2: BaseAndAmount;
9
+ reduceRate: BaseAndAmount;
10
+ addedValue: { amount: number; }
11
+ other: { amount: number; }
12
+ total: number;
13
+ };
14
+
15
+ type Exercice = {
16
+ startDate: string;
17
+ endDate: string;
18
+ };
19
+
20
+ type Society = {
21
+ name: string;
22
+ address: string;
23
+ };
24
+
25
+ type PreFinancingWithAmount = {
26
+ preFinancing: number;
27
+ amount: number;
28
+ };
29
+
30
+ type Debts = {
31
+ onCompanyTax: number;
32
+ notOnCompanyTax: number;
33
+ VEL: number;
34
+ PRE: number;
35
+ new: number;
36
+ companyTaxAfterImputation: number;
37
+ reducedTax: {
38
+ inEurope: number;
39
+ amount: number;
40
+ }
41
+ balanceInPreviousExercises: number;
42
+ jobCredit: PreFinancingWithAmount;
43
+ jobCreditForLongExercises: PreFinancingWithAmount;
44
+ jobCreditForPreviousExercises: number;
45
+ corse: number;
46
+ CORInPreviousExercise: number;
47
+ deficit: number;
48
+ RADInPreviousExercise: number;
49
+ CIRcredit: number;
50
+ CIRsolde: number;
51
+ reportedInLine2B11: number;
52
+ subTotal: number;
53
+ inDepositLimit: number;
54
+ balanceDebtInPreviousExercises: number;
55
+ FOR: number;
56
+ RAC: number;
57
+ FAM: number;
58
+ CIN: number;
59
+ BIO: number;
60
+ PHO: number;
61
+ AUD: number;
62
+ ART: number;
63
+ CJV: number;
64
+ CPE: number;
65
+ CCI: number;
66
+ PTR: number;
67
+ CIO: PreFinancingWithAmount;
68
+ COL: PreFinancingWithAmount;
69
+ CSV: number;
70
+ CAC: number;
71
+ REB: number;
72
+ BLC: number;
73
+ RTD: number;
74
+ CPG: number;
75
+ HVE: number;
76
+ newUnlistedReceivables: number;
77
+ inLine2C22: number;
78
+ subTotal2: number;
79
+ afterImputation: number;
80
+ payment: number;
81
+ taxAmount: number;
82
+ CSB: { base: number };
83
+ };
84
+
85
+ type SocialContribution = {
86
+ CSB: BaseAndAmount;
87
+ strangers: number;
88
+ onCompanyTax: number;
89
+ payment: number;
90
+ };
91
+
92
+ type YearlyContribution = {
93
+ onRent: number;
94
+ amount: number;
95
+ payment: number;
96
+ };
97
+
98
+ type AmountToPayWithOverage = {
99
+ amountToPay: number;
100
+ overage: number;
101
+ };
102
+
103
+ type Summary = {
104
+ companyTax: AmountToPayWithOverage
105
+ socialContribution: AmountToPayWithOverage;
106
+ yearlyContribution: AmountToPayWithOverage;
107
+ total: AmountToPayWithOverage
108
+ amountToPay: number;
109
+ overage: number;
110
+ imputedOverage: number;
111
+ contribution: number;
112
+ limitDate: string;
113
+ amountToInpute: number;
114
+ overageRefundAsked: number;
115
+ };
116
+
117
+ type Payment = {
118
+ date: number;
119
+ phone: number;
120
+ isTransfer: number;
121
+ isCheck: number;
122
+ isElectronicPayment: number;
123
+ contribution: number;
124
+ limitDate: number;
125
+ amountToInpute: number;
126
+ };
127
+
128
+ type Administration = {
129
+ amount: number;
130
+ date: string;
131
+ operationNumber: number;
132
+ receptionDate: string;
133
+ };
134
+
135
+ export class Cerfa2572 {
136
+ siren: string;
137
+ exercice: Exercice;
138
+ society: Society;
139
+ tax: Tax;
140
+ debts: Debts;
141
+ socialContribution: SocialContribution;
142
+ yearlyContribution: YearlyContribution;
143
+ summary: Summary;
144
+ payment: Payment;
145
+ administration?: Administration;
146
+ }
147
+
148
+ export type Prepare2572Params = { idSociety: number; idExercice: number; values: Cerfa2572 };
149
+
150
+ export class ParamsGenerate2572 {}
@@ -5,6 +5,7 @@ export * from './2033';
5
5
  export * from './2035';
6
6
  export * from './2050';
7
7
  export * from './2065';
8
+ export * from './2572';
8
9
 
9
10
  export interface DeterminedResult {
10
11
  incomeExpenditure: boolean; // d'après les règles « recettes-dépenses »
@@ -0,0 +1,23 @@
1
+ import { IsBoolean, IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../..';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class CreateDocumentsParams {
6
+ @ApiProperty()
7
+ @IsString()
8
+ itemStatus: string;
9
+
10
+ @ApiProperty()
11
+ @IsString()
12
+ procedureType: string;
13
+
14
+ @ApiProperty()
15
+ @IsString()
16
+ listType: string;
17
+
18
+ @ApiPropertyOptional()
19
+ @IsBoolean()
20
+ @ToBoolean()
21
+ @IsOptional()
22
+ forceTestMode?: boolean;
23
+ }
@@ -0,0 +1,69 @@
1
+ type WSDLJeDeClare = {
2
+ url: string;
3
+ };
4
+
5
+ export type AccessKeysJeDeclare = {
6
+ login: string;
7
+ password: string;
8
+ editor: string;
9
+ software: string;
10
+ wsdl: WSDLJeDeClare;
11
+ };
12
+
13
+ export type GetDocumentParams = {
14
+ itemStatus: string;
15
+ procedureType: string;
16
+ listType: string;
17
+ forceTestMode?: boolean;
18
+ };
19
+
20
+ export type ListDocumentAvailability = DocumentAvailability[];
21
+
22
+ export type DocumentAvailability = {
23
+ 'ns2:numero': string[];
24
+ 'ns2:statut': string[];
25
+ 'ns2:typeDePiece': string[];
26
+ };
27
+
28
+ export type BankStatementCFONBStructure = {
29
+ previous: { [key: string]: string | null } | null;
30
+ transactions: LineStructure[];
31
+ last: { [key: string]: string | null } | null;
32
+ };
33
+
34
+ export type LineStructureUnknowProperty = { [key: string]: string | null } | null;
35
+ export type LineStructure = LineStructureUnknowProperty & {
36
+ detail: { [key: string]: string | null } | null;
37
+ };
38
+
39
+ export type AmountType = 'credit' | 'debit' | 'neutral' | 'unknown';
40
+
41
+ type UsableBankStatementTransaction = {
42
+ dateValue?: string;
43
+ id?: number;
44
+ label: string | null;
45
+ debit: number;
46
+ credit: number;
47
+ idCurrency: number | null;
48
+ complementaryLabel: string | null;
49
+ };
50
+
51
+ type BankStatementData = {
52
+ balance: number;
53
+ dateBalance?: string;
54
+ };
55
+
56
+ export type UsableBankStatement = {
57
+ iban: string | null;
58
+ previous: BankStatementData;
59
+ next: BankStatementData;
60
+ name: string | null;
61
+ transactions: UsableBankStatementTransaction[];
62
+ };
63
+
64
+ export type GetDocumentsParams = {
65
+ itemStatus: string;
66
+ procedureType: string;
67
+ listType: string;
68
+ forceTestMode?: boolean;
69
+ };
@@ -0,0 +1,387 @@
1
+ import { AmountType } from './Util';
2
+
3
+ export const CFONB_START_LINE = 0;
4
+ export const CFONB_START_LINE_LENGTH = 2;
5
+ export const CFFONB_LINE_LENGHT = 120;
6
+ export const CFONB_PREVIOUS_BALANCE_CODE = '01';
7
+ export const CFONB_DETAIL_ENTRY_CODE = '04';
8
+ export const CFONB_COMPLEMENTARY_LABEL_CODE = '05';
9
+ export const CFONB_NEW_BALANCE_CODE = '07';
10
+
11
+ export type CFONBStructureObejct = { [key: string]: { start: number, length: number }[] };
12
+
13
+ export const CFONB_PREVIOUS_BALANCE: CFONBStructureObejct = {
14
+ recordCode: [{
15
+ start: 1,
16
+ length: 2,
17
+ }],
18
+ bankCode: [{
19
+ start: 3,
20
+ length: 5,
21
+ }],
22
+ designatedArea1: [{
23
+ start: 8,
24
+ length: 4,
25
+ }],
26
+ counterCode: [{
27
+ start: 12,
28
+ length: 5,
29
+ }],
30
+ currencyCode: [{
31
+ start: 17,
32
+ length: 3,
33
+ }],
34
+ decimalNumber: [{
35
+ start: 20,
36
+ length: 1,
37
+ }],
38
+ designatedArea2: [{
39
+ start: 21,
40
+ length: 1,
41
+ }],
42
+ accountNumber: [{
43
+ start: 22,
44
+ length: 11,
45
+ }],
46
+ designatedArea3: [{
47
+ start: 33,
48
+ length: 2,
49
+ }],
50
+ previousSoldeDate: [{
51
+ start: 35,
52
+ length: 6,
53
+ }],
54
+ designatedArea4: [{
55
+ start: 41,
56
+ length: 50,
57
+ }],
58
+ amount: [{
59
+ start: 91,
60
+ length: 14,
61
+ }],
62
+ designatedArea5: [{
63
+ start: 105,
64
+ length: 16,
65
+ }],
66
+ };
67
+
68
+ export const CFONB_ENTRY_DETAIL: CFONBStructureObejct = {
69
+ recordCode: [{
70
+ start: 1,
71
+ length: 2,
72
+ }],
73
+ bankCode: [{
74
+ start: 3,
75
+ length: 5,
76
+ }],
77
+ operationSGCode: [{
78
+ start: 8,
79
+ length: 4,
80
+ }],
81
+ counterCode: [{
82
+ start: 12,
83
+ length: 5,
84
+ }],
85
+ currencyCode: [{
86
+ start: 17,
87
+ length: 3,
88
+ }],
89
+ decimalNumber: [{
90
+ start: 20,
91
+ length: 1,
92
+ }],
93
+ SITIndex: [{
94
+ start: 21,
95
+ length: 1,
96
+ }],
97
+ accountNumber: [{
98
+ start: 22,
99
+ length: 11,
100
+ }],
101
+ operationInterbank_code: [{
102
+ start: 33,
103
+ length: 2,
104
+ }],
105
+ entryDate: [{
106
+ start: 35,
107
+ length: 6,
108
+ }],
109
+ rejectMotifCode: [{
110
+ start: 41,
111
+ length: 2,
112
+ }],
113
+ valueDate: [{
114
+ start: 43,
115
+ length: 6,
116
+ }],
117
+ operationLabel: [{
118
+ start: 49,
119
+ length: 31,
120
+ }],
121
+ designatedArea1: [{
122
+ start: 80,
123
+ length: 2,
124
+ }],
125
+ entryNumber: [{
126
+ start: 82,
127
+ length: 7,
128
+ }],
129
+ exonerationCode: [{
130
+ start: 89,
131
+ length: 1,
132
+ }],
133
+ designatedArea2: [{
134
+ start: 90,
135
+ length: 1,
136
+ }],
137
+ amount: [{
138
+ start: 91,
139
+ length: 14,
140
+ }],
141
+ operationRef: [{
142
+ start: 105,
143
+ length: 16,
144
+ }],
145
+ };
146
+
147
+ export const CFONB_COMPLEMENTARY_LABEL: CFONBStructureObejct = {
148
+ recordCode: [{
149
+ start: 1,
150
+ length: 2,
151
+ }],
152
+ bankCode: [{
153
+ start: 3,
154
+ length: 5,
155
+ }],
156
+ operationSGCode: [{
157
+ start: 8,
158
+ length: 4,
159
+ }],
160
+ counterCode: [{
161
+ start: 12,
162
+ length: 5,
163
+ }],
164
+ designatedArea1: [{
165
+ start: 17,
166
+ length: 5,
167
+ }],
168
+ account_Number: [{
169
+ start: 22,
170
+ length: 11,
171
+ }],
172
+ operationInterbankCode: [{
173
+ start: 33,
174
+ length: 2,
175
+ }],
176
+ entryDate: [{
177
+ start: 35,
178
+ length: 6,
179
+ }],
180
+ complementaryLabel: [{
181
+ start: 41,
182
+ length: 41,
183
+ }],
184
+ entryNumber: [{
185
+ start: 82,
186
+ length: 8,
187
+ }],
188
+ designatedArea2: [{
189
+ start: 89,
190
+ length: 2,
191
+ }],
192
+ '04Ammount': [{
193
+ start: 91,
194
+ length: 14,
195
+ }],
196
+ designatedArea3: [{
197
+ start: 105,
198
+ length: 16,
199
+ }],
200
+ };
201
+
202
+ export const CFONB_NEW_BALANCE: CFONBStructureObejct = {
203
+ recordCode: [{
204
+ start: 1,
205
+ length: 2,
206
+ }],
207
+ bankCode: [{
208
+ start: 3,
209
+ length: 5,
210
+ }],
211
+ designatedArea1: [{
212
+ start: 8,
213
+ length: 4,
214
+ }],
215
+ counterCode: [{
216
+ start: 12,
217
+ length: 5,
218
+ }],
219
+ currencyCode: [{
220
+ start: 17,
221
+ length: 3,
222
+ }],
223
+ decimalNumber: [{
224
+ start: 20,
225
+ length: 1,
226
+ }],
227
+ designatedArea2: [{
228
+ start: 21,
229
+ length: 1,
230
+ }],
231
+ accountNumber: [{
232
+ start: 22,
233
+ length: 11,
234
+ }],
235
+ designatedArea3: [{
236
+ start: 33,
237
+ length: 2,
238
+ }],
239
+ dataNewBalance: [{
240
+ start: 35,
241
+ length: 6,
242
+ }],
243
+ designatedArea4: [{
244
+ start: 41,
245
+ length: 50,
246
+ }],
247
+ amount: [{
248
+ start: 91,
249
+ length: 14,
250
+ }],
251
+ designatedArea5: [{
252
+ start: 105,
253
+ length: 16,
254
+ }],
255
+ };
256
+
257
+ export function initializeCFONBStructreObject(structure:CFONBStructureObejct): { [key: string]: string | null } | null {
258
+ let object: { [key: string]: string | null } | null = null;
259
+ Object.keys(structure).forEach((key) => {
260
+ object = { ...(object ? { ...object, [key]: null } : { [key]: null }) };
261
+ });
262
+ return object;
263
+ }
264
+
265
+ export function codeInterbankToTypeAmount(code: string | null): AmountType {
266
+ switch (code) {
267
+ case '02':
268
+ case '04':
269
+ case '05':
270
+ case '12':
271
+ case '13':
272
+ case '15':
273
+ case '16':
274
+ case '17':
275
+ case '18':
276
+ case '24':
277
+ case '25':
278
+ case '30':
279
+ case '31':
280
+ case '32':
281
+ case '35':
282
+ case '37':
283
+ case '39':
284
+ case '40':
285
+ case '45':
286
+ case '47':
287
+ case '49':
288
+ case '54':
289
+ case '57':
290
+ case '59':
291
+ case '63':
292
+ case '69':
293
+ case '71':
294
+ case '73':
295
+ case '74':
296
+ case '77':
297
+ case '78':
298
+ case '81':
299
+ case '85':
300
+ case '87':
301
+ case '89':
302
+ case '94':
303
+ case '97':
304
+ case 'A1':
305
+ case 'A2':
306
+ case 'A3':
307
+ case 'A4':
308
+ case 'B5':
309
+ case 'B6':
310
+ case 'C2':
311
+ case 'C3':
312
+ case 'C5':
313
+ return 'credit';
314
+ case '01':
315
+ case '03':
316
+ case '06':
317
+ case '07':
318
+ case '08':
319
+ case '10':
320
+ case '14':
321
+ case '19':
322
+ case '20':
323
+ case '21':
324
+ case '22':
325
+ case '23':
326
+ case '26':
327
+ case '27':
328
+ case '28':
329
+ case '29':
330
+ case '33':
331
+ case '36':
332
+ case '38':
333
+ case '44':
334
+ case '46':
335
+ case '48':
336
+ case '50':
337
+ case '53':
338
+ case '56':
339
+ case '58':
340
+ case '62':
341
+ case '64':
342
+ case '65':
343
+ case '66':
344
+ case '67':
345
+ case '68':
346
+ case '70':
347
+ case '72':
348
+ case '75':
349
+ case '76':
350
+ case '79':
351
+ case '80':
352
+ case '84':
353
+ case '88':
354
+ case '90':
355
+ case '95':
356
+ case '96':
357
+ case '98':
358
+ case 'A5':
359
+ case 'A6':
360
+ case 'B1':
361
+ case 'B2':
362
+ case 'B3':
363
+ case 'B4':
364
+ case 'C1':
365
+ case 'C4':
366
+ return 'debit';
367
+ // here we have a problème to infer the symbol for amount, because all this code have credit and debit. for now it will match credit when infering the amount in
368
+ // transformData function
369
+ case '11':
370
+ case '34':
371
+ case '41':
372
+ case '42':
373
+ case '43':
374
+ case '52':
375
+ case '55':
376
+ case '61':
377
+ case '82':
378
+ case '83':
379
+ case '91':
380
+ case '92':
381
+ case '93':
382
+ case '99':
383
+ return 'neutral';
384
+ default:
385
+ return 'unknown';
386
+ }
387
+ }
@@ -6,6 +6,7 @@ export type CreateLog = {
6
6
  client?: { idExercice?: number, idSociety?: number },
7
7
  idAction: ActionType,
8
8
  idTypeLog: number,
9
+ idBankAccount?: number,
9
10
  referer?: string,
10
11
  ip?: string
11
12
  };
@@ -38,18 +38,12 @@ export class CreateMachineLearningAnnotation {
38
38
  dateValue: string[];
39
39
 
40
40
  @ApiProperty()
41
- @IsInt({
42
- each: true,
43
- })
44
41
  @Min(0, {
45
42
  each: true,
46
43
  })
47
44
  credit: number[];
48
45
 
49
46
  @ApiProperty()
50
- @IsInt({
51
- each: true,
52
- })
53
47
  @Min(0, {
54
48
  each: true,
55
49
  })
@@ -2,7 +2,7 @@ import { IsEnum, IsOptional, IsBoolean } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { CerfaType } from '../../../Enum/CerfaType';
4
4
  import {
5
- ParamsGenerate2035, ParamsGenerate2035WithSuites, ParamsGenerate2033, ParamsGenerate2065, ParamsGenerate2031, ParamsGenerate2050,
5
+ ParamsGenerate2035, ParamsGenerate2035WithSuites, ParamsGenerate2033, ParamsGenerate2065, ParamsGenerate2031, ParamsGenerate2050, ParamsGenerate2572,
6
6
  } from '../cerfa/CreateCerfa';
7
7
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
8
8
 
@@ -15,6 +15,7 @@ export class CreateRegistration {
15
15
  cerfa2065?: ParamsGenerate2065;
16
16
  cerfa2031?: ParamsGenerate2031;
17
17
  cerfa2050?: ParamsGenerate2050;
18
+ cerfa2572?: ParamsGenerate2572;
18
19
  };
19
20
 
20
21
  @ApiProperty()
@@ -0,0 +1,16 @@
1
+ import { IsDate, IsInt } from 'class-validator';
2
+ import { ApiProperty } from '../../../..';
3
+
4
+ export class QueryRevision {
5
+ @ApiProperty()
6
+ @IsDate()
7
+ startDate: Date;
8
+
9
+ @ApiProperty()
10
+ @IsDate()
11
+ endDate: Date;
12
+
13
+ @ApiProperty()
14
+ @IsInt()
15
+ idSociety: number;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { IAccountDetail } from '../../models/IAccountDetail';
2
+
3
+ export interface ReadRevision {
4
+ balance: number;
5
+ account: {
6
+ id: number,
7
+ name: string | null,
8
+ number: number | null,
9
+ accountDetails: Array<IAccountDetail>
10
+ },
11
+ unlocked: number;
12
+ previousBalance: number;
13
+ nextBalance: number;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { IAccountingEntry } from '../../models/IAccountingEntry';
2
+
3
+ export interface Revision extends IAccountingEntry {
4
+ balance?: number | null;
5
+ }