@silexpert/core 1.1.201 → 1.1.202

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 (71) hide show
  1. package/dist/cjs/types/Enum/CommercialOfferType.d.ts +13 -0
  2. package/dist/cjs/types/Enum/CommercialOfferType.d.ts.map +1 -1
  3. package/dist/cjs/types/Enum/CommercialOfferType.js +10 -0
  4. package/dist/cjs/types/Enum/CommercialOfferType.js.map +1 -1
  5. package/dist/cjs/types/Enum/PriceGridClementine.d.ts +13 -20
  6. package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/PriceGridClementine.js +39 -39
  8. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  9. package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts +7 -11
  10. package/dist/cjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/PriceGridLegalstart.js +13 -13
  12. package/dist/cjs/types/Enum/PriceGridLegalstart.js.map +1 -1
  13. package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts +8 -13
  14. package/dist/cjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/PriceGridPourcentage.js +156 -156
  16. package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/contest/Create.d.ts +2 -1
  18. package/dist/cjs/types/Interface/api/contest/Create.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/contest/Create.js +8 -2
  20. package/dist/cjs/types/Interface/api/contest/Create.js.map +1 -1
  21. package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts +2 -0
  22. package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.js +10 -0
  24. package/dist/cjs/types/Interface/api/userRoomEquipment/CreateSignature.js.map +1 -1
  25. package/dist/cjs/utils/documents.d.ts.map +1 -1
  26. package/dist/cjs/utils/documents.js +2 -1
  27. package/dist/cjs/utils/documents.js.map +1 -1
  28. package/dist/cjs/utils/prestation.d.ts +2 -2
  29. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  30. package/dist/cjs/utils/prestation.js +23 -17
  31. package/dist/cjs/utils/prestation.js.map +1 -1
  32. package/dist/mjs/types/Enum/CommercialOfferType.d.ts +13 -0
  33. package/dist/mjs/types/Enum/CommercialOfferType.d.ts.map +1 -1
  34. package/dist/mjs/types/Enum/CommercialOfferType.js +10 -0
  35. package/dist/mjs/types/Enum/CommercialOfferType.js.map +1 -1
  36. package/dist/mjs/types/Enum/PriceGridClementine.d.ts +13 -20
  37. package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  38. package/dist/mjs/types/Enum/PriceGridClementine.js +39 -39
  39. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  40. package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts +7 -11
  41. package/dist/mjs/types/Enum/PriceGridLegalstart.d.ts.map +1 -1
  42. package/dist/mjs/types/Enum/PriceGridLegalstart.js +13 -13
  43. package/dist/mjs/types/Enum/PriceGridLegalstart.js.map +1 -1
  44. package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts +8 -13
  45. package/dist/mjs/types/Enum/PriceGridPourcentage.d.ts.map +1 -1
  46. package/dist/mjs/types/Enum/PriceGridPourcentage.js +156 -156
  47. package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  48. package/dist/mjs/types/Interface/api/contest/Create.d.ts +2 -1
  49. package/dist/mjs/types/Interface/api/contest/Create.d.ts.map +1 -1
  50. package/dist/mjs/types/Interface/api/contest/Create.js +9 -2
  51. package/dist/mjs/types/Interface/api/contest/Create.js.map +1 -1
  52. package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts +2 -0
  53. package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.d.ts.map +1 -1
  54. package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.js +13 -1
  55. package/dist/mjs/types/Interface/api/userRoomEquipment/CreateSignature.js.map +1 -1
  56. package/dist/mjs/utils/documents.d.ts.map +1 -1
  57. package/dist/mjs/utils/documents.js +2 -1
  58. package/dist/mjs/utils/documents.js.map +1 -1
  59. package/dist/mjs/utils/prestation.d.ts +2 -2
  60. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  61. package/dist/mjs/utils/prestation.js +22 -16
  62. package/dist/mjs/utils/prestation.js.map +1 -1
  63. package/package.json +1 -1
  64. package/ts/types/Enum/CommercialOfferType.ts +10 -0
  65. package/ts/types/Enum/PriceGridClementine.ts +39 -39
  66. package/ts/types/Enum/PriceGridLegalstart.ts +13 -13
  67. package/ts/types/Enum/PriceGridPourcentage.ts +156 -156
  68. package/ts/types/Interface/api/contest/Create.ts +9 -3
  69. package/ts/types/Interface/api/userRoomEquipment/CreateSignature.ts +9 -1
  70. package/ts/utils/documents.ts +2 -1
  71. package/ts/utils/prestation.ts +28 -18
