@silexpert/core 1.1.307 → 1.1.309

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 (70) hide show
  1. package/dist/cjs/api/resources/CommercialDocument.d.ts +3 -1
  2. package/dist/cjs/api/resources/CommercialDocument.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/CommercialDocument.js +9 -0
  4. package/dist/cjs/api/resources/CommercialDocument.js.map +1 -1
  5. package/dist/cjs/types/Enum/Card.d.ts +24 -2
  6. package/dist/cjs/types/Enum/Card.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/Card.js +26 -0
  8. package/dist/cjs/types/Enum/Card.js.map +1 -1
  9. package/dist/cjs/types/Enum/EstimateInvoice.d.ts +4 -0
  10. package/dist/cjs/types/Enum/EstimateInvoice.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/EstimateInvoice.js +27 -1
  12. package/dist/cjs/types/Enum/EstimateInvoice.js.map +1 -1
  13. package/dist/cjs/types/Enum/PriceGridClementine.js +1 -1
  14. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  15. package/dist/cjs/types/Interface/api/commercialManagement/Query.d.ts +6 -0
  16. package/dist/cjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  17. package/dist/cjs/types/Interface/api/commercialManagement/Query.js +26 -1
  18. package/dist/cjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
  19. package/dist/cjs/types/Interface/api/payment/Util.d.ts +3 -0
  20. package/dist/cjs/types/Interface/api/payment/Util.d.ts.map +1 -1
  21. package/dist/cjs/types/Interface/api/payment/Util.js.map +1 -1
  22. package/dist/cjs/types/Interface/models/IPrestation.d.ts +1 -0
  23. package/dist/cjs/types/Interface/models/IPrestation.d.ts.map +1 -1
  24. package/dist/cjs/types/Interface/models/IPrestation.js.map +1 -1
  25. package/dist/cjs/utils/payment.d.ts +2 -0
  26. package/dist/cjs/utils/payment.d.ts.map +1 -1
  27. package/dist/cjs/utils/payment.js +84 -33
  28. package/dist/cjs/utils/payment.js.map +1 -1
  29. package/dist/cjs/utils/tests/payment.spec.js +36 -0
  30. package/dist/cjs/utils/tests/payment.spec.js.map +1 -1
  31. package/dist/mjs/api/resources/CommercialDocument.d.ts +3 -1
  32. package/dist/mjs/api/resources/CommercialDocument.d.ts.map +1 -1
  33. package/dist/mjs/api/resources/CommercialDocument.js +9 -0
  34. package/dist/mjs/api/resources/CommercialDocument.js.map +1 -1
  35. package/dist/mjs/types/Enum/Card.d.ts +24 -2
  36. package/dist/mjs/types/Enum/Card.d.ts.map +1 -1
  37. package/dist/mjs/types/Enum/Card.js +26 -0
  38. package/dist/mjs/types/Enum/Card.js.map +1 -1
  39. package/dist/mjs/types/Enum/EstimateInvoice.d.ts +4 -0
  40. package/dist/mjs/types/Enum/EstimateInvoice.d.ts.map +1 -1
  41. package/dist/mjs/types/Enum/EstimateInvoice.js +26 -0
  42. package/dist/mjs/types/Enum/EstimateInvoice.js.map +1 -1
  43. package/dist/mjs/types/Enum/PriceGridClementine.js +1 -1
  44. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  45. package/dist/mjs/types/Interface/api/commercialManagement/Query.d.ts +6 -0
  46. package/dist/mjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  47. package/dist/mjs/types/Interface/api/commercialManagement/Query.js +29 -1
  48. package/dist/mjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
  49. package/dist/mjs/types/Interface/api/payment/Util.d.ts +3 -0
  50. package/dist/mjs/types/Interface/api/payment/Util.d.ts.map +1 -1
  51. package/dist/mjs/types/Interface/api/payment/Util.js.map +1 -1
  52. package/dist/mjs/types/Interface/models/IPrestation.d.ts +1 -0
  53. package/dist/mjs/types/Interface/models/IPrestation.d.ts.map +1 -1
  54. package/dist/mjs/types/Interface/models/IPrestation.js.map +1 -1
  55. package/dist/mjs/utils/payment.d.ts +2 -0
  56. package/dist/mjs/utils/payment.d.ts.map +1 -1
  57. package/dist/mjs/utils/payment.js +84 -34
  58. package/dist/mjs/utils/payment.js.map +1 -1
  59. package/dist/mjs/utils/tests/payment.spec.js +37 -1
  60. package/dist/mjs/utils/tests/payment.spec.js.map +1 -1
  61. package/package.json +1 -1
  62. package/ts/api/resources/CommercialDocument.ts +11 -0
  63. package/ts/types/Enum/Card.ts +27 -0
  64. package/ts/types/Enum/EstimateInvoice.ts +28 -1
  65. package/ts/types/Enum/PriceGridClementine.ts +1 -1
  66. package/ts/types/Interface/api/commercialManagement/Query.ts +21 -1
  67. package/ts/types/Interface/api/payment/Util.ts +3 -0
  68. package/ts/types/Interface/models/IPrestation.ts +1 -0
  69. package/ts/utils/payment.ts +87 -34
  70. package/ts/utils/tests/payment.spec.ts +37 -1
