@silexpert/core 1.1.165 → 1.1.167

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 (51) hide show
  1. package/dist/cjs/types/Enum/BrandPourcentage.d.ts +4 -0
  2. package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
  3. package/dist/cjs/types/Enum/BrandPourcentage.js +2 -1
  4. package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
  5. package/dist/cjs/types/Enum/Constitution.d.ts +3 -0
  6. package/dist/cjs/types/Enum/Constitution.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/Constitution.js +3 -0
  8. package/dist/cjs/types/Enum/Constitution.js.map +1 -1
  9. package/dist/cjs/types/Enum/PrestationType.js +6 -6
  10. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  11. package/dist/cjs/types/Enum/PriceGridClementine.d.ts +9 -0
  12. package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  13. package/dist/cjs/types/Enum/PriceGridClementine.js +15 -0
  14. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  15. package/dist/cjs/types/Interface/api/prestation/Query.d.ts +1 -0
  16. package/dist/cjs/types/Interface/api/prestation/Query.d.ts.map +1 -1
  17. package/dist/cjs/types/Interface/api/prestation/Query.js +8 -0
  18. package/dist/cjs/types/Interface/api/prestation/Query.js.map +1 -1
  19. package/dist/cjs/utils/prestation.d.ts +4 -1
  20. package/dist/cjs/utils/prestation.d.ts.map +1 -1
  21. package/dist/cjs/utils/prestation.js +47 -23
  22. package/dist/cjs/utils/prestation.js.map +1 -1
  23. package/dist/mjs/types/Enum/BrandPourcentage.d.ts +4 -0
  24. package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
  25. package/dist/mjs/types/Enum/BrandPourcentage.js +2 -1
  26. package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
  27. package/dist/mjs/types/Enum/Constitution.d.ts +3 -0
  28. package/dist/mjs/types/Enum/Constitution.d.ts.map +1 -1
  29. package/dist/mjs/types/Enum/Constitution.js +3 -0
  30. package/dist/mjs/types/Enum/Constitution.js.map +1 -1
  31. package/dist/mjs/types/Enum/PrestationType.js +6 -6
  32. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  33. package/dist/mjs/types/Enum/PriceGridClementine.d.ts +9 -0
  34. package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  35. package/dist/mjs/types/Enum/PriceGridClementine.js +15 -0
  36. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  37. package/dist/mjs/types/Interface/api/prestation/Query.d.ts +1 -0
  38. package/dist/mjs/types/Interface/api/prestation/Query.d.ts.map +1 -1
  39. package/dist/mjs/types/Interface/api/prestation/Query.js +10 -1
  40. package/dist/mjs/types/Interface/api/prestation/Query.js.map +1 -1
  41. package/dist/mjs/utils/prestation.d.ts +4 -1
  42. package/dist/mjs/utils/prestation.d.ts.map +1 -1
  43. package/dist/mjs/utils/prestation.js +37 -13
  44. package/dist/mjs/utils/prestation.js.map +1 -1
  45. package/package.json +1 -1
  46. package/ts/types/Enum/BrandPourcentage.ts +2 -1
  47. package/ts/types/Enum/Constitution.ts +3 -0
  48. package/ts/types/Enum/PrestationType.ts +6 -6
  49. package/ts/types/Enum/PriceGridClementine.ts +15 -0
  50. package/ts/types/Interface/api/prestation/Query.ts +8 -1
  51. package/ts/utils/prestation.ts +43 -12
@@ -1,6 +1,7 @@
1
1
  import { VatRegime } from './VatRegime';
2
2
  import { ClosingType } from './ClosingType';
3
3
  import { PrestationType } from './PrestationType';
