@silexpert/core 1.1.201 → 1.1.203
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/OldExpertInfos.d.ts +9 -0
- package/dist/cjs/api/resources/OldExpertInfos.d.ts.map +1 -0
- package/dist/cjs/api/resources/OldExpertInfos.js +20 -0
- package/dist/cjs/api/resources/OldExpertInfos.js.map +1 -0
- package/dist/cjs/api/resources.d.ts +2 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +2 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts +2 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js +2 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
- package/dist/cjs/types/Enum/CommercialOfferType.d.ts +13 -0
- package/dist/cjs/types/Enum/CommercialOfferType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/CommercialOfferType.js +10 -0
- package/dist/cjs/types/Enum/CommercialOfferType.js.map +1 -1
- package/dist/cjs/types/Enum/ComptaType.d.ts +19 -0
- package/dist/cjs/types/Enum/ComptaType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/ComptaType.js +27 -1
- package/dist/cjs/types/Enum/ComptaType.js.map +1 -1
- package/dist/cjs/types/Enum/Ged.d.ts +23 -1
- package/dist/cjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Ged.js +23 -1
- package/dist/cjs/types/Enum/Ged.js.map +1 -1
- package/dist/cjs/types/Enum/MailDomainType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/MailDomainType.js +2 -0
- package/dist/cjs/types/Enum/MailDomainType.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridClementine.d.ts +13 -20
- package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridClementine.js +39 -39
- package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts +7 -11
- package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridLegalstart.js +13 -13
- package/dist/cjs/types/Enum/PriceGridLegalstart.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts +8 -13
- package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.js +156 -156
- package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/cjs/types/Interface/api/contest/Create.d.ts +6 -1
- package/dist/cjs/types/Interface/api/contest/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/contest/Create.js +30 -2
- package/dist/cjs/types/Interface/api/contest/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.d.ts +2 -1
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.js +6 -2
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts +1 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.js +1 -1
- package/dist/cjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts +16 -0
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.js +94 -0
- package/dist/cjs/types/Interface/api/oldExportInfo/OldExpertInfos.js.map +1 -0
- package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts +2 -0
- package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.js +10 -0
- package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.js.map +1 -1
- package/dist/cjs/types/Interface/models/IOldExpertInfo.d.ts +6 -6
- package/dist/cjs/types/Interface/models/IOldExpertInfo.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IOldExpertInfo.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUserContest.d.ts +3 -0
- package/dist/cjs/types/Interface/models/IUserContest.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUserContest.js.map +1 -1
- package/dist/cjs/types/Interface/models/IVoteContest.d.ts +1 -0
- package/dist/cjs/types/Interface/models/IVoteContest.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IVoteContest.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/documents.d.ts.map +1 -1
- package/dist/cjs/utils/documents.js +2 -1
- package/dist/cjs/utils/documents.js.map +1 -1
- package/dist/cjs/utils/prestation.d.ts +2 -2
- package/dist/cjs/utils/prestation.d.ts.map +1 -1
- package/dist/cjs/utils/prestation.js +23 -17
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/mjs/api/resources/OldExpertInfos.d.ts +9 -0
- package/dist/mjs/api/resources/OldExpertInfos.d.ts.map +1 -0
- package/dist/mjs/api/resources/OldExpertInfos.js +20 -0
- package/dist/mjs/api/resources/OldExpertInfos.js.map +1 -0
- package/dist/mjs/api/resources.d.ts +2 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +2 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts +2 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js +2 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
- package/dist/mjs/types/Enum/CommercialOfferType.d.ts +13 -0
- package/dist/mjs/types/Enum/CommercialOfferType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/CommercialOfferType.js +10 -0
- package/dist/mjs/types/Enum/CommercialOfferType.js.map +1 -1
- package/dist/mjs/types/Enum/ComptaType.d.ts +19 -0
- package/dist/mjs/types/Enum/ComptaType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/ComptaType.js +26 -0
- package/dist/mjs/types/Enum/ComptaType.js.map +1 -1
- package/dist/mjs/types/Enum/Ged.d.ts +23 -1
- package/dist/mjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Ged.js +23 -1
- package/dist/mjs/types/Enum/Ged.js.map +1 -1
- package/dist/mjs/types/Enum/MailDomainType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/MailDomainType.js +2 -0
- package/dist/mjs/types/Enum/MailDomainType.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridClementine.d.ts +13 -20
- package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridClementine.js +39 -39
- package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts +7 -11
- package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridLegalstart.js +13 -13
- package/dist/mjs/types/Enum/PriceGridLegalstart.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts +8 -13
- package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.js +156 -156
- package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/mjs/types/Interface/api/contest/Create.d.ts +6 -1
- package/dist/mjs/types/Interface/api/contest/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/contest/Create.js +35 -2
- package/dist/mjs/types/Interface/api/contest/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.d.ts +2 -1
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.js +7 -2
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
- package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts +1 -1
- package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/library/QueryLibrary.js +1 -1
- package/dist/mjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts +16 -0
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.js +103 -0
- package/dist/mjs/types/Interface/api/oldExportInfo/OldExpertInfos.js.map +1 -0
- package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts +2 -0
- package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.js +13 -1
- package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.js.map +1 -1
- package/dist/mjs/types/Interface/models/IOldExpertInfo.d.ts +6 -6
- package/dist/mjs/types/Interface/models/IOldExpertInfo.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IOldExpertInfo.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUserContest.d.ts +3 -0
- package/dist/mjs/types/Interface/models/IUserContest.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUserContest.js.map +1 -1
- package/dist/mjs/types/Interface/models/IVoteContest.d.ts +1 -0
- package/dist/mjs/types/Interface/models/IVoteContest.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IVoteContest.js.map +1 -1
- package/dist/mjs/types/index.d.ts +1 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +1 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/documents.d.ts.map +1 -1
- package/dist/mjs/utils/documents.js +2 -1
- package/dist/mjs/utils/documents.js.map +1 -1
- package/dist/mjs/utils/prestation.d.ts +2 -2
- package/dist/mjs/utils/prestation.d.ts.map +1 -1
- package/dist/mjs/utils/prestation.js +22 -16
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/OldExpertInfos.ts +25 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/BalanceSheetQuestionWording.ts +2 -1
- package/ts/types/Enum/CommercialOfferType.ts +10 -0
- package/ts/types/Enum/ComptaType.ts +28 -1
- package/ts/types/Enum/Ged.ts +23 -1
- package/ts/types/Enum/MailDomainType.ts +2 -0
- package/ts/types/Enum/PriceGridClementine.ts +39 -39
- package/ts/types/Enum/PriceGridLegalstart.ts +13 -13
- package/ts/types/Enum/PriceGridPourcentage.ts +156 -156
- package/ts/types/Interface/api/contest/Create.ts +28 -3
- package/ts/types/Interface/api/gedFile/createFileAndGed.ts +5 -2
- package/ts/types/Interface/api/library/QueryLibrary.ts +1 -1
- package/ts/types/Interface/api/oldExportInfo/OldExpertInfos.ts +67 -0
- package/ts/types/Interface/api/userRoomEquipment/CreateSignature.ts +9 -1
- package/ts/types/Interface/models/IOldExpertInfo.ts +6 -6
- package/ts/types/Interface/models/IUserContest.ts +3 -0
- package/ts/types/Interface/models/IVoteContest.ts +2 -1
- package/ts/types/index.ts +1 -0
- package/ts/utils/documents.ts +2 -1
- package/ts/utils/prestation.ts +28 -18
package/ts/types/index.ts
CHANGED
|
@@ -729,6 +729,7 @@ export * from './Interface/api/team/QueryUpdate';
|
|
|
729
729
|
export * from './Interface/api/constitutionHistory/QueryPaginatedConstitutionHistory';
|
|
730
730
|
export * from './Interface/api/userSpecialDay/BodyUserSpecialDay';
|
|
731
731
|
export * from './Interface/api/userSpecialDay/QueryUserSpecialDay';
|
|
732
|
+
export * from './Interface/api/oldExportInfo/OldExpertInfos';
|
|
732
733
|
|
|
733
734
|
// export * from './Interface/api/survey/QuerySurvey';
|
|
734
735
|
export * from './Interface/api/survey/ReadSurvey';
|
package/ts/utils/documents.ts
CHANGED
|
@@ -41,7 +41,8 @@ const requiredListDocs = (params: RequiredDocsType): GedFileType[] => {
|
|
|
41
41
|
generique.push(GedFileType.DISTRIBUTION_OF_SHARE);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
if ([LegalForm.SELARLU.id, LegalForm.EURL.id, LegalForm.SASU.id, LegalForm.SA.id,
|
|
44
|
+
if ([LegalForm.SELARLU.id, LegalForm.EURL.id, LegalForm.SASU.id, LegalForm.SA.id,
|
|
45
|
+
LegalForm.SAS.id, LegalForm.SARL.id, LegalForm.SCI.id, LegalForm.EARL.id, LegalForm.GIE.id].includes(idLegalForm)) {
|
|
45
46
|
return [...generique, GedFileType.KBIS, GedFileType.STATUTES, GedFileType.DBE2, GedFileType.SEPA];
|
|
46
47
|
}
|
|
47
48
|
if ([LegalForm.SELARL.id].includes(idLegalForm)) {
|
package/ts/utils/prestation.ts
CHANGED
|
@@ -17,8 +17,7 @@ type priceGridBrand = {
|
|
|
17
17
|
|
|
18
18
|
type priceGrid = {
|
|
19
19
|
idPrestationList: number[],
|
|
20
|
-
|
|
21
|
-
maximumMonthlyPayment?: monthlyPayment[],
|
|
20
|
+
monthlyNbr?: monthlyNbr[],
|
|
22
21
|
turnoverCreatedYear?: turnover[],
|
|
23
22
|
turnoverPastYear?: turnover[],
|
|
24
23
|
turnoverMonthly?: turnover[],
|
|
@@ -32,9 +31,11 @@ type priceGrid = {
|
|
|
32
31
|
legalForm?: legalForm[],
|
|
33
32
|
};
|
|
34
33
|
|
|
35
|
-
type
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
type monthlyNbr = {
|
|
35
|
+
minimum: number,
|
|
36
|
+
maximum: number,
|
|
37
|
+
value: number,
|
|
38
|
+
closingType: number[],
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
type turnover = {
|
|
@@ -135,7 +136,7 @@ const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid
|
|
|
135
136
|
return currentPriceGrid;
|
|
136
137
|
};
|
|
137
138
|
|
|
138
|
-
const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, isYearly: boolean, totalMonth: number, idTaxSystem: number, idLegalForm: number): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, monthNbr: number, price: number } => {
|
|
139
|
+
const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, isYearly: boolean, totalMonth: number, idTaxSystem: number, idLegalForm: number, balanceSheetOffered: number = 0): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, monthNbr: number, price: number } => {
|
|
139
140
|
let totalPrestation: number = 0;
|
|
140
141
|
let reduceMonth: number = 0;
|
|
141
142
|
let monthNbr: number = NbrMonth;
|
|
@@ -175,21 +176,30 @@ const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate
|
|
|
175
176
|
/* Gestion des mois */
|
|
176
177
|
let cloturedPast: boolean = false;
|
|
177
178
|
if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
let monthlyNbrList: monthlyNbr[] | undefined;
|
|
180
|
+
let monthlyNbr: monthlyNbr | undefined;
|
|
181
|
+
if (currentPriceGrid.monthlyNbr) {
|
|
182
|
+
monthlyNbrList = currentPriceGrid.monthlyNbr?.filter(el => el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS));
|
|
183
|
+
if (monthlyNbrList) {
|
|
184
|
+
monthlyNbr = monthlyNbrList.find(el => (el.minimum <= monthNbr) && (monthNbr <= el.maximum));
|
|
185
|
+
if (monthlyNbr) {
|
|
186
|
+
monthNbr = monthlyNbr.value;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
185
189
|
}
|
|
186
|
-
if (
|
|
187
|
-
monthNbr =
|
|
190
|
+
if (totalMonth > 0) {
|
|
191
|
+
if (monthlyNbr && ((monthNbr - totalMonth) < monthlyNbr?.minimum)) canBeCreated = false;
|
|
192
|
+
monthNbr = monthNbr - totalMonth;
|
|
188
193
|
recalculateMonthly = true;
|
|
189
|
-
if (totalMonth > 0) canBeCreated = false;
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
reduceMonth = (monthNbr === NbrMonth - totalMonth ? totalMonth : 0);
|
|
197
|
+
|
|
198
|
+
if (balanceSheetOffered > 0) {
|
|
199
|
+
yearlyPrice = undefined;
|
|
200
|
+
recalculateMonthly = false;
|
|
201
|
+
finalMonthlyPrice = balanceSheetOffered / monthNbr;
|
|
202
|
+
}
|
|
193
203
|
|
|
194
204
|
/* Prix Final */
|
|
195
205
|
totalPrestation = (yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr);
|
|
@@ -205,7 +215,7 @@ const calculatePrestationPriceWithPrestationList = (prestationList: IPrestationL
|
|
|
205
215
|
return totalPrestation;
|
|
206
216
|
};
|
|
207
217
|
|
|
208
|
-
const calculatePrestationPrice = (idPrestationList: number, prestationList: IPrestationList, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, optionsList: number[], totalPercentage: number, totalAmount: number, totalMonth: number, isWithApplicationFees: boolean, idTaxSystem: number, idLegalForm: number, isYearly: boolean = false): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, calculDetail: string, monthlyPrice: string, price: number } => {
|
|
218
|
+
const calculatePrestationPrice = (idPrestationList: number, prestationList: IPrestationList, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, optionsList: number[], totalPercentage: number, totalAmount: number, totalMonth: number, isWithApplicationFees: boolean, idTaxSystem: number, idLegalForm: number, isYearly: boolean = false, balanceSheetOffered: number = 0): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, calculDetail: string, monthlyPrice: string, price: number } => {
|
|
209
219
|
let totalPrestation: number = 0;
|
|
210
220
|
let reduceMonth: number = 0;
|
|
211
221
|
let canBeCreated: boolean = true;
|
|
@@ -241,7 +251,7 @@ const calculatePrestationPrice = (idPrestationList: number, prestationList: IPre
|
|
|
241
251
|
PrestationType.STATUTS_OPTION_2,
|
|
242
252
|
].includes(idPrestationList)
|
|
243
253
|
) {
|
|
244
|
-
totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth, idTaxSystem, idLegalForm);
|
|
254
|
+
totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth, idTaxSystem, idLegalForm, balanceSheetOffered);
|
|
245
255
|
totalPrestation = totalWithReduce.totalPrestation;
|
|
246
256
|
reduceMonth = totalWithReduce.reduceMonth;
|
|
247
257
|
canBeCreated = totalWithReduce.canBeCreated;
|