@@ -1,5 +1,5 @@
1
1
  import {
2
- IsArray, IsBoolean, IsDateString, IsOptional, IsString,
2
+ IsArray, IsBoolean, IsDateString, IsInt, IsOptional, IsString,
3
3
  } from 'class-validator';
4
4
  import { Order } from '../../..';
5
5
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
@@ -150,4 +150,24 @@ export class QueryCountByStatus {
150
150
  @ToBoolean()
151
151
  @IsOptional()
152
152
  isDraft?: boolean;
153
+ }
154
+
155
+ export class QueryExportCommercialManagementIntoCSV {
156
+ @ApiPropertyOptional()
157
+ @IsDateString()
158
+ @IsOptional()
159
+ startDate?: string;
160
+
161
+ @ApiPropertyOptional()
162
+ @IsOptional()
163
+ @IsDateString()
164
+ endDate?: string;
165
+
166
+ @ApiProperty()
167
+ @IsInt()
168
+ idSociety: number;
169
+
170
+ @ApiProperty()
171
+ @IsArray()
172
+ types: EstimateInvoiceType[];
153
173
  }
@@ -11,6 +11,8 @@ export interface ParamsForPaymentsAuto {
11
11
  firstExerciceNonExpresssEndDate: Date;
12
12
  goToClient: Date;
13
13
  idPrestation: number;
14
+ idLegalForm: number;
15
+ isWithApplicationFees: boolean;
14
16
  idVat: number;
15
17
  prestationList: IPrestationList;
16
18
  yearlyAmountNonExpress: number;
@@ -21,6 +23,7 @@ export interface ParamsForPaymentsAuto {
21
23
 
22
24
  export interface PaymentAuto {
23
25
  amount: number;
26
+ isPaid?: boolean;
24
27
  datePayment: Date;
25
28
  idPrestation: number;
26
29
  idPaymentMethod: number;
@@ -32,6 +32,7 @@ export interface IPrestation {
32
32
  goToFacturation?: Date | null;
33
33
  dateLeavingFacturation?: Date | null;
34
34
  scoring: number | null;
35
+ isWithApplicationFees: boolean;
35
36
  state: boolean;
36
37
  commentPdf: string | null;
37
38
  token: string | null;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import { IPayment, IRegulation, ParamsForPaymentsAuto, PaymentMethod, PaymentAuto, getTaxesIncludedAmount } from '../types';
3
+ import { IPayment, IRegulation, ParamsForPaymentsAuto, PaymentMethod, PaymentAuto, getTaxesIncludedAmount, LegalFormTypeEnum } from '../types';
4
4
  import * as dayjs from 'dayjs';
5
5
  import { PartialExercicePrestationExpress } from '../types/Interface/api/payment/Util';
6
6
  import { getPriceGrid } from './prestation';
@@ -78,6 +78,8 @@ const calculateFees = (amount: number, goToClient: Date, paymentDate: Date):numb
78
78
  // * @param {number} firstPaymentAmount - amount of the first payment (first regulation of the customer)
79
79
  * @param {Date} firstExerciceNonExpresssEndDate - end date of the first exercice non express
80
80
  * @param {number} idPrestation - prestation id
81
+ * @param {number} idLegalForm - legal form id of the society
82
+ * @param {boolean} isWithApplicationFees - if the prestation has application fees to paid
81
83
  * @param {IPrestationList} prestationList - type of prestation (hidden: 0, isCatalog: 1, isComptable: 1)
82
84
  * @param {number} idVat - vat id of society linked
83
85
  * @param {number} yearlyAmountNonExpress - yearly amount of non express prestation (HT)
@@ -87,11 +89,10 @@ const calculateFees = (amount: number, goToClient: Date, paymentDate: Date):numb
87
89
  * @returns { IPayment[] } list of payment to create for billing auto, after each presta go to onBoarding
88
90
  */
89
91
  const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
90
- const { idTypeBrand, goToClient, firstExerciceNonExpresssEndDate, idPrestation, prestationList, idVat, yearlyAmountNonExpress, nextYearlyAmountNonExpress, listPartialExercicePrestationExpress, listRegulations } = params;
92
+ const { idTypeBrand, goToClient, isWithApplicationFees, firstExerciceNonExpresssEndDate, idPrestation, idLegalForm, prestationList, idVat, yearlyAmountNonExpress, nextYearlyAmountNonExpress, listPartialExercicePrestationExpress, listRegulations } = params;
91
93
  const initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 15 */
92
94
  ? dayjs().add(2, 'month').startOf('month').toDate()
93
95
  : dayjs().add(1, 'month').startOf('month').toDate();
94
- let isApplicationAlreadyPaid = false;
95
96
 
96
97
  // On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC
97
98
  // et pour connaitre le montant du coût de l'app
@@ -100,6 +101,7 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
100
101
  if (!priceGrid) throw new Error('Impossible de trouver la grille tarifaire correspondante');
101
102
  const { applicationCost, priceWithTaxesIncluded } = priceGrid;
102
103
  const applicationCostTotalTTC = (priceWithTaxesIncluded ? applicationCost : getTaxesIncludedAmount(applicationCost, idVat)) * 12;
104
+ const applicationFeesAmount = (idLegalForm === LegalFormTypeEnum.SCI) ? 150 : 50;
103
105
 
104
106
  if (prestationList?.isCatalog || !prestationList?.isComptable) throw new Error('Ce type de prestation ne correspond pas aux conditions attendues.');
105
107
  // if (!listRegulations?.length) throw new Error('List of regulations can not be empty');
@@ -110,7 +112,21 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
110
112
  const listPayments:PaymentAuto[] = [];
111
113
 
112
114
  // on récupère le/les premiers réglements effectués, non alloués
113
- const sumRegulations = listRegulations.reduce((acc: number, r:IRegulation) => acc + r.amount - r.amountUsed, 0);
115
+ let isApplicationFeesAlreadyPaid = false;
116
+ const sumRegulations = listRegulations.reduce((acc: number, r:IRegulation) => {
117
+ //Si la regulation est rattachée à un paymentExpectation, on récupère le détail
118
+ // et on ne prend que les frais de dossier (applicationFee) + le montant de la compta (accountingFee)
119
+ if (r.paymentsExpectation?.payload) {
120
+ const payload = JSON.parse(r.paymentsExpectation?.payload);
121
+ if (+payload?.applicationFee > 0) {
122
+ isApplicationFeesAlreadyPaid = true;
123
+ }
124
+ if (+payload?.accountingFee > 0) acc += +payload?.accountingFee;
125
+ return acc;
126
+ } else {
127
+ return acc + r.amount - r.amountUsed;
128
+ }
129
+ }, 0);
114
130
  let remainingAmount = -sumRegulations; //TTC
115
131
  let paymentDate = initializedPaymentDate;
116
132
 
@@ -125,12 +141,26 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
125
141
  if (sumRegulations) {
126
142
  listPayments.push({
127
143
  amount:sumRegulations, //TTC
144
+ isPaid: true,
128
145
  datePayment: dayjs().toDate(),
129
146
  idPrestation,
130
147
  idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,
131
148
  closingDate: listPartialExercicePrestationExpress?.length ? listPartialExercicePrestationExpress[0].endDate : firstExerciceNonExpresssEndDate,
132
149
  });
133
150
  }
151
+
152
+ // Si les frais de dossiers sont facturés et qu'ils n'ont pas déjà été payés,
153
+ // on ajoute un paiement sur la première mensualité non express
154
+ if (isWithApplicationFees && !isApplicationFeesAlreadyPaid) {
155
+ listPayments.push({
156
+ amount: getTaxesIncludedAmount(applicationFeesAmount, idVat), //TTC
157
+ isPaid: false,
158
+ datePayment: dayjs().startOf('month').add(1, 'month').toDate(),
159
+ idPrestation,
160
+ idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,
161
+ closingDate: listPartialExercicePrestationExpress?.length ? listPartialExercicePrestationExpress[0].endDate : firstExerciceNonExpresssEndDate,
162
+ });
163
+ }
134
164
 
135
165
  // =========================
136
166
  // EXPRESS
@@ -175,37 +205,61 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
175
205
  // sinon, ils sont à la suite des express
176
206
  if (nbExoExpress <= 1) paymentDate = initializedPaymentDate;
177
207
  let exerciceEndDate = dayjs(firstExerciceNonExpresssEndDate).toDate();
208
+
209
+ let hasGeneratedWholeYear = false;
210
+ let isFirstNonExpress = true;
178
211
 
179
- //On génère un seul exercices plein, non express
180
- //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice
181
- let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
182
- if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;
183
-
184
- const exoAmount = yearlyAmountNonExpress;
185
- remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);
212
+ //On génère des paiements jusqu'à ce qu'un exercice soit entier (12 mois), non express
213
+ while (!hasGeneratedWholeYear) {
214
+
215
+ //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice
216
+ let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
217
+ if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;
186
218
 
187
- let remainingAmountByExercicePrestation = remainingAmount;
188
- let monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC
219
+ const exoAmount = isFirstNonExpress ? yearlyAmountNonExpress : nextYearlyAmountNonExpress;
220
+ remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);
221
+
222
+ //TODO: CAS A TESTER : si sumRegulations couvre le premier exercice par exemple (cas rar mais à envisager)
223
+ //Si le premier règlement couvre le coût de cet exercicePrestation, on passe au suivant
224
+ // if (remainingAmount <= 0) {
225
+ // continue;
226
+ // }
189
227
 
190
- if (monthlyAmount > 0) {
191
- for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {
192
- let amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;
228
+ // Si on a ajouté une ligne pour les applications fees, alors on les déduit du montant total
229
+ if (isFirstNonExpress && isWithApplicationFees && !isApplicationFeesAlreadyPaid) {
230
+ remainingAmount -= getTaxesIncludedAmount(applicationFeesAmount, idVat);
231
+ }
232
+
233
+ let remainingAmountByExercicePrestation = remainingAmount;
234
+
235
+ // - frais d'application dès les second exo non express
236
+ if (!isFirstNonExpress) remainingAmountByExercicePrestation += applicationCostTotalTTC;
237
+
238
+ const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC
239
+
240
+ if (monthlyAmount > 0) {
241
+ for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {
242
+ let amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;
193
243
 
194
- // Si besoin, on applique les frais nécessaires :
195
- // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)
196
- amount = calculateFees(amount, goToClient, paymentDate);
244
+ // Si besoin, on applique les frais nécessaires :
245
+ // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)
246
+ amount = calculateFees(amount, goToClient, paymentDate);
197
247
 
198
- listPayments.push({
199
- amount: Math.round(100 * amount) / 100,
200
- datePayment: paymentDate,
201
- idPrestation,
202
- idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,
203
- closingDate: exerciceEndDate,
204
- });
205
- remainingAmountByExercicePrestation -= monthlyAmount;
206
- paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
248
+ listPayments.push({
249
+ amount: Math.round(100 * amount) / 100,
250
+ datePayment: paymentDate,
251
+ idPrestation,
252
+ idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,
253
+ closingDate: exerciceEndDate,
254
+ });
255
+ remainingAmountByExercicePrestation -= monthlyAmount;
256
+ paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
257
+ }
258
+ exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();
207
259
  }
208
- exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();
260
+ remainingAmount = 0;
261
+ if (countMonthsBeforeExerciceEnd === 12) hasGeneratedWholeYear = true;
262
+ isFirstNonExpress = false;
209
263
  }
210
264
 
211
265
  remainingAmount = 0;
@@ -216,20 +270,20 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
216
270
  // On applique le taux de tva de la société, si besoin, selon la grille tarifaire
217
271
  remainingAmount += priceWithTaxesIncluded ? nextYearlyAmountNonExpress : getTaxesIncludedAmount(nextYearlyAmountNonExpress, idVat);
218
272
 
219
- remainingAmountByExercicePrestation = remainingAmount;
273
+ let remainingAmountByExercicePrestation = remainingAmount;
220
274
  //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice
221
- countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
275
+ let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
222
276
  if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;
223
277
 
224
278
  // - frais d'application dès les second exo non express
225
279
  remainingAmountByExercicePrestation += applicationCostTotalTTC;
226
280
 
227
- monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;
281
+ const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;
228
282
 
229
283
  // Si aucun paiement généré, on stoppe là
230
284
  if (!listPayments.length) return [];
231
285
 
232
- while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11 || !isApplicationAlreadyPaid) {
286
+ while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11) {
233
287
  let amount = monthlyAmount;
234
288
 
235
289
  // Si besoin, on applique les frais nécessaires :
@@ -245,7 +299,6 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
245
299
  closingDate: exerciceEndDate,
246
300
  });
247
301
  paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
248
- isApplicationAlreadyPaid = true;
249
302
  }
250
303
 
251
304
  return listPayments;
@@ -1,5 +1,5 @@
1
1
  import * as dayjs from 'dayjs';
2
- import { IRegulation, Vat, PaymentMethod } from '../../types';
2
+ import { IRegulation, Vat, PaymentMethod, LegalFormTypeEnum } from '../../types';
3
3
  import MockDate from 'mockdate';
4
4
 
5
5
  import { calculatePaymentsAuto } from '../payment';
@@ -83,6 +83,8 @@ describe('Payment', () => {
83
83
  goToClient: dayjs('2024-06-06').toDate(),
84
84
  firstExerciceNonExpresssEndDate,
85
85
  idPrestation,
86
+ isWithApplicationFees: true,
87
+ idLegalForm: LegalFormTypeEnum.SARL,
86
88
  prestationList: {
87
89
  ...prestationList,
88
90
  isCatalog: true,
@@ -106,6 +108,8 @@ describe('Payment', () => {
106
108
  goToClient: dayjs('2024-06-06').toDate(),
107
109
  firstExerciceNonExpresssEndDate,
108
110
  idPrestation,
111
+ isWithApplicationFees: true,
112
+ idLegalForm: LegalFormTypeEnum.SARL,
109
113
  prestationList,
110
114
  idVat,
111
115
  listPartialExercicePrestationExpress,
@@ -126,6 +130,8 @@ describe('Payment', () => {
126
130
  goToClient: dayjs('2024-06-06').toDate(),
127
131
  firstExerciceNonExpresssEndDate,
128
132
  idPrestation,
133
+ isWithApplicationFees: true,
134
+ idLegalForm: LegalFormTypeEnum.SARL,
129
135
  prestationList,
130
136
  idVat,
131
137
  listPartialExercicePrestationExpress,
@@ -149,6 +155,8 @@ describe('Payment', () => {
149
155
  goToClient: dayjs('2024-06-06').toDate(),
150
156
  firstExerciceNonExpresssEndDate,
151
157
  idPrestation,
158
+ isWithApplicationFees: true,
159
+ idLegalForm: LegalFormTypeEnum.SARL,
152
160
  prestationList,
153
161
  idVat,
154
162
  listPartialExercicePrestationExpress: [listPartialExercicePrestationExpress[0]],
@@ -166,6 +174,8 @@ describe('Payment', () => {
166
174
  goToClient: dayjs('2024-06-06').toDate(),
167
175
  firstExerciceNonExpresssEndDate,
168
176
  idPrestation,
177
+ isWithApplicationFees: true,
178
+ idLegalForm: LegalFormTypeEnum.SARL,
169
179
  prestationList,
170
180
  idVat,
171
181
  listPartialExercicePrestationExpress,
@@ -190,6 +200,8 @@ describe('Payment', () => {
190
200
  goToClient: dayjs('2024-06-06').toDate(),
191
201
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
192
202
  idPrestation,
203
+ isWithApplicationFees: true,
204
+ idLegalForm: LegalFormTypeEnum.SARL,
193
205
  prestationList,
194
206
  idVat,
195
207
  listPartialExercicePrestationExpress: [],
@@ -215,6 +227,8 @@ describe('Payment', () => {
215
227
  goToClient: dayjs('2024-06-06').toDate(),
216
228
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
217
229
  idPrestation,
230
+ isWithApplicationFees: true,
231
+ idLegalForm: LegalFormTypeEnum.SARL,
218
232
  prestationList,
219
233
  idVat,
220
234
  listPartialExercicePrestationExpress: [],
@@ -243,6 +257,8 @@ describe('Payment', () => {
243
257
  goToClient: dayjs('2024-06-06').toDate(),
244
258
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
245
259
  idPrestation,
260
+ isWithApplicationFees: true,
261
+ idLegalForm: LegalFormTypeEnum.SARL,
246
262
  prestationList,
247
263
  idVat,
248
264
  listPartialExercicePrestationExpress: [],
@@ -269,6 +285,8 @@ describe('Payment', () => {
269
285
  goToClient: dayjs('2024-06-06').toDate(),
270
286
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
271
287
  idPrestation,
288
+ isWithApplicationFees: true,
289
+ idLegalForm: LegalFormTypeEnum.SARL,
272
290
  prestationList,
273
291
  idVat,
274
292
  listPartialExercicePrestationExpress: [],
@@ -293,6 +311,8 @@ describe('Payment', () => {
293
311
  goToClient: dayjs('2024-06-06').toDate(),
294
312
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
295
313
  idPrestation,
314
+ isWithApplicationFees: true,
315
+ idLegalForm: LegalFormTypeEnum.SARL,
296
316
  prestationList,
297
317
  idVat,
298
318
  listPartialExercicePrestationExpress: [],
@@ -319,6 +339,8 @@ describe('Payment', () => {
319
339
  goToClient: dayjs('2024-06-06').toDate(),
320
340
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
321
341
  idPrestation,
342
+ isWithApplicationFees: true,
343
+ idLegalForm: LegalFormTypeEnum.SARL,
322
344
  prestationList,
323
345
  idVat,
324
346
  listPartialExercicePrestationExpress: [],
@@ -346,6 +368,8 @@ describe('Payment', () => {
346
368
  goToClient: dayjs('2024-06-06').toDate(),
347
369
  firstExerciceNonExpresssEndDate: newFirstExerciceNonExpresssEndDate,
348
370
  idPrestation,
371
+ isWithApplicationFees: true,
372
+ idLegalForm: LegalFormTypeEnum.SARL,
349
373
  prestationList,
350
374
  idVat,
351
375
  listPartialExercicePrestationExpress: [],
@@ -379,6 +403,8 @@ describe('Payment', () => {
379
403
  goToClient: dayjs('2024-06-06').toDate(),
380
404
  firstExerciceNonExpresssEndDate,
381
405
  idPrestation,
406
+ isWithApplicationFees: true,
407
+ idLegalForm: LegalFormTypeEnum.SARL,
382
408
  prestationList,
383
409
  idVat,
384
410
  listPartialExercicePrestationExpress: listPartialExercicePrestationExpressCloned,
@@ -397,6 +423,8 @@ describe('Payment', () => {
397
423
  goToClient: dayjs('2024-06-06').toDate(),
398
424
  firstExerciceNonExpresssEndDate,
399
425
  idPrestation,
426
+ isWithApplicationFees: true,
427
+ idLegalForm: LegalFormTypeEnum.SARL,
400
428
  prestationList,
401
429
  idVat,
402
430
  listPartialExercicePrestationExpress,
@@ -436,6 +464,8 @@ describe('Payment', () => {
436
464
  goToClient: dayjs('2024-06-06').toDate(),
437
465
  firstExerciceNonExpresssEndDate,
438
466
  idPrestation,
467
+ isWithApplicationFees: true,
468
+ idLegalForm: LegalFormTypeEnum.SARL,
439
469
  prestationList,
440
470
  idVat,
441
471
  listPartialExercicePrestationExpress,
@@ -455,6 +485,8 @@ describe('Payment', () => {
455
485
  goToClient: dayjs('2024-06-06').toDate(),
456
486
  firstExerciceNonExpresssEndDate,
457
487
  idPrestation,
488
+ isWithApplicationFees: true,
489
+ idLegalForm: LegalFormTypeEnum.SARL,
458
490
  prestationList,
459
491
  idVat,
460
492
  listPartialExercicePrestationExpress,
@@ -470,6 +502,8 @@ describe('Payment', () => {
470
502
  goToClient: dayjs('2024-06-06').toDate(),
471
503
  firstExerciceNonExpresssEndDate,
472
504
  idPrestation,
505
+ isWithApplicationFees: true,
506
+ idLegalForm: LegalFormTypeEnum.SARL,
473
507
  prestationList,
474
508
  idVat,
475
509
  listPartialExercicePrestationExpress: [],
@@ -484,6 +518,8 @@ describe('Payment', () => {
484
518
  goToClient: dayjs('2024-06-06').toDate(),
485
519
  firstExerciceNonExpresssEndDate: dayjs('2024-12-31').toDate(),
486
520
  idPrestation,
521
+ isWithApplicationFees: true,
522
+ idLegalForm: LegalFormTypeEnum.SARL,
487
523
  prestationList,
488
524
  idVat: Vat.TX_20.id,
489
525
  listPartialExercicePrestationExpress: [],