@silexpert/core 1.2.15 → 1.2.17
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.
- package/dist/cjs/api/resources/Checklist.d.ts +2 -1
- package/dist/cjs/api/resources/Checklist.d.ts.map +1 -1
- package/dist/cjs/api/resources/Checklist.js +3 -0
- package/dist/cjs/api/resources/Checklist.js.map +1 -1
- package/dist/cjs/api/resources/Library.d.ts +3 -1
- package/dist/cjs/api/resources/Library.d.ts.map +1 -1
- package/dist/cjs/api/resources/Library.js +12 -0
- package/dist/cjs/api/resources/Library.js.map +1 -1
- package/dist/cjs/api/resources/Society.d.ts +2 -2
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js +4 -4
- package/dist/cjs/api/resources/Society.js.map +1 -1
- package/dist/cjs/api/resources/TimeRecorder.d.ts +3 -2
- package/dist/cjs/api/resources/TimeRecorder.d.ts.map +1 -1
- package/dist/cjs/api/resources/TimeRecorder.js +3 -0
- package/dist/cjs/api/resources/TimeRecorder.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js +0 -1
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/JuridicalSociety.d.ts +6 -0
- package/dist/cjs/types/Enum/JuridicalSociety.d.ts.map +1 -0
- package/dist/cjs/types/Enum/JuridicalSociety.js +10 -0
- package/dist/cjs/types/Enum/JuridicalSociety.js.map +1 -0
- package/dist/cjs/types/Interface/api/PaymentRecovery/Create.d.ts +1 -1
- package/dist/cjs/types/Interface/api/PaymentRecovery/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/PaymentRecovery/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/checklist/Query.d.ts +7 -0
- package/dist/cjs/types/Interface/api/checklist/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/checklist/Query.js +32 -1
- package/dist/cjs/types/Interface/api/checklist/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts +12 -0
- package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.js +55 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts +37 -29
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js +89 -31
- package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts +46 -29
- package/dist/cjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.js.map +1 -1
- package/dist/cjs/types/Interface/api/society/QueryUnpaid.d.ts +2 -0
- package/dist/cjs/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/society/QueryUnpaid.js +14 -0
- package/dist/cjs/types/Interface/api/society/QueryUnpaid.js.map +1 -1
- package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts +5 -1
- package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.js.map +1 -1
- package/dist/cjs/types/Interface/api/timeRecorder/CreateRecorder.d.ts +15 -0
- package/dist/cjs/types/Interface/api/timeRecorder/CreateRecorder.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/timeRecorder/CreateRecorder.js +82 -0
- package/dist/cjs/types/Interface/api/timeRecorder/CreateRecorder.js.map +1 -0
- package/dist/cjs/types/Interface/api/timeRecorder/Query.d.ts +3 -0
- package/dist/cjs/types/Interface/api/timeRecorder/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/timeRecorder/Query.js +9 -1
- package/dist/cjs/types/Interface/api/timeRecorder/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/timeRecorder/UpdateRecorder.d.ts +1 -0
- package/dist/cjs/types/Interface/api/timeRecorder/UpdateRecorder.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/timeRecorder/UpdateRecorder.js +7 -0
- package/dist/cjs/types/Interface/api/timeRecorder/UpdateRecorder.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/documents.js +1 -1
- package/dist/cjs/utils/documents.js.map +1 -1
- package/dist/mjs/api/resources/Checklist.d.ts +2 -1
- package/dist/mjs/api/resources/Checklist.d.ts.map +1 -1
- package/dist/mjs/api/resources/Checklist.js +6 -0
- package/dist/mjs/api/resources/Checklist.js.map +1 -1
- package/dist/mjs/api/resources/Library.d.ts +3 -1
- package/dist/mjs/api/resources/Library.d.ts.map +1 -1
- package/dist/mjs/api/resources/Library.js +12 -0
- package/dist/mjs/api/resources/Library.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts +2 -2
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js +4 -4
- package/dist/mjs/api/resources/Society.js.map +1 -1
- package/dist/mjs/api/resources/TimeRecorder.d.ts +3 -2
- package/dist/mjs/api/resources/TimeRecorder.d.ts.map +1 -1
- package/dist/mjs/api/resources/TimeRecorder.js +3 -0
- package/dist/mjs/api/resources/TimeRecorder.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js +0 -1
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/JuridicalSociety.d.ts +6 -0
- package/dist/mjs/types/Enum/JuridicalSociety.d.ts.map +1 -0
- package/dist/mjs/types/Enum/JuridicalSociety.js +7 -0
- package/dist/mjs/types/Enum/JuridicalSociety.js.map +1 -0
- package/dist/mjs/types/Interface/api/PaymentRecovery/Create.d.ts +1 -1
- package/dist/mjs/types/Interface/api/PaymentRecovery/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/PaymentRecovery/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/checklist/Query.d.ts +7 -0
- package/dist/mjs/types/Interface/api/checklist/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/checklist/Query.js +36 -1
- package/dist/mjs/types/Interface/api/checklist/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts +12 -0
- package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/library/QueryLibrary.js +62 -0
- package/dist/mjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts +37 -29
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js +101 -35
- package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts +46 -29
- package/dist/mjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/previsionalForm/PrevisionalFormPayload.js.map +1 -1
- package/dist/mjs/types/Interface/api/society/QueryUnpaid.d.ts +2 -0
- package/dist/mjs/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/society/QueryUnpaid.js +16 -0
- package/dist/mjs/types/Interface/api/society/QueryUnpaid.js.map +1 -1
- package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts +5 -1
- package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.js.map +1 -1
- package/dist/mjs/types/Interface/api/timeRecorder/CreateRecorder.d.ts +15 -0
- package/dist/mjs/types/Interface/api/timeRecorder/CreateRecorder.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/timeRecorder/CreateRecorder.js +89 -0
- package/dist/mjs/types/Interface/api/timeRecorder/CreateRecorder.js.map +1 -0
- package/dist/mjs/types/Interface/api/timeRecorder/Query.d.ts +3 -0
- package/dist/mjs/types/Interface/api/timeRecorder/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/timeRecorder/Query.js +8 -0
- package/dist/mjs/types/Interface/api/timeRecorder/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/timeRecorder/UpdateRecorder.d.ts +1 -0
- package/dist/mjs/types/Interface/api/timeRecorder/UpdateRecorder.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/timeRecorder/UpdateRecorder.js +8 -0
- package/dist/mjs/types/Interface/api/timeRecorder/UpdateRecorder.js.map +1 -1
- package/dist/mjs/types/index.d.ts +2 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +2 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/documents.js +1 -1
- package/dist/mjs/utils/documents.js.map +1 -1
- package/package.json +2 -1
- package/ts/api/resources/Checklist.ts +8 -1
- package/ts/api/resources/Library.ts +16 -0
- package/ts/api/resources/Society.ts +4 -4
- package/ts/api/resources/TimeRecorder.ts +7 -2
- package/ts/types/Enum/BalanceSheet.ts +0 -1
- package/ts/types/Enum/JuridicalSociety.ts +5 -0
- package/ts/types/Interface/api/PaymentRecovery/Create.ts +1 -1
- package/ts/types/Interface/api/checklist/Query.ts +26 -0
- package/ts/types/Interface/api/library/QueryLibrary.ts +46 -0
- package/ts/types/Interface/api/previsionalForm/CreatePrevisionalForm.ts +88 -32
- package/ts/types/Interface/api/previsionalForm/PrevisionalFormPayload.ts +50 -30
- package/ts/types/Interface/api/society/QueryUnpaid.ts +12 -0
- package/ts/types/Interface/api/society/ReadSocietyUnpaidStats.ts +5 -1
- package/ts/types/Interface/api/timeRecorder/CreateRecorder.ts +59 -0
- package/ts/types/Interface/api/timeRecorder/Query.ts +6 -0
- package/ts/types/Interface/api/timeRecorder/UpdateRecorder.ts +6 -0
- package/ts/types/index.ts +2 -0
- package/ts/utils/documents.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.17",
|
|
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",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"ejs": "^3.1.9",
|
|
77
77
|
"libphonenumber-js": "^1.11.12",
|
|
78
78
|
"mailparser": "^3.4.0",
|
|
79
|
+
"pdf2pic": "^3.1.3",
|
|
79
80
|
"rxjs": "^7.0.1",
|
|
80
81
|
"sms-segments-calculator": "^1.2.0",
|
|
81
82
|
"stripe": "^14.13.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import {
|
|
3
3
|
BasePaginate,
|
|
4
|
-
IChecklist, IChecklistType, QueryChecklistStatistic, QueryChecklistUpdate, QueryChecklistWallet, QueryGenerateAdvice, QueryGetAllBlockingIssues, QueryGetAllDeadlines, QueryGetAllQuestions, ReadChecklistDeadline, ReadChecklistWallet, UpdateAnswer,
|
|
4
|
+
IChecklist, IChecklistType, QueryChecklistGetPaginated, QueryChecklistStatistic, QueryChecklistUpdate, QueryChecklistWallet, QueryGenerateAdvice, QueryGetAllBlockingIssues, QueryGetAllDeadlines, QueryGetAllQuestions, ReadChecklistDeadline, ReadChecklistWallet, UpdateAnswer,
|
|
5
5
|
} from '../../types';
|
|
6
6
|
import { getAllBlockingIssues } from '../../utils/checklist';
|
|
7
7
|
import { Resource } from '../Resource';
|
|
@@ -39,6 +39,13 @@ export class Checklist extends Resource {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
getPaginated(params: QueryChecklistGetPaginated, signal?: AbortSignal): Promise<BasePaginate<ReadChecklistWallet>> {
|
|
43
|
+
return this.axios.$get('/checklists/paginate', {
|
|
44
|
+
...(signal ? { signal } : {}),
|
|
45
|
+
params,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
42
49
|
getStatisticsByAccountant(params: QueryChecklistStatistic, cancelToken?: CancelToken, signal?: AbortSignal): Promise<ReadChecklistWallet> {
|
|
43
50
|
return this.axios.$get('/checklists/statistics', {
|
|
44
51
|
...(cancelToken ? { cancelToken } : {}),
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import {
|
|
3
3
|
QueryLibraryFile, UpdateOrCreateGedFile, IGedFile, QueryDownloadFile, UpdateGedFile, QueryLastFileOfType, QueryLibrarySociety, BasePaginate, ReadSocietyLibrary,
|
|
4
|
+
ConvertFilePdfToImage,
|
|
4
5
|
} from '../../types';
|
|
6
|
+
import { ConvertResponse } from 'pdf2pic/dist/types/convertResponse';
|
|
5
7
|
|
|
6
8
|
export class Library extends Resource {
|
|
7
9
|
create(formData: FormData): Promise<IGedFile> {
|
|
@@ -56,4 +58,18 @@ export class Library extends Resource {
|
|
|
56
58
|
getPaginatedForSociety(idSociety: number, params: QueryLibrarySociety, signal: AbortSignal): Promise<BasePaginate<ReadSocietyLibrary>> {
|
|
57
59
|
return this.axios.$get(`/societies/${idSociety}/library`, { params, signal });
|
|
58
60
|
}
|
|
61
|
+
|
|
62
|
+
convertPdfToImage(body: Omit<ConvertFilePdfToImage, 'file'>, file: File): Promise<ConvertResponse> {
|
|
63
|
+
const formData = new FormData();
|
|
64
|
+
Object.entries(body).forEach(([key, value]) => {
|
|
65
|
+
if (value) {
|
|
66
|
+
formData.append(key, `${value}`);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
formData.append('file', file);
|
|
71
|
+
return this.axios.$post('/convert-pdf-to-image', formData, {
|
|
72
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
73
|
+
});
|
|
74
|
+
}
|
|
59
75
|
}
|
|
@@ -118,15 +118,15 @@ export class Society extends Resource {
|
|
|
118
118
|
return this.axios.$get('/society/archived', { params: query });
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
getUnpaids(query: QueryUnpaidSociety,
|
|
121
|
+
getUnpaids(query: QueryUnpaidSociety, signal?: AbortSignal): Promise<ISociety[]> {
|
|
122
122
|
return this.axios.$get('/society/unpaids', {
|
|
123
|
-
...(
|
|
123
|
+
...(signal ? { signal } : {}),
|
|
124
124
|
params: query });
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
getUnpaidsStats(
|
|
127
|
+
getUnpaidsStats(signal?: AbortSignal): Promise<ReadSocietyUnpaidStats> {
|
|
128
128
|
return this.axios.$get('/society/unpaids/stats', {
|
|
129
|
-
...(
|
|
129
|
+
...(signal ? { signal } : {}),
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import {
|
|
3
|
-
ReadAttendanceHours, QueryAttendance, QueryPaginatedDelays, ReadPaginatedDelays, BasePaginate, ReadUsersNotConnected,
|
|
3
|
+
ReadAttendanceHours, QueryAttendance, QueryPaginatedDelays, ReadPaginatedDelays, BasePaginate, ReadUsersNotConnected, UpdateRecorder, QueryTimeRecorderGetStats, ReadUsersAbsent, ReadPlaceToWork, QueryAttendanceForLastConnexion,
|
|
4
|
+
CreateRecorder,
|
|
5
|
+
QueryGetTimeRecorder,
|
|
4
6
|
} from '../../types';
|
|
5
7
|
|
|
6
8
|
export class TimeRecorder extends Resource {
|
|
7
|
-
create(payload:
|
|
9
|
+
create(payload: CreateRecorder): Promise<TimeRecorder> {
|
|
8
10
|
return this.axios.$post('/time-recorders', payload);
|
|
9
11
|
}
|
|
10
12
|
update(payload: UpdateRecorder): Promise<TimeRecorder> {
|
|
11
13
|
return this.axios.$put('/time-recorders', payload);
|
|
12
14
|
}
|
|
15
|
+
getCurrent(idUser: number, params: QueryGetTimeRecorder): Promise<TimeRecorder> {
|
|
16
|
+
return this.axios.$get(`/users/${idUser}/current`, { params });
|
|
17
|
+
}
|
|
13
18
|
getAllPresenceHoursByUser(idUser: number, params: QueryAttendance): Promise<ReadAttendanceHours> {
|
|
14
19
|
return this.axios.$get(`/users/${idUser}/attendances`,
|
|
15
20
|
{ params });
|
|
@@ -756,7 +756,6 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
|
|
|
756
756
|
name: 'Autres dettes',
|
|
757
757
|
key: 'OtherDebts',
|
|
758
758
|
accounts: ['411', '418', '4196', '4197', '464', '467', '4686', '471', '472', '478', '509'],
|
|
759
|
-
accountsDeducted: ['4198'],
|
|
760
759
|
accountsForceToDeduce: ['4198'],
|
|
761
760
|
// PASSIF Autres = lorsque l'entreprise doit de l'argent au client = somme débit > crédit (modifié)
|
|
762
761
|
idThirdPartyTypeToAdd: [ThirdPartyType.CUSTOMER, MathematicalSign.LESS],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IsArray,
|
|
3
3
|
IsBoolean,
|
|
4
|
+
IsDate,
|
|
4
5
|
IsDateString, IsEnum, IsInt, IsNumber, IsOptional, IsPositive, IsString,
|
|
5
6
|
} from 'class-validator';
|
|
6
7
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
@@ -85,6 +86,31 @@ export class QueryChecklistWallet extends RequiredQueryPaginate {
|
|
|
85
86
|
onlyChecklistPossible: boolean;
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
export class QueryChecklistGetPaginated extends RequiredQueryPaginate {
|
|
90
|
+
@ApiPropertyOptional()
|
|
91
|
+
@IsString()
|
|
92
|
+
@IsOptional()
|
|
93
|
+
search?: string;
|
|
94
|
+
|
|
95
|
+
@ApiProperty()
|
|
96
|
+
@IsArray()
|
|
97
|
+
idUser: number[];
|
|
98
|
+
|
|
99
|
+
@ApiPropertyOptional()
|
|
100
|
+
@IsArray()
|
|
101
|
+
@IsOptional()
|
|
102
|
+
vatRegime?: number[];
|
|
103
|
+
|
|
104
|
+
@ApiPropertyOptional()
|
|
105
|
+
@IsNumber()
|
|
106
|
+
@IsOptional()
|
|
107
|
+
state?: number;
|
|
108
|
+
|
|
109
|
+
@ApiProperty()
|
|
110
|
+
@IsDate()
|
|
111
|
+
closingDate: Date;
|
|
112
|
+
}
|
|
113
|
+
|
|
88
114
|
export class QueryGetAllQuestions {
|
|
89
115
|
@ApiPropertyOptional()
|
|
90
116
|
@IsOptional()
|
|
@@ -5,6 +5,7 @@ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
|
5
5
|
import { GedFolder, GedFileType, GedCategory } from '../../../Enum/Ged';
|
|
6
6
|
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
7
7
|
import { Order } from 'sequelize';
|
|
8
|
+
import { TFile } from '../file/TFile';
|
|
8
9
|
|
|
9
10
|
export class QueryLibraryFile {
|
|
10
11
|
@ApiProperty()
|
|
@@ -162,4 +163,49 @@ export class QueryProcessCommercialFile {
|
|
|
162
163
|
@IsOptional()
|
|
163
164
|
@IsInt()
|
|
164
165
|
limit?: number;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
export class ConvertFilePdfToImage {
|
|
170
|
+
@ApiProperty()
|
|
171
|
+
file: TFile;
|
|
172
|
+
|
|
173
|
+
@ApiProperty()
|
|
174
|
+
@IsString()
|
|
175
|
+
returnType: string;
|
|
176
|
+
|
|
177
|
+
@ApiPropertyOptional()
|
|
178
|
+
@IsString()
|
|
179
|
+
@IsOptional()
|
|
180
|
+
format: string;
|
|
181
|
+
|
|
182
|
+
@ApiPropertyOptional()
|
|
183
|
+
@IsNumber()
|
|
184
|
+
@IsOptional()
|
|
185
|
+
density?: number;
|
|
186
|
+
|
|
187
|
+
@ApiPropertyOptional()
|
|
188
|
+
@IsString()
|
|
189
|
+
@IsOptional()
|
|
190
|
+
saveFilename?: string;
|
|
191
|
+
|
|
192
|
+
@ApiPropertyOptional()
|
|
193
|
+
@IsString()
|
|
194
|
+
@IsOptional()
|
|
195
|
+
savePath?: string;
|
|
196
|
+
|
|
197
|
+
@ApiPropertyOptional()
|
|
198
|
+
@IsInt()
|
|
199
|
+
@IsOptional()
|
|
200
|
+
width?: number;
|
|
201
|
+
|
|
202
|
+
@ApiPropertyOptional()
|
|
203
|
+
@IsInt()
|
|
204
|
+
@IsOptional()
|
|
205
|
+
height?: number;
|
|
206
|
+
|
|
207
|
+
@ApiPropertyOptional()
|
|
208
|
+
@IsInt()
|
|
209
|
+
@IsOptional()
|
|
210
|
+
numberOfPage?: number;
|
|
165
211
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LegalFormTypeEnum } from '../../../Enum/LegalForm';
|
|
2
2
|
import { TaxSystem } from '../../../Enum/TaxSystem';
|
|
3
|
-
import { NumberFiscalYears, PrevisionalFormActivity, PrevisionalFormPayload } from '../../..';
|
|
4
|
-
import { ApiProperty } from '../../../../utils';
|
|
5
|
-
import { IsNumber, IsBoolean, IsEnum,
|
|
3
|
+
import { LoanInformation, NumberFiscalYears, OptionNumberFiscalYears, PrevisionalFormActivity, PrevisionalFormPayload } from '../../..';
|
|
4
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
5
|
+
import { IsNumber, IsBoolean, IsEnum, IsOptional, ValidateNested, IsArray } from 'class-validator';
|
|
6
6
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
7
|
|
|
8
8
|
export class NumberFiscalYearsValidation implements NumberFiscalYears {
|
|
@@ -17,6 +17,11 @@ export class NumberFiscalYearsValidation implements NumberFiscalYears {
|
|
|
17
17
|
@ApiProperty()
|
|
18
18
|
@IsNumber()
|
|
19
19
|
n2: number;
|
|
20
|
+
|
|
21
|
+
@ApiPropertyOptional()
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsNumber()
|
|
24
|
+
vat?: number;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
export class CreatePrevisionalFormData implements PrevisionalFormPayload {
|
|
@@ -37,113 +42,146 @@ export class CreatePrevisionalFormData implements PrevisionalFormPayload {
|
|
|
37
42
|
idTaxSystem: TaxSystem;
|
|
38
43
|
|
|
39
44
|
@ApiProperty()
|
|
40
|
-
@
|
|
45
|
+
@IsEnum(PrevisionalFormActivity)
|
|
41
46
|
activity: PrevisionalFormActivity;
|
|
42
47
|
|
|
43
48
|
/**
|
|
44
49
|
* Investissement
|
|
45
50
|
*/
|
|
46
51
|
@ApiProperty()
|
|
47
|
-
|
|
52
|
+
@ValidateNested()
|
|
53
|
+
computerHardware: Required<NumberFiscalYearsValidation>;
|
|
54
|
+
|
|
55
|
+
@ApiProperty()
|
|
56
|
+
@ValidateNested()
|
|
57
|
+
utilityVehicle: Required<NumberFiscalYearsValidation>;
|
|
48
58
|
|
|
49
59
|
@ApiProperty()
|
|
50
|
-
|
|
60
|
+
@ValidateNested()
|
|
61
|
+
personalVehicle: Required<NumberFiscalYearsValidation>;
|
|
51
62
|
|
|
52
63
|
@ApiProperty()
|
|
53
|
-
|
|
64
|
+
@ValidateNested()
|
|
65
|
+
toolsEquipment: Required<NumberFiscalYearsValidation>;
|
|
54
66
|
|
|
55
67
|
@ApiProperty()
|
|
56
|
-
|
|
68
|
+
@ValidateNested()
|
|
69
|
+
software: Required<NumberFiscalYearsValidation>;
|
|
57
70
|
|
|
58
71
|
@ApiProperty()
|
|
59
|
-
|
|
72
|
+
@ValidateNested()
|
|
73
|
+
website: Required<NumberFiscalYearsValidation>;
|
|
60
74
|
|
|
61
75
|
@ApiProperty()
|
|
62
|
-
|
|
76
|
+
@ValidateNested()
|
|
77
|
+
businessAssets: Required<NumberFiscalYearsValidation>;
|
|
63
78
|
|
|
64
79
|
@ApiProperty()
|
|
65
|
-
|
|
80
|
+
@ValidateNested()
|
|
81
|
+
immobilizedSecurities: Required<NumberFiscalYearsValidation>;
|
|
66
82
|
|
|
67
83
|
@ApiProperty()
|
|
68
|
-
|
|
84
|
+
@ValidateNested()
|
|
85
|
+
deposit: Required<NumberFiscalYearsValidation>;
|
|
69
86
|
|
|
70
87
|
/**
|
|
71
88
|
* Financement
|
|
72
89
|
*/
|
|
73
90
|
@ApiProperty()
|
|
91
|
+
@ValidateNested()
|
|
74
92
|
socialCapital: NumberFiscalYearsValidation;
|
|
75
93
|
|
|
76
94
|
@ApiProperty()
|
|
95
|
+
@ValidateNested()
|
|
77
96
|
accountContribution: NumberFiscalYearsValidation;
|
|
78
97
|
|
|
79
98
|
@ApiProperty()
|
|
80
|
-
|
|
99
|
+
@IsArray()
|
|
100
|
+
loans: LoanInformation[];
|
|
81
101
|
|
|
82
102
|
/**
|
|
83
103
|
* Chiffres d’affaires et charge liées à l’activité
|
|
84
104
|
*/
|
|
85
105
|
@ApiProperty()
|
|
86
|
-
|
|
106
|
+
@ValidateNested()
|
|
107
|
+
turnover: Required<NumberFiscalYearsValidation>[];
|
|
87
108
|
|
|
88
109
|
@ApiProperty()
|
|
89
|
-
|
|
110
|
+
@ValidateNested()
|
|
111
|
+
outsourcing: Required<NumberFiscalYearsValidation>[];
|
|
90
112
|
|
|
91
113
|
@ApiProperty()
|
|
92
|
-
merchandisePurchase:
|
|
114
|
+
merchandisePurchase: OptionNumberFiscalYears[];
|
|
93
115
|
|
|
94
116
|
/**
|
|
95
117
|
* Consommables
|
|
96
118
|
*/
|
|
97
119
|
@ApiProperty()
|
|
98
|
-
|
|
120
|
+
@ValidateNested()
|
|
121
|
+
packaging: Required<NumberFiscalYearsValidation>;
|
|
99
122
|
|
|
100
123
|
@ApiProperty()
|
|
101
|
-
|
|
124
|
+
@ValidateNested()
|
|
125
|
+
utilities: Required<NumberFiscalYearsValidation>;
|
|
102
126
|
|
|
103
127
|
@ApiProperty()
|
|
104
|
-
|
|
128
|
+
@ValidateNested()
|
|
129
|
+
fuel: Required<NumberFiscalYearsValidation>;
|
|
105
130
|
|
|
106
131
|
@ApiProperty()
|
|
107
|
-
|
|
132
|
+
@ValidateNested()
|
|
133
|
+
equipmentAndSupplies: Required<NumberFiscalYearsValidation>;
|
|
108
134
|
|
|
109
135
|
@ApiProperty()
|
|
110
|
-
|
|
136
|
+
@ValidateNested()
|
|
137
|
+
administrativeSupplies: Required<NumberFiscalYearsValidation>;
|
|
111
138
|
|
|
112
139
|
/**
|
|
113
140
|
* Autes charges liées à l’activité
|
|
114
141
|
*/
|
|
115
142
|
@ApiProperty()
|
|
116
|
-
|
|
143
|
+
@ValidateNested()
|
|
144
|
+
realEstateRental: Required<NumberFiscalYearsValidation>;
|
|
117
145
|
|
|
118
146
|
@ApiProperty()
|
|
119
|
-
|
|
147
|
+
@ValidateNested()
|
|
148
|
+
otherRental: Required<NumberFiscalYearsValidation>;
|
|
120
149
|
|
|
121
150
|
@ApiProperty()
|
|
122
|
-
|
|
151
|
+
@ValidateNested()
|
|
152
|
+
maintenanceAndRepair: Required<NumberFiscalYearsValidation>;
|
|
123
153
|
|
|
124
154
|
@ApiProperty()
|
|
125
|
-
|
|
155
|
+
@ValidateNested()
|
|
156
|
+
insuranceAndProfessionalLiability: Required<NumberFiscalYearsValidation>;
|
|
126
157
|
|
|
127
158
|
@ApiProperty()
|
|
128
|
-
|
|
159
|
+
@ValidateNested()
|
|
160
|
+
accountingFees: Required<NumberFiscalYearsValidation>;
|
|
129
161
|
|
|
130
162
|
@ApiProperty()
|
|
131
|
-
|
|
163
|
+
@ValidateNested()
|
|
164
|
+
otherFees: Required<NumberFiscalYearsValidation>;
|
|
132
165
|
|
|
133
166
|
@ApiProperty()
|
|
134
|
-
|
|
167
|
+
@ValidateNested()
|
|
168
|
+
advertising: Required<NumberFiscalYearsValidation>;
|
|
135
169
|
|
|
136
170
|
@ApiProperty()
|
|
137
|
-
|
|
171
|
+
@ValidateNested()
|
|
172
|
+
kilometricAllowances: Required<NumberFiscalYearsValidation>;
|
|
138
173
|
|
|
139
174
|
@ApiProperty()
|
|
140
|
-
|
|
175
|
+
@ValidateNested()
|
|
176
|
+
otherTravelExpenses: Required<NumberFiscalYearsValidation>;
|
|
141
177
|
|
|
142
178
|
@ApiProperty()
|
|
143
|
-
|
|
179
|
+
@ValidateNested()
|
|
180
|
+
telephonyInternetNetworks: Required<NumberFiscalYearsValidation>;
|
|
144
181
|
|
|
145
182
|
@ApiProperty()
|
|
146
|
-
|
|
183
|
+
@ValidateNested()
|
|
184
|
+
bankFees: Required<NumberFiscalYearsValidation>;
|
|
147
185
|
|
|
148
186
|
/**
|
|
149
187
|
* Social et rémunération
|
|
@@ -152,19 +190,36 @@ export class CreatePrevisionalFormData implements PrevisionalFormPayload {
|
|
|
152
190
|
isACREBeneficiary: boolean;
|
|
153
191
|
|
|
154
192
|
@ApiProperty()
|
|
193
|
+
@ValidateNested()
|
|
155
194
|
employee1GrossSalary: NumberFiscalYearsValidation;
|
|
156
195
|
|
|
157
196
|
@ApiProperty()
|
|
197
|
+
@ValidateNested()
|
|
158
198
|
employee2GrossSalary: NumberFiscalYearsValidation;
|
|
159
199
|
|
|
160
200
|
@ApiProperty()
|
|
201
|
+
@ValidateNested()
|
|
161
202
|
employee3GrossSalary: NumberFiscalYearsValidation;
|
|
162
203
|
|
|
163
204
|
@ApiProperty()
|
|
205
|
+
@ValidateNested()
|
|
164
206
|
remunerationPresident: NumberFiscalYearsValidation;
|
|
165
207
|
|
|
166
208
|
@ApiProperty()
|
|
209
|
+
@ValidateNested()
|
|
167
210
|
remunerationManager: NumberFiscalYearsValidation;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Impôts
|
|
214
|
+
*/
|
|
215
|
+
@ApiProperty()
|
|
216
|
+
cfe: NumberFiscalYears | undefined;
|
|
217
|
+
|
|
218
|
+
@ApiProperty()
|
|
219
|
+
tvs: NumberFiscalYears | undefined;
|
|
220
|
+
|
|
221
|
+
@ApiProperty()
|
|
222
|
+
otherTaxes: NumberFiscalYears | undefined;
|
|
168
223
|
}
|
|
169
224
|
|
|
170
225
|
export class CreatePrevisionalForm {
|
|
@@ -173,5 +228,6 @@ export class CreatePrevisionalForm {
|
|
|
173
228
|
idSociety: number;
|
|
174
229
|
|
|
175
230
|
@ApiProperty()
|
|
231
|
+
@ValidateNested()
|
|
176
232
|
payload: CreatePrevisionalFormData;
|
|
177
233
|
}
|
|
@@ -6,6 +6,20 @@ export interface NumberFiscalYears {
|
|
|
6
6
|
n: number;
|
|
7
7
|
n1: number;
|
|
8
8
|
n2: number;
|
|
9
|
+
vat?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface LoanInformation {
|
|
13
|
+
year: 'n' | 'n1' | 'n2';
|
|
14
|
+
amount: number;
|
|
15
|
+
duration: number;
|
|
16
|
+
rate: number;
|
|
17
|
+
payment: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export interface OptionNumberFiscalYears extends Required<NumberFiscalYears> {
|
|
22
|
+
isMarginRate?: boolean;
|
|
9
23
|
}
|
|
10
24
|
|
|
11
25
|
export interface CompanyDescription {
|
|
@@ -13,55 +27,61 @@ export interface CompanyDescription {
|
|
|
13
27
|
idLegalForm: LegalFormTypeEnum; // Statut Juridique
|
|
14
28
|
idTaxSystem: TaxSystem; // Régime d'imposition prévu
|
|
15
29
|
activity: PrevisionalFormActivity; // Quelle est l'activité de la société ?
|
|
16
|
-
// + question "De combien est le capital initial apporté ?" socialCapital pour année N
|
|
17
30
|
}
|
|
18
31
|
|
|
19
32
|
export interface Investment {
|
|
20
|
-
computerHardware: NumberFiscalYears
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
computerHardware: Required<NumberFiscalYears>; // Matériel informatique
|
|
34
|
+
utilityVehicle: Required<NumberFiscalYears>; // Véhicule utilitaire
|
|
35
|
+
personalVehicle: Required<NumberFiscalYears>; // Véhicule particulier
|
|
36
|
+
toolsEquipment: Required<NumberFiscalYears>; // Outillage, matériel
|
|
37
|
+
software: Required<NumberFiscalYears>; // Logiciel
|
|
38
|
+
website: Required<NumberFiscalYears>; // Site internet
|
|
39
|
+
businessAssets: Required<NumberFiscalYears>; // Fonds de commerce
|
|
40
|
+
immobilizedSecurities: Required<NumberFiscalYears>; // Titres immobilisés
|
|
41
|
+
deposit: Required<NumberFiscalYears>; // Caution
|
|
28
42
|
}
|
|
29
43
|
|
|
30
44
|
export interface Financing {
|
|
31
45
|
socialCapital: NumberFiscalYears; // Augmentation social
|
|
32
46
|
accountContribution: NumberFiscalYears; // Apport en compte courant d'associé
|
|
33
|
-
|
|
47
|
+
loans: LoanInformation[]; // Emprunt bancaire
|
|
34
48
|
}
|
|
35
49
|
|
|
36
50
|
export interface Turnover {
|
|
37
|
-
turnover: NumberFiscalYears; //
|
|
51
|
+
turnover: Required<NumberFiscalYears>[]; // Ventes de marchandises / Ventes de matières premières / Ventes de prestations de services
|
|
52
|
+
merchandisePurchase: OptionNumberFiscalYears[]; // Achats de marchandises / matières premières
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
export interface Charges {
|
|
41
|
-
outsourcing: NumberFiscalYears; // Sous-traitance prévue
|
|
42
|
-
|
|
56
|
+
outsourcing: Required<NumberFiscalYears>[]; // Sous-traitance prévue
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface Taxes {
|
|
60
|
+
cfe: NumberFiscalYears | undefined; // CFE
|
|
61
|
+
tvs: NumberFiscalYears | undefined; // TVS
|
|
62
|
+
otherTaxes: NumberFiscalYears | undefined; // Autres impôts
|
|
43
63
|
}
|
|
44
64
|
|
|
45
65
|
export interface Consumables {
|
|
46
|
-
packaging: NumberFiscalYears
|
|
47
|
-
utilities: NumberFiscalYears
|
|
48
|
-
fuel: NumberFiscalYears
|
|
49
|
-
equipmentAndSupplies: NumberFiscalYears
|
|
50
|
-
administrativeSupplies: NumberFiscalYears
|
|
66
|
+
packaging: Required<NumberFiscalYears>; // Emballages
|
|
67
|
+
utilities: Required<NumberFiscalYears>; // Eau, électricité, gaz
|
|
68
|
+
fuel: Required<NumberFiscalYears>; // Carburant
|
|
69
|
+
equipmentAndSupplies: Required<NumberFiscalYears>; // Petit équipement et matériel
|
|
70
|
+
administrativeSupplies: Required<NumberFiscalYears>; // Fournitures administratives
|
|
51
71
|
}
|
|
52
72
|
|
|
53
73
|
export interface OtherCharges {
|
|
54
|
-
realEstateRental: NumberFiscalYears
|
|
55
|
-
otherRental: NumberFiscalYears
|
|
56
|
-
maintenanceAndRepair: NumberFiscalYears
|
|
57
|
-
insuranceAndProfessionalLiability: NumberFiscalYears
|
|
58
|
-
accountingFees: NumberFiscalYears
|
|
59
|
-
otherFees: NumberFiscalYears
|
|
60
|
-
advertising: NumberFiscalYears
|
|
61
|
-
kilometricAllowances: NumberFiscalYears
|
|
62
|
-
otherTravelExpenses: NumberFiscalYears
|
|
63
|
-
telephonyInternetNetworks: NumberFiscalYears
|
|
64
|
-
bankFees: NumberFiscalYears
|
|
74
|
+
realEstateRental: Required<NumberFiscalYears>; // Location immobilière
|
|
75
|
+
otherRental: Required<NumberFiscalYears>; // Autres locations et crédit bail
|
|
76
|
+
maintenanceAndRepair: Required<NumberFiscalYears>; // Entretien et réparation
|
|
77
|
+
insuranceAndProfessionalLiability: Required<NumberFiscalYears>; // Assurances et RC Pro
|
|
78
|
+
accountingFees: Required<NumberFiscalYears>; // Honoraires comptables
|
|
79
|
+
otherFees: Required<NumberFiscalYears>; // Autres frais de gestion
|
|
80
|
+
advertising: Required<NumberFiscalYears>; // Publicité
|
|
81
|
+
kilometricAllowances: Required<NumberFiscalYears>; // Indemnités kilométriques
|
|
82
|
+
otherTravelExpenses: Required<NumberFiscalYears>; // Autres frais de déplacement
|
|
83
|
+
telephonyInternetNetworks: Required<NumberFiscalYears>; // Téléphonie, interne, réseaux
|
|
84
|
+
bankFees: Required<NumberFiscalYears>; // Frais bancaires
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
export interface SocialAndRemuneration {
|
|
@@ -73,4 +93,4 @@ export interface SocialAndRemuneration {
|
|
|
73
93
|
remunerationManager: NumberFiscalYears; // Rémunération gérant
|
|
74
94
|
}
|
|
75
95
|
|
|
76
|
-
export interface PrevisionalFormPayload extends CompanyDescription, Investment, Financing, Turnover, Charges, Consumables, OtherCharges, SocialAndRemuneration {}
|
|
96
|
+
export interface PrevisionalFormPayload extends CompanyDescription, Investment, Financing, Turnover, Charges, Taxes, Consumables, OtherCharges, SocialAndRemuneration {}
|
|
@@ -19,6 +19,18 @@ export class QueryUnpaidSociety {
|
|
|
19
19
|
@ToBoolean()
|
|
20
20
|
isExoExpress?: boolean;
|
|
21
21
|
|
|
22
|
+
@ApiPropertyOptional()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsBoolean()
|
|
25
|
+
@ToBoolean()
|
|
26
|
+
isRecoverable?: boolean;
|
|
27
|
+
|
|
28
|
+
@ApiPropertyOptional()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsBoolean()
|
|
31
|
+
@ToBoolean()
|
|
32
|
+
isNotCollected?: boolean;
|
|
33
|
+
|
|
22
34
|
@ApiPropertyOptional()
|
|
23
35
|
@IsOptional()
|
|
24
36
|
@IsString()
|