4
+ import { TaxSystem } from './TaxSystem';
4
5
  export declare const PriceGridClementine: {
5
6
  idTypeBrand: number;
6
7
  price: ({
@@ -22,6 +23,7 @@ export declare const PriceGridClementine: {
22
23
  price: number;
23
24
  }[];
24
25
  properties?: undefined;
26
+ taxSystem?: undefined;
25
27
  turnoverCreatedYear?: undefined;
26
28
  turnoverPastYear?: undefined;
27
29
  partner?: undefined;
@@ -44,6 +46,10 @@ export declare const PriceGridClementine: {
44
46
  type: VatRegime;
45
47
  price: number;
46
48
  }[];
49
+ taxSystem: {
50
+ id: TaxSystem;
51
+ price: number;
52
+ }[];
47
53
  turnoverMonthly?: undefined;
48
54
  turnoverCreatedYear?: undefined;
49
55
  turnoverPastYear?: undefined;
@@ -64,6 +70,7 @@ export declare const PriceGridClementine: {
64
70
  turnoverMonthly?: undefined;
65
71
  vatRegimeMonthly?: undefined;
66
72
  properties?: undefined;
73
+ taxSystem?: undefined;
67
74
  partner?: undefined;
68
75
  employee?: undefined;
69
76
  } | {
@@ -78,6 +85,7 @@ export declare const PriceGridClementine: {
78
85
  turnoverMonthly?: undefined;
79
86
  vatRegimeMonthly?: undefined;
80
87
  properties?: undefined;
88
+ taxSystem?: undefined;
81
89
  turnoverCreatedYear?: undefined;
82
90
  turnoverPastYear?: undefined;
83
91
  employee?: undefined;
@@ -93,6 +101,7 @@ export declare const PriceGridClementine: {
93
101
  turnoverMonthly?: undefined;
94
102
  vatRegimeMonthly?: undefined;
95
103
  properties?: undefined;
104
+ taxSystem?: undefined;
96
105
  turnoverCreatedYear?: undefined;
97
106
  turnoverPastYear?: undefined;
98
107
  partner?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"PriceGridClementine.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/PriceGridClementine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0U/B,CAAC"}
1
+ {"version":3,"file":"PriceGridClementine.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/PriceGridClementine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwV/B,CAAC"}
@@ -4,6 +4,7 @@ exports.PriceGridClementine = void 0;
4
4
  const VatRegime_1 = require("./VatRegime");
5
5
  const ClosingType_1 = require("./ClosingType");
6
6
  const PrestationType_1 = require("./PrestationType");
7
+ const TaxSystem_1 = require("./TaxSystem");
7
8
  exports.PriceGridClementine = [
8
9
  {
9
10
  /* Clementine */
@@ -216,6 +217,20 @@ exports.PriceGridClementine = [
216
217
  price: 40,
217
218
  },
218
219
  ],
220
+ taxSystem: [
221
+ {
222
+ id: TaxSystem_1.TaxSystem.IR,
223
+ price: 0,
224
+ },
225
+ {
226
+ id: TaxSystem_1.TaxSystem.IS,
227
+ price: 15,
228
+ },
229
+ {
230
+ id: TaxSystem_1.TaxSystem.NA,
231
+ price: 0,
232
+ },
233
+ ],
219
234
  },
220
235
  {
221
236
  /* Prévisionnel */
@@ -1 +1 @@
1
- {"version":3,"file":"PriceGridClementine.js","sourceRoot":"","sources":["../../../../ts/types/Enum/PriceGridClementine.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,+CAA4C;AAC5C,qDAAkD;AAErC,QAAA,mBAAmB,GAAG;IACjC;QACE,gBAAgB;QAChB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE;YACL;gBACE,gBAAgB;gBAChB,gBAAgB,EAAE,CAAC,+BAAc,CAAC,UAAU,EAAE,+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,aAAa,EAAE,CAAC;wBAChB,aAAa,EAAE,EAAE;wBACjB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,EAAE;wBACjB,aAAa,EAAE,EAAE;wBACjB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,EAAE;wBACjB,aAAa,EAAE,OAAO;wBACtB,KAAK,EAAE,EAAE;qBACV;iBACF;aACF;SACF;KACF;IACD;QACE,gBAAgB;QAChB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,EAAE;KACV;IACD;QACE,qBAAqB;QACrB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,EAAE;KACV;IACD;QACE,aAAa;QACb,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,EAAE;KACV;CACF,CAAC","sourcesContent":["import { VatRegime } from './VatRegime';\nimport { ClosingType } from './ClosingType';\nimport { PrestationType } from './PrestationType';\n\nexport const PriceGridClementine = [\n {\n /* Clementine */\n idTypeBrand: 1,\n price: [\n {\n /* Compta Pro */\n idPrestationList: [PrestationType.COMPTA_PRO, PrestationType.COMPTA_PRO_EXPRESS],\n minimumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 9,\n },\n {\n id: ClosingType.OUTDATED,\n month: 16,\n },\n ],\n maximumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 23,\n },\n {\n id: ClosingType.OUTDATED,\n month: 23,\n },\n ],\n turnoverMonthly: [\n {\n turnoverValue: 10000,\n price: 59,\n },\n {\n turnoverValue: 50000,\n price: 79,\n },\n {\n turnoverValue: 100000,\n price: 99,\n },\n {\n turnoverValue: 150000,\n price: 109,\n },\n {\n turnoverValue: 200000,\n price: 129,\n },\n {\n turnoverValue: 250000,\n price: 149,\n },\n ],\n vatRegimeMonthly: [\n {\n type: VatRegime.NOT_ATTRIBUTED,\n price: 0,\n },\n {\n type: VatRegime.SIMPLIFIED,\n price: 20,\n },\n {\n type: VatRegime.QUARTERLY,\n price: 30,\n },\n {\n type: VatRegime.MONTHLY,\n price: 40,\n },\n ],\n },\n {\n /* Compta Entreprise */\n idPrestationList: [PrestationType.COMPTA_ENTREPRISE, PrestationType.COMPTA_ENTREPRISE_EXPRESS],\n minimumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 9,\n },\n {\n id: ClosingType.OUTDATED,\n month: 16,\n },\n ],\n maximumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 23,\n },\n {\n id: ClosingType.OUTDATED,\n month: 23,\n },\n ],\n turnoverMonthly: [\n {\n turnoverValue: 50000,\n price: 99,\n },\n {\n turnoverValue: 150000,\n price: 129,\n },\n {\n turnoverValue: 250000,\n price: 169,\n },\n {\n turnoverValue: 350000,\n price: 209,\n },\n {\n turnoverValue: 500000,\n price: 239,\n },\n {\n turnoverValue: 700000,\n price: 279,\n },\n {\n turnoverValue: 900000,\n price: 329,\n },\n ],\n vatRegimeMonthly: [\n {\n type: VatRegime.NOT_ATTRIBUTED,\n price: 0,\n },\n {\n type: VatRegime.SIMPLIFIED,\n price: 20,\n },\n {\n type: VatRegime.QUARTERLY,\n price: 30,\n },\n {\n type: VatRegime.MONTHLY,\n price: 40,\n },\n ],\n },\n {\n /* Compta SCI */\n idPrestationList: [PrestationType.COMPTA_SCI, PrestationType.COMPTA_SCI_EXPRESS],\n minimumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 9,\n },\n {\n id: ClosingType.OUTDATED,\n month: 16,\n },\n ],\n maximumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 23,\n },\n {\n id: ClosingType.OUTDATED,\n month: 23,\n },\n ],\n properties: [\n {\n amount: 1,\n price: 39,\n },\n {\n amount: 2,\n price: 49,\n },\n {\n amount: 3,\n price: 59,\n },\n {\n amount: 4,\n price: 69,\n },\n {\n amount: 5,\n price: 79,\n },\n {\n amount: 6,\n price: 89,\n },\n ],\n vatRegimeMonthly: [\n {\n type: VatRegime.NOT_ATTRIBUTED,\n price: 0,\n },\n {\n type: VatRegime.SIMPLIFIED,\n price: 20,\n },\n {\n type: VatRegime.QUARTERLY,\n price: 30,\n },\n {\n type: VatRegime.MONTHLY,\n price: 40,\n },\n ],\n },\n {\n /* Prévisionnel */\n idPrestationList: [PrestationType.BILAN_PREVISIONNEL],\n turnoverCreatedYear: [\n {\n turnoverValue: 75000,\n price: 199,\n },\n {\n turnoverValue: 150000,\n price: 299,\n },\n {\n turnoverValue: 400000,\n price: 399,\n },\n {\n turnoverValue: 750000,\n price: 579,\n },\n {\n turnoverValue: 1000000,\n price: 889,\n },\n ],\n turnoverPastYear: [\n {\n turnoverValue: 75000,\n price: 299,\n },\n {\n turnoverValue: 150000,\n price: 399,\n },\n {\n turnoverValue: 400000,\n price: 499,\n },\n {\n turnoverValue: 750000,\n price: 679,\n },\n {\n turnoverValue: 1000000,\n price: 989,\n },\n ],\n },\n {\n /* Gestion Juridique */\n idPrestationList: [PrestationType.GESTION_JURIDIQUE],\n partner: [\n {\n amountMinimum: 1,\n amountMaximum: 1,\n price: 249,\n },\n {\n amountMinimum: 2,\n amountMaximum: 4,\n price: 299,\n },\n {\n amountMinimum: 5,\n amountMaximum: 1000000,\n price: 399,\n },\n ],\n },\n {\n /* Social */\n idPrestationList: [PrestationType.SOCIAL],\n employee: [\n {\n amountMinimum: 1,\n amountMaximum: 1,\n price: 33,\n },\n {\n amountMinimum: 2,\n amountMaximum: 5,\n price: 30,\n },\n {\n amountMinimum: 6,\n amountMaximum: 20,\n price: 28,\n },\n {\n amountMinimum: 21,\n amountMaximum: 50,\n price: 27,\n },\n {\n amountMinimum: 50,\n amountMaximum: 1000000,\n price: 25,\n },\n ],\n },\n ],\n },\n {\n /* Leglastart */\n idTypeBrand: 2,\n price: [],\n },\n {\n /* Statuts Express */\n idTypeBrand: 4,\n price: [],\n },\n {\n /* Kandbaz */\n idTypeBrand: 5,\n price: [],\n },\n];"]}
1
+ {"version":3,"file":"PriceGridClementine.js","sourceRoot":"","sources":["../../../../ts/types/Enum/PriceGridClementine.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,+CAA4C;AAC5C,qDAAkD;AAClD,2CAAwC;AAE3B,QAAA,mBAAmB,GAAG;IACjC;QACE,gBAAgB;QAChB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE;YACL;gBACE,gBAAgB;gBAChB,gBAAgB,EAAE,CAAC,+BAAc,CAAC,UAAU,EAAE,+BAAc,CAAC,kBAAkB,CAAC;gBAChF,qBAAqB,EAAE;oBACrB;wBACE,EAAE,EAAE,yBAAW,CAAC,WAAW;wBAC3B,KAAK,EAAE,CAAC;qBACT;oBACD;wBACE,EAAE,EAAE,yBAAW,CAAC,QAAQ;wBACxB,KAAK,EAAE,EAAE;qBACV;iBACF;gBACD,qBAAqB,EAAE;oBACrB;wBACE,EAAE,EAAE,yBAAW,CAAC,WAAW;wBAC3B,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,EAAE,EAAE,yBAAW,CAAC,QAAQ;wBACxB,KAAK,EAAE,EAAE;qBACV;iBACF;gBACD,eAAe,EAAE;oBACf;wBACE,aAAa,EAAE,KAAK;wBACpB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,KAAK;wBACpB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,MAAM;wBACrB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,MAAM;wBACrB,KAAK,EAAE,GAAG;qBACX;oBACD;wBACE,aAAa,EAAE,MAAM;wBACrB,KAAK,EAAE,GAAG;qBACX;oBACD;wBACE,aAAa,EAAE,MAAM;wBACrB,KAAK,EAAE,GAAG;qBACX;iBACF;gBACD,gBAAgB,EAAE;oBAChB;wBACE,IAAI,EAAE,qBAAS,CAAC,cAAc;wBAC9B,KAAK,EAAE,CAAC;qBACT;oBACD;wBACE,IAAI,EAAE,qBAAS,CAAC,UAAU;wBAC1B,KAAK,EAAE,EAAE;qBACV;oBACD;w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CAAC;wBAChB,aAAa,EAAE,CAAC;wBAChB,KAAK,EAAE,GAAG;qBACX;oBACD;wBACE,aAAa,EAAE,CAAC;wBAChB,aAAa,EAAE,CAAC;wBAChB,KAAK,EAAE,GAAG;qBACX;oBACD;wBACE,aAAa,EAAE,CAAC;wBAChB,aAAa,EAAE,OAAO;wBACtB,KAAK,EAAE,GAAG;qBACX;iBACF;aACF;YACD;gBACE,YAAY;gBACZ,gBAAgB,EAAE,CAAC,+BAAc,CAAC,MAAM,CAAC;gBACzC,QAAQ,EAAE;oBACR;wBACE,aAAa,EAAE,CAAC;wBAChB,aAAa,EAAE,CAAC;wBAChB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,CAAC;wBAChB,aAAa,EAAE,CAAC;wBAChB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,CAAC;wBAChB,aAAa,EAAE,EAAE;wBACjB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,EAAE;wBACjB,aAAa,EAAE,EAAE;wBACjB,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,aAAa,EAAE,EAAE;wBACjB,aAAa,EAAE,OAAO;wBACtB,KAAK,EAAE,EAAE;qBACV;iBACF;aACF;SACF;KACF;IACD;QACE,gBAAgB;QAChB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,EAAE;KACV;IACD;QACE,qBAAqB;QACrB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,EAAE;KACV;IACD;QACE,aAAa;QACb,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,EAAE;KACV;CACF,CAAC","sourcesContent":["import { VatRegime } from './VatRegime';\nimport { ClosingType } from './ClosingType';\nimport { PrestationType } from './PrestationType';\nimport { TaxSystem } from './TaxSystem';\n\nexport const PriceGridClementine = [\n {\n /* Clementine */\n idTypeBrand: 1,\n price: [\n {\n /* Compta Pro */\n idPrestationList: [PrestationType.COMPTA_PRO, PrestationType.COMPTA_PRO_EXPRESS],\n minimumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 9,\n },\n {\n id: ClosingType.OUTDATED,\n month: 16,\n },\n ],\n maximumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 23,\n },\n {\n id: ClosingType.OUTDATED,\n month: 23,\n },\n ],\n turnoverMonthly: [\n {\n turnoverValue: 10000,\n price: 59,\n },\n {\n turnoverValue: 50000,\n price: 79,\n },\n {\n turnoverValue: 100000,\n price: 99,\n },\n {\n turnoverValue: 150000,\n price: 109,\n },\n {\n turnoverValue: 200000,\n price: 129,\n },\n {\n turnoverValue: 250000,\n price: 149,\n },\n ],\n vatRegimeMonthly: [\n {\n type: VatRegime.NOT_ATTRIBUTED,\n price: 0,\n },\n {\n type: VatRegime.SIMPLIFIED,\n price: 20,\n },\n {\n type: VatRegime.QUARTERLY,\n price: 30,\n },\n {\n type: VatRegime.MONTHLY,\n price: 40,\n },\n ],\n },\n {\n /* Compta Entreprise */\n idPrestationList: [PrestationType.COMPTA_ENTREPRISE, PrestationType.COMPTA_ENTREPRISE_EXPRESS],\n minimumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 9,\n },\n {\n id: ClosingType.OUTDATED,\n month: 16,\n },\n ],\n maximumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 23,\n },\n {\n id: ClosingType.OUTDATED,\n month: 23,\n },\n ],\n turnoverMonthly: [\n {\n turnoverValue: 50000,\n price: 99,\n },\n {\n turnoverValue: 150000,\n price: 129,\n },\n {\n turnoverValue: 250000,\n price: 169,\n },\n {\n turnoverValue: 350000,\n price: 209,\n },\n {\n turnoverValue: 500000,\n price: 239,\n },\n {\n turnoverValue: 700000,\n price: 279,\n },\n {\n turnoverValue: 900000,\n price: 329,\n },\n ],\n vatRegimeMonthly: [\n {\n type: VatRegime.NOT_ATTRIBUTED,\n price: 0,\n },\n {\n type: VatRegime.SIMPLIFIED,\n price: 20,\n },\n {\n type: VatRegime.QUARTERLY,\n price: 30,\n },\n {\n type: VatRegime.MONTHLY,\n price: 40,\n },\n ],\n },\n {\n /* Compta SCI */\n idPrestationList: [PrestationType.COMPTA_SCI, PrestationType.COMPTA_SCI_EXPRESS],\n minimumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 9,\n },\n {\n id: ClosingType.OUTDATED,\n month: 16,\n },\n ],\n maximumMonthlyPayment: [\n {\n id: ClosingType.IN_PROGRESS,\n month: 23,\n },\n {\n id: ClosingType.OUTDATED,\n month: 23,\n },\n ],\n properties: [\n {\n amount: 1,\n price: 39,\n },\n {\n amount: 2,\n price: 49,\n },\n {\n amount: 3,\n price: 59,\n },\n {\n amount: 4,\n price: 69,\n },\n {\n amount: 5,\n price: 79,\n },\n {\n amount: 6,\n price: 89,\n },\n ],\n vatRegimeMonthly: [\n {\n type: VatRegime.NOT_ATTRIBUTED,\n price: 0,\n },\n {\n type: VatRegime.SIMPLIFIED,\n price: 20,\n },\n {\n type: VatRegime.QUARTERLY,\n price: 30,\n },\n {\n type: VatRegime.MONTHLY,\n price: 40,\n },\n ],\n taxSystem: [\n {\n id: TaxSystem.IR,\n price: 0,\n },\n {\n id: TaxSystem.IS,\n price: 15,\n },\n {\n id: TaxSystem.NA,\n price: 0,\n },\n ],\n },\n {\n /* Prévisionnel */\n idPrestationList: [PrestationType.BILAN_PREVISIONNEL],\n turnoverCreatedYear: [\n {\n turnoverValue: 75000,\n price: 199,\n },\n {\n turnoverValue: 150000,\n price: 299,\n },\n {\n turnoverValue: 400000,\n price: 399,\n },\n {\n turnoverValue: 750000,\n price: 579,\n },\n {\n turnoverValue: 1000000,\n price: 889,\n },\n ],\n turnoverPastYear: [\n {\n turnoverValue: 75000,\n price: 299,\n },\n {\n turnoverValue: 150000,\n price: 399,\n },\n {\n turnoverValue: 400000,\n price: 499,\n },\n {\n turnoverValue: 750000,\n price: 679,\n },\n {\n turnoverValue: 1000000,\n price: 989,\n },\n ],\n },\n {\n /* Gestion Juridique */\n idPrestationList: [PrestationType.GESTION_JURIDIQUE],\n partner: [\n {\n amountMinimum: 1,\n amountMaximum: 1,\n price: 249,\n },\n {\n amountMinimum: 2,\n amountMaximum: 4,\n price: 299,\n },\n {\n amountMinimum: 5,\n amountMaximum: 1000000,\n price: 399,\n },\n ],\n },\n {\n /* Social */\n idPrestationList: [PrestationType.SOCIAL],\n employee: [\n {\n amountMinimum: 1,\n amountMaximum: 1,\n price: 33,\n },\n {\n amountMinimum: 2,\n amountMaximum: 5,\n price: 30,\n },\n {\n amountMinimum: 6,\n amountMaximum: 20,\n price: 28,\n },\n {\n amountMinimum: 21,\n amountMaximum: 50,\n price: 27,\n },\n {\n amountMinimum: 50,\n amountMaximum: 1000000,\n price: 25,\n },\n ],\n },\n ],\n },\n {\n /* Leglastart */\n idTypeBrand: 2,\n price: [],\n },\n {\n /* Statuts Express */\n idTypeBrand: 4,\n price: [],\n },\n {\n /* Kandbaz */\n idTypeBrand: 5,\n price: [],\n },\n];"]}
@@ -10,6 +10,7 @@ export declare class QueryCreatePrestation {
10
10
  }
11
11
  export declare class QueryUpdatePrestation {
12
12
  commentPdf: string;
13
+ isWithApplicationFees: boolean;
13
14
  exercice: Partial<IExercice>;
14
15
  exercicePrestation: Partial<IExercicePrestation>;
15
16
  options: number[];
@@ -1 +1 @@
1
- {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/prestation/Query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,qBAAqB;IAG9B,UAAU,EAAE,WAAW,CAAC;IAIxB,kBAAkB,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAIjD,OAAO,EAAE,MAAM,EAAE,CAAC;IAIlB,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;CACxC;AAED,qBAAa,qBAAqB;IAI9B,UAAU,EAAE,MAAM,CAAC;IAKnB,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAK7B,kBAAkB,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAKjD,OAAO,EAAE,MAAM,EAAE,CAAC;IAKlB,oBAAoB,EAAE,MAAM,CAAC;IAK7B,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;CACxC"}
1
+ {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/prestation/Query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,qBAAa,qBAAqB;IAG9B,UAAU,EAAE,WAAW,CAAC;IAIxB,kBAAkB,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAIjD,OAAO,EAAE,MAAM,EAAE,CAAC;IAIlB,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;CACxC;AAED,qBAAa,qBAAqB;IAI9B,UAAU,EAAE,MAAM,CAAC;IAMnB,qBAAqB,EAAE,OAAO,CAAC;IAK/B,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAK7B,kBAAkB,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAKjD,OAAO,EAAE,MAAM,EAAE,CAAC;IAKlB,oBAAoB,EAAE,MAAM,CAAC;IAK7B,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;CACxC"}
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.QueryUpdatePrestation = exports.QueryCreatePrestation = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const utils_1 = require("../../../../utils");
15
+ const boolean_transform_1 = require("../../../../utils/transforms/boolean.transform");
15
16
  class QueryCreatePrestation {
16
17
  }
17
18
  __decorate([
@@ -43,6 +44,13 @@ __decorate([
43
44
  (0, class_validator_1.IsString)(),
44
45
  __metadata("design:type", String)
45
46
  ], QueryUpdatePrestation.prototype, "commentPdf", void 0);
47
+ __decorate([
48
+ (0, utils_1.ApiPropertyOptional)(),
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsBoolean)(),
51
+ (0, boolean_transform_1.ToBoolean)(),
52
+ __metadata("design:type", Boolean)
53
+ ], QueryUpdatePrestation.prototype, "isWithApplicationFees", void 0);
46
54
  __decorate([
47
55
  (0, utils_1.ApiPropertyOptional)(),
48
56
  (0, class_validator_1.IsOptional)(),
@@ -1 +1 @@
1
- {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/prestation/Query.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoF;AACpF,6CAAqE;AAMrE,MAAa,qBAAqB;CAgBjC;AAfC;IAAC,IAAA,mBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;yDACe;AAE1B;IAAC,IAAA,mBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;iEACwC;AAEnD;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,yBAAO,GAAE;;sDACU;AAEpB;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,yBAAO,GAAE;;+DAC6B;AAfzC,sDAgBC;AAED,MAAa,qBAAqB;CA8BjC;AA7BC;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACU;AAErB;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACoB;AAE/B;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iEACwC;AAEnD;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;sDACU;AAEpB;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACoB;AAE/B;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;+DAC6B;AA7BzC,sDA8BC","sourcesContent":["import { IsArray, IsNumber, IsObject, IsOptional, IsString } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { IPrestation } from '../../models/IPrestation';\nimport { IExercicePrestation } from '../../models/IExercicePrestation';\nimport { ICommercialOffer } from '../../models/ICommercialOffer';\nimport { IExercice } from '../../models/IExercice';\n\nexport class QueryCreatePrestation {\n @ApiProperty()\n @IsObject()\n prestation: IPrestation;\n\n @ApiProperty()\n @IsObject()\n exercicePrestation: Partial<IExercicePrestation>;\n\n @ApiPropertyOptional()\n @IsArray()\n options: number[];\n\n @ApiPropertyOptional()\n @IsArray()\n commercialOffers: ICommercialOffer[];\n}\n\nexport class QueryUpdatePrestation {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commentPdf: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsObject()\n exercice: Partial<IExercice>;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsObject()\n exercicePrestation: Partial<IExercicePrestation>;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n options: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idExercicePrestation: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n commercialOffers: ICommercialOffer[];\n}"]}
1
+ {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/prestation/Query.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+F;AAC/F,6CAAqE;AAKrE,sFAA2E;AAE3E,MAAa,qBAAqB;CAgBjC;AAfC;IAAC,IAAA,mBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;yDACe;AAE1B;IAAC,IAAA,mBAAW,GAAE;IACb,IAAA,0BAAQ,GAAE;;iEACwC;AAEnD;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,yBAAO,GAAE;;sDACU;AAEpB;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,yBAAO,GAAE;;+DAC6B;AAfzC,sDAgBC;AAED,MAAa,qBAAqB;CAoCjC;AAnCC;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACU;AAErB;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,6BAAS,GAAE;;oEACqB;AAEjC;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACoB;AAE/B;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iEACwC;AAEnD;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;sDACU;AAEpB;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mEACoB;AAE/B;IAAC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;+DAC6B;AAnCzC,sDAoCC","sourcesContent":["import { IsArray, IsBoolean, IsNumber, IsObject, IsOptional, IsString } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { IPrestation } from '../../models/IPrestation';\nimport { IExercicePrestation } from '../../models/IExercicePrestation';\nimport { ICommercialOffer } from '../../models/ICommercialOffer';\nimport { IExercice } from '../../models/IExercice';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\n\nexport class QueryCreatePrestation {\n @ApiProperty()\n @IsObject()\n prestation: IPrestation;\n\n @ApiProperty()\n @IsObject()\n exercicePrestation: Partial<IExercicePrestation>;\n\n @ApiPropertyOptional()\n @IsArray()\n options: number[];\n\n @ApiPropertyOptional()\n @IsArray()\n commercialOffers: ICommercialOffer[];\n}\n\nexport class QueryUpdatePrestation {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commentPdf: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isWithApplicationFees: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsObject()\n exercice: Partial<IExercice>;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsObject()\n exercicePrestation: Partial<IExercicePrestation>;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n options: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idExercicePrestation: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n commercialOffers: ICommercialOffer[];\n}"]}
@@ -11,9 +11,12 @@ declare const isOnlyJuridic: (idPrestationList: number[]) => boolean;
11
11
  declare const isCreation: (idPrestationList: number[]) => boolean;
12
12
  declare const isExpress: (idPrestationList: number) => boolean;
13
13
  declare const calculateScoringOfPrestation: (idPrestationType: PrestationType, prestations: IPrestation[]) => number;
14
- declare 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, isYearly?: boolean) => {
14
+ declare 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, isYearly?: boolean) => {
15
15
  totalPrestation: number;
16
16
  reduceMonth: number;
17
+ canBeCreated: boolean;
18
+ calculDetail: string;
19
+ price: number;
17
20
  };
18
21
  declare const getPrestationOptions: (idPrestationList: number) => PrestationOptionType[];
19
22
  declare const isAbleToUpdatePrice: (idTypeBrand: number, idPrestationList: number, turnover: number, pastBalanceSheet: boolean) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"prestation.d.ts","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAoB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAoB,MAAM,gCAAgC,CAAC;AAsDxF,QAAA,MAAM,yBAAyB,qBAAsB,MAAM,KAAG,OAOC,CAAC;AAEhE,QAAA,MAAM,wBAAwB,gBAAgB,OAAO,aAAY,OAAO,oBAAoB,MAAM,KAAG,OAA4F,CAAC;AAElM,QAAA,MAAM,oBAAoB,qBAAsB,MAAM,KAAG,OAA8E,CAAC;AAExI,QAAA,MAAM,kBAAkB,WAAW,OAAO,aAAY,OAAO,KAAG,OAA+B,CAAC;AAEhG,QAAA,MAAM,WAAW,qBAAsB,MAAM,EAAE,KAAE,OAAmK,CAAC;AAErN,QAAA,MAAM,YAAY,qBAAsB,MAAM,EAAE,KAAE,OAA+H,CAAC;AAElL,QAAA,MAAM,aAAa,qBAAsB,MAAM,EAAE,KAAE,OAA+G,CAAC;AAEnK,QAAA,MAAM,UAAU,qBAAsB,MAAM,EAAE,KAAE,OAAqE,CAAC;AAEtH,QAAA,MAAM,SAAS,qBAAsB,MAAM,KAAE,OAI5C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Grid === null || currentBrandPriceGrid === void 0 ? void 0 : currentBrandPriceGrid.price.find((price) => price.idPrestationList.includes(idPrestationList));
72
72
  return currentPriceGrid;
73
73
  };
74
- const calculatePrestationPriceWithPriceGrid = (idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth) => {
75
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
74
+ const calculatePrestationPriceWithPriceGrid = (idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth, idTaxSystem) => {
75
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
76
76
  let totalPrestation = 0;
77
77
  let reduceMonth = 0;
78
+ let monthNbr = NbrMonth;
79
+ let yearlyPrice;
80
+ let finalMonthlyPrice;
81
+ let canBeCreated = true;
82
+ let recalculateMonthly = false;
78
83
  /* Récupération de la grille tarifaire */
79
84
  const currentPriceGrid = getPriceGrid(idTypeBrand, idPrestationList);
80
85
  if (currentPriceGrid) {
81
86
  let monthlyPrice;
82
- let yearlyPrice;
83
87
  let vatRegimePrice;
88
+ let taxSystemPrice;
84
89
  /* Gestion du régime de TVA */
85
90
  if (currentPriceGrid.vatRegimeMonthly && !isYearly)
86
91
  vatRegimePrice = (_b = (_a = currentPriceGrid.vatRegimeMonthly) === null || _a === void 0 ? void 0 : _a.find(regime => regime.type === idVatRegime)) === null || _b === void 0 ? void 0 : _b.price;
87
92
  else if (currentPriceGrid.vatRegimeYearly && isYearly)
88
93
  vatRegimePrice = (_d = (_c = currentPriceGrid.vatRegimeYearly) === null || _c === void 0 ? void 0 : _c.find(regime => regime.type === idVatRegime)) === null || _d === void 0 ? void 0 : _d.price;
94
+ /* Gestion du Régime d'imposition */
95
+ if (currentPriceGrid.taxSystem && idTaxSystem)
96
+ taxSystemPrice = (_f = (_e = currentPriceGrid.taxSystem) === null || _e === void 0 ? void 0 : _e.find(tax => tax.id === idTaxSystem)) === null || _f === void 0 ? void 0 : _f.price;
89
97
  /* Gestion des montants */
90
98
  if (currentPriceGrid.turnoverMonthly && !isYearly)
91
- monthlyPrice = (_f = (_e = currentPriceGrid.turnoverMonthly) === null || _e === void 0 ? void 0 : _e.find(turn => turnover < turn.turnoverValue)) === null || _f === void 0 ? void 0 : _f.price;
99
+ monthlyPrice = (_h = (_g = currentPriceGrid.turnoverMonthly) === null || _g === void 0 ? void 0 : _g.find(turn => turnover < turn.turnoverValue)) === null || _h === void 0 ? void 0 : _h.price;
92
100
  else if (currentPriceGrid.properties)
93
- monthlyPrice = (_h = (_g = currentPriceGrid.properties) === null || _g === void 0 ? void 0 : _g.find(property => property.amount === rentsNumber)) === null || _h === void 0 ? void 0 : _h.price;
101
+ monthlyPrice = (_k = (_j = currentPriceGrid.properties) === null || _j === void 0 ? void 0 : _j.find(property => property.amount === rentsNumber)) === null || _k === void 0 ? void 0 : _k.price;
94
102
  else if (currentPriceGrid.employee)
95
- monthlyPrice = (_k = (_j = currentPriceGrid.employee) === null || _j === void 0 ? void 0 : _j.find(emp => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber)) === null || _k === void 0 ? void 0 : _k.price;
103
+ monthlyPrice = (_m = (_l = currentPriceGrid.employee) === null || _l === void 0 ? void 0 : _l.find(emp => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber)) === null || _m === void 0 ? void 0 : _m.price;
96
104
  else if (currentPriceGrid.turnoverYearly && isYearly)
97
- yearlyPrice = (_m = (_l = currentPriceGrid.turnoverYearly) === null || _l === void 0 ? void 0 : _l.find(turn => turnover < turn.turnoverValue)) === null || _m === void 0 ? void 0 : _m.price;
105
+ yearlyPrice = (_p = (_o = currentPriceGrid.turnoverYearly) === null || _o === void 0 ? void 0 : _o.find(turn => turnover < turn.turnoverValue)) === null || _p === void 0 ? void 0 : _p.price;
98
106
  else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)
99
- yearlyPrice = (_p = (_o = currentPriceGrid.turnoverCreatedYear) === null || _o === void 0 ? void 0 : _o.find(turn => turnover < turn.turnoverValue)) === null || _p === void 0 ? void 0 : _p.price;
107
+ yearlyPrice = (_r = (_q = currentPriceGrid.turnoverCreatedYear) === null || _q === void 0 ? void 0 : _q.find(turn => turnover < turn.turnoverValue)) === null || _r === void 0 ? void 0 : _r.price;
100
108
  else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)
101
- yearlyPrice = (_r = (_q = currentPriceGrid.turnoverPastYear) === null || _q === void 0 ? void 0 : _q.find(turn => turnover < turn.turnoverValue)) === null || _r === void 0 ? void 0 : _r.price;
109
+ yearlyPrice = (_t = (_s = currentPriceGrid.turnoverPastYear) === null || _s === void 0 ? void 0 : _s.find(turn => turnover < turn.turnoverValue)) === null || _t === void 0 ? void 0 : _t.price;
102
110
  else if (currentPriceGrid.partner)
103
- yearlyPrice = (_t = (_s = currentPriceGrid.partner) === null || _s === void 0 ? void 0 : _s.find(part => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber)) === null || _t === void 0 ? void 0 : _t.price;
104
- const finalMonthlyPrice = (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0);
111
+ yearlyPrice = (_v = (_u = currentPriceGrid.partner) === null || _u === void 0 ? void 0 : _u.find(part => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber)) === null || _v === void 0 ? void 0 : _v.price;
112
+ finalMonthlyPrice = (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);
105
113
  /* Gestion des mois */
106
114
  let cloturedPast = false;
107
115
  if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs()))
108
116
  cloturedPast = true;
109
- const minimumMonth = (_v = (_u = currentPriceGrid.minimumMonthlyPayment) === null || _u === void 0 ? void 0 : _u.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType_1.ClosingType.OUTDATED : ClosingType_1.ClosingType.IN_PROGRESS))) === null || _v === void 0 ? void 0 : _v.month;
110
- const maximumMonth = (_x = (_w = currentPriceGrid.maximumMonthlyPayment) === null || _w === void 0 ? void 0 : _w.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType_1.ClosingType.OUTDATED : ClosingType_1.ClosingType.IN_PROGRESS))) === null || _x === void 0 ? void 0 : _x.month;
111
- let monthNbr = NbrMonth;
117
+ const minimumMonth = (_x = (_w = currentPriceGrid.minimumMonthlyPayment) === null || _w === void 0 ? void 0 : _w.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType_1.ClosingType.OUTDATED : ClosingType_1.ClosingType.IN_PROGRESS))) === null || _x === void 0 ? void 0 : _x.month;
118
+ const maximumMonth = (_z = (_y = currentPriceGrid.maximumMonthlyPayment) === null || _y === void 0 ? void 0 : _y.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType_1.ClosingType.OUTDATED : ClosingType_1.ClosingType.IN_PROGRESS))) === null || _z === void 0 ? void 0 : _z.month;
112
119
  if (totalMonth > 0)
113
120
  monthNbr = monthNbr - totalMonth;
114
- if (minimumMonth && monthNbr < minimumMonth)
121
+ if (minimumMonth && monthNbr < minimumMonth) {
115
122
  monthNbr = minimumMonth;
116
- if (maximumMonth && monthNbr > maximumMonth)
123
+ recalculateMonthly = true;
124
+ if (totalMonth > 0)
125
+ canBeCreated = false;
126
+ }
127
+ if (maximumMonth && monthNbr > maximumMonth) {
117
128
  monthNbr = maximumMonth;
129
+ recalculateMonthly = true;
130
+ if (totalMonth > 0)
131
+ canBeCreated = false;
132
+ }
118
133
  reduceMonth = (monthNbr === NbrMonth - totalMonth ? totalMonth : 0);
119
134
  /* Prix Final */
120
135
  totalPrestation = (yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr);
121
136
  }
122
- return { totalPrestation, reduceMonth };
137
+ return { totalPrestation, reduceMonth, canBeCreated, monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr, price: yearlyPrice ? yearlyPrice : recalculateMonthly ? (totalPrestation / NbrMonth) : (finalMonthlyPrice ? finalMonthlyPrice : 0) };
123
138
  };
124
139
  const calculatePrestationPriceWithPrestationList = (prestationList) => {
125
140
  let totalPrestation = 0;
126
141
  totalPrestation = prestationList.price || 0;
127
142
  return totalPrestation;
128
143
  };
129
- const calculatePrestationPrice = (idPrestationList, prestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, optionsList, totalPercentage, totalAmount, totalMonth, isYearly = false) => {
144
+ const calculatePrestationPrice = (idPrestationList, prestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, optionsList, totalPercentage, totalAmount, totalMonth, isWithApplicationFees, idTaxSystem, isYearly = false) => {
130
145
  let totalPrestation = 0;
131
146
  let reduceMonth = 0;
132
- let totalWithReduce = { totalPrestation: 0, reduceMonth: 0 };
147
+ let canBeCreated = true;
148
+ let monthNbr = 0;
149
+ let price = 0;
150
+ let totalWithReduce = { totalPrestation: 0, reduceMonth: 0, canBeCreated: true, monthNbr: 0, price: 0 };
133
151
  /* Gestion du prix en fonction de la prestation */
134
152
  if ([
135
153
  PrestationType_1.PrestationType.COMPTA_PRO,
@@ -149,17 +167,20 @@ const calculatePrestationPrice = (idPrestationList, prestationList, endDate, Nbr
149
167
  PrestationType_1.PrestationType.COMPTA_PRO_COMPTASTART,
150
168
  PrestationType_1.PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,
151
169
  ].includes(idPrestationList)) {
152
- totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth);
170
+ totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth, idTaxSystem);
153
171
  totalPrestation = totalWithReduce.totalPrestation;
154
172
  reduceMonth = totalWithReduce.reduceMonth;
173
+ canBeCreated = totalWithReduce.canBeCreated;
174
+ monthNbr = totalWithReduce.monthNbr;
175
+ price = totalWithReduce.price;
155
176
  }
156
177
  else {
157
178
  totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);
158
179
  }
159
- if (totalPercentage > 0)
160
- totalPrestation = totalPrestation - (totalPrestation * (totalPercentage / 100));
161
180
  if (totalAmount > 0)
162
181
  totalPrestation = totalPrestation - totalAmount;
182
+ if (totalPercentage > 0)
183
+ totalPrestation = totalPrestation - (totalPrestation * (totalPercentage / 100));
163
184
  if (prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)
164
185
  totalPrestation = prestationList.minimumPrice;
165
186
  /* Gestion des options */
@@ -173,7 +194,10 @@ const calculatePrestationPrice = (idPrestationList, prestationList, endDate, Nbr
173
194
  });
174
195
  }
175
196
  totalPrestation += (OptionTotalPrice ? OptionTotalPrice : 0);
176
- return { totalPrestation, reduceMonth };
197
+ if (isWithApplicationFees)
198
+ totalPrestation += 50;
199
+ const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + price + '€' : price + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;
200
+ return { totalPrestation, reduceMonth, canBeCreated, calculDetail, price };
177
201
  };
