@silexpert/core 1.1.133 → 1.1.135
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/api/resources/Checklist.d.ts +2 -2
- package/es/api/resources/Checklist.d.ts.map +1 -1
- package/es/api/resources/Checklist.js +2 -2
- package/es/api/resources/Checklist.js.map +1 -1
- package/es/types/Enum/Ged.d.ts +6 -1
- package/es/types/Enum/Ged.d.ts.map +1 -1
- package/es/types/Enum/Ged.js +5 -0
- package/es/types/Enum/Ged.js.map +1 -1
- package/es/types/Enum/TimeCounterType.js +1 -1
- package/es/types/Enum/TimeCounterType.js.map +1 -1
- package/es/types/Interface/api/balanceSheet/Read.d.ts +2 -0
- package/es/types/Interface/api/balanceSheet/Read.d.ts.map +1 -1
- package/es/types/Interface/api/balanceSheet/Read.js.map +1 -1
- package/es/types/Interface/api/checklist/Query.d.ts +3 -0
- package/es/types/Interface/api/checklist/Query.d.ts.map +1 -1
- package/es/types/Interface/api/checklist/Query.js +9 -0
- package/es/types/Interface/api/checklist/Query.js.map +1 -1
- package/es/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts +22 -0
- package/es/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts.map +1 -0
- package/es/types/Interface/api/commercial/RequiredDocsTypeParams.js +2 -0
- package/es/types/Interface/api/commercial/RequiredDocsTypeParams.js.map +1 -0
- package/es/types/index.d.ts +1 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +1 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/documents.d.ts +2 -1
- package/es/utils/documents.d.ts.map +1 -1
- package/es/utils/documents.js +16 -1
- package/es/utils/documents.js.map +1 -1
- package/es/utils/prestation.js +1 -1
- package/es/utils/prestation.js.map +1 -1
- package/js/api/resources/Checklist.js +4 -2
- package/js/api/resources/Checklist.js.map +1 -1
- package/js/types/Enum/Ged.js +5 -0
- package/js/types/Enum/Ged.js.map +1 -1
- package/js/types/Enum/TimeCounterType.js +1 -1
- package/js/types/Enum/TimeCounterType.js.map +1 -1
- package/js/types/Interface/api/balanceSheet/Read.js.map +1 -1
- package/js/types/Interface/api/checklist/Query.js +4 -1
- package/js/types/Interface/api/checklist/Query.js.map +1 -1
- package/js/types/Interface/api/commercial/RequiredDocsTypeParams.js +6 -0
- package/js/types/Interface/api/commercial/RequiredDocsTypeParams.js.map +1 -0
- package/js/types/index.js +10 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/documents.js +29 -1
- package/js/utils/documents.js.map +1 -1
- package/js/utils/prestation.js +1 -1
- package/js/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Checklist.ts +3 -3
- package/ts/types/Enum/Ged.ts +6 -1
- package/ts/types/Enum/TimeCounterType.ts +1 -1
- package/ts/types/Interface/api/balanceSheet/Read.ts +2 -0
- package/ts/types/Interface/api/checklist/Query.ts +8 -0
- package/ts/types/Interface/api/commercial/RequiredDocsTypeParams.ts +14 -0
- package/ts/types/index.ts +1 -0
- package/ts/utils/documents.ts +22 -1
- package/ts/utils/prestation.ts +1 -1
package/js/utils/documents.js
CHANGED
|
@@ -6,7 +6,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.requiredListDocs = undefined;
|
|
7
7
|
var _Ged = require("../types/Enum/Ged");
|
|
8
8
|
var _LegalForm = require("../types/Enum/LegalForm");
|
|
9
|
-
|
|
9
|
+
var _dayjs = require("dayjs");
|
|
10
|
+
var dayjs = _interopRequireWildcard(_dayjs);
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
const requiredListDocs = params => {
|
|
14
|
+
const {
|
|
15
|
+
society,
|
|
16
|
+
oldExpertInfo,
|
|
17
|
+
isOnlyPrevi,
|
|
18
|
+
isOnlyJuridic,
|
|
19
|
+
isOnlySocial,
|
|
20
|
+
isCreation,
|
|
21
|
+
goToClient
|
|
22
|
+
} = params;
|
|
23
|
+
const {
|
|
24
|
+
dontHaveOldExpert,
|
|
25
|
+
recoveryDate
|
|
26
|
+
} = oldExpertInfo || {};
|
|
27
|
+
const {
|
|
28
|
+
idLegalForm,
|
|
29
|
+
dateOfRegistration
|
|
30
|
+
} = society || {};
|
|
10
31
|
if (isOnlyPrevi) {
|
|
11
32
|
return [_Ged.GedFileType.IDENTITY_CARD, _Ged.GedFileType.PLAQUETTE];
|
|
12
33
|
}
|
|
@@ -14,6 +35,13 @@ const requiredListDocs = (idLegalForm, isOnlyPrevi, isOnlyJuridic, isOnlySocial,
|
|
|
14
35
|
return [_Ged.GedFileType.RIB, _Ged.GedFileType.PLAQUETTE];
|
|
15
36
|
}
|
|
16
37
|
const generique = [_Ged.GedFileType.IDENTITY_CARD, _Ged.GedFileType.RIB, _Ged.GedFileType.PLAQUETTE];
|
|
38
|
+
// Si le client faisait sa compta lui-même
|
|
39
|
+
// et que le goToClient est supérieur à la date de reprise + 4 mois
|
|
40
|
+
// et que la date de reprise est après la date de création de la société
|
|
41
|
+
// alors liasse fiscale N-1 obligatoire !
|
|
42
|
+
if (dontHaveOldExpert && recoveryDate && dateOfRegistration && dayjs(recoveryDate).add(4, 'months').diff(goToClient) < 0 && dayjs(recoveryDate).isAfter(dateOfRegistration)) {
|
|
43
|
+
generique.push(_Ged.GedFileType.FISCAL_BUNDLE);
|
|
44
|
+
}
|
|
17
45
|
if ([_LegalForm.LegalForm.SAS.id, _LegalForm.LegalForm.SA.id].includes(idLegalForm)) {
|
|
18
46
|
generique.push(_Ged.GedFileType.DISTRIBUTION_OF_SHARE);
|
|
19
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.js","names":["_Ged","require","_LegalForm","requiredListDocs","
|
|
1
|
+
{"version":3,"file":"documents.js","names":["_Ged","require","_LegalForm","_dayjs","dayjs","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","requiredListDocs","params","society","oldExpertInfo","isOnlyPrevi","isOnlyJuridic","isOnlySocial","isCreation","goToClient","dontHaveOldExpert","recoveryDate","idLegalForm","dateOfRegistration","GedFileType","IDENTITY_CARD","PLAQUETTE","RIB","generique","add","diff","isAfter","push","FISCAL_BUNDLE","LegalForm","SAS","id","SA","includes","DISTRIBUTION_OF_SHARE","SELARLU","EURL","SASU","SARL","SCI","EARL","KBIS","STATUTES","DBE2","SEPA","SELARL","EI","AUTO_ENTREPRENEUR","SIRENE","EIRL","PATRIMONY","ASSOCIATION","RULES_OF_PROCEDURE","REGISTRATION_OF_THE_ASSOCIATION_AT_THE_PREFECTURE","REPRESENTATIVE_OF_THE_ASSOCIATION","exports"],"sources":["../../ts/utils/documents.ts"],"sourcesContent":["import { RequiredDocsType } from '../types';\nimport { GedFileType } from '../types/Enum/Ged';\nimport { LegalForm } from '../types/Enum/LegalForm';\nimport * as dayjs from 'dayjs';\n\nconst requiredListDocs = (params: RequiredDocsType): GedFileType[] => {\n const { \n society, oldExpertInfo, isOnlyPrevi, isOnlyJuridic, isOnlySocial, isCreation, goToClient,\n } = params;\n const { dontHaveOldExpert, recoveryDate } = oldExpertInfo || {};\n const { idLegalForm, dateOfRegistration } = society || {};\n\n if (isOnlyPrevi) {\n return [GedFileType.IDENTITY_CARD, GedFileType.PLAQUETTE];\n }\n if (isCreation || isOnlyJuridic || isOnlySocial) {\n return [GedFileType.RIB, GedFileType.PLAQUETTE];\n }\n\n const generique = [GedFileType.IDENTITY_CARD, GedFileType.RIB, GedFileType.PLAQUETTE];\n\n // Si le client faisait sa compta lui-même\n // et que le goToClient est supérieur à la date de reprise + 4 mois\n // et que la date de reprise est après la date de création de la société\n // alors liasse fiscale N-1 obligatoire !\n if (dontHaveOldExpert && \n recoveryDate && \n dateOfRegistration && \n dayjs(recoveryDate).add(4, 'months').diff(goToClient) < 0\n && dayjs(recoveryDate).isAfter(dateOfRegistration)\n ) {\n generique.push(GedFileType.FISCAL_BUNDLE);\n }\n\n if ([LegalForm.SAS.id, LegalForm.SA.id].includes(idLegalForm)) {\n generique.push(GedFileType.DISTRIBUTION_OF_SHARE);\n }\n\n 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)) {\n return [...generique, GedFileType.KBIS, GedFileType.STATUTES, GedFileType.DBE2, GedFileType.SEPA];\n }\n if ([LegalForm.SELARL.id].includes(idLegalForm)) {\n return [...generique, GedFileType.KBIS, GedFileType.STATUTES, GedFileType.SEPA];\n }\n if ([LegalForm.EI.id, LegalForm.AUTO_ENTREPRENEUR.id].includes(idLegalForm)) {\n return [...generique, GedFileType.SIRENE, GedFileType.SEPA];\n }\n if ([LegalForm.EIRL.id].includes(idLegalForm)) {\n return [...generique, GedFileType.SIRENE, GedFileType.SEPA, GedFileType.PATRIMONY];\n }\n if ([LegalForm.ASSOCIATION.id].includes(idLegalForm)) {\n return [...generique, GedFileType.RULES_OF_PROCEDURE, GedFileType.REGISTRATION_OF_THE_ASSOCIATION_AT_THE_PREFECTURE, GedFileType.REPRESENTATIVE_OF_THE_ASSOCIATION];\n }\n return generique;\n};\n\nexport {\n requiredListDocs,\n};"],"mappings":";;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAA+B,IAAnBG,KAAK,GAAAC,uBAAA,CAAAF,MAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAA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,gBAAW,CAAC6B,MAAM,EAAE7B,gBAAW,CAACyB,IAAI,EAAEzB,gBAAW,CAAC+B,SAAS,CAAC;;EAEpF,IAAI,CAACrB,oBAAS,CAACsB,WAAW,CAACpB,EAAE,CAAC,CAACE,QAAQ,CAAChB,WAAW,CAAC,EAAE;IACpD,OAAO,CAAC,GAAGM,SAAS,EAAEJ,gBAAW,CAACiC,kBAAkB,EAAEjC,gBAAW,CAACkC,iDAAiD,EAAElC,gBAAW,CAACmC,iCAAiC,CAAC;;EAErK,OAAO/B,SAAS;AAClB,CAAC;AAACgC,OAAA,CAGAjD,gBAAgB,GAAhBA,gBAAgB"}
|
package/js/utils/prestation.js
CHANGED
|
@@ -30,7 +30,7 @@ const calculateScoringOfPrestation = (idPrestationType, prestations) => {
|
|
|
30
30
|
const prestationsExistIds = prestationsSignedPaid.map(prestation => prestation.idPrestationList);
|
|
31
31
|
const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter(id => prestationHalfPriceIds.includes(id));
|
|
32
32
|
// 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
|
|
33
|
-
if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType)) return Math.floor(numberPoint * 0.
|
|
33
|
+
if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType)) return Math.floor(numberPoint * 0.3);
|
|
34
34
|
return numberPoint;
|
|
35
35
|
};
|
|
36
36
|
exports.isOtherAccountingMissions = isOtherAccountingMissions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prestation.js","names":["_PrestationType","require","isOtherAccountingMissions","idPrestationList","PrestationType","PREVISIONNEL","BILAN_INTERMEDIAIRE","AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE","AUTRE_MISSION_COMPTABLE","TVS","ETUDE_FISCALE","BILAN_PREVISIONNEL","includes","isOtherJuridicalMissions","isJuridique","isCatalog","GESTION_JURIDIQUE","isOtherSocialMission","AUTRE_MISSION_SOCIALE_HORS_PAIE","isAdditionalPresta","hidden","isOnlyPrevi","filter","idPL","PV_AG","length","isOnlySocial","FRUCTUPAIE","SOCIAL","isOnlyJuridic","isCreation","CREATION_SOCIETE","isExpress","prestationDetailValues","Object","values","PrestationDetail","prestaList","find","pr","id","isBack","calculateScoringOfPrestation","idPrestationType","prestations","prestationsSignedPaid","prestation","paid","signed","terminationList","prestationHalfPriceList","p","isComptable","prestationHalfPriceIds","map","t","prestaDetails","prestaDetail","numberPoint","point","prestationsExistIds","prestationHalfPriceAlreadyDoneIds","Math","floor","exports"],"sources":["../../ts/utils/prestation.ts"],"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 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.
|
|
1
|
+
{"version":3,"file":"prestation.js","names":["_PrestationType","require","isOtherAccountingMissions","idPrestationList","PrestationType","PREVISIONNEL","BILAN_INTERMEDIAIRE","AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE","AUTRE_MISSION_COMPTABLE","TVS","ETUDE_FISCALE","BILAN_PREVISIONNEL","includes","isOtherJuridicalMissions","isJuridique","isCatalog","GESTION_JURIDIQUE","isOtherSocialMission","AUTRE_MISSION_SOCIALE_HORS_PAIE","isAdditionalPresta","hidden","isOnlyPrevi","filter","idPL","PV_AG","length","isOnlySocial","FRUCTUPAIE","SOCIAL","isOnlyJuridic","isCreation","CREATION_SOCIETE","isExpress","prestationDetailValues","Object","values","PrestationDetail","prestaList","find","pr","id","isBack","calculateScoringOfPrestation","idPrestationType","prestations","prestationsSignedPaid","prestation","paid","signed","terminationList","prestationHalfPriceList","p","isComptable","prestationHalfPriceIds","map","t","prestaDetails","prestaDetail","numberPoint","point","prestationsExistIds","prestationHalfPriceAlreadyDoneIds","Math","floor","exports"],"sources":["../../ts/utils/prestation.ts"],"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 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\nexport {\n isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation,\n};"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AAEA,MAAMC,yBAAyB,GAAIC,gBAAwB,IAAc,CACvEC,8BAAc,CAACC,YAAY,EAC3BD,8BAAc,CAACE,mBAAmB,EAClCF,8BAAc,CAACG,wCAAwC,E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sBAAsB,CAACzC,QAAQ,CAAC+B,gBAAgB,CAAC,EAAE,OAAOmB,IAAI,CAACC,KAAK,CAACL,WAAW,GAAG,GAAG,CAAC;EAEvI,OAAOA,WAAW;AACpB,CAAC;AAACM,OAAA,CAGA9D,yBAAyB,GAAzBA,yBAAyB;AAAA8D,OAAA,CAAEnD,wBAAwB,GAAxBA,wBAAwB;AAAAmD,OAAA,CAAE7C,kBAAkB,GAAlBA,kBAAkB;AAAA6C,OAAA,CAAE/C,oBAAoB,GAApBA,oBAAoB;AAAA+C,OAAA,CAAE3C,WAAW,GAAXA,WAAW;AAAA2C,OAAA,CAAEtC,YAAY,GAAZA,YAAY;AAAAsC,OAAA,CAAEnC,aAAa,GAAbA,aAAa;AAAAmC,OAAA,CAAElC,UAAU,GAAVA,UAAU;AAAAkC,OAAA,CAAEhC,SAAS,GAATA,SAAS;AAAAgC,OAAA,CAAEtB,4BAA4B,GAA5BA,4BAA4B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.135",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import {
|
|
3
3
|
BasePaginate,
|
|
4
|
-
IChecklist, IChecklistType, QueryChecklistStatistic, QueryChecklistWallet, QueryGetAllBlockingIssues, QueryGetAllDeadlines, QueryGetAllQuestions, ReadChecklistDeadline, ReadChecklistWallet, UpdateAnswer,
|
|
4
|
+
IChecklist, IChecklistType, QueryChecklistStatistic, QueryChecklistUpdate, QueryChecklistWallet, QueryGetAllBlockingIssues, QueryGetAllDeadlines, QueryGetAllQuestions, ReadChecklistDeadline, ReadChecklistWallet, UpdateAnswer,
|
|
5
5
|
} from '../../types';
|
|
6
6
|
import { getAllBlockingIssues } from '../../utils/checklist';
|
|
7
7
|
import { Resource } from '../Resource';
|
|
@@ -23,8 +23,8 @@ export class Checklist extends Resource {
|
|
|
23
23
|
return this.axios.$post('/checklists', payload);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
update(id: number, payload: Partial<IChecklist
|
|
27
|
-
return this.axios.$put(`/checklists/${id}`, payload);
|
|
26
|
+
update(id: number, payload: Partial<IChecklist>, query: QueryChecklistUpdate): Promise<IChecklist> {
|
|
27
|
+
return this.axios.$put(`/checklists/${id}`, payload, { params: query });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
getAllErrors(checklist: IChecklist, meta: QueryGetAllBlockingIssues): IChecklistType[] {
|
package/ts/types/Enum/Ged.ts
CHANGED
|
@@ -110,7 +110,8 @@ export enum GedFileType {
|
|
|
110
110
|
REVISION_GUIDE = 18,
|
|
111
111
|
SUMMARY_NOTE = 19,
|
|
112
112
|
BALANCESHEET_NOTE = 20,
|
|
113
|
-
PERSONNAL_RIB = 21, // RIB PERSO
|
|
113
|
+
PERSONNAL_RIB = 21, // RIB PERSO,
|
|
114
|
+
FISCAL_BUNDLE = 22, // LIASSE FISCALE
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
export const SignFileDetail = [
|
|
@@ -251,6 +252,10 @@ export const GedFileTypeDetail = {
|
|
|
251
252
|
id: GedFileType.PERSONNAL_RIB,
|
|
252
253
|
name: 'RIB Personnel',
|
|
253
254
|
},
|
|
255
|
+
FISCAL_BUNDLE: {
|
|
256
|
+
id: GedFileType.FISCAL_BUNDLE,
|
|
257
|
+
name: 'Liasse fiscale N-1',
|
|
258
|
+
},
|
|
254
259
|
};
|
|
255
260
|
|
|
256
261
|
export const GedFolderList: Array<{ id: GedFolder, isVisibleForClient: boolean; idGedCategory: GedCategory; name: string }> = [
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IBusinessPartner } from '../../models/IBusinessPartner';
|
|
2
|
+
import { IGedFile } from '../../models/IGedFile';
|
|
3
|
+
|
|
4
|
+
export interface RequiredDocsType {
|
|
5
|
+
society: { idLegalForm: number, id?: number, totalSharesHeld?: number, dateOfRegistration?: Date },
|
|
6
|
+
oldExpertInfo?:{ dontHaveOldExpert?: boolean, recoveryDate?: Date };
|
|
7
|
+
_gedFile: IGedFile[],
|
|
8
|
+
isOnlyPrevi?: boolean,
|
|
9
|
+
isOnlyJuridic?: boolean,
|
|
10
|
+
isOnlySocial?: boolean,
|
|
11
|
+
listBusinessPartners?: IBusinessPartner[],
|
|
12
|
+
isCreation?: boolean;
|
|
13
|
+
goToClient?: Date;
|
|
14
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -576,6 +576,7 @@ export * from './Interface/api/facturation/QueryPaginatedSocietyWithFacturation'
|
|
|
576
576
|
export * from './Interface/api/billingHistory/QueryPaginatedBillingHistory';
|
|
577
577
|
export * from './Interface/api/facturation/CreateRebilling';
|
|
578
578
|
export * from './Interface/api/commercial/QueryGetStats';
|
|
579
|
+
export * from './Interface/api/commercial/RequiredDocsTypeParams';
|
|
579
580
|
export * from './Interface/api/commercial/QueryFetchDialogDatasInfosOk';
|
|
580
581
|
export * from './Interface/api/commercial/QueryMovePrestationsToNextMonth';
|
|
581
582
|
export * from './Interface/api/society/GetDataSociety';
|
package/ts/utils/documents.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { RequiredDocsType } from '../types';
|
|
1
2
|
import { GedFileType } from '../types/Enum/Ged';
|
|
2
3
|
import { LegalForm } from '../types/Enum/LegalForm';
|
|
4
|
+
import * as dayjs from 'dayjs';
|
|
5
|
+
|
|
6
|
+
const requiredListDocs = (params: RequiredDocsType): GedFileType[] => {
|
|
7
|
+
const {
|
|
8
|
+
society, oldExpertInfo, isOnlyPrevi, isOnlyJuridic, isOnlySocial, isCreation, goToClient,
|
|
9
|
+
} = params;
|
|
10
|
+
const { dontHaveOldExpert, recoveryDate } = oldExpertInfo || {};
|
|
11
|
+
const { idLegalForm, dateOfRegistration } = society || {};
|
|
3
12
|
|
|
4
|
-
const requiredListDocs = (idLegalForm: number, isOnlyPrevi?: boolean, isOnlyJuridic?: boolean, isOnlySocial?: boolean, isCreation?: boolean): GedFileType[] => {
|
|
5
13
|
if (isOnlyPrevi) {
|
|
6
14
|
return [GedFileType.IDENTITY_CARD, GedFileType.PLAQUETTE];
|
|
7
15
|
}
|
|
@@ -11,6 +19,19 @@ const requiredListDocs = (idLegalForm: number, isOnlyPrevi?: boolean, isOnlyJuri
|
|
|
11
19
|
|
|
12
20
|
const generique = [GedFileType.IDENTITY_CARD, GedFileType.RIB, GedFileType.PLAQUETTE];
|
|
13
21
|
|
|
22
|
+
// Si le client faisait sa compta lui-même
|
|
23
|
+
// et que le goToClient est supérieur à la date de reprise + 4 mois
|
|
24
|
+
// et que la date de reprise est après la date de création de la société
|
|
25
|
+
// alors liasse fiscale N-1 obligatoire !
|
|
26
|
+
if (dontHaveOldExpert &&
|
|
27
|
+
recoveryDate &&
|
|
28
|
+
dateOfRegistration &&
|
|
29
|
+
dayjs(recoveryDate).add(4, 'months').diff(goToClient) < 0
|
|
30
|
+
&& dayjs(recoveryDate).isAfter(dateOfRegistration)
|
|
31
|
+
) {
|
|
32
|
+
generique.push(GedFileType.FISCAL_BUNDLE);
|
|
33
|
+
}
|
|
34
|
+
|
|
14
35
|
if ([LegalForm.SAS.id, LegalForm.SA.id].includes(idLegalForm)) {
|
|
15
36
|
generique.push(GedFileType.DISTRIBUTION_OF_SHARE);
|
|
16
37
|
}
|
package/ts/utils/prestation.ts
CHANGED
|
@@ -46,7 +46,7 @@ const calculateScoringOfPrestation = (idPrestationType: PrestationType, prestati
|
|
|
46
46
|
const prestationHalfPriceAlreadyDoneIds = prestationsExistIds.filter((id) => prestationHalfPriceIds.includes(id));
|
|
47
47
|
|
|
48
48
|
// 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
|
|
49
|
-
if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType)) return Math.floor(numberPoint * 0.
|
|
49
|
+
if (prestationHalfPriceAlreadyDoneIds.length && prestationHalfPriceIds.includes(idPrestationType)) return Math.floor(numberPoint * 0.3);
|
|
50
50
|
|
|
51
51
|
return numberPoint;
|
|
52
52
|
};
|