@@ -10,24 +10,24 @@ export const PriceGridPourcentage = [
10
10
  {
11
11
  /* Compta Premium */
12
12
  idPrestationList: [PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
13
- minimumMonthlyPayment: [
13
+ monthlyNbr: [
14
14
  {
15
- id: ClosingType.IN_PROGRESS,
16
- month: 9,
15
+ minimum: 0,
16
+ maximum: 4,
17
+ value: 6,
18
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
17
19
  },
18
20
  {
19
- id: ClosingType.OUTDATED,
20
- month: 12,
21
- },
22
- ],
23
- maximumMonthlyPayment: [
24
- {
25
- id: ClosingType.IN_PROGRESS,
26
- month: 23,
21
+ minimum: 5,
22
+ maximum: 9,
23
+ value: 9,
24
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
27
25
  },
28
26
  {
29
- id: ClosingType.OUTDATED,
30
- month: 23,
27
+ minimum: 12,
28
+ maximum: 16,
29
+ value: 16,
30
+ closingType: [ClosingType.OUTDATED],
31
31
  },
32
32
  ],
33
33
  turnoverMonthly: [
@@ -98,24 +98,24 @@ export const PriceGridPourcentage = [
98
98
  {
99
99
  /* Compta Pourcentage */
100
100
  idPrestationList: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
101
- minimumMonthlyPayment: [
101
+ monthlyNbr: [
102
102
  {
103
- id: ClosingType.IN_PROGRESS,
104
- month: 9,
103
+ minimum: 0,
104
+ maximum: 4,
105
+ value: 6,
106
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
105
107
  },
106
108
  {
107
- id: ClosingType.OUTDATED,
108
- month: 12,
109
+ minimum: 5,
110
+ maximum: 9,
111
+ value: 9,
112
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
109
113
  },
110
- ],
111
- maximumMonthlyPayment: [
112
114
  {
113
- id: ClosingType.IN_PROGRESS,
114
- month: 23,
115
- },
116
- {
117
- id: ClosingType.OUTDATED,
118
- month: 23,
115
+ minimum: 12,
116
+ maximum: 16,
117
+ value: 16,
118
+ closingType: [ClosingType.OUTDATED],
119
119
  },
120
120
  ],
121
121
  turnoverMonthly: [
@@ -320,24 +320,24 @@ export const PriceGridPourcentage = [
320
320
  {
321
321
  /* Compta Premium */
322
322
  idPrestationList: [PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
323
- minimumMonthlyPayment: [
324
- {
325
- id: ClosingType.IN_PROGRESS,
326
- month: 9,
327
- },
323
+ monthlyNbr: [
328
324
  {
329
- id: ClosingType.OUTDATED,
330
- month: 12,
325
+ minimum: 0,
326
+ maximum: 4,
327
+ value: 6,
328
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
331
329
  },
332
- ],
333
- maximumMonthlyPayment: [
334
330
  {
335
- id: ClosingType.IN_PROGRESS,
336
- month: 23,
331
+ minimum: 5,
332
+ maximum: 9,
333
+ value: 9,
334
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
337
335
  },
338
336
  {
339
- id: ClosingType.OUTDATED,
340
- month: 23,
337
+ minimum: 12,
338
+ maximum: 16,
339
+ value: 16,
340
+ closingType: [ClosingType.OUTDATED],
341
341
  },
342
342
  ],
343
343
  turnoverMonthly: [
@@ -408,24 +408,24 @@ export const PriceGridPourcentage = [
408
408
  {
409
409
  /* Compta Pourcentage */
410
410
  idPrestationList: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
411
- minimumMonthlyPayment: [
411
+ monthlyNbr: [
412
412
  {
413
- id: ClosingType.IN_PROGRESS,
414
- month: 9,
413
+ minimum: 0,
414
+ maximum: 4,
415
+ value: 6,
416
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
415
417
  },
416
418
  {
417
- id: ClosingType.OUTDATED,
418
- month: 12,
419
- },
420
- ],
421
- maximumMonthlyPayment: [
422
- {
423
- id: ClosingType.IN_PROGRESS,
424
- month: 23,
419
+ minimum: 5,
420
+ maximum: 9,
421
+ value: 9,
422
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
425
423
  },
426
424
  {
427
- id: ClosingType.OUTDATED,
428
- month: 23,
425
+ minimum: 12,
426
+ maximum: 16,
427
+ value: 16,
428
+ closingType: [ClosingType.OUTDATED],
429
429
  },
430
430
  ],
431
431
  turnoverMonthly: [
@@ -630,24 +630,24 @@ export const PriceGridPourcentage = [
630
630
  {
631
631
  /* Compta Premium */
632
632
  idPrestationList: [PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
633
- minimumMonthlyPayment: [
633
+ monthlyNbr: [
634
634
  {
635
- id: ClosingType.IN_PROGRESS,
636
- month: 9,
635
+ minimum: 0,
636
+ maximum: 4,
637
+ value: 6,
638
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
637
639
  },
638
640
  {
639
- id: ClosingType.OUTDATED,
640
- month: 12,
641
+ minimum: 5,
642
+ maximum: 9,
643
+ value: 9,
644
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
641
645
  },
642
- ],
643
- maximumMonthlyPayment: [
644
646
  {
645
- id: ClosingType.IN_PROGRESS,
646
- month: 23,
647
- },
648
- {
649
- id: ClosingType.OUTDATED,
650
- month: 23,
647
+ minimum: 12,
648
+ maximum: 16,
649
+ value: 16,
650
+ closingType: [ClosingType.OUTDATED],
651
651
  },
652
652
  ],
653
653
  turnoverMonthly: [
@@ -718,24 +718,24 @@ export const PriceGridPourcentage = [
718
718
  {
719
719
  /* Compta Pourcentage */
720
720
  idPrestationList: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
721
- minimumMonthlyPayment: [
722
- {
723
- id: ClosingType.IN_PROGRESS,
724
- month: 9,
725
- },
721
+ monthlyNbr: [
726
722
  {
727
- id: ClosingType.OUTDATED,
728
- month: 12,
723
+ minimum: 0,
724
+ maximum: 4,
725
+ value: 6,
726
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
729
727
  },
730
- ],
731
- maximumMonthlyPayment: [
732
728
  {
733
- id: ClosingType.IN_PROGRESS,
734
- month: 23,
729
+ minimum: 5,
730
+ maximum: 9,
731
+ value: 9,
732
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
735
733
  },
736
734
  {
737
- id: ClosingType.OUTDATED,
738
- month: 23,
735
+ minimum: 12,
736
+ maximum: 16,
737
+ value: 16,
738
+ closingType: [ClosingType.OUTDATED],
739
739
  },
740
740
  ],
741
741
  turnoverMonthly: [
@@ -940,24 +940,24 @@ export const PriceGridPourcentage = [
940
940
  {
941
941
  /* Compta Premium */
942
942
  idPrestationList: [PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
943
- minimumMonthlyPayment: [
943
+ monthlyNbr: [
944
944
  {
945
- id: ClosingType.IN_PROGRESS,
946
- month: 9,
945
+ minimum: 0,
946
+ maximum: 4,
947
+ value: 6,
948
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
947
949
  },
948
950
  {
949
- id: ClosingType.OUTDATED,
950
- month: 12,
951
- },
952
- ],
953
- maximumMonthlyPayment: [
954
- {
955
- id: ClosingType.IN_PROGRESS,
956
- month: 23,
951
+ minimum: 5,
952
+ maximum: 9,
953
+ value: 9,
954
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
957
955
  },
958
956
  {
959
- id: ClosingType.OUTDATED,
960
- month: 23,
957
+ minimum: 12,
958
+ maximum: 16,
959
+ value: 16,
960
+ closingType: [ClosingType.OUTDATED],
961
961
  },
962
962
  ],
963
963
  turnoverMonthly: [
@@ -1028,24 +1028,24 @@ export const PriceGridPourcentage = [
1028
1028
  {
1029
1029
  /* Compta Pourcentage */
1030
1030
  idPrestationList: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
1031
- minimumMonthlyPayment: [
1031
+ monthlyNbr: [
1032
1032
  {
1033
- id: ClosingType.IN_PROGRESS,
1034
- month: 9,
1033
+ minimum: 0,
1034
+ maximum: 4,
1035
+ value: 6,
1036
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1035
1037
  },
1036
1038
  {
1037
- id: ClosingType.OUTDATED,
1038
- month: 12,
1039
+ minimum: 5,
1040
+ maximum: 9,
1041
+ value: 9,
1042
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1039
1043
  },
1040
- ],
1041
- maximumMonthlyPayment: [
1042
1044
  {
1043
- id: ClosingType.IN_PROGRESS,
1044
- month: 23,
1045
- },
1046
- {
1047
- id: ClosingType.OUTDATED,
1048
- month: 23,
1045
+ minimum: 12,
1046
+ maximum: 16,
1047
+ value: 16,
1048
+ closingType: [ClosingType.OUTDATED],
1049
1049
  },
1050
1050
  ],
1051
1051
  turnoverMonthly: [
@@ -1250,24 +1250,24 @@ export const PriceGridPourcentage = [
1250
1250
  {
1251
1251
  /* Compta Premium */
1252
1252
  idPrestationList: [PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
1253
- minimumMonthlyPayment: [
1254
- {
1255
- id: ClosingType.IN_PROGRESS,
1256
- month: 9,
1257
- },
1253
+ monthlyNbr: [
1258
1254
  {
1259
- id: ClosingType.OUTDATED,
1260
- month: 12,
1255
+ minimum: 0,
1256
+ maximum: 4,
1257
+ value: 6,
1258
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1261
1259
  },
1262
- ],
1263
- maximumMonthlyPayment: [
1264
1260
  {
1265
- id: ClosingType.IN_PROGRESS,
1266
- month: 23,
1261
+ minimum: 5,
1262
+ maximum: 9,
1263
+ value: 9,
1264
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1267
1265
  },
1268
1266
  {
1269
- id: ClosingType.OUTDATED,
1270
- month: 23,
1267
+ minimum: 12,
1268
+ maximum: 16,
1269
+ value: 16,
1270
+ closingType: [ClosingType.OUTDATED],
1271
1271
  },
1272
1272
  ],
1273
1273
  turnoverMonthly: [
@@ -1338,24 +1338,24 @@ export const PriceGridPourcentage = [
1338
1338
  {
1339
1339
  /* Compta Pourcentage */
1340
1340
  idPrestationList: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
1341
- minimumMonthlyPayment: [
1341
+ monthlyNbr: [
1342
1342
  {
1343
- id: ClosingType.IN_PROGRESS,
1344
- month: 9,
1343
+ minimum: 0,
1344
+ maximum: 4,
1345
+ value: 6,
1346
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1345
1347
  },
1346
1348
  {
1347
- id: ClosingType.OUTDATED,
1348
- month: 12,
1349
- },
1350
- ],
1351
- maximumMonthlyPayment: [
1352
- {
1353
- id: ClosingType.IN_PROGRESS,
1354
- month: 23,
1349
+ minimum: 5,
1350
+ maximum: 9,
1351
+ value: 9,
1352
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1355
1353
  },
1356
1354
  {
1357
- id: ClosingType.OUTDATED,
1358
- month: 23,
1355
+ minimum: 12,
1356
+ maximum: 16,
1357
+ value: 16,
1358
+ closingType: [ClosingType.OUTDATED],
1359
1359
  },
1360
1360
  ],
1361
1361
  turnoverMonthly: [
@@ -1560,24 +1560,24 @@ export const PriceGridPourcentage = [
1560
1560
  {
1561
1561
  /* Compta Premium */
1562
1562
  idPrestationList: [PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
1563
- minimumMonthlyPayment: [
1563
+ monthlyNbr: [
1564
1564
  {
1565
- id: ClosingType.IN_PROGRESS,
1566
- month: 9,
1565
+ minimum: 0,
1566
+ maximum: 4,
1567
+ value: 6,
1568
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1567
1569
  },
1568
1570
  {
1569
- id: ClosingType.OUTDATED,
1570
- month: 12,
1571
+ minimum: 5,
1572
+ maximum: 9,
1573
+ value: 9,
1574
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1571
1575
  },
1572
- ],
1573
- maximumMonthlyPayment: [
1574
1576
  {
1575
- id: ClosingType.IN_PROGRESS,
1576
- month: 23,
1577
- },
1578
- {
1579
- id: ClosingType.OUTDATED,
1580
- month: 23,
1577
+ minimum: 12,
1578
+ maximum: 16,
1579
+ value: 16,
1580
+ closingType: [ClosingType.OUTDATED],
1581
1581
  },
1582
1582
  ],
1583
1583
  turnoverMonthly: [
@@ -1648,24 +1648,24 @@ export const PriceGridPourcentage = [
1648
1648
  {
1649
1649
  /* Compta Pourcentage */
1650
1650
  idPrestationList: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
1651
- minimumMonthlyPayment: [
1652
- {
1653
- id: ClosingType.IN_PROGRESS,
1654
- month: 9,
1655
- },
1651
+ monthlyNbr: [
1656
1652
  {
1657
- id: ClosingType.OUTDATED,
1658
- month: 12,
1653
+ minimum: 0,
1654
+ maximum: 4,
1655
+ value: 6,
1656
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1659
1657
  },
1660
- ],
1661
- maximumMonthlyPayment: [
1662
1658
  {
1663
- id: ClosingType.IN_PROGRESS,
1664
- month: 23,
1659
+ minimum: 5,
1660
+ maximum: 9,
1661
+ value: 9,
1662
+ closingType: [ClosingType.OUTDATED, ClosingType.IN_PROGRESS],
1665
1663
  },
1666
1664
  {
1667
- id: ClosingType.OUTDATED,
1668
- month: 23,
1665
+ minimum: 12,
1666
+ maximum: 16,
1667
+ value: 16,
1668
+ closingType: [ClosingType.OUTDATED],
1669
1669
  },
1670
1670
  ],
1671
1671
  turnoverMonthly: [
@@ -28,9 +28,8 @@ export class CreateUserContest {
28
28
  @ApiPropertyOptional()
29
29
  societyDescription?: string;
30
30
 
31
- @ApiPropertyOptional()
32
- @IsOptional()
33
- photo?: TFile;
31
+ @ApiProperty()
32
+ photo: TFile;
34
33
 
35
34
  @ApiPropertyOptional()
36
35
  @IsOptional()
@@ -62,6 +61,13 @@ export class CreateCheckVote {
62
61
 
63
62
  @ApiPropertyOptional()
64
63
  recaptcha?: string;
64
+
65
+
66
+ @ApiPropertyOptional()
67
+ @IsOptional()
68
+ @IsBoolean()
69
+ @ToBoolean()
70
+ isTestMode?: boolean;
65
71
  }
66
72
 
67
73
  export class CreateVoteContest {
@@ -1,4 +1,4 @@
1
- import { IsInt, IsEmail } from 'class-validator';
1
+ import { IsInt, IsEmail, IsString } from 'class-validator';
2
2
  import { ApiProperty } from '../../../../utils';
3
3
 
4
4
  export class CreateYousignSignature {
@@ -13,4 +13,12 @@ export class CreateYousignSignature {
13
13
  @ApiProperty()
14
14
  @IsEmail()
15
15
  email: string;
16
+
17
+ @ApiProperty()
18
+ @IsString()
19
+ phone: string;
20
+
21
+ @ApiProperty()
22
+ @IsString()
23
+ prefix: string;
16
24
  }
@@ -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, LegalForm.SAS.id, LegalForm.SARL.id, LegalForm.SCI.id, LegalForm.EARL.id].includes(idLegalForm)) {
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)) {
@@ -17,8 +17,7 @@ type priceGridBrand = {
17
17
 
18
18
  type priceGrid = {
19
19
  idPrestationList: number[],
20
- minimumMonthlyPayment?: monthlyPayment[],
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 monthlyPayment = {
36
- id: number,
37
- month: number,
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
- const minimumMonth: number | undefined = currentPriceGrid.minimumMonthlyPayment?.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS))?.month;
179
- const maximumMonth: number | undefined = currentPriceGrid.maximumMonthlyPayment?.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS))?.month;
180
- if (totalMonth > 0) monthNbr = monthNbr - totalMonth;
181
- if (minimumMonth && monthNbr < minimumMonth) {
182
- monthNbr = minimumMonth;
183
- recalculateMonthly = true;
184
- if (totalMonth > 0) canBeCreated = false;
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 (maximumMonth && monthNbr > maximumMonth) {
187
- monthNbr = maximumMonth;
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;