178
202
  exports.calculatePrestationPrice = calculatePrestationPrice;
179
203
  const getPrestationOptions = (idPrestationList) => {
@@ -1 +1 @@
1
- {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mapp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C,QAAQ,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;QACpR,aAAa;aACR,IAAI,CAAC,+BAAc,CAAC,kBAAkB,EAAE,+BAAc,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC1O,aAAa;aACR,IAAI,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC5N,aAAa;aACR,IAAI,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;;YAChN,OAAO,KAAK,CAAC;KACnB;IACD,OAAO,KAAK,CAAC;AAEf,CAAC,CAAC;AAG8O,kDAAmB","sourcesContent":["import { IPrestation, IPrestationList } from '../types';\nimport { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';\nimport { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption';\nimport { PriceGridClementine } from '../types/Enum/PriceGridClementine';\nimport { PriceGridPourcentage } from '../types/Enum/PriceGridPourcentage';\nimport { PriceGridLegalstart } from '../types/Enum/PriceGridLegalstart';\nimport { ClosingType } from '../types/Enum/ClosingType';\nimport { getBrandNameByNodeEnv } from './brands';\nimport * as dayjs from 'dayjs';\n\ntype priceGridBrand = {\n idTypeBrand: number,\n price: priceGrid[]\n};\n\ntype priceGrid = {\n idPrestationList: number[],\n minimumMonthlyPayment?: monthlyPayment[],\n maximumMonthlyPayment?: monthlyPayment[],\n turnoverCreatedYear?: turnover[],\n turnoverPastYear?: turnover[],\n turnoverMonthly?: turnover[],\n turnoverYearly?: turnover[],\n employee?: employee[],\n partner?: employee[],\n properties?: propertie[],\n vatRegimeMonthly?: vatRegime[],\n vatRegimeYearly?: vatRegime[],\n};\n\ntype monthlyPayment = {\n id: number,\n month: number,\n};\n\ntype turnover = {\n turnoverValue: number,\n price: number,\n};\n\ntype employee = {\n amountMinimum: number,\n amountMaximum: number,\n price: number,\n};\n\ntype propertie = {\n amount: number,\n price: number,\n};\n\ntype vatRegime = {\n type: number,\n price: number,\n};\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean => [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique:boolean, isCatalog:boolean, idPrestationList: number): boolean => idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean => idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden:boolean, isCatalog:boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL)).length;\n\nconst isOnlySocial = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]):boolean => idPrestationList.includes(PrestationType.CREATION_SOCIETE);\n\nconst isExpress = (idPrestationList: number):boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr:any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst calculateScoringOfPrestation = (idPrestationType: PrestationType, prestations: IPrestation[]): number => {\n const prestationsSignedPaid = prestations.filter((prestation) => prestation.paid && prestation.signed && prestation.terminationList === null);\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter((p) => p.isComptable && !p.isCatalog);\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the new prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n const numberPoint = prestaDetails?.point || 0;\n\n // Get list of prestations that are already done and check if one of them is in the list of prestations that are half price\n const prestationsExistIds = prestationsSignedPaid.map((prestation) => prestation.idPrestationList);\n const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));\n\n // If one of the prestations already done is in the list of prestations that are half price and if the idPrestationType is in prestationHalfPriceIds, return 50% of points\n if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType)) return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nconst getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid | undefined => {\n let currentBrandPriceGrid: priceGridBrand | undefined;\n let currentPriceGrid: priceGrid | undefined;\n\n const currentEnvName = getBrandNameByNodeEnv(process.env.NODE_ENV);\n const listEnvEnum = {\n PriceGridClementine, PriceGridPourcentage, PriceGridLegalstart,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile) currentBrandPriceGrid = currentPriceGridFile.find((priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand);\n if (currentBrandPriceGrid) currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) => price.idPrestationList.includes(idPrestationList));\n return currentPriceGrid;\n};\n\nconst 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): { totalPrestation: number, reduceMonth: number } => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n \n if (currentPriceGrid) {\n let monthlyPrice: number | undefined;\n let yearlyPrice: number | undefined;\n let vatRegimePrice: number | undefined;\n\n /* Gestion du régime de TVA */\n if (currentPriceGrid.vatRegimeMonthly && !isYearly) vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find(regime => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly) vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find(regime => regime.type === idVatRegime)?.price;\n\n /* Gestion des montants */\n if (currentPriceGrid.turnoverMonthly && !isYearly) monthlyPrice = currentPriceGrid.turnoverMonthly?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties) monthlyPrice = currentPriceGrid.properties?.find(property => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) monthlyPrice = currentPriceGrid.employee?.find(emp => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber)?.price;\n else if (currentPriceGrid.turnoverYearly && isYearly) yearlyPrice = currentPriceGrid.turnoverYearly?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear) yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear) yearlyPrice = currentPriceGrid.turnoverPastYear?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner) yearlyPrice = currentPriceGrid.partner?.find(part => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber)?.price;\n const finalMonthlyPrice: number | undefined = (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0);\n\n /* Gestion des mois */\n let cloturedPast: boolean = false;\n if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;\n const minimumMonth: number | undefined = currentPriceGrid.minimumMonthlyPayment?.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS))?.month;\n const maximumMonth: number | undefined = currentPriceGrid.maximumMonthlyPayment?.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS))?.month;\n let monthNbr: number = NbrMonth;\n if (totalMonth > 0) monthNbr = monthNbr - totalMonth;\n if (minimumMonth && monthNbr < minimumMonth) monthNbr = minimumMonth;\n if (maximumMonth && monthNbr > maximumMonth) monthNbr = maximumMonth;\n\n reduceMonth = (monthNbr === NbrMonth - totalMonth ? totalMonth : 0);\n \n /* Prix Final */\n totalPrestation = (yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr);\n }\n return { totalPrestation, reduceMonth };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList.price || 0;\n\n return totalPrestation;\n};\n\nconst 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, isYearly: boolean = false): { totalPrestation: number, reduceMonth: number } => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let totalWithReduce: { totalPrestation: number, reduceMonth: number } = { totalPrestation: 0, reduceMonth: 0 };\n\n /* Gestion du prix en fonction de la prestation */\n if (\n [\n PrestationType.COMPTA_PRO,\n PrestationType.COMPTA_PRO_EXPRESS,\n PrestationType.COMPTA_ENTREPRISE,\n PrestationType.COMPTA_ENTREPRISE_EXPRESS,\n PrestationType.COMPTA_SCI,\n PrestationType.COMPTA_SCI_EXPRESS,\n PrestationType.BILAN_PREVISIONNEL,\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n PrestationType.COMPTA_POURCENTAGE,\n PrestationType.COMPTA_POURCENTAGE_EXPRESS,\n PrestationType.SOCIAL,\n PrestationType.GESTION_JURIDIQUE,\n PrestationType.COMPTA_PRO_COMPTASTART,\n PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,\n ].includes(idPrestationList)\n ) {\n totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth);\n totalPrestation = totalWithReduce.totalPrestation;\n reduceMonth = totalWithReduce.reduceMonth;\n } else {\n totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);\n }\n if (totalPercentage > 0) totalPrestation = totalPrestation - (totalPrestation * (totalPercentage / 100));\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n if (prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice) totalPrestation = prestationList.minimumPrice;\n /* Gestion des options */\n let OptionTotalPrice: number = 0;\n if (optionsList.length) {\n optionsList.forEach((optionId) => {\n const optionPrice: number | undefined = Object.values(PrestationOption).find((option) => option.id === optionId)?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += (OptionTotalPrice ? OptionTotalPrice : 0);\n\n return { totalPrestation, reduceMonth };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter(option => option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)));\n return PrestationOptionList.filter(option => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (idTypeBrand: number, idPrestationList: number, turnover: number, pastBalanceSheet: boolean): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n // @ts-ignore\n if ([PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS].includes(idPrestationList) && currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover) return true;\n // @ts-ignore\n else if ([PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) && currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover) return true;\n // @ts-ignore\n else if ([PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) && !pastBalanceSheet && currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover) return true;\n // @ts-ignore\n else if ([PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) && pastBalanceSheet && currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover) return true;\n else return false;\n }\n return false;\n\n};\n\nexport {\n isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation, calculatePrestationPrice, getPrestationOptions, isAbleToUpdatePrice,\n};"]}
1
+ {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":";;;AACA,iEAAgF;AAChF,qEAAwF;AACxF,2EAAwE;AACxE,6EAA0E;AAC1E,2EAAwE;AACxE,2DAAwD;AACxD,qCAAiD;AACjD,+BAA+B;AAsD/B,MAAM,yBAAyB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CAAC;IACvE,+BAAc,CAAC,YAAY;IAC3B,+BAAc,CAAC,mBAAmB;IAClC,+BAAc,CAAC,wCAAwC;IACvD,+BAAc,CAAC,uBAAuB;IACtC,+BAAc,CAAC,GAAG;IAClB,+BAAc,CAAC,aAAa;IAC5B,+BAAc,CAAC,kBAAkB;CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AA+M9D,8DAAyB;AA7M3B,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAE,SAAiB,EAAE,gBAAwB,EAAW,EAAE,CAAC,gBAAgB,KAAK,+BAAc,CAAC,iBAAiB,IAAI,SAAS,IAAI,WAAW,CAAC;AA6MrK,4DAAwB;AA3MrD,MAAM,oBAAoB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CAAC,gBAAgB,KAAK,+BAAc,CAAC,+BAA+B,CAAC;AA2M7D,oDAAoB;AAzM/F,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAW,EAAE,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC;AAyMzC,gDAAkB;AAvMzE,MAAM,WAAW,GAAG,CAAC,gBAA0B,EAAU,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAW,EAAE,EAAE,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAY,EAAE,+BAAc,CAAC,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AC;QAC1O,aAAa;aACR,IAAI,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC5N,aAAa;aACR,IAAI,CAAC,+BAAc,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAAE,OAAO,IAAI,CAAC;;YAChN,OAAO,KAAK,CAAC;KACnB;IACD,OAAO,KAAK,CAAC;AAEf,CAAC,CAAC;AAG8O,kDAAmB","sourcesContent":["import { IPrestation, IPrestationList } from '../types';\nimport { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';\nimport { PrestationOptionType, PrestationOption } from '../types/Enum/PrestationOption';\nimport { PriceGridClementine } from '../types/Enum/PriceGridClementine';\nimport { PriceGridPourcentage } from '../types/Enum/PriceGridPourcentage';\nimport { PriceGridLegalstart } from '../types/Enum/PriceGridLegalstart';\nimport { ClosingType } from '../types/Enum/ClosingType';\nimport { getBrandNameByNodeEnv } from './brands';\nimport * as dayjs from 'dayjs';\n\ntype priceGridBrand = {\n idTypeBrand: number,\n price: priceGrid[]\n};\n\ntype priceGrid = {\n idPrestationList: number[],\n minimumMonthlyPayment?: monthlyPayment[],\n maximumMonthlyPayment?: monthlyPayment[],\n turnoverCreatedYear?: turnover[],\n turnoverPastYear?: turnover[],\n turnoverMonthly?: turnover[],\n turnoverYearly?: turnover[],\n employee?: employee[],\n partner?: employee[],\n properties?: propertie[],\n vatRegimeMonthly?: vatRegime[],\n vatRegimeYearly?: vatRegime[],\n taxSystem?: taxSystem[],\n};\n\ntype monthlyPayment = {\n id: number,\n month: number,\n};\n\ntype turnover = {\n turnoverValue: number,\n price: number,\n};\n\ntype employee = {\n amountMinimum: number,\n amountMaximum: number,\n price: number,\n};\n\ntype propertie = {\n amount: number,\n price: number,\n};\n\ntype vatRegime = {\n type: number,\n price: number,\n};\n\ntype taxSystem = {\n id: number,\n price: number,\n};\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean => [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique:boolean, isCatalog:boolean, idPrestationList: number): boolean => idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean => idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden:boolean, isCatalog:boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL)).length;\n\nconst isOnlySocial = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]):boolean => idPrestationList.includes(PrestationType.CREATION_SOCIETE);\n\nconst isExpress = (idPrestationList: number):boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr:any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst calculateScoringOfPrestation = (idPrestationType: PrestationType, prestations: IPrestation[]): number => {\n const prestationsSignedPaid = prestations.filter((prestation) => prestation.paid && prestation.signed && prestation.terminationList === null);\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter((p) => p.isComptable && !p.isCatalog);\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the new prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n const numberPoint = prestaDetails?.point || 0;\n\n // Get list of prestations that are already done and check if one of them is in the list of prestations that are half price\n const prestationsExistIds = prestationsSignedPaid.map((prestation) => prestation.idPrestationList);\n const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));\n\n // If one of the prestations already done is in the list of prestations that are half price and if the idPrestationType is in prestationHalfPriceIds, return 50% of points\n if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType)) return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nconst getPriceGrid = (idTypeBrand: number, idPrestationList: number): priceGrid | undefined => {\n let currentBrandPriceGrid: priceGridBrand | undefined;\n let currentPriceGrid: priceGrid | undefined;\n\n const currentEnvName = getBrandNameByNodeEnv(process.env.NODE_ENV);\n const listEnvEnum = {\n PriceGridClementine, PriceGridPourcentage, PriceGridLegalstart,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile) currentBrandPriceGrid = currentPriceGridFile.find((priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand);\n if (currentBrandPriceGrid) currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) => price.idPrestationList.includes(idPrestationList));\n return currentPriceGrid;\n};\n\nconst 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): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, monthNbr: number, price: number } => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let monthNbr: number = NbrMonth;\n let yearlyPrice: number | undefined;\n let finalMonthlyPrice: number | undefined;\n let canBeCreated: boolean = true;\n let recalculateMonthly: boolean = false;\n\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n \n if (currentPriceGrid) {\n let monthlyPrice: number | undefined;\n let vatRegimePrice: number | undefined;\n let taxSystemPrice: number | undefined;\n\n /* Gestion du régime de TVA */\n if (currentPriceGrid.vatRegimeMonthly && !isYearly) vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find(regime => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly) vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find(regime => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem) taxSystemPrice = currentPriceGrid.taxSystem?.find(tax => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n if (currentPriceGrid.turnoverMonthly && !isYearly) monthlyPrice = currentPriceGrid.turnoverMonthly?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties) monthlyPrice = currentPriceGrid.properties?.find(property => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) monthlyPrice = currentPriceGrid.employee?.find(emp => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber)?.price;\n else if (currentPriceGrid.turnoverYearly && isYearly) yearlyPrice = currentPriceGrid.turnoverYearly?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear) yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear) yearlyPrice = currentPriceGrid.turnoverPastYear?.find(turn => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner) yearlyPrice = currentPriceGrid.partner?.find(part => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber)?.price;\n finalMonthlyPrice = (monthlyPrice ? monthlyPrice : 0) + (vatRegimePrice ? vatRegimePrice : 0) + (taxSystemPrice ? taxSystemPrice : 0);\n\n /* Gestion des mois */\n let cloturedPast: boolean = false;\n if (dayjs(endDate, 'YYYY-MM-DD').subtract(15, 'day').isBefore(dayjs())) cloturedPast = true;\n const minimumMonth: number | undefined = currentPriceGrid.minimumMonthlyPayment?.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS))?.month;\n const maximumMonth: number | undefined = currentPriceGrid.maximumMonthlyPayment?.find(monthlyPayment => monthlyPayment.id === (cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS))?.month;\n if (totalMonth > 0) monthNbr = monthNbr - totalMonth;\n if (minimumMonth && monthNbr < minimumMonth) {\n monthNbr = minimumMonth;\n recalculateMonthly = true;\n if (totalMonth > 0) canBeCreated = false;\n }\n if (maximumMonth && monthNbr > maximumMonth) {\n monthNbr = maximumMonth;\n recalculateMonthly = true;\n if (totalMonth > 0) canBeCreated = false;\n }\n\n reduceMonth = (monthNbr === NbrMonth - totalMonth ? totalMonth : 0);\n \n /* Prix Final */\n totalPrestation = (yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr);\n }\n return { totalPrestation, reduceMonth, canBeCreated, monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr, price: yearlyPrice ? yearlyPrice : recalculateMonthly ? (totalPrestation / NbrMonth) : (finalMonthlyPrice ? finalMonthlyPrice : 0) };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList.price || 0;\n\n return totalPrestation;\n};\n\nconst 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, isYearly: boolean = false): { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, calculDetail: string, price: number } => {\n let totalPrestation: number = 0;\n let reduceMonth: number = 0;\n let canBeCreated: boolean = true;\n let monthNbr: number = 0;\n let price: number = 0;\n let totalWithReduce: { totalPrestation: number, reduceMonth: number, canBeCreated: boolean, monthNbr: number, price: number } = { totalPrestation: 0, reduceMonth: 0, canBeCreated: true, monthNbr: 0, price: 0 };\n\n /* Gestion du prix en fonction de la prestation */\n if (\n [\n PrestationType.COMPTA_PRO,\n PrestationType.COMPTA_PRO_EXPRESS,\n PrestationType.COMPTA_ENTREPRISE,\n PrestationType.COMPTA_ENTREPRISE_EXPRESS,\n PrestationType.COMPTA_SCI,\n PrestationType.COMPTA_SCI_EXPRESS,\n PrestationType.BILAN_PREVISIONNEL,\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n PrestationType.COMPTA_POURCENTAGE,\n PrestationType.COMPTA_POURCENTAGE_EXPRESS,\n PrestationType.SOCIAL,\n PrestationType.GESTION_JURIDIQUE,\n PrestationType.COMPTA_PRO_COMPTASTART,\n PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS,\n ].includes(idPrestationList)\n ) {\n totalWithReduce = calculatePrestationPriceWithPriceGrid(idPrestationList, endDate, NbrMonth, turnover, rentsNumber, employeesNumber, associatesNumber, idTypeBrand, idVatRegime, pastBalanceSheet, isYearly, totalMonth, idTaxSystem);\n totalPrestation = totalWithReduce.totalPrestation;\n reduceMonth = totalWithReduce.reduceMonth;\n canBeCreated = totalWithReduce.canBeCreated;\n monthNbr = totalWithReduce.monthNbr;\n price = totalWithReduce.price;\n } else {\n totalPrestation = calculatePrestationPriceWithPrestationList(prestationList);\n }\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n if (totalPercentage > 0) totalPrestation = totalPrestation - (totalPrestation * (totalPercentage / 100));\n if (prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice) totalPrestation = prestationList.minimumPrice;\n /* Gestion des options */\n let OptionTotalPrice: number = 0;\n if (optionsList.length) {\n optionsList.forEach((optionId) => {\n const optionPrice: number | undefined = Object.values(PrestationOption).find((option) => option.id === optionId)?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += (OptionTotalPrice ? OptionTotalPrice : 0);\n\n if (isWithApplicationFees) totalPrestation += 50;\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + price + '€' : price + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;\n\n return { totalPrestation, reduceMonth, canBeCreated, calculDetail, price };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter(option => option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)));\n return PrestationOptionList.filter(option => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (idTypeBrand: number, idPrestationList: number, turnover: number, pastBalanceSheet: boolean): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n // @ts-ignore\n if ([PrestationType.COMPTA_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS].includes(idPrestationList) && currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover) return true;\n // @ts-ignore\n else if ([PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) && currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover) return true;\n // @ts-ignore\n else if ([PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) && !pastBalanceSheet && currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover) return true;\n // @ts-ignore\n else if ([PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) && pastBalanceSheet && currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover) return true;\n else return false;\n }\n return false;\n\n};\n\nexport {\n isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation, calculatePrestationPrice, getPrestationOptions, isAbleToUpdatePrice,\n};"]}
@@ -89,6 +89,7 @@ export declare const BrandPourcentage: ({
89
89
  phone: string;
90
90
  vatIntracom: string;
91
91
  email: string;
92
+ lastUsedNumber?: undefined;
92
93
  };
93
94
  webmail: {
94
95
  domain: string;
@@ -242,6 +243,7 @@ export declare const BrandPourcentage: ({
242
243
  phone: string;
243
244
  vatIntracom: string;
244
245
  email: string;
246
+ lastUsedNumber?: undefined;
245
247
  };
246
248
  webmail: {
247
249
  domain: string;
@@ -338,6 +340,7 @@ export declare const BrandPourcentage: ({
338
340
  phone: string;
339
341
  vatIntracom: string;
340
342
  email: string;
343
+ lastUsedNumber?: undefined;
341
344
  };
342
345
  webmail: {
343
346
  domain: string;
@@ -421,6 +424,7 @@ export declare const BrandPourcentage: ({
421
424
  cleRib: string;
422
425
  };
423
426
  internalInvoicing: {
427
+ lastUsedNumber: number;
424
428
  statut: string;
425
429
  name: string;
426
430
  address: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BrandPourcentage.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/BrandPourcentage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAgD,MAAM,kBAAkB,CAAC;AAEhG,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAkLC,MAAM,KAAG,OAAO;;;;;;;;;;;;;;;;;2BAyBnB,MAAM,KAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAyfb,MAAM,KAAG,OAAO;;;;;;;;;;;;;;;;;2BAyBnB,MAAM,KAAG,OAAO;;;IAoQ1C,CAAC"}
1
+ {"version":3,"file":"BrandPourcentage.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/BrandPourcentage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAgD,MAAM,kBAAkB,CAAC;AAEhG,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAkLC,MAAM,KAAG,OAAO;;;;;;;;;;;;;;;;;2BAyBnB,MAAM,KAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA0fb,MAAM,KAAG,OAAO;;;;;;;;;;;;;;;;;2BAyBnB,MAAM,KAAG,OAAO;;;IAoQ1C,CAAC"}
@@ -561,7 +561,7 @@ export const BrandPourcentage = [
561
561
  urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-pourcentage/',
562
562
  logoS3: 'config/pourcentage-logo.png',
563
563
  name: 'Pourcentage ECE',
564
- commercialName: 'Pourcentage',
564
+ commercialName: 'Pourcentage AMEX',
565
565
  colors: {
566
566
  primary: '#1e6f5c',
567
567
  primary50: '#DFF9F1',
@@ -633,6 +633,7 @@ export const BrandPourcentage = [
633
633
  cleRib: '89',
634
634
  },
635
635
  internalInvoicing: {
636
+ lastUsedNumber: 1685,
636
637
  statut: 'SAS',
637
638
  name: 'AMEX',
638
639
  address: '11, Boulevard Victor Hugo',