@silexpert/core 1.1.214 → 1.1.216
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/BudgetInsight.d.ts +3 -3
- package/dist/cjs/api/resources/BudgetInsight.d.ts.map +1 -1
- package/dist/cjs/api/resources/BudgetInsight.js.map +1 -1
- package/dist/cjs/api/resources/Connector.d.ts +2 -1
- package/dist/cjs/api/resources/Connector.d.ts.map +1 -1
- package/dist/cjs/api/resources/Connector.js +3 -0
- package/dist/cjs/api/resources/Connector.js.map +1 -1
- package/dist/cjs/api/resources/Mobile.d.ts +1 -0
- package/dist/cjs/api/resources/Mobile.d.ts.map +1 -1
- package/dist/cjs/api/resources/Mobile.js +3 -0
- package/dist/cjs/api/resources/Mobile.js.map +1 -1
- package/dist/cjs/api/resources/Product.d.ts +1 -0
- package/dist/cjs/api/resources/Product.d.ts.map +1 -1
- package/dist/cjs/api/resources/Product.js +3 -0
- package/dist/cjs/api/resources/Product.js.map +1 -1
- package/dist/cjs/api/resources/Rule.d.ts +1 -0
- package/dist/cjs/api/resources/Rule.d.ts.map +1 -1
- package/dist/cjs/api/resources/Rule.js +3 -0
- package/dist/cjs/api/resources/Rule.js.map +1 -1
- package/dist/cjs/api/resources/SalariesFile.d.ts +1 -1
- package/dist/cjs/api/resources/SalariesFile.d.ts.map +1 -1
- package/dist/cjs/api/resources/SalariesFile.js +14 -2
- package/dist/cjs/api/resources/SalariesFile.js.map +1 -1
- package/dist/cjs/api/resources/Society.d.ts +1 -0
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js +3 -0
- package/dist/cjs/api/resources/Society.js.map +1 -1
- package/dist/cjs/api/resources/Stocks.d.ts +1 -1
- package/dist/cjs/api/resources/Stocks.js.map +1 -1
- package/dist/cjs/api/resources/ThirdParty.d.ts +2 -1
- package/dist/cjs/api/resources/ThirdParty.d.ts.map +1 -1
- package/dist/cjs/api/resources/ThirdParty.js +3 -0
- package/dist/cjs/api/resources/ThirdParty.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts +2 -0
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js +2 -0
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
- package/dist/cjs/types/Enum/Ged.d.ts +2 -1
- package/dist/cjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Ged.js +2 -0
- package/dist/cjs/types/Enum/Ged.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.d.ts +4 -0
- package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +4 -0
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridClementine.d.ts +55 -0
- package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridClementine.js +42 -0
- package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts +17 -0
- package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridLegalstart.js +16 -0
- package/dist/cjs/types/Enum/PriceGridLegalstart.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts +18 -0
- package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.js +96 -0
- package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/cjs/types/Interface/api/aspone/ReadInterchange.d.ts +1 -0
- package/dist/cjs/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts +1 -0
- package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.js +8 -0
- package/dist/cjs/types/Interface/api/bankAccount/QueryBankAccount.js.map +1 -1
- package/dist/cjs/types/Interface/api/connector/QueryConnector.d.ts +3 -0
- package/dist/cjs/types/Interface/api/connector/QueryConnector.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/connector/QueryConnector.js +10 -1
- package/dist/cjs/types/Interface/api/connector/QueryConnector.js.map +1 -1
- package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts +3 -0
- package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.js +10 -1
- package/dist/cjs/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
- package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
- package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
- package/dist/cjs/types/Interface/models/ISocietyDetail.d.ts +5 -0
- package/dist/cjs/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ISocietyDetail.js.map +1 -1
- package/dist/cjs/utils/exercice.d.ts +4 -0
- package/dist/cjs/utils/exercice.d.ts.map +1 -0
- package/dist/cjs/utils/exercice.js +25 -0
- package/dist/cjs/utils/exercice.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/index.d.ts.map +1 -1
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/prestation.d.ts +3 -3
- package/dist/cjs/utils/prestation.d.ts.map +1 -1
- package/dist/cjs/utils/prestation.js +20 -10
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/cjs/utils/vat/3517/century23.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3517/century23.js +9 -8
- package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
- package/dist/mjs/api/resources/BudgetInsight.d.ts +3 -3
- package/dist/mjs/api/resources/BudgetInsight.d.ts.map +1 -1
- package/dist/mjs/api/resources/BudgetInsight.js.map +1 -1
- package/dist/mjs/api/resources/Connector.d.ts +2 -1
- package/dist/mjs/api/resources/Connector.d.ts.map +1 -1
- package/dist/mjs/api/resources/Connector.js +3 -0
- package/dist/mjs/api/resources/Connector.js.map +1 -1
- package/dist/mjs/api/resources/Mobile.d.ts +1 -0
- package/dist/mjs/api/resources/Mobile.d.ts.map +1 -1
- package/dist/mjs/api/resources/Mobile.js +3 -0
- package/dist/mjs/api/resources/Mobile.js.map +1 -1
- package/dist/mjs/api/resources/Product.d.ts +1 -0
- package/dist/mjs/api/resources/Product.d.ts.map +1 -1
- package/dist/mjs/api/resources/Product.js +3 -0
- package/dist/mjs/api/resources/Product.js.map +1 -1
- package/dist/mjs/api/resources/Rule.d.ts +1 -0
- package/dist/mjs/api/resources/Rule.d.ts.map +1 -1
- package/dist/mjs/api/resources/Rule.js +3 -0
- package/dist/mjs/api/resources/Rule.js.map +1 -1
- package/dist/mjs/api/resources/SalariesFile.d.ts +1 -1
- package/dist/mjs/api/resources/SalariesFile.d.ts.map +1 -1
- package/dist/mjs/api/resources/SalariesFile.js +14 -2
- package/dist/mjs/api/resources/SalariesFile.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts +1 -0
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js +3 -0
- package/dist/mjs/api/resources/Society.js.map +1 -1
- package/dist/mjs/api/resources/Stocks.d.ts +1 -1
- package/dist/mjs/api/resources/Stocks.js.map +1 -1
- package/dist/mjs/api/resources/ThirdParty.d.ts +2 -1
- package/dist/mjs/api/resources/ThirdParty.d.ts.map +1 -1
- package/dist/mjs/api/resources/ThirdParty.js +3 -0
- package/dist/mjs/api/resources/ThirdParty.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts +2 -0
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js +2 -0
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
- package/dist/mjs/types/Enum/Ged.d.ts +2 -1
- package/dist/mjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Ged.js +2 -0
- package/dist/mjs/types/Enum/Ged.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.d.ts +4 -0
- package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +4 -0
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridClementine.d.ts +55 -0
- package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridClementine.js +42 -0
- package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts +17 -0
- package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridLegalstart.js +16 -0
- package/dist/mjs/types/Enum/PriceGridLegalstart.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts +18 -0
- package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.js +96 -0
- package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/mjs/types/Interface/api/aspone/ReadInterchange.d.ts +1 -0
- package/dist/mjs/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts +1 -0
- package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.js +9 -0
- package/dist/mjs/types/Interface/api/bankAccount/QueryBankAccount.js.map +1 -1
- package/dist/mjs/types/Interface/api/connector/QueryConnector.d.ts +3 -0
- package/dist/mjs/types/Interface/api/connector/QueryConnector.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/connector/QueryConnector.js +11 -2
- package/dist/mjs/types/Interface/api/connector/QueryConnector.js.map +1 -1
- package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts +3 -0
- package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.js +9 -0
- package/dist/mjs/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
- package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
- package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
- package/dist/mjs/types/Interface/models/ISocietyDetail.d.ts +5 -0
- package/dist/mjs/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ISocietyDetail.js.map +1 -1
- package/dist/mjs/utils/exercice.d.ts +4 -0
- package/dist/mjs/utils/exercice.d.ts.map +1 -0
- package/dist/mjs/utils/exercice.js +22 -0
- package/dist/mjs/utils/exercice.js.map +1 -0
- package/dist/mjs/utils/index.d.ts +1 -0
- package/dist/mjs/utils/index.d.ts.map +1 -1
- package/dist/mjs/utils/index.js +1 -0
- package/dist/mjs/utils/index.js.map +1 -1
- package/dist/mjs/utils/prestation.d.ts +3 -3
- package/dist/mjs/utils/prestation.d.ts.map +1 -1
- package/dist/mjs/utils/prestation.js +13 -3
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/dist/mjs/utils/vat/3517/century23.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3517/century23.js +2 -1
- package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/BudgetInsight.ts +3 -3
- package/ts/api/resources/Connector.ts +5 -1
- package/ts/api/resources/Mobile.ts +4 -0
- package/ts/api/resources/Product.ts +4 -0
- package/ts/api/resources/Rule.ts +4 -0
- package/ts/api/resources/SalariesFile.ts +14 -2
- package/ts/api/resources/Society.ts +4 -0
- package/ts/api/resources/Stocks.ts +1 -1
- package/ts/api/resources/ThirdParty.ts +5 -0
- package/ts/types/Enum/BalanceSheetQuestionWording.ts +2 -0
- package/ts/types/Enum/Ged.ts +2 -0
- package/ts/types/Enum/PrestationType.ts +4 -0
- package/ts/types/Enum/PriceGridClementine.ts +42 -0
- package/ts/types/Enum/PriceGridLegalstart.ts +16 -0
- package/ts/types/Enum/PriceGridPourcentage.ts +96 -0
- package/ts/types/Interface/api/aspone/ReadInterchange.ts +1 -0
- package/ts/types/Interface/api/bankAccount/QueryBankAccount.ts +7 -0
- package/ts/types/Interface/api/connector/QueryConnector.ts +9 -2
- package/ts/types/Interface/api/thirdParty/QueryThirdParty.ts +7 -0
- package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +2 -0
- package/ts/types/Interface/models/ISocietyDetail.ts +5 -0
- package/ts/utils/exercice.ts +25 -0
- package/ts/utils/index.ts +1 -0
- package/ts/utils/prestation.ts +93 -4
- package/ts/utils/vat/3517/century23.ts +2 -1
package/ts/utils/prestation.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPrestation, IPrestationList } from '../types';
|
|
1
|
+
import { IExercice, IPrestation, IPrestationList } from '../types';
|
|
2
2
|
import { intersection } from './noLodash';
|
|
3
3
|
import { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';
|
|
4
4
|
import { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption';
|
|
@@ -9,6 +9,7 @@ import { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress';
|
|
|
9
9
|
import { ClosingType } from '../types/Enum/ClosingType';
|
|
10
10
|
import { getBrandNameByNodeEnv } from './brands';
|
|
11
11
|
import * as dayjs from 'dayjs';
|
|
12
|
+
import { exerciceNumber } from './exercice';
|
|
12
13
|
|
|
13
14
|
type priceGridBrand = {
|
|
14
15
|
idTypeBrand: number,
|
|
@@ -18,6 +19,7 @@ type priceGridBrand = {
|
|
|
18
19
|
type priceGrid = {
|
|
19
20
|
idPrestationList: number[],
|
|
20
21
|
monthlyNbr?: monthlyNbr[],
|
|
22
|
+
exerciceNbr?: exerciceNbr[],
|
|
21
23
|
turnoverCreatedYear?: turnover[],
|
|
22
24
|
turnoverPastYear?: turnover[],
|
|
23
25
|
turnoverMonthly?: turnover[],
|
|
@@ -29,6 +31,7 @@ type priceGrid = {
|
|
|
29
31
|
vatRegimeYearly?: vatRegime[],
|
|
30
32
|
taxSystem?: taxSystem[],
|
|
31
33
|
legalForm?: legalForm[],
|
|
34
|
+
employeeByLegalForm?: employeeByLegalForm[],
|
|
32
35
|
};
|
|
33
36
|
|
|
34
37
|
type monthlyNbr = {
|
|
@@ -38,6 +41,12 @@ type monthlyNbr = {
|
|
|
38
41
|
closingType: number[],
|
|
39
42
|
};
|
|
40
43
|
|
|
44
|
+
type exerciceNbr = {
|
|
45
|
+
minimum: number,
|
|
46
|
+
maximum: number,
|
|
47
|
+
price: number,
|
|
48
|
+
};
|
|
49
|
+
|
|
41
50
|
type turnover = {
|
|
42
51
|
turnoverValue: number,
|
|
43
52
|
price: number,
|
|
@@ -54,6 +63,11 @@ type employee = {
|
|
|
54
63
|
price: number,
|
|
55
64
|
};
|
|
56
65
|
|
|
66
|
+
type employeeByLegalForm = {
|
|
67
|
+
idLegalForm: number,
|
|
68
|
+
price: number,
|
|
69
|
+
};
|
|
70
|
+
|
|
57
71
|
type propertie = {
|
|
58
72
|
amount: number,
|
|
59
73
|
price: number,
|
|
@@ -136,7 +150,30 @@ const getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid
|
|
|
136
150
|
return currentPriceGrid;
|
|
137
151
|
};
|
|
138
152
|
|
|
139
|
-
const calculatePrestationPriceWithPriceGrid = (
|
|
153
|
+
const calculatePrestationPriceWithPriceGrid = (
|
|
154
|
+
idPrestationList: number,
|
|
155
|
+
endDate: string,
|
|
156
|
+
NbrMonth: number,
|
|
157
|
+
turnover: number,
|
|
158
|
+
rentsNumber: number,
|
|
159
|
+
employeesNumber: number,
|
|
160
|
+
associatesNumber: number,
|
|
161
|
+
idTypeBrand: number,
|
|
162
|
+
idVatRegime: number,
|
|
163
|
+
pastBalanceSheet: boolean,
|
|
164
|
+
isYearly: boolean,
|
|
165
|
+
totalMonth: number,
|
|
166
|
+
idTaxSystem: number,
|
|
167
|
+
idLegalForm: number,
|
|
168
|
+
exerciceNbr: number,
|
|
169
|
+
balanceSheetOffered: number = 0,
|
|
170
|
+
): {
|
|
171
|
+
totalPrestation: number,
|
|
172
|
+
reduceMonth: number,
|
|
173
|
+
canBeCreated: boolean,
|
|
174
|
+
monthNbr: number,
|
|
175
|
+
price: number
|
|
176
|
+
} => {
|
|
140
177
|
let totalPrestation: number = 0;
|
|
141
178
|
let reduceMonth: number = 0;
|
|
142
179
|
let monthNbr: number = NbrMonth;
|
|
@@ -166,11 +203,15 @@ const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate
|
|
|
166
203
|
else if (currentPriceGrid.employee) {
|
|
167
204
|
monthlyPrice = currentPriceGrid.employee?.find(emp => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber)?.price;
|
|
168
205
|
monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;
|
|
206
|
+
} else if (currentPriceGrid.employeeByLegalForm) {
|
|
207
|
+
monthlyPrice = currentPriceGrid.employeeByLegalForm?.find(emp => emp.idLegalForm === idLegalForm)?.price;
|
|
208
|
+
monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;
|
|
169
209
|
} else if (currentPriceGrid.turnoverYearly && isYearly) yearlyPrice = currentPriceGrid.turnoverYearly?.find(turn => turnover < turn.turnoverValue)?.price;
|
|
170
210
|
else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear) yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find(turn => turnover < turn.turnoverValue)?.price;
|
|
171
211
|
else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear) yearlyPrice = currentPriceGrid.turnoverPastYear?.find(turn => turnover < turn.turnoverValue)?.price;
|
|
172
212
|
else if (currentPriceGrid.partner) yearlyPrice = currentPriceGrid.partner?.find(part => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber)?.price;
|
|
173
213
|
else if (currentPriceGrid.legalForm) yearlyPrice = currentPriceGrid.legalForm?.find(form => form.idLegalForm === idLegalForm)?.price;
|
|
214
|
+
else if (currentPriceGrid.exerciceNbr) yearlyPrice = currentPriceGrid.exerciceNbr?.find(el => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum )?.price;
|
|
174
215
|
finalMonthlyPrice = (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);
|
|
175
216
|
|
|
176
217
|
/* Gestion des mois */
|
|
@@ -215,7 +256,36 @@ const calculatePrestationPriceWithPrestationList = (prestationList: IPrestationL
|
|
|
215
256
|
return totalPrestation;
|
|
216
257
|
};
|
|
217
258
|
|
|
218
|
-
const calculatePrestationPrice = (
|
|
259
|
+
const calculatePrestationPrice = (
|
|
260
|
+
idPrestationList: number,
|
|
261
|
+
prestationList: IPrestationList,
|
|
262
|
+
endDate: string,
|
|
263
|
+
NbrMonth: number,
|
|
264
|
+
turnover: number,
|
|
265
|
+
rentsNumber: number,
|
|
266
|
+
employeesNumber: number,
|
|
267
|
+
associatesNumber: number,
|
|
268
|
+
idTypeBrand: number,
|
|
269
|
+
idVatRegime: number,
|
|
270
|
+
pastBalanceSheet: boolean,
|
|
271
|
+
optionsList: number[],
|
|
272
|
+
totalPercentage: number,
|
|
273
|
+
totalAmount: number,
|
|
274
|
+
totalMonth: number,
|
|
275
|
+
isWithApplicationFees: boolean,
|
|
276
|
+
idTaxSystem: number,
|
|
277
|
+
idLegalForm: number,
|
|
278
|
+
isYearly: boolean = false,
|
|
279
|
+
balanceSheetOffered: number = 0,
|
|
280
|
+
exerciceList: IExercice[] = [],
|
|
281
|
+
): {
|
|
282
|
+
totalPrestation: number,
|
|
283
|
+
reduceMonth: number,
|
|
284
|
+
canBeCreated: boolean,
|
|
285
|
+
calculDetail: string,
|
|
286
|
+
monthlyPrice: string,
|
|
287
|
+
price: number
|
|
288
|
+
} => {
|
|
219
289
|
let totalPrestation: number = 0;
|
|
220
290
|
let reduceMonth: number = 0;
|
|
221
291
|
let canBeCreated: boolean = true;
|
|
@@ -251,7 +321,26 @@ const calculatePrestationPrice = (idPrestationList: number, prestationList: IPre
|
|
|
251
321
|
PrestationType.STATUTS_OPTION_2,
|
|
252
322
|
].includes(idPrestationList)
|
|
253
323
|
) {
|
|
254
|
-
|
|
324
|
+
let exerciceNbr: number = 0;
|
|
325
|
+
if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);
|
|
326
|
+
totalWithReduce = calculatePrestationPriceWithPriceGrid(
|
|
327
|
+
idPrestationList,
|
|
328
|
+
endDate,
|
|
329
|
+
NbrMonth,
|
|
330
|
+
turnover,
|
|
331
|
+
rentsNumber,
|
|
332
|
+
employeesNumber,
|
|
333
|
+
associatesNumber,
|
|
334
|
+
idTypeBrand,
|
|
335
|
+
idVatRegime,
|
|
336
|
+
pastBalanceSheet,
|
|
337
|
+
isYearly,
|
|
338
|
+
totalMonth,
|
|
339
|
+
idTaxSystem,
|
|
340
|
+
idLegalForm,
|
|
341
|
+
exerciceNbr,
|
|
342
|
+
balanceSheetOffered,
|
|
343
|
+
);
|
|
255
344
|
totalPrestation = totalWithReduce.totalPrestation;
|
|
256
345
|
reduceMonth = totalWithReduce.reduceMonth;
|
|
257
346
|
canBeCreated = totalWithReduce.canBeCreated;
|
|
@@ -286,7 +286,7 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
|
|
|
286
286
|
recapitulation: {
|
|
287
287
|
balance: 0, // Calculé plus bas
|
|
288
288
|
refund: isNil ? 0 : _round(payload.refund?.asked ?? 0),
|
|
289
|
-
creditToReport:
|
|
289
|
+
creditToReport: 0, // Calculé plus bas
|
|
290
290
|
imputedCredit: isNil ? 0 : _round(payload.recapitulation?.imputedCredit ?? 0),
|
|
291
291
|
ticRefunded: 0, // Calculé plus bas
|
|
292
292
|
imputeOnVat: 0, // Calculé plus bas
|
|
@@ -338,6 +338,7 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
|
|
|
338
338
|
|
|
339
339
|
data.recapitulation.balance = data.net.balanceSurplus;
|
|
340
340
|
data.recapitulation.ticRefunded = data.tic.total.refund;
|
|
341
|
+
data.recapitulation.creditToReport = isNil ? 0 : data.recapitulation.balance - data.recapitulation.refund;
|
|
341
342
|
data.recapitulation.imputeOnVat = data.tic.total.imputed;
|
|
342
343
|
data.recapitulation.consumsion = data.tic.total.tax;
|
|
343
344
|
data.recapitulation.vatNetDue = data.net.balance;
|