@silexpert/core 1.3.107 → 1.3.108
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/dist/cjs/api/resources/BankStatement.d.ts +1 -3
- package/dist/cjs/api/resources/BankStatement.d.ts.map +1 -1
- package/dist/cjs/api/resources/BankStatement.js +0 -6
- package/dist/cjs/api/resources/BankStatement.js.map +1 -1
- package/dist/cjs/api/resources/Payment.d.ts +3 -1
- package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Payment.js +3 -0
- package/dist/cjs/api/resources/Payment.js.map +1 -1
- package/dist/cjs/types/Enum/AIPrompt.d.ts +2 -2
- package/dist/cjs/types/Enum/AIPrompt.d.ts.map +1 -1
- package/dist/cjs/types/Enum/AIPrompt.js +16 -12
- package/dist/cjs/types/Enum/AIPrompt.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.d.ts +6 -0
- package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +8 -1
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Enum/TimeSlot.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TimeSlot.js +2 -1
- package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/cjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts +6 -0
- package/dist/cjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/accountingIncome/ReadAccountingIncome.js.map +1 -1
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.d.ts +1 -0
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.js +10 -0
- package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts +8 -0
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.js.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/Create.d.ts +4 -0
- package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/Create.js +13 -1
- package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts +1 -0
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.js +6 -0
- package/dist/cjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
- package/dist/cjs/utils/prestation.d.ts.map +1 -1
- package/dist/cjs/utils/prestation.js +7 -5
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/mjs/api/resources/BankStatement.d.ts +1 -3
- package/dist/mjs/api/resources/BankStatement.d.ts.map +1 -1
- package/dist/mjs/api/resources/BankStatement.js +0 -6
- package/dist/mjs/api/resources/BankStatement.js.map +1 -1
- package/dist/mjs/api/resources/Payment.d.ts +3 -1
- package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Payment.js +3 -0
- package/dist/mjs/api/resources/Payment.js.map +1 -1
- package/dist/mjs/types/Enum/AIPrompt.d.ts +2 -2
- package/dist/mjs/types/Enum/AIPrompt.d.ts.map +1 -1
- package/dist/mjs/types/Enum/AIPrompt.js +16 -12
- package/dist/mjs/types/Enum/AIPrompt.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.d.ts +6 -0
- package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +7 -0
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Enum/TimeSlot.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TimeSlot.js +1 -0
- package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/mjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts +6 -0
- package/dist/mjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/accountingIncome/ReadAccountingIncome.js.map +1 -1
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.d.ts +1 -0
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.js +12 -1
- package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts +8 -0
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.js.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/Create.d.ts +4 -0
- package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/Create.js +13 -0
- package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts +1 -0
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.js +8 -1
- package/dist/mjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
- package/dist/mjs/utils/prestation.d.ts.map +1 -1
- package/dist/mjs/utils/prestation.js +7 -5
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/BankStatement.ts +0 -12
- package/ts/api/resources/Payment.ts +6 -0
- package/ts/types/Enum/AIPrompt.ts +18 -13
- package/ts/types/Enum/PrestationType.ts +7 -0
- package/ts/types/Enum/TimeSlot.ts +1 -0
- package/ts/types/Interface/api/accountingIncome/ReadAccountingIncome.ts +3 -0
- package/ts/types/Interface/api/gedFile/createFileAndGed.ts +10 -1
- package/ts/types/Interface/api/ocr/OcrTypeTransactions.ts +6 -0
- package/ts/types/Interface/api/stripe/Create.ts +9 -0
- package/ts/types/Interface/api/stripe/QueryStripe.ts +6 -1
- package/ts/utils/prestation.ts +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,oDAAoD,EACpD,gBAAgB,EAChB,cAAc,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAwB,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA4E5C,MAAM,yBAAyB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CACtE;IACE,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,CA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AAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ;YAExG,OAAO,IAAI,CAAC;;YACT,OAAO,KAAK,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,gBAAwB,EAA4B,EAAE;IACzF,IAAI,oDAAoD,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAAE,OAAO,UAAU,CAAC;IACvG,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,qCAAqC,EACrC,wBAAwB,EACxB,2BAA2B,GAC5B,CAAC","sourcesContent":["import { IExercice, IPrestation, IPrestationList } from '../types';\nimport { Vat } from '../types/Enum/Vat';\nimport { getTaxesIncludedAmount } from './vat/utils';\nimport { intersection } from './noLodash';\nimport {\n ClementineSubscriptionAccountancySoftwarePrestations,\n PrestationDetail,\n PrestationType,\n} from '../types/Enum/PrestationType';\nimport { LegalFormTypeEnum } from '../types/Enum/LegalForm';\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 { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress';\nimport { ClosingType } from '../types/Enum/ClosingType';\nimport { getBrandNameByNodeEnv } from './brands';\nimport * as dayjs from 'dayjs';\nimport { exerciceNumber } from './exercice';\n\ntype priceGridBrand = {\n idTypeBrand: number;\n price: priceGrid[];\n};\n\ntype priceGrid = {\n idPrestationList: number[];\n priceWithTaxesIncluded: boolean;\n applicationCost: number;\n monthlyNbr?: monthlyNbr[];\n exerciceNbr?: exerciceNbr[];\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 legalForm?: legalForm[];\n employeeByLegalForm?: employeeByLegalForm[];\n};\n\ntype monthlyNbr = {\n minimum: number;\n maximum: number;\n value: number;\n closingType: number[];\n};\n\ntype exerciceNbr = {\n minimum: number;\n maximum: number;\n price: number;\n};\n\ntype turnover = {\n turnoverValue: number;\n price: number;\n};\n\ntype legalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype employee = {\n amountMinimum: number;\n amountMaximum: number;\n price: number;\n};\n\ntype employeeByLegalForm = {\n idLegalForm: 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 [\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,\n ].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique: boolean, isCatalog: boolean, idPrestationList: number): boolean =>\n idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean =>\n idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden: boolean, isCatalog: boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL),\n ).length;\n\nconst isOnlySocial = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [\n PrestationType.CREATION_SOCIETE,\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ]).length;\n\nconst isFromStatutsExpress = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ].includes(idPL),\n ).length;\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 isConsultingHour = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.CONSULTING_HOUR]).length;\n\nconst isSoftwarePrestation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.STEERING, PrestationType.VAT, PrestationType.BALANCESHEET])\n .length; /* &&\n idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge\n\nconst calculateScoringOfPrestation = (\n idPrestationType: PrestationType,\n prestations: IPrestation[],\n currentIdPrestation: number,\n): number => {\n const prestationsSignedPaid = prestations.filter(\n (prestation) =>\n prestation.paid &&\n prestation.signed &&\n prestation.terminationList === null &&\n prestation.id !== currentIdPrestation,\n );\n\n const currentPrestation = prestations.find(\n (el) => el.idPrestationList === idPrestationType && el.terminationList === null,\n );\n\n // SPECIAL CASE:\n // If current prestation is a software prestation\n // and the current prestation is an annual payment, return 0 point\n if (\n isSoftwarePrestation([idPrestationType]) &&\n currentPrestation?.exercices?.length &&\n //@ts-expect-error\n (currentPrestation?.exercices[0].ExercicePrestation?.totalPrestation < 80 ||\n //@ts-expect-error\n currentPrestation?.exercices[0].ExercicePrestation?.monthNumber !== 1)\n ) {\n return 0;\n }\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter(\n (p) =>\n p.isComptable &&\n !p.isCatalog &&\n p.id &&\n ![PrestationType.BALANCESHEET, PrestationType.VAT, PrestationType.STEERING].includes(p.id),\n );\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 let numberPoint = prestaDetails?.point || 0;\n\n // For each back exercices, add 100 points\n // -> for new prestations only\n if (\n [\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.GESTION_IMMO,\n PrestationType.EI,\n PrestationType.MICRO,\n ].includes(idPrestationType) &&\n currentPrestation?.exercices?.length &&\n currentPrestation?.exercices.find((el) => el.isBack)\n ) {\n numberPoint += (currentPrestation?.exercices.filter((el) => el.isBack).length ?? 1) * 100;\n }\n\n // Get list of prestations that are already done\n // 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))\n return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nexport const calculateMonthlyAmount = (params: {\n monthlyPrice: number;\n monthNumber: number;\n monthOffer: number;\n idVatForInternalInvoicing?: number | null;\n returnTaxesIncludedValue?: boolean;\n}): number => {\n const { monthlyPrice, monthNumber, monthOffer, idVatForInternalInvoicing, returnTaxesIncludedValue = true } = params;\n\n if (!idVatForInternalInvoicing && returnTaxesIncludedValue)\n throw new Error('Taux de TVA manquant pour calculer le montant TTC');\n\n if (!idVatForInternalInvoicing || !returnTaxesIncludedValue) return monthlyPrice * (monthNumber - monthOffer);\n\n return (\n monthlyPrice *\n (monthNumber - monthOffer) *\n (1 + Object.values(Vat).find((el) => el.id === idVatForInternalInvoicing).value / 100)\n );\n};\n\nexport const 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,\n PriceGridPourcentage,\n PriceGridLegalstart,\n PriceGridStatutsExpress,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile)\n currentBrandPriceGrid = currentPriceGridFile.find(\n (priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand,\n );\n if (currentBrandPriceGrid)\n currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) =>\n price.idPrestationList.includes(idPrestationList),\n );\n return currentPriceGrid;\n};\n\nconst calculatePrestationPriceWithPriceGrid = (\n idPrestationList: number,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n isYearly: boolean /* Prestation annuel ou mensuel */,\n totalMonth: number /* Nbr de moiis offer */,\n idTaxSystem: number,\n idLegalForm: number,\n exerciceNbr: number,\n balanceSheetOffered: number = 0 /* montant du bilan offer */,\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n} => {\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)\n vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find((regime) => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find((regime) => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem)\n taxSystemPrice = currentPriceGrid.taxSystem?.find((tax) => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n /* Récupératioin des prix mensuels */\n if (currentPriceGrid.turnoverMonthly && !isYearly)\n monthlyPrice = currentPriceGrid.turnoverMonthly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties)\n monthlyPrice = currentPriceGrid.properties?.find((property) => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) {\n monthlyPrice = currentPriceGrid.employee?.find(\n (emp) => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber,\n )?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n } else if (currentPriceGrid.employeeByLegalForm) {\n monthlyPrice = currentPriceGrid.employeeByLegalForm?.find((emp) => emp.idLegalForm === idLegalForm)?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n /* Récupération des prix annuels */\n } else if (currentPriceGrid.turnoverYearly && isYearly)\n yearlyPrice = currentPriceGrid.turnoverYearly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)\n yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)\n yearlyPrice = currentPriceGrid.turnoverPastYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner)\n yearlyPrice = currentPriceGrid.partner?.find(\n (part) => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber,\n )?.price;\n else if (currentPriceGrid.legalForm)\n yearlyPrice = currentPriceGrid.legalForm?.find((form) => form.idLegalForm === idLegalForm)?.price;\n else if (currentPriceGrid.exerciceNbr)\n yearlyPrice = currentPriceGrid.exerciceNbr?.find(\n (el) => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum,\n )?.price;\n /* Calcul du prix mensuel final */\n finalMonthlyPrice =\n (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 let monthlyNbrList: monthlyNbr[] | undefined;\n let monthlyNbr: monthlyNbr | undefined;\n if (currentPriceGrid.monthlyNbr) {\n monthlyNbrList = currentPriceGrid.monthlyNbr?.filter((el) =>\n el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS),\n );\n if (monthlyNbrList) {\n monthlyNbr = monthlyNbrList.find((el) => el.minimum <= monthNbr && monthNbr <= el.maximum);\n if (monthlyNbr) {\n monthNbr = monthlyNbr.value;\n }\n }\n }\n /* Gestion des offres, mois offer */\n if (totalMonth > 0) {\n if (monthlyNbr && monthNbr - totalMonth < monthlyNbr?.minimum) canBeCreated = false;\n monthNbr = monthNbr - totalMonth;\n recalculateMonthly = true;\n }\n\n /* Calcul du nombre de mois soustraient */\n reduceMonth = monthNbr === NbrMonth - totalMonth ? totalMonth : 0;\n\n /* Gestion des offres, bilan offer */\n if (balanceSheetOffered > 0) {\n yearlyPrice = undefined;\n recalculateMonthly = false;\n finalMonthlyPrice = balanceSheetOffered / monthNbr;\n }\n\n /* Prix Final */\n totalPrestation = yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr;\n }\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr,\n price: yearlyPrice\n ? yearlyPrice\n : recalculateMonthly\n ? totalPrestation / monthNbr\n : finalMonthlyPrice\n ? finalMonthlyPrice\n : 0,\n };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList?.price || 0;\n\n return totalPrestation;\n};\n\n/**\n * From idLegalForm, get application fees amount (without taxes included if no idVat passed, or with taxes included calculated by given idVat)\n * @param idLegalForm\n * @param idVat\n * @returns amount of application fees, without taxes included\n */\nconst getApplicationFeesAmount = (idLegalForm: number, idVat?: number) => {\n let applicationFeesAmount = 50;\n if (idLegalForm === LegalFormTypeEnum.SCI) applicationFeesAmount = 150;\n\n //Sans tva, on envoie le montant HT\n if (!idVat) return applicationFeesAmount;\n\n //Avec tva, on envoie le montant TTC\n return getTaxesIncludedAmount(applicationFeesAmount, idVat);\n};\n\nconst calculatePrestationPrice = (\n idPrestationList: number,\n prestationList: IPrestationList,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n optionsList: number[],\n totalPercentage: number /* total pourcentage offer (%) */,\n totalAmount: number /* total montant offer (€) */,\n totalMonth: number /* total mois offer (mois) */,\n isWithApplicationFees: boolean /* frais de dossier */,\n idTaxSystem: number,\n idLegalForm: number,\n isYearly: boolean = false /* prestation annuel ou mensuel */,\n isSubPrestation: boolean = false,\n balanceSheetOffered: number = 0,\n exerciceList: IExercice[] = [],\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n calculDetail: string;\n monthlyPrice: string;\n price: number;\n} => {\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: {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n } = { 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 PrestationType.COMPTA_EI_KLEMS,\n PrestationType.COMPTA_EI_KLEMS_EXPRESS,\n PrestationType.COMPTA_MICRO_KLEMS,\n PrestationType.COMPTA_MICRO_KLEMS_EXPRESS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS_EXPRESS,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.EI,\n PrestationType.MICRO,\n PrestationType.GESTION_IMMO,\n ].includes(idPrestationList)\n ) {\n let exerciceNbr: number = 0;\n if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);\n totalWithReduce = calculatePrestationPriceWithPriceGrid(\n idPrestationList,\n endDate,\n NbrMonth,\n turnover,\n rentsNumber,\n employeesNumber,\n associatesNumber,\n idTypeBrand,\n idVatRegime,\n pastBalanceSheet,\n isYearly,\n totalMonth,\n idTaxSystem,\n idLegalForm,\n exerciceNbr,\n balanceSheetOffered,\n );\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 if ([PrestationType.CREATION_SOCIETE].includes(idPrestationList) && !isSubPrestation) {\n // totalPrestation += 50;\n // La création est offerte désormais\n // inutile d'ajouter les frais de greffe et d'annonce légale,\n // car ne compte pas dans le calcul pour les sales\n }\n }\n /* Gestion des offres */\n /* Offre montant offer */\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n /* Offre pourcentage offer */\n if (totalPercentage > 0) totalPrestation = totalPrestation - totalPrestation * (totalPercentage / 100);\n /* Gesstioin du prix minimum acceptable pour la prestation */\n if (prestationList && prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)\n 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(\n (option) => option.id === optionId,\n )?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += OptionTotalPrice ? OptionTotalPrice : 0;\n /* Gestion des frais de dossier */\n // if (isWithApplicationFees) {\n // const applicationFeesAmount = getApplicationFeesAmount(idLegalForm);\n // totalPrestation += applicationFeesAmount;\n // }\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + Math.round(price * 100) / 100 + '€' : Math.round(price * 100) / 100 + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;\n\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n calculDetail,\n monthlyPrice: monthNbr > 0 ? Math.round(price * 100) / 100 + '€/mois' : Math.round(price * 100) / 100 + '€',\n price,\n };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter((option) =>\n option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)),\n );\n return PrestationOptionList.filter((option) => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (\n idTypeBrand: number,\n idPrestationList: number,\n turnover: number,\n pastBalanceSheet: boolean,\n): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n if (\n [\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n ].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n !pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover\n )\n return true;\n else return false;\n }\n return false;\n};\n\nconst idPrestationListToOfferType = (idPrestationList: number): 'software' | 'expertise' => {\n if (ClementineSubscriptionAccountancySoftwarePrestations.includes(idPrestationList)) return 'software';\n return 'expertise';\n};\n\nexport {\n isOtherAccountingMissions,\n isOtherJuridicalMissions,\n isAdditionalPresta,\n isOtherSocialMission,\n isOnlyPrevi,\n isOnlySocial,\n isOnlyJuridic,\n isCreation,\n isFromStatutsExpress,\n isExpress,\n isConsultingHour,\n isSoftwarePrestation,\n calculateScoringOfPrestation,\n calculatePrestationPrice,\n getPrestationOptions,\n isAbleToUpdatePrice,\n calculatePrestationPriceWithPriceGrid,\n getApplicationFeesAmount,\n idPrestationListToOfferType,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,oDAAoD,EACpD,gBAAgB,EAChB,cAAc,GACf,MAA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ClB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,qCAAqC,EACrC,wBAAwB,EACxB,2BAA2B,GAC5B,CAAC","sourcesContent":["import { IExercice, IPrestation, IPrestationList } from '../types';\nimport { Vat } from '../types/Enum/Vat';\nimport { getTaxesIncludedAmount } from './vat/utils';\nimport { intersection } from './noLodash';\nimport {\n ClementineSubscriptionAccountancySoftwarePrestations,\n PrestationDetail,\n PrestationType,\n} from '../types/Enum/PrestationType';\nimport { LegalFormTypeEnum } from '../types/Enum/LegalForm';\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 { PriceGridStatutsExpress } from '../types/Enum/PriceGridStatutsExpress';\nimport { ClosingType } from '../types/Enum/ClosingType';\nimport { getBrandNameByNodeEnv } from './brands';\nimport * as dayjs from 'dayjs';\nimport { exerciceNumber } from './exercice';\n\ntype priceGridBrand = {\n idTypeBrand: number;\n price: priceGrid[];\n};\n\ntype priceGrid = {\n idPrestationList: number[];\n priceWithTaxesIncluded: boolean;\n applicationCost: number;\n monthlyNbr?: monthlyNbr[];\n exerciceNbr?: exerciceNbr[];\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 legalForm?: legalForm[];\n employeeByLegalForm?: employeeByLegalForm[];\n};\n\ntype monthlyNbr = {\n minimum: number;\n maximum: number;\n value: number;\n closingType: number[];\n};\n\ntype exerciceNbr = {\n minimum: number;\n maximum: number;\n price: number;\n};\n\ntype turnover = {\n turnoverValue: number;\n price: number;\n};\n\ntype legalForm = {\n idLegalForm: number;\n price: number;\n};\n\ntype employee = {\n amountMinimum: number;\n amountMaximum: number;\n price: number;\n};\n\ntype employeeByLegalForm = {\n idLegalForm: 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 [\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,\n ].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique: boolean, isCatalog: boolean, idPrestationList: number): boolean =>\n idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean =>\n idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden: boolean, isCatalog: boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL),\n ).length;\n\nconst isOnlySocial = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter((idPL: number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [\n PrestationType.CREATION_SOCIETE,\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ]).length;\n\nconst isFromStatutsExpress = (idPrestationList: number[]): boolean =>\n !idPrestationList.filter(\n (idPL: number) =>\n ![\n PrestationType.STATUTS_FREE,\n PrestationType.STATUTS_OPTION_1,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.STATUTS_OPTION_AE,\n ].includes(idPL),\n ).length;\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 isConsultingHour = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.CONSULTING_HOUR]).length;\n\nconst isSoftwarePrestation = (idPrestationList: number[]): boolean =>\n !!intersection(idPrestationList, [PrestationType.STEERING, PrestationType.VAT, PrestationType.BALANCESHEET])\n .length; /* &&\n idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge\n\nconst calculateScoringOfPrestation = (\n idPrestationType: PrestationType,\n prestations: IPrestation[],\n currentIdPrestation: number,\n): number => {\n const prestationsSignedPaid = prestations.filter(\n (prestation) =>\n prestation.paid &&\n prestation.signed &&\n prestation.terminationList === null &&\n prestation.id !== currentIdPrestation,\n );\n\n const currentPrestation = prestations.find(\n (el) => el.idPrestationList === idPrestationType && el.terminationList === null,\n );\n\n // SPECIAL CASE:\n // If current prestation is a software prestation\n // and the current prestation is an annual payment, return 0 point\n if (\n isSoftwarePrestation([idPrestationType]) &&\n currentPrestation?.exercices?.length &&\n //@ts-expect-error\n (currentPrestation?.exercices[0].ExercicePrestation?.totalPrestation < 80 ||\n //@ts-expect-error\n currentPrestation?.exercices[0].ExercicePrestation?.monthNumber !== 1)\n ) {\n return 0;\n }\n\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter(\n (p) =>\n p.isComptable &&\n !p.isCatalog &&\n p.id &&\n ![PrestationType.BALANCESHEET, PrestationType.VAT, PrestationType.STEERING].includes(p.id),\n );\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 let numberPoint = prestaDetails?.point || 0;\n\n // For each back exercices, add 100 points\n // -> for new prestations only\n if (\n [\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.GESTION_IMMO,\n PrestationType.EI,\n PrestationType.MICRO,\n ].includes(idPrestationType) &&\n currentPrestation?.exercices?.length &&\n currentPrestation?.exercices.find((el) => el.isBack)\n ) {\n numberPoint += (currentPrestation?.exercices.filter((el) => el.isBack).length ?? 1) * 100;\n }\n\n // Get list of prestations that are already done\n // 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))\n return Math.floor(numberPoint * 0.3);\n\n return numberPoint;\n};\n\nexport const calculateMonthlyAmount = (params: {\n monthlyPrice: number;\n monthNumber: number;\n monthOffer: number;\n idVatForInternalInvoicing?: number | null;\n returnTaxesIncludedValue?: boolean;\n}): number => {\n const { monthlyPrice, monthNumber, monthOffer, idVatForInternalInvoicing, returnTaxesIncludedValue = true } = params;\n\n if (!idVatForInternalInvoicing && returnTaxesIncludedValue)\n throw new Error('Taux de TVA manquant pour calculer le montant TTC');\n\n if (!idVatForInternalInvoicing || !returnTaxesIncludedValue) return monthlyPrice * (monthNumber - monthOffer);\n\n return (\n monthlyPrice *\n (monthNumber - monthOffer) *\n (1 + Object.values(Vat).find((el) => el.id === idVatForInternalInvoicing).value / 100)\n );\n};\n\nexport const 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,\n PriceGridPourcentage,\n PriceGridLegalstart,\n PriceGridStatutsExpress,\n };\n // @ts-ignore\n const currentPriceGridFile: priceGridBrand[] = listEnvEnum[`PriceGrid${currentEnvName}`];\n if (currentPriceGridFile)\n currentBrandPriceGrid = currentPriceGridFile.find(\n (priceGrid: priceGridBrand) => priceGrid.idTypeBrand === idTypeBrand,\n );\n if (currentBrandPriceGrid)\n currentPriceGrid = currentBrandPriceGrid?.price.find((price: priceGrid) =>\n price.idPrestationList.includes(idPrestationList),\n );\n return currentPriceGrid;\n};\n\nconst calculatePrestationPriceWithPriceGrid = (\n idPrestationList: number,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n isYearly: boolean /* Prestation annuel ou mensuel */,\n totalMonth: number /* Nbr de moiis offer */,\n idTaxSystem: number,\n idLegalForm: number,\n exerciceNbr: number,\n balanceSheetOffered: number = 0 /* montant du bilan offer */,\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n} => {\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 const 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)\n vatRegimePrice = currentPriceGrid.vatRegimeMonthly?.find((regime) => regime.type === idVatRegime)?.price;\n else if (currentPriceGrid.vatRegimeYearly && isYearly)\n vatRegimePrice = currentPriceGrid.vatRegimeYearly?.find((regime) => regime.type === idVatRegime)?.price;\n\n /* Gestion du Régime d'imposition */\n if (currentPriceGrid.taxSystem && idTaxSystem)\n taxSystemPrice = currentPriceGrid.taxSystem?.find((tax) => tax.id === idTaxSystem)?.price;\n\n /* Gestion des montants */\n /* Récupératioin des prix mensuels */\n if (currentPriceGrid.turnoverMonthly && !isYearly)\n monthlyPrice = currentPriceGrid.turnoverMonthly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.properties)\n monthlyPrice = currentPriceGrid.properties?.find((property) => property.amount === rentsNumber)?.price;\n else if (currentPriceGrid.employee) {\n monthlyPrice = currentPriceGrid.employee?.find(\n (emp) => emp.amountMinimum <= employeesNumber && emp.amountMaximum >= employeesNumber,\n )?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n } else if (currentPriceGrid.employeeByLegalForm) {\n monthlyPrice = currentPriceGrid.employeeByLegalForm?.find((emp) => emp.idLegalForm === idLegalForm)?.price;\n monthlyPrice = monthlyPrice ? monthlyPrice * employeesNumber : 0;\n /* Récupération des prix annuels */\n } else if (currentPriceGrid.turnoverYearly && isYearly)\n yearlyPrice = currentPriceGrid.turnoverYearly?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (!pastBalanceSheet && currentPriceGrid.turnoverCreatedYear)\n yearlyPrice = currentPriceGrid.turnoverCreatedYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (pastBalanceSheet && currentPriceGrid.turnoverPastYear)\n yearlyPrice = currentPriceGrid.turnoverPastYear?.find((turn) => turnover < turn.turnoverValue)?.price;\n else if (currentPriceGrid.partner)\n yearlyPrice = currentPriceGrid.partner?.find(\n (part) => part.amountMinimum <= associatesNumber && part.amountMaximum >= associatesNumber,\n )?.price;\n else if (currentPriceGrid.legalForm)\n yearlyPrice = currentPriceGrid.legalForm?.find((form) => form.idLegalForm === idLegalForm)?.price;\n else if (currentPriceGrid.exerciceNbr)\n yearlyPrice = currentPriceGrid.exerciceNbr?.find(\n (el) => el.minimum <= exerciceNbr && exerciceNbr <= el.maximum,\n )?.price;\n /* Calcul du prix mensuel final */\n finalMonthlyPrice =\n (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 let monthlyNbrList: monthlyNbr[] | undefined;\n let monthlyNbr: monthlyNbr | undefined;\n if (currentPriceGrid.monthlyNbr) {\n monthlyNbrList = currentPriceGrid.monthlyNbr?.filter((el) =>\n el.closingType.includes(cloturedPast ? ClosingType.OUTDATED : ClosingType.IN_PROGRESS),\n );\n if (monthlyNbrList) {\n monthlyNbr = monthlyNbrList.find((el) => el.minimum <= monthNbr && monthNbr <= el.maximum);\n if (monthlyNbr) {\n monthNbr = monthlyNbr.value;\n }\n }\n }\n\n /* Gestion des offres, mois offer */\n if (totalMonth > 0) {\n if (isYearly) {\n yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);\n } else {\n monthNbr = monthNbr - totalMonth;\n }\n }\n\n /* Calcul du nombre de mois soustraient */\n reduceMonth = monthNbr === NbrMonth - totalMonth ? totalMonth : 0;\n\n /* Gestion des offres, bilan offer */\n if (balanceSheetOffered > 0) {\n yearlyPrice = undefined;\n recalculateMonthly = false;\n finalMonthlyPrice = balanceSheetOffered / monthNbr;\n }\n\n /* Prix Final */\n totalPrestation = yearlyPrice ? yearlyPrice : finalMonthlyPrice * monthNbr;\n }\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n monthNbr: yearlyPrice ? 0 : recalculateMonthly ? NbrMonth : monthNbr,\n price: yearlyPrice\n ? yearlyPrice\n : recalculateMonthly\n ? totalPrestation / monthNbr\n : finalMonthlyPrice\n ? finalMonthlyPrice\n : 0,\n };\n};\n\nconst calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {\n let totalPrestation: number = 0;\n\n totalPrestation = prestationList?.price || 0;\n\n return totalPrestation;\n};\n\n/**\n * From idLegalForm, get application fees amount (without taxes included if no idVat passed, or with taxes included calculated by given idVat)\n * @param idLegalForm\n * @param idVat\n * @returns amount of application fees, without taxes included\n */\nconst getApplicationFeesAmount = (idLegalForm: number, idVat?: number) => {\n let applicationFeesAmount = 50;\n if (idLegalForm === LegalFormTypeEnum.SCI) applicationFeesAmount = 150;\n\n //Sans tva, on envoie le montant HT\n if (!idVat) return applicationFeesAmount;\n\n //Avec tva, on envoie le montant TTC\n return getTaxesIncludedAmount(applicationFeesAmount, idVat);\n};\n\nconst calculatePrestationPrice = (\n idPrestationList: number,\n prestationList: IPrestationList,\n endDate: string,\n NbrMonth: number /* Nbr de mois dans l'exercice */,\n turnover: number,\n rentsNumber: number,\n employeesNumber: number,\n associatesNumber: number,\n idTypeBrand: number,\n idVatRegime: number,\n pastBalanceSheet: boolean,\n optionsList: number[],\n totalPercentage: number /* total pourcentage offer (%) */,\n totalAmount: number /* total montant offer (€) */,\n totalMonth: number /* total mois offer (mois) */,\n isWithApplicationFees: boolean /* frais de dossier */,\n idTaxSystem: number,\n idLegalForm: number,\n isYearly: boolean = false /* prestation annuel ou mensuel */,\n isSubPrestation: boolean = false,\n balanceSheetOffered: number = 0,\n exerciceList: IExercice[] = [],\n): {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n calculDetail: string;\n monthlyPrice: string;\n price: number;\n} => {\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: {\n totalPrestation: number;\n reduceMonth: number;\n canBeCreated: boolean;\n monthNbr: number;\n price: number;\n } = { 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 PrestationType.COMPTA_EI_KLEMS,\n PrestationType.COMPTA_EI_KLEMS_EXPRESS,\n PrestationType.COMPTA_MICRO_KLEMS,\n PrestationType.COMPTA_MICRO_KLEMS_EXPRESS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS,\n PrestationType.COMPTA_LOUEUR_MEUBLE_NON_PRO_KLEMS_EXPRESS,\n PrestationType.STATUTS_OPTION_2,\n PrestationType.EXPERTISE,\n PrestationType.SUPPORT,\n PrestationType.PREMIUM,\n PrestationType.CUSTOM_MADE,\n PrestationType.EI,\n PrestationType.MICRO,\n PrestationType.GESTION_IMMO,\n ].includes(idPrestationList)\n ) {\n let exerciceNbr: number = 0;\n if (exerciceList.length) exerciceNbr = exerciceNumber(dayjs(endDate, 'YYYY-MM-DD').toDate(), exerciceList);\n totalWithReduce = calculatePrestationPriceWithPriceGrid(\n idPrestationList,\n endDate,\n NbrMonth,\n turnover,\n rentsNumber,\n employeesNumber,\n associatesNumber,\n idTypeBrand,\n idVatRegime,\n pastBalanceSheet,\n isYearly,\n totalMonth,\n idTaxSystem,\n idLegalForm,\n exerciceNbr,\n balanceSheetOffered,\n );\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 if ([PrestationType.CREATION_SOCIETE].includes(idPrestationList) && !isSubPrestation) {\n // totalPrestation += 50;\n // La création est offerte désormais\n // inutile d'ajouter les frais de greffe et d'annonce légale,\n // car ne compte pas dans le calcul pour les sales\n }\n }\n /* Gestion des offres */\n /* Offre montant offer */\n if (totalAmount > 0) totalPrestation = totalPrestation - totalAmount;\n /* Offre pourcentage offer */\n if (totalPercentage > 0) totalPrestation = totalPrestation - totalPrestation * (totalPercentage / 100);\n /* Gesstioin du prix minimum acceptable pour la prestation */\n if (prestationList && prestationList.minimumPrice && totalPrestation < prestationList.minimumPrice)\n 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(\n (option) => option.id === optionId,\n )?.price;\n if (optionPrice) OptionTotalPrice += optionPrice;\n });\n }\n totalPrestation += OptionTotalPrice ? OptionTotalPrice : 0;\n /* Gestion des frais de dossier */\n // if (isWithApplicationFees) {\n // const applicationFeesAmount = getApplicationFeesAmount(idLegalForm);\n // totalPrestation += applicationFeesAmount;\n // }\n\n const calculDetail = `${monthNbr > 0 ? monthNbr + ' mois x ' + Math.round(price * 100) / 100 + '€' : Math.round(price * 100) / 100 + '€'} ${totalAmount > 0 ? '- ' + totalAmount + '€' : ''} ${totalPercentage > 0 ? '- ' + totalPercentage + '%' : ''} ${isWithApplicationFees ? '+ 50€' : ''}`;\n\n return {\n totalPrestation,\n reduceMonth,\n canBeCreated,\n calculDetail,\n monthlyPrice: monthNbr > 0 ? Math.round(price * 100) / 100 + '€/mois' : Math.round(price * 100) / 100 + '€',\n price,\n };\n};\n\nconst getPrestationOptions = (idPrestationList: number): PrestationOptionType[] => {\n const PrestationOptionList: PrestationOptionType[] = Object.values(PrestationOption).filter((option) =>\n option.brand.includes(getBrandNameByNodeEnv(process.env.NODE_ENV)),\n );\n return PrestationOptionList.filter((option) => option.prestationList.includes(idPrestationList));\n};\n\nconst isAbleToUpdatePrice = (\n idTypeBrand: number,\n idPrestationList: number,\n turnover: number,\n pastBalanceSheet: boolean,\n): boolean => {\n /* Récupération de la grille tarifaire */\n const currentPriceGrid: priceGrid | undefined = getPriceGrid(idTypeBrand, idPrestationList);\n if (currentPriceGrid) {\n if (\n [\n PrestationType.COMPTA_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM,\n PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS,\n ].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 2].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS].includes(idPrestationList) &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverMonthly[currentPriceGrid.turnoverMonthly.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n !pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverCreatedYear[currentPriceGrid.turnoverCreatedYear.length - 1].turnoverValue < turnover\n )\n return true;\n else if (\n [PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList) &&\n pastBalanceSheet &&\n // @ts-ignore: error after prettier formatting\n currentPriceGrid.turnoverPastYear[currentPriceGrid.turnoverPastYear.length - 1].turnoverValue < turnover\n )\n return true;\n else return false;\n }\n return false;\n};\n\nconst idPrestationListToOfferType = (idPrestationList: number): 'software' | 'expertise' => {\n if (ClementineSubscriptionAccountancySoftwarePrestations.includes(idPrestationList)) return 'software';\n return 'expertise';\n};\n\nexport {\n isOtherAccountingMissions,\n isOtherJuridicalMissions,\n isAdditionalPresta,\n isOtherSocialMission,\n isOnlyPrevi,\n isOnlySocial,\n isOnlyJuridic,\n isCreation,\n isFromStatutsExpress,\n isExpress,\n isConsultingHour,\n isSoftwarePrestation,\n calculateScoringOfPrestation,\n calculatePrestationPrice,\n getPrestationOptions,\n isAbleToUpdatePrice,\n calculatePrestationPriceWithPriceGrid,\n getApplicationFeesAmount,\n idPrestationListToOfferType,\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.108",
|
|
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": "dist/cjs/index.js",
|
|
@@ -4,10 +4,6 @@ import {
|
|
|
4
4
|
UploadBankStatement,
|
|
5
5
|
QueryTransactionBankStatement,
|
|
6
6
|
ReadBankStatement,
|
|
7
|
-
AskPeriodFromFileName,
|
|
8
|
-
ReadPeriodFromFileName,
|
|
9
|
-
AskFileNameFromPeriod,
|
|
10
|
-
ReadFileNameFromPeriod,
|
|
11
7
|
} from '../../types';
|
|
12
8
|
import { isDefined } from 'class-validator';
|
|
13
9
|
|
|
@@ -52,12 +48,4 @@ export class BankStatement extends Resource {
|
|
|
52
48
|
params,
|
|
53
49
|
);
|
|
54
50
|
}
|
|
55
|
-
|
|
56
|
-
askPeriodFromFileName(payload: AskPeriodFromFileName): Promise<ReadPeriodFromFileName> {
|
|
57
|
-
return this.axios.$post('/bank-statements/ask/period', payload);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
askFileNameFromPeriod(payload: AskFileNameFromPeriod): Promise<ReadFileNameFromPeriod> {
|
|
61
|
-
return this.axios.$post('/bank-statements/ask/file-name', payload);
|
|
62
|
-
}
|
|
63
51
|
}
|
|
@@ -23,8 +23,10 @@ import {
|
|
|
23
23
|
ReadStatsSocietyUnpaid,
|
|
24
24
|
UpdatePayment,
|
|
25
25
|
QueryStripeSubscriptionId,
|
|
26
|
+
UpdatePaymentMethod,
|
|
26
27
|
} from '../../types';
|
|
27
28
|
import { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery';
|
|
29
|
+
import Stripe from 'stripe';
|
|
28
30
|
|
|
29
31
|
export class Payment extends Resource {
|
|
30
32
|
getMonthlyCsv(query: QueryMonthlyPayment): Promise<void> {
|
|
@@ -99,6 +101,10 @@ export class Payment extends Resource {
|
|
|
99
101
|
return this.axios.$get('/stripe/payments/methods', { params });
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
updatePaymentMethod(params: UpdatePaymentMethod): Promise<Stripe.PaymentMethod> {
|
|
105
|
+
return this.axios.$put('/stripe/payments/methods', params);
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
getStatsPaidByPrestation(
|
|
103
109
|
payload: QueryPayment,
|
|
104
110
|
): Promise<{ invoicePaymentStats: ReadStatPrestation; assetPaymentStats: ReadStatPrestation }> {
|
|
@@ -2,13 +2,13 @@ export enum AIPromptKey {
|
|
|
2
2
|
BANK_STATEMENT = 'bank_statement',
|
|
3
3
|
BANK_STATEMENT_PERIOD = 'bank_statement_period',
|
|
4
4
|
BANK_STATEMENT_FILE_NAME = 'bank_statement_file_name',
|
|
5
|
-
|
|
5
|
+
BANK_STATEMENT_INFOS = 'bank_statement_infos',
|
|
6
6
|
ASK_COLLABORATOR = 'ask_collaborator',
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
interface AIPromptInfo {
|
|
10
10
|
userPrompt: string;
|
|
11
|
-
systemPrompt: string;
|
|
11
|
+
systemPrompt: string | ((...arg: any[]) => string);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const AIPrompt: Record<AIPromptKey, AIPromptInfo> = {
|
|
@@ -32,26 +32,31 @@ export const AIPrompt: Record<AIPromptKey, AIPromptInfo> = {
|
|
|
32
32
|
Assurez-vous que le JSON soit strictement conforme à ce format, sans aucun commentaire ou texte supplémentaire.
|
|
33
33
|
`,
|
|
34
34
|
},
|
|
35
|
-
[AIPromptKey.
|
|
35
|
+
[AIPromptKey.BANK_STATEMENT_INFOS]: {
|
|
36
36
|
userPrompt:
|
|
37
|
-
'Voici des lignes issues d’un relevé de compte bancaire (cela peut être un relevé français). Pouvez-vous extraire les données concernant le solde précédent compte bancaire
|
|
38
|
-
systemPrompt:
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
'Voici des lignes issues d’un relevé de compte bancaire (cela peut être un relevé français). Pouvez-vous extraire les données concernant le solde précédent, la date de début et la date de fin du compte bancaire?',
|
|
38
|
+
systemPrompt: (bankAccountName) =>
|
|
39
|
+
`
|
|
40
|
+
Analysez ce relevé de compte bancaire et extrayez toutes les infos concernant le montant des solde précédents du compte bancaire, les dates de début et de fin du relevé sous forme d'un objet JSON structuré.
|
|
41
|
+
Le relevé peut contenir des informations telles que la date du solde précédent et le montant du solde qui doit être un nombre. La date de début et de fin doivent être retourné en string.
|
|
42
|
+
|
|
41
43
|
Garder exactement le même ordre des différentes dates que dans le relevé.
|
|
42
44
|
Si plusieurs solde sont trouvés, les retourner tous.
|
|
45
|
+
De plus, il faut également retourné un nom de fichier formatté.
|
|
43
46
|
Le format attendu est le suivant :
|
|
44
|
-
[
|
|
47
|
+
soldes: [
|
|
45
48
|
{
|
|
46
49
|
"dateValue": string (format : YYYY-MM-DD correspondant à la date du ou des soldes précédents),
|
|
47
50
|
"amount": number,
|
|
48
51
|
},
|
|
49
52
|
...
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
],
|
|
54
|
+
period: {
|
|
55
|
+
"startDate": string (format : YYYY-MM-DD correspondant a la date de début du relevé),
|
|
56
|
+
"endDate": string (format : YYYY-MM-DD correspondant a la date de fin du relevé),
|
|
57
|
+
},
|
|
58
|
+
formattedFileName: string (nom du fichier au format 'releve_bancaire_${bankAccountName}_du_DD-MM-YYYY_au_DD-MM-YYYY.pdf)
|
|
59
|
+
Assurez-vous que le JSON soit strictement conforme à ce format, sans aucun commentaire ou texte supplémentaire. Si Aucune date n'est trouvée, retourner un tableau vide,`,
|
|
55
60
|
},
|
|
56
61
|
[AIPromptKey.BANK_STATEMENT_PERIOD]: {
|
|
57
62
|
userPrompt: '',
|
|
@@ -3890,3 +3890,10 @@ export const PrestationDetail: PrestationDetailEnum = {
|
|
|
3890
3890
|
point: 0,
|
|
3891
3891
|
},
|
|
3892
3892
|
};
|
|
3893
|
+
|
|
3894
|
+
export enum PrestationTypeDetail {
|
|
3895
|
+
SOFTWARE = 'software',
|
|
3896
|
+
ACCOUNTANCY = 'accountancy',
|
|
3897
|
+
TRIAL = 'trial',
|
|
3898
|
+
FREEMIUM = 'freemium',
|
|
3899
|
+
}
|
|
@@ -353,6 +353,7 @@ export const TimeSlotDetail: TimeSlotDetailType[] = [
|
|
|
353
353
|
id: TimeSlot.SUPPORTING_CREATION_OF_SOCIETY_PROSPECT,
|
|
354
354
|
name: 'Accompagnement pour la création de mon entreprise',
|
|
355
355
|
internalName: 'Rdv création Prospect',
|
|
356
|
+
category: TimeSlotCategoryDetail.find((c) => c.id === TimeSlotCategory.SALES)?.name,
|
|
356
357
|
duration: 30,
|
|
357
358
|
idRole: [Role.COMMERCIAL],
|
|
358
359
|
forWholeService: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IsDate, IsNumber, IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsBoolean, IsDate, IsNumber, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiPropertyOptional, ApiProperty } from '../../../../utils';
|
|
3
3
|
import { TFile } from '../file/TFile';
|
|
4
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
5
|
|
|
5
6
|
export class CreateFileAndGed {
|
|
6
7
|
@ApiProperty()
|
|
@@ -62,5 +63,13 @@ export class CreateFileAndGed {
|
|
|
62
63
|
|
|
63
64
|
@ApiPropertyOptional()
|
|
64
65
|
@IsOptional()
|
|
66
|
+
@IsBoolean()
|
|
67
|
+
@ToBoolean()
|
|
65
68
|
needToBeReviewed?: boolean | null;
|
|
69
|
+
|
|
70
|
+
@ApiPropertyOptional()
|
|
71
|
+
@IsOptional()
|
|
72
|
+
@IsBoolean()
|
|
73
|
+
@ToBoolean()
|
|
74
|
+
formatFileName?: boolean | null;
|
|
66
75
|
}
|
|
@@ -17,6 +17,12 @@ export type MistralBankAccountSoldeDetails = {
|
|
|
17
17
|
amount: number;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
export type MistralBankAccountDetails = {
|
|
21
|
+
period: { startDate: string; endDate: string };
|
|
22
|
+
formattedFileName: string;
|
|
23
|
+
solde: MistralBankAccountSoldeDetails[];
|
|
24
|
+
};
|
|
25
|
+
|
|
20
26
|
export type OcrResponseParsed = {
|
|
21
27
|
Type: OcrType;
|
|
22
28
|
MessageId: string;
|
|
@@ -112,6 +112,15 @@ export class CreatePaymentIntent {
|
|
|
112
112
|
metadata?: Stripe.MetadataParam;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
export class UpdatePaymentMethod {
|
|
116
|
+
@ApiProperty()
|
|
117
|
+
@IsString()
|
|
118
|
+
stripePaymentMethodId: string;
|
|
119
|
+
|
|
120
|
+
@ApiProperty()
|
|
121
|
+
metadata: any;
|
|
122
|
+
}
|
|
123
|
+
|
|
115
124
|
export class PostProcessPaymentAutomatically {
|
|
116
125
|
@ApiPropertyOptional()
|
|
117
126
|
@IsInt()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsBoolean, IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsBoolean, IsNumber, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
4
|
|
|
@@ -6,6 +6,11 @@ export class RetrievePaymentMethodsParams {
|
|
|
6
6
|
@ApiProperty()
|
|
7
7
|
@IsString()
|
|
8
8
|
customerId: string;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional({ describe: 'Search into payment method metadata' })
|
|
11
|
+
@IsNumber()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
idSociety: number;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
export class QueryStripeSession {
|
package/ts/utils/prestation.ts
CHANGED
|
@@ -306,7 +306,7 @@ const calculatePrestationPriceWithPriceGrid = (
|
|
|
306
306
|
let monthNbr: number = NbrMonth;
|
|
307
307
|
let yearlyPrice: number | undefined;
|
|
308
308
|
let finalMonthlyPrice: number | undefined;
|
|
309
|
-
|
|
309
|
+
const canBeCreated: boolean = true;
|
|
310
310
|
let recalculateMonthly: boolean = false;
|
|
311
311
|
|
|
312
312
|
/* Récupération de la grille tarifaire */
|
|
@@ -378,11 +378,14 @@ const calculatePrestationPriceWithPriceGrid = (
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
+
|
|
381
382
|
/* Gestion des offres, mois offer */
|
|
382
383
|
if (totalMonth > 0) {
|
|
383
|
-
if (
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
if (isYearly) {
|
|
385
|
+
yearlyPrice = (10 - totalMonth) * (yearlyPrice ? yearlyPrice / 10 : 0);
|
|
386
|
+
} else {
|
|
387
|
+
monthNbr = monthNbr - totalMonth;
|
|
388
|
+
}
|
|
386
389
|
}
|
|
387
390
|
|
|
388
391
|
/* Calcul du nombre de mois soustraient */
|