@silexpert/core 1.0.155 → 1.0.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/types/Enum/GeneralThirdParty.d.ts.map +1 -1
- package/es/types/Enum/GeneralThirdParty.js +611 -234
- package/es/types/Enum/GeneralThirdParty.js.map +1 -1
- package/es/types/Enum/PrestationType.js +81 -81
- package/es/types/Enum/PrestationType.js.map +1 -1
- package/es/types/Interface/models/IPrestation.d.ts +1 -1
- package/es/types/Interface/models/IPrestation.d.ts.map +1 -1
- package/es/types/Interface/models/IPrestation.js.map +1 -1
- package/es/utils/prestation.d.ts.map +1 -1
- package/es/utils/prestation.js +5 -4
- package/es/utils/prestation.js.map +1 -1
- package/js/types/Enum/GeneralThirdParty.js +1567 -436
- package/js/types/Enum/GeneralThirdParty.js.map +1 -1
- package/js/types/Enum/PrestationType.js +81 -81
- package/js/types/Enum/PrestationType.js.map +1 -1
- package/js/types/Interface/models/IPrestation.js.map +1 -1
- package/js/utils/prestation.js +4 -3
- package/js/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/GeneralThirdParty.ts +611 -234
- package/ts/types/Enum/PrestationType.ts +81 -81
- package/ts/types/Interface/models/IPrestation.ts +1 -1
- package/ts/utils/prestation.ts +5 -4
|
@@ -54,6 +54,6 @@ export interface IPrestation {
|
|
|
54
54
|
societiesPrestations?: ISociety;
|
|
55
55
|
prestationsDetailsBeforeExercice?: IExercicePrestation[];
|
|
56
56
|
customersSignatures?: ICustomerSignature[];
|
|
57
|
-
|
|
57
|
+
terminationList?: ITerminationList;
|
|
58
58
|
}
|
|
59
59
|
//# sourceMappingURL=IPrestation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPrestation.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,O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],"names":[],"mappings":"","sourcesContent":["import { IExercice } from './IExercice';\nimport { IPayment } from './IPayment';\nimport { IPrestationList } from './IPrestationList';\nimport { IPrestationComplementary } from './IPrestationComplementary';\nimport { ISociety } from './ISociety';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { ICustomerSignature } from './ICustomerSignature';\nimport { ITerminationList } from './ITerminationList';\n\n// prestations\nexport interface IPrestation {\n id?: number;\n numPrestation: string | null;\n statePrevi: number | null;\n archive: boolean;\n withStatuteDrafted: boolean | null;\n withCaptainContrat: boolean | null;\n withStatutesApportNature: boolean | null;\n withStatutesAutorisationTutelle: boolean | null;\n withStatutesFileAccre: boolean | null;\n paid: boolean | null;\n signed: boolean | null;\n toAdministratif: number | null;\n goToAdministratif: Date | null;\n administratifStatus: number;\n toConstitution: number;\n dateValidPrestation: Date | null;\n goToOnboarding: Date | null;\n goToClient: Date | null;\n scoring: number | null;\n state: boolean;\n commentPdf: string | null;\n token: string | null;\n size: number | null;\n inProgress: number | null;\n idSociety: number;\n idPrestationList: number;\n idPrestationComplementary: number | null;\n gestionJuridique: boolean;\n idPrestationSocial: number | null;\n idPrestationJuridique: number | null;\n idPrestationCreation: number | null;\n totalAmount?: number;\n discountAmount?: number;\n debitType?: string;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n exercices?: IExercice[];\n prestationsPayments?: IPayment[];\n prestationsList?: IPrestationList;\n prestationsComplementary?: IPrestationComplementary;\n prestationJuridique?: IPrestation;\n prestationSocial?: IPrestation;\n prestationCreation?: IPrestation;\n societiesPrestations?: ISociety;\n prestationsDetailsBeforeExercice?: IExercicePrestation[];\n customersSignatures?: ICustomerSignature[];\n
|
|
1
|
+
{"version":3,"file":"IPrestation.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IExercice } from './IExercice';\nimport { IPayment } from './IPayment';\nimport { IPrestationList } from './IPrestationList';\nimport { IPrestationComplementary } from './IPrestationComplementary';\nimport { ISociety } from './ISociety';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { ICustomerSignature } from './ICustomerSignature';\nimport { ITerminationList } from './ITerminationList';\n\n// prestations\nexport interface IPrestation {\n id?: number;\n numPrestation: string | null;\n statePrevi: number | null;\n archive: boolean;\n withStatuteDrafted: boolean | null;\n withCaptainContrat: boolean | null;\n withStatutesApportNature: boolean | null;\n withStatutesAutorisationTutelle: boolean | null;\n withStatutesFileAccre: boolean | null;\n paid: boolean | null;\n signed: boolean | null;\n toAdministratif: number | null;\n goToAdministratif: Date | null;\n administratifStatus: number;\n toConstitution: number;\n dateValidPrestation: Date | null;\n goToOnboarding: Date | null;\n goToClient: Date | null;\n scoring: number | null;\n state: boolean;\n commentPdf: string | null;\n token: string | null;\n size: number | null;\n inProgress: number | null;\n idSociety: number;\n idPrestationList: number;\n idPrestationComplementary: number | null;\n gestionJuridique: boolean;\n idPrestationSocial: number | null;\n idPrestationJuridique: number | null;\n idPrestationCreation: number | null;\n totalAmount?: number;\n discountAmount?: number;\n debitType?: string;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n exercices?: IExercice[];\n prestationsPayments?: IPayment[];\n prestationsList?: IPrestationList;\n prestationsComplementary?: IPrestationComplementary;\n prestationJuridique?: IPrestation;\n prestationSocial?: IPrestation;\n prestationCreation?: IPrestation;\n societiesPrestations?: ISociety;\n prestationsDetailsBeforeExercice?: IExercicePrestation[];\n customersSignatures?: ICustomerSignature[];\n terminationList?: ITerminationList;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prestation.d.ts","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAoB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF,QAAA,MAAM,yBAAyB,qBAAsB,MAAM,KAAG,OA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MAAM,EAAE,KAAE,OAA+G,CAAC;AAEnK,QAAA,MAAM,UAAU,qBAAsB,MAAM,EAAE,KAAE,OAAqE,CAAC;AAEtH,QAAA,MAAM,SAAS,qBAAsB,MAAM,KAAE,OAI5C,CAAC;AAEF,QAAA,MAAM,4BAA4B,qBAAsB,cAAc,eAAe,WAAW,EAAE,KAAG,MAoBpG,CAAC;AAEF,OAAO,EACL,yBAAyB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,4BAA4B,GAC7L,CAAC"}
|
package/es/utils/prestation.js
CHANGED
|
@@ -27,14 +27,15 @@ const calculateScoringOfPrestation = (idPrestationType, prestations) => {
|
|
|
27
27
|
// Get the number of points for the prestation
|
|
28
28
|
const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);
|
|
29
29
|
const numberPoint = (prestaDetails === null || prestaDetails === void 0 ? void 0 : prestaDetails.point) || 0;
|
|
30
|
+
const prestationsExistIds = prestations.map((prestation) => prestation.idPrestationList);
|
|
31
|
+
// If one the prestation is in the list of prestations that are half price, return 50% of points
|
|
32
|
+
if (prestationsExistIds.some((id) => prestationHalfPriceIds.includes(id)))
|
|
33
|
+
return Math.floor(numberPoint * 0.5);
|
|
30
34
|
// Find the prestation with the same idPrestationList and they need to be paid and signed
|
|
31
|
-
const samePrestation = prestations.filter((prestation) => (prestation.idPrestationList === idPrestationType) && (prestation.paid === true && prestation.signed === true && prestation.
|
|
35
|
+
const samePrestation = prestations.filter((prestation) => (prestation.idPrestationList === idPrestationType) && (prestation.paid === true && prestation.signed === true && prestation.terminationList === null));
|
|
32
36
|
// If there is no prestation with the same idPrestationList, return 100% of points
|
|
33
37
|
if (samePrestation.length === 0)
|
|
34
38
|
return numberPoint;
|
|
35
|
-
// If the prestation is in the list of half price prestation, return 50% of points
|
|
36
|
-
if (prestationHalfPriceIds.includes(idPrestationType))
|
|
37
|
-
return numberPoint * 0.5;
|
|
38
39
|
return 0;
|
|
39
40
|
};
|
|
40
41
|
export { isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,yBAAyB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CAAC;IACvE,cAAc,CAAC,YAAY;IAC3B,cAAc,CAAC,mBAAmB;IAClC,cAAc,CAAC,wCAAwC;IACvD,cAAc,CAAC,uBAAuB;IACtC,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,aAAa;IAC5B,cAAc,CAAC,kBAAkB;CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAEhE,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAE,SAAiB,EAAE,gBAAwB,EAAW,EAAE,CAAC,gBAAgB,KAAK,cAAc,CAAC,iBAAiB,IAAI,SAAS,IAAI,WAAW,CAAC;AAElM,MAAM,oBAAoB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CAAC,gBAAgB,KAAK,cAAc,CAAC,+BAA+B,CAAC;AAExI,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAW,EAAE,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC;AAEhG,MAAM,WAAW,GAAG,CAAC,gBAA0B,EAAU,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAW,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,kBAAkB,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,C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FAAkF;IAClF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,WAAW,CAAC;IAEpD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,OAAO,EACL,yBAAyB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,4BAA4B,GAC7L,CAAC","sourcesContent":["import { IPrestation } from '../types';\nimport { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';\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 // 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 prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n const numberPoint = prestaDetails?.point || 0;\n\n const prestationsExistIds = prestations.map((prestation) => prestation.idPrestationList);\n // If one the prestation is in the list of prestations that are half price, return 50% of points\n if (prestationsExistIds.some((id) => prestationHalfPriceIds.includes(id))) return Math.floor(numberPoint * 0.5);\n\n // Find the prestation with the same idPrestationList and they need to be paid and signed\n const samePrestation = prestations.filter((prestation) => (prestation.idPrestationList === idPrestationType) && (prestation.paid === true && prestation.signed === true && prestation.terminationList === null));\n\n // If there is no prestation with the same idPrestationList, return 100% of points\n if (samePrestation.length === 0) return numberPoint;\n\n return 0;\n};\n\nexport {\n isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation,\n};"]}
|