@silexpert/core 1.2.26 → 1.2.28
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/index.d.ts.map +1 -1
- package/dist/cjs/api/index.js +8 -3
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/api/resources/Employee.d.ts.map +1 -1
- package/dist/cjs/api/resources/Employee.js +1 -0
- package/dist/cjs/api/resources/Employee.js.map +1 -1
- package/dist/cjs/api/resources/RegistrationForm.d.ts +3 -2
- package/dist/cjs/api/resources/RegistrationForm.d.ts.map +1 -1
- package/dist/cjs/api/resources/RegistrationForm.js +4 -1
- package/dist/cjs/api/resources/RegistrationForm.js.map +1 -1
- package/dist/cjs/api/resources/Task.d.ts.map +1 -1
- package/dist/cjs/api/resources/Task.js +1 -0
- package/dist/cjs/api/resources/Task.js.map +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Enum/Aspone.d.ts +57 -0
- package/dist/cjs/types/Enum/Aspone.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Aspone.js +94 -1
- package/dist/cjs/types/Enum/Aspone.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestion.js +2 -0
- package/dist/cjs/types/Enum/BalanceSheetQuestion.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js +1 -0
- package/dist/cjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
- package/dist/cjs/types/Enum/CerfaType.d.ts +2 -1
- package/dist/cjs/types/Enum/CerfaType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/CerfaType.js +1 -0
- package/dist/cjs/types/Enum/CerfaType.js.map +1 -1
- package/dist/cjs/types/Enum/CommercialManagement.d.ts +28 -0
- package/dist/cjs/types/Enum/CommercialManagement.d.ts.map +1 -1
- package/dist/cjs/types/Enum/CommercialManagement.js +137 -1
- package/dist/cjs/types/Enum/CommercialManagement.js.map +1 -1
- package/dist/cjs/types/Enum/RevisionGuide.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RevisionGuide.js +5 -0
- package/dist/cjs/types/Enum/RevisionGuide.js.map +1 -1
- package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Role.js +1 -0
- package/dist/cjs/types/Enum/Role.js.map +1 -1
- package/dist/cjs/types/Enum/SalesContractBrandClementine.js +4 -4
- package/dist/cjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
- package/dist/cjs/types/Enum/SalesContractBrandPourcentage.d.ts +1 -26
- package/dist/cjs/types/Enum/SalesContractBrandPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/SalesContractBrandPourcentage.js +6 -6
- package/dist/cjs/types/Enum/SalesContractBrandPourcentage.js.map +1 -1
- package/dist/cjs/types/Enum/TransactionKind.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TransactionKind.js.map +1 -1
- package/dist/cjs/types/Enum/TransactionStatus.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TransactionStatus.js.map +1 -1
- package/dist/cjs/types/Enum/TypePayment.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TypePayment.js +1 -0
- package/dist/cjs/types/Enum/TypePayment.js.map +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/Ocr.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/Ocr.js.map +1 -1
- package/dist/cjs/types/Interface/api/cerfa/2573.d.ts +91 -0
- package/dist/cjs/types/Interface/api/cerfa/2573.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/cerfa/2573.js +3 -0
- package/dist/cjs/types/Interface/api/cerfa/2573.js.map +1 -0
- package/dist/cjs/types/Interface/api/cerfa/CreateCerfa.d.ts +1 -0
- package/dist/cjs/types/Interface/api/cerfa/CreateCerfa.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/cerfa/CreateCerfa.js +1 -0
- package/dist/cjs/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
- package/dist/cjs/types/Interface/api/cerfa/ReadCerfa.d.ts +2 -1
- package/dist/cjs/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
- package/dist/cjs/types/Interface/api/checklist/Read.d.ts +1 -0
- package/dist/cjs/types/Interface/api/checklist/Read.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/checklist/Read.js.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +15 -0
- package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.js +70 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Read.d.ts +4 -0
- package/dist/cjs/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Read.js.map +1 -1
- package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +282 -0
- package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/config/ConfigType.js +3 -0
- package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -0
- package/dist/cjs/types/Interface/api/crisp/GetCrisp.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/crisp/GetCrisp.js.map +1 -1
- package/dist/cjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js +3 -1
- package/dist/cjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -1
- package/dist/cjs/types/Interface/api/journal/Journals.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/journal/Journals.js.map +1 -1
- package/dist/cjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js +3 -1
- package/dist/cjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js.map +1 -1
- package/dist/cjs/types/Interface/api/notion/NotionResponse.d.ts +4 -4
- package/dist/cjs/types/Interface/api/notion/NotionResponse.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/notion/NotionResponse.js.map +1 -1
- package/dist/cjs/types/Interface/api/pappers/QueryPappers.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/pappers/QueryPappers.js.map +1 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +3 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +1 -1
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts +2 -0
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/ShopifyFinancialStatus.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/ShopifyFinancialStatus.js.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/ShopifyOrder.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/ShopifyOrder.js.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/discount_code.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/discount_code.js.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/shipping_line.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/shipping_line.js.map +1 -1
- package/dist/cjs/types/Interface/models/IBalanceSheetQuestion.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IBalanceSheetQuestion.js.map +1 -1
- package/dist/cjs/types/Interface/models/IFecFile.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IFecFile.js.map +1 -1
- package/dist/cjs/types/Interface/models/IRegistration.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IRegistration.js.map +1 -1
- package/dist/cjs/types/Interface/models/ISaleEmail.d.ts +15 -0
- package/dist/cjs/types/Interface/models/ISaleEmail.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/ISaleEmail.js +3 -0
- package/dist/cjs/types/Interface/models/ISaleEmail.js.map +1 -0
- package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/brands.d.ts.map +1 -1
- package/dist/cjs/utils/brands.js +5 -0
- package/dist/cjs/utils/brands.js.map +1 -1
- package/dist/cjs/utils/checkup.d.ts.map +1 -1
- package/dist/cjs/utils/checkup.js +5 -0
- package/dist/cjs/utils/checkup.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
- package/dist/cjs/utils/commercialManagement/document.js +6 -5
- package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/recurrence.js +2 -2
- package/dist/cjs/utils/commercialManagement/recurrence.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/saleEmail.d.ts +10 -0
- package/dist/cjs/utils/commercialManagement/saleEmail.d.ts.map +1 -0
- package/dist/cjs/utils/commercialManagement/saleEmail.js +34 -0
- package/dist/cjs/utils/commercialManagement/saleEmail.js.map +1 -0
- package/dist/cjs/utils/commercialManagement/vat.d.ts.map +1 -1
- package/dist/cjs/utils/commercialManagement/vat.js +1 -0
- package/dist/cjs/utils/commercialManagement/vat.js.map +1 -1
- package/dist/cjs/utils/date.d.ts.map +1 -1
- package/dist/cjs/utils/date.js +9 -0
- package/dist/cjs/utils/date.js.map +1 -1
- package/dist/cjs/utils/decorators.d.ts.map +1 -1
- package/dist/cjs/utils/decorators.js +3 -4
- package/dist/cjs/utils/decorators.js.map +1 -1
- package/dist/cjs/utils/email.d.ts.map +1 -1
- package/dist/cjs/utils/email.js +22 -0
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/cjs/utils/isUrl.d.ts.map +1 -1
- package/dist/cjs/utils/isUrl.js +1 -2
- package/dist/cjs/utils/isUrl.js.map +1 -1
- package/dist/cjs/utils/noLodash.d.ts.map +1 -1
- package/dist/cjs/utils/noLodash.js +10 -2
- package/dist/cjs/utils/noLodash.js.map +1 -1
- package/dist/cjs/utils/objectUtils/flattenObject.d.ts.map +1 -1
- package/dist/cjs/utils/objectUtils/flattenObject.js +1 -0
- package/dist/cjs/utils/objectUtils/flattenObject.js.map +1 -1
- package/dist/cjs/utils/objectUtils/fullFlattenObject.d.ts.map +1 -1
- package/dist/cjs/utils/objectUtils/fullFlattenObject.js +1 -0
- package/dist/cjs/utils/objectUtils/fullFlattenObject.js.map +1 -1
- package/dist/cjs/utils/objectUtils/unflattenObject.d.ts.map +1 -1
- package/dist/cjs/utils/objectUtils/unflattenObject.js +0 -1
- package/dist/cjs/utils/objectUtils/unflattenObject.js.map +1 -1
- package/dist/cjs/utils/payment.d.ts.map +1 -1
- package/dist/cjs/utils/payment.js +6 -1
- package/dist/cjs/utils/payment.js.map +1 -1
- package/dist/cjs/utils/phone.d.ts.map +1 -1
- package/dist/cjs/utils/phone.js +1 -0
- package/dist/cjs/utils/phone.js.map +1 -1
- package/dist/cjs/utils/quotation.js +2 -2
- package/dist/cjs/utils/quotation.js.map +1 -1
- package/dist/cjs/utils/social.js +0 -1
- package/dist/cjs/utils/social.js.map +1 -1
- package/dist/cjs/utils/statutsGeneration.js +2 -2
- package/dist/cjs/utils/statutsGeneration.js.map +1 -1
- package/dist/cjs/utils/tests/payment.spec.js +30 -39
- package/dist/cjs/utils/tests/payment.spec.js.map +1 -1
- package/dist/cjs/utils/transforms/boolean.transform.d.ts.map +1 -1
- package/dist/cjs/utils/transforms/boolean.transform.js +3 -1
- package/dist/cjs/utils/transforms/boolean.transform.js.map +1 -1
- package/dist/cjs/utils/vat/3310/century23.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3310/century23.js +23 -0
- package/dist/cjs/utils/vat/3310/century23.js.map +1 -1
- package/dist/cjs/utils/vat/3310/century24.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3310/century24.js +23 -0
- package/dist/cjs/utils/vat/3310/century24.js.map +1 -1
- package/dist/cjs/utils/vat/3517/century23.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3517/century23.js +4 -0
- package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
- package/dist/cjs/utils/vat/registration.d.ts.map +1 -1
- package/dist/cjs/utils/vat/registration.js +0 -1
- package/dist/cjs/utils/vat/registration.js.map +1 -1
- package/dist/mjs/api/index.d.ts.map +1 -1
- package/dist/mjs/api/index.js +7 -1
- package/dist/mjs/api/index.js.map +1 -1
- package/dist/mjs/api/resources/Employee.d.ts.map +1 -1
- package/dist/mjs/api/resources/Employee.js +1 -0
- package/dist/mjs/api/resources/Employee.js.map +1 -1
- package/dist/mjs/api/resources/RegistrationForm.d.ts +3 -2
- package/dist/mjs/api/resources/RegistrationForm.d.ts.map +1 -1
- package/dist/mjs/api/resources/RegistrationForm.js +4 -1
- package/dist/mjs/api/resources/RegistrationForm.js.map +1 -1
- package/dist/mjs/api/resources/Task.d.ts.map +1 -1
- package/dist/mjs/api/resources/Task.js +1 -0
- package/dist/mjs/api/resources/Task.js.map +1 -1
- package/dist/mjs/index.d.ts.map +1 -1
- package/dist/mjs/index.js +0 -1
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/types/Enum/Aspone.d.ts +57 -0
- package/dist/mjs/types/Enum/Aspone.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Aspone.js +93 -0
- package/dist/mjs/types/Enum/Aspone.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestion.js +2 -0
- package/dist/mjs/types/Enum/BalanceSheetQuestion.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js +1 -0
- package/dist/mjs/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
- package/dist/mjs/types/Enum/CerfaType.d.ts +2 -1
- package/dist/mjs/types/Enum/CerfaType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/CerfaType.js +1 -0
- package/dist/mjs/types/Enum/CerfaType.js.map +1 -1
- package/dist/mjs/types/Enum/CommercialManagement.d.ts +28 -0
- package/dist/mjs/types/Enum/CommercialManagement.d.ts.map +1 -1
- package/dist/mjs/types/Enum/CommercialManagement.js +136 -0
- package/dist/mjs/types/Enum/CommercialManagement.js.map +1 -1
- package/dist/mjs/types/Enum/RevisionGuide.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RevisionGuide.js +5 -0
- package/dist/mjs/types/Enum/RevisionGuide.js.map +1 -1
- package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Role.js +1 -0
- package/dist/mjs/types/Enum/Role.js.map +1 -1
- package/dist/mjs/types/Enum/SalesContractBrandClementine.js +4 -4
- package/dist/mjs/types/Enum/SalesContractBrandClementine.js.map +1 -1
- package/dist/mjs/types/Enum/SalesContractBrandPourcentage.d.ts +1 -26
- package/dist/mjs/types/Enum/SalesContractBrandPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/SalesContractBrandPourcentage.js +6 -6
- package/dist/mjs/types/Enum/SalesContractBrandPourcentage.js.map +1 -1
- package/dist/mjs/types/Enum/TransactionKind.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TransactionKind.js.map +1 -1
- package/dist/mjs/types/Enum/TransactionStatus.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TransactionStatus.js.map +1 -1
- package/dist/mjs/types/Enum/TypePayment.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TypePayment.js +1 -0
- package/dist/mjs/types/Enum/TypePayment.js.map +1 -1
- package/dist/mjs/types/Interface/api/accountingFiles/Ocr.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/accountingFiles/Ocr.js.map +1 -1
- package/dist/mjs/types/Interface/api/cerfa/2573.d.ts +91 -0
- package/dist/mjs/types/Interface/api/cerfa/2573.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/cerfa/2573.js +2 -0
- package/dist/mjs/types/Interface/api/cerfa/2573.js.map +1 -0
- package/dist/mjs/types/Interface/api/cerfa/CreateCerfa.d.ts +1 -0
- package/dist/mjs/types/Interface/api/cerfa/CreateCerfa.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/cerfa/CreateCerfa.js +1 -0
- package/dist/mjs/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
- package/dist/mjs/types/Interface/api/cerfa/ReadCerfa.d.ts +2 -1
- package/dist/mjs/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
- package/dist/mjs/types/Interface/api/checklist/Read.d.ts +1 -0
- package/dist/mjs/types/Interface/api/checklist/Read.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/checklist/Read.js.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +15 -0
- package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.js +79 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Read.d.ts +4 -0
- package/dist/mjs/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Read.js.map +1 -1
- package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +282 -0
- package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/config/ConfigType.js +2 -0
- package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -0
- package/dist/mjs/types/Interface/api/crisp/GetCrisp.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/crisp/GetCrisp.js.map +1 -1
- package/dist/mjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js +3 -1
- package/dist/mjs/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -1
- package/dist/mjs/types/Interface/api/journal/Journals.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/journal/Journals.js.map +1 -1
- package/dist/mjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js +3 -1
- package/dist/mjs/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.js.map +1 -1
- package/dist/mjs/types/Interface/api/notion/NotionResponse.d.ts +4 -4
- package/dist/mjs/types/Interface/api/notion/NotionResponse.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/notion/NotionResponse.js.map +1 -1
- package/dist/mjs/types/Interface/api/pappers/QueryPappers.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/pappers/QueryPappers.js +3 -0
- package/dist/mjs/types/Interface/api/pappers/QueryPappers.js.map +1 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +4 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +1 -1
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +1 -1
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts +2 -0
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/ShopifyFinancialStatus.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/ShopifyFinancialStatus.js.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/ShopifyOrder.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/ShopifyOrder.js.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/discount_code.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/discount_code.js.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/shipping_line.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/shipping_line.js.map +1 -1
- package/dist/mjs/types/Interface/models/IBalanceSheetQuestion.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IBalanceSheetQuestion.js.map +1 -1
- package/dist/mjs/types/Interface/models/IFecFile.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IFecFile.js.map +1 -1
- package/dist/mjs/types/Interface/models/IRegistration.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IRegistration.js.map +1 -1
- package/dist/mjs/types/Interface/models/ISaleEmail.d.ts +15 -0
- package/dist/mjs/types/Interface/models/ISaleEmail.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/ISaleEmail.js +2 -0
- package/dist/mjs/types/Interface/models/ISaleEmail.js.map +1 -0
- package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/mjs/types/index.d.ts +2 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +2 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/brands.d.ts.map +1 -1
- package/dist/mjs/utils/brands.js +5 -0
- package/dist/mjs/utils/brands.js.map +1 -1
- package/dist/mjs/utils/checkup.d.ts.map +1 -1
- package/dist/mjs/utils/checkup.js +5 -0
- package/dist/mjs/utils/checkup.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
- package/dist/mjs/utils/commercialManagement/document.js +2 -1
- package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/recurrence.js +2 -2
- package/dist/mjs/utils/commercialManagement/recurrence.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/saleEmail.d.ts +10 -0
- package/dist/mjs/utils/commercialManagement/saleEmail.d.ts.map +1 -0
- package/dist/mjs/utils/commercialManagement/saleEmail.js +30 -0
- package/dist/mjs/utils/commercialManagement/saleEmail.js.map +1 -0
- package/dist/mjs/utils/commercialManagement/vat.d.ts.map +1 -1
- package/dist/mjs/utils/commercialManagement/vat.js +1 -0
- package/dist/mjs/utils/commercialManagement/vat.js.map +1 -1
- package/dist/mjs/utils/date.d.ts.map +1 -1
- package/dist/mjs/utils/date.js +9 -0
- package/dist/mjs/utils/date.js.map +1 -1
- package/dist/mjs/utils/decorators.d.ts.map +1 -1
- package/dist/mjs/utils/decorators.js +3 -4
- package/dist/mjs/utils/decorators.js.map +1 -1
- package/dist/mjs/utils/email.d.ts.map +1 -1
- package/dist/mjs/utils/email.js +22 -0
- package/dist/mjs/utils/email.js.map +1 -1
- package/dist/mjs/utils/isUrl.d.ts.map +1 -1
- package/dist/mjs/utils/isUrl.js +1 -2
- package/dist/mjs/utils/isUrl.js.map +1 -1
- package/dist/mjs/utils/noLodash.d.ts.map +1 -1
- package/dist/mjs/utils/noLodash.js +8 -1
- package/dist/mjs/utils/noLodash.js.map +1 -1
- package/dist/mjs/utils/objectUtils/flattenObject.d.ts.map +1 -1
- package/dist/mjs/utils/objectUtils/flattenObject.js +1 -0
- package/dist/mjs/utils/objectUtils/flattenObject.js.map +1 -1
- package/dist/mjs/utils/objectUtils/fullFlattenObject.d.ts.map +1 -1
- package/dist/mjs/utils/objectUtils/fullFlattenObject.js +1 -0
- package/dist/mjs/utils/objectUtils/fullFlattenObject.js.map +1 -1
- package/dist/mjs/utils/objectUtils/unflattenObject.d.ts.map +1 -1
- package/dist/mjs/utils/objectUtils/unflattenObject.js +0 -1
- package/dist/mjs/utils/objectUtils/unflattenObject.js.map +1 -1
- package/dist/mjs/utils/payment.d.ts.map +1 -1
- package/dist/mjs/utils/payment.js +6 -1
- package/dist/mjs/utils/payment.js.map +1 -1
- package/dist/mjs/utils/phone.d.ts.map +1 -1
- package/dist/mjs/utils/phone.js +1 -0
- package/dist/mjs/utils/phone.js.map +1 -1
- package/dist/mjs/utils/quotation.js +1 -1
- package/dist/mjs/utils/quotation.js.map +1 -1
- package/dist/mjs/utils/social.js +0 -1
- package/dist/mjs/utils/social.js.map +1 -1
- package/dist/mjs/utils/statutsGeneration.js +2 -2
- package/dist/mjs/utils/statutsGeneration.js.map +1 -1
- package/dist/mjs/utils/tests/payment.spec.js +15 -15
- package/dist/mjs/utils/tests/payment.spec.js.map +1 -1
- package/dist/mjs/utils/transforms/boolean.transform.d.ts.map +1 -1
- package/dist/mjs/utils/transforms/boolean.transform.js +3 -1
- package/dist/mjs/utils/transforms/boolean.transform.js.map +1 -1
- package/dist/mjs/utils/vat/3310/century23.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3310/century23.js +23 -0
- package/dist/mjs/utils/vat/3310/century23.js.map +1 -1
- package/dist/mjs/utils/vat/3310/century24.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3310/century24.js +23 -0
- package/dist/mjs/utils/vat/3310/century24.js.map +1 -1
- package/dist/mjs/utils/vat/3517/century23.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3517/century23.js +4 -0
- package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
- package/dist/mjs/utils/vat/registration.d.ts.map +1 -1
- package/dist/mjs/utils/vat/registration.js +0 -1
- package/dist/mjs/utils/vat/registration.js.map +1 -1
- package/eslint.config.mjs +47 -0
- package/package.json +7 -10
- package/ts/api/index.ts +9 -2
- package/ts/api/resources/Employee.ts +1 -0
- package/ts/api/resources/RegistrationForm.ts +8 -2
- package/ts/api/resources/Task.ts +1 -0
- package/ts/index.ts +0 -1
- package/ts/types/Enum/Aspone.ts +98 -1
- package/ts/types/Enum/BalanceSheet.ts +1 -1
- package/ts/types/Enum/BalanceSheetQuestion.ts +2 -0
- package/ts/types/Enum/BalanceSheetQuestionWording.ts +1 -0
- package/ts/types/Enum/CerfaType.ts +1 -0
- package/ts/types/Enum/CommercialManagement.ts +143 -1
- package/ts/types/Enum/RevisionGuide.ts +5 -0
- package/ts/types/Enum/Role.ts +1 -0
- package/ts/types/Enum/SalesContractBrandClementine.ts +4 -4
- package/ts/types/Enum/SalesContractBrandPourcentage.ts +7 -7
- package/ts/types/Enum/TransactionKind.ts +1 -0
- package/ts/types/Enum/TransactionStatus.ts +1 -0
- package/ts/types/Enum/TypePayment.ts +1 -0
- package/ts/types/Interface/api/accountingFiles/Ocr.ts +1 -0
- package/ts/types/Interface/api/cerfa/2573.ts +88 -0
- package/ts/types/Interface/api/cerfa/CreateCerfa.ts +1 -0
- package/ts/types/Interface/api/cerfa/ReadCerfa.ts +2 -0
- package/ts/types/Interface/api/checklist/Read.ts +1 -0
- package/ts/types/Interface/api/commercialManagement/Create.ts +58 -2
- package/ts/types/Interface/api/commercialManagement/Read.ts +5 -0
- package/ts/types/Interface/api/config/ConfigType.ts +325 -0
- package/ts/types/Interface/api/crisp/GetCrisp.ts +2 -0
- package/ts/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.ts +1 -0
- package/ts/types/Interface/api/journal/Journals.ts +0 -1
- package/ts/types/Interface/api/kilometricAllowance/CreateKilometricAllowanceValidation.ts +1 -0
- package/ts/types/Interface/api/notion/NotionResponse.ts +2 -4
- package/ts/types/Interface/api/pappers/QueryPappers.ts +9 -0
- package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +1 -0
- package/ts/types/Interface/api/promoCode/ReadDefaultPromotion.ts +1 -0
- package/ts/types/Interface/api/registration/CreateRegistration.ts +2 -0
- package/ts/types/Interface/api/shopify/ShopifyFinancialStatus.ts +1 -0
- package/ts/types/Interface/api/shopify/ShopifyOrder.ts +2 -0
- package/ts/types/Interface/api/shopify/discount_code.ts +1 -0
- package/ts/types/Interface/api/shopify/shipping_line.ts +2 -0
- package/ts/types/Interface/models/IBalanceSheetQuestion.ts +1 -0
- package/ts/types/Interface/models/IFecFile.ts +1 -0
- package/ts/types/Interface/models/IRegistration.ts +1 -0
- package/ts/types/Interface/models/ISaleEmail.ts +18 -0
- package/ts/types/Interface/models/IUser.ts +1 -0
- package/ts/types/index.ts +2 -0
- package/ts/utils/brands.ts +5 -0
- package/ts/utils/checkup.ts +5 -0
- package/ts/utils/commercialManagement/document.ts +3 -2
- package/ts/utils/commercialManagement/recurrence.ts +2 -2
- package/ts/utils/commercialManagement/saleEmail.ts +43 -0
- package/ts/utils/commercialManagement/vat.ts +1 -0
- package/ts/utils/date.ts +9 -0
- package/ts/utils/decorators.ts +5 -4
- package/ts/utils/email.ts +22 -1
- package/ts/utils/isUrl.ts +1 -2
- package/ts/utils/noLodash.ts +7 -1
- package/ts/utils/objectUtils/flattenObject.ts +1 -0
- package/ts/utils/objectUtils/fullFlattenObject.ts +1 -0
- package/ts/utils/objectUtils/unflattenObject.ts +0 -1
- package/ts/utils/payment.ts +8 -3
- package/ts/utils/phone.ts +1 -0
- package/ts/utils/quotation.ts +1 -1
- package/ts/utils/social.ts +1 -1
- package/ts/utils/statutsGeneration.ts +4 -4
- package/ts/utils/tests/payment.spec.ts +15 -15
- package/ts/utils/transforms/boolean.transform.ts +1 -0
- package/ts/utils/vat/3310/century23.ts +24 -0
- package/ts/utils/vat/3310/century24.ts +23 -0
- package/ts/utils/vat/3517/century23.ts +4 -0
- package/ts/utils/vat/registration.ts +0 -1
- package/tsconfig-base.json +1 -2
|
@@ -108,14 +108,20 @@ export type BeneficialOwnerPappers = {
|
|
|
108
108
|
pourcentage_parts_directes: number | null;
|
|
109
109
|
pourcentage_parts_indirectes: number | null;
|
|
110
110
|
pourcentage_parts_vocation_titulaire: number | null;
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
111
112
|
details_parts_directes: any | null;
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
112
114
|
details_parts_indirectes: any | null;
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
113
116
|
details_parts_vocation_titulaire: any | null;
|
|
114
117
|
pourcentage_votes: number | null;
|
|
115
118
|
pourcentage_votes_directs: number | null;
|
|
116
119
|
pourcentage_votes_indirect: number | null;
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
117
121
|
details_votes_directs: any | null;
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
118
123
|
details_votes_indirects: any | null;
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
119
125
|
details_societe_de_gestion: any | null;
|
|
120
126
|
detention_pouvoir_decision_ag: boolean | null;
|
|
121
127
|
detention_pouvoir_nom_membre_conseil_administration: boolean | null;
|
|
@@ -235,10 +241,12 @@ export class GetBusinessPappersResponse {
|
|
|
235
241
|
dernier_traitement: string | null;
|
|
236
242
|
siege: HeadOfficePappers | null;
|
|
237
243
|
diffusable: boolean;
|
|
244
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
238
245
|
sigle: any | null;
|
|
239
246
|
objet_social: string | null;
|
|
240
247
|
capital: number | null;
|
|
241
248
|
capital_formate: string | null;
|
|
249
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
242
250
|
capital_actuel_si_variable: any | null;
|
|
243
251
|
numero_rcs: string | null;
|
|
244
252
|
date_cloture_exercice: string | null;
|
|
@@ -247,6 +255,7 @@ export class GetBusinessPappersResponse {
|
|
|
247
255
|
prochaine_date_cloture_exercice: string | null;
|
|
248
256
|
prochaine_date_cloture_exercice_formate: string | null;
|
|
249
257
|
economie_sociale_solidaire: boolean;
|
|
258
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
250
259
|
duree_personne_morale: any | null;
|
|
251
260
|
derniere_mise_a_jour_sirene: string | null;
|
|
252
261
|
derniere_mise_a_jour_rcs: string | null;
|
|
@@ -14,6 +14,7 @@ import { CerfaFormValue } from '../cerfa/ReadCerfa';
|
|
|
14
14
|
import { UpdatedAnnotation } from './ReadRegistration';
|
|
15
15
|
import { CustomerVatState, CustomerVatType } from '../../../Enum/CustomerVat';
|
|
16
16
|
import { Cerfa2069RCI_2024_Payload } from '../cerfa/2069RCI';
|
|
17
|
+
import { Cerfa2573_2024 } from '../cerfa/2573';
|
|
17
18
|
|
|
18
19
|
export class CreateRegistrationSetting {
|
|
19
20
|
@ApiPropertyOptional()
|
|
@@ -72,6 +73,7 @@ export type ForcedValues_2571 = {
|
|
|
72
73
|
export type ForcedValues = {
|
|
73
74
|
cerfa2571?: ForcedValues_2571;
|
|
74
75
|
cerfa2069RCI?: Cerfa2069RCI_2024_Payload;
|
|
76
|
+
cerfa2573?: Cerfa2573_2024;
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
export class CreateRegistration {
|
|
@@ -159,6 +159,7 @@ export interface ShopifyOrder extends ShopifyObject {
|
|
|
159
159
|
/**
|
|
160
160
|
* The fulfillment status for this order. Known values are 'fulfilled', 'partial' or null.
|
|
161
161
|
*/
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
162
163
|
fulfillment_status: 'fulfilled' | 'partial' | string | null;
|
|
163
164
|
|
|
164
165
|
/**
|
|
@@ -316,6 +317,7 @@ export interface ShopifyOrder extends ShopifyObject {
|
|
|
316
317
|
/**
|
|
317
318
|
* not documented; always null in test data
|
|
318
319
|
*/
|
|
320
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
319
321
|
source_url?: null | any;
|
|
320
322
|
|
|
321
323
|
/**
|
|
@@ -14,5 +14,6 @@ export interface DiscountCode extends ShopifyObject {
|
|
|
14
14
|
/**
|
|
15
15
|
* The type of discount. Known values are 'percentage', 'shipping', 'fixed_amount' and 'none'.
|
|
16
16
|
*/
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
17
18
|
type?: 'percentage' | 'shipping' | 'fixed_amount' | string;
|
|
18
19
|
}
|
|
@@ -18,6 +18,7 @@ export interface ShippingLine extends ShopifyObject {
|
|
|
18
18
|
/**
|
|
19
19
|
* not documented
|
|
20
20
|
*/
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
21
22
|
delivery_category: null | any;
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -52,6 +53,7 @@ export interface ShippingLine extends ShopifyObject {
|
|
|
52
53
|
/**
|
|
53
54
|
* undocumented (always null in available test data)
|
|
54
55
|
*/
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
55
57
|
requested_fulfillment_service_id: null | any;
|
|
56
58
|
|
|
57
59
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EmailType } from '../../Enum/CommercialManagement';
|
|
2
|
+
import { ISociety } from './ISociety';
|
|
3
|
+
|
|
4
|
+
export interface ISaleEmail {
|
|
5
|
+
id?: number;
|
|
6
|
+
name: string;
|
|
7
|
+
subject: string;
|
|
8
|
+
content: string;
|
|
9
|
+
type: EmailType;
|
|
10
|
+
isDefault: boolean;
|
|
11
|
+
idSociety: number;
|
|
12
|
+
createdAt?: Date | null;
|
|
13
|
+
updatedAt?: Date | null;
|
|
14
|
+
|
|
15
|
+
// association
|
|
16
|
+
|
|
17
|
+
society?: ISociety
|
|
18
|
+
}
|
|
@@ -24,6 +24,7 @@ import { IUserBrand } from './IUserBrand';
|
|
|
24
24
|
import { ICollaboraterDetail } from './ICollaboraterDetail';
|
|
25
25
|
import { IUserTimeSlot } from './IUserTimeSlot';
|
|
26
26
|
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
27
28
|
type isAny<T> = T | any;
|
|
28
29
|
|
|
29
30
|
// users
|
package/ts/types/index.ts
CHANGED
|
@@ -338,6 +338,7 @@ export * from './Interface/models/ILoanEarlyRepayment';
|
|
|
338
338
|
export * from './Interface/models/IPrevisionalForm';
|
|
339
339
|
export * from './Interface/models/IHumanResourceLibrary';
|
|
340
340
|
export * from './Interface/models/IUserHumanResourceLibrary';
|
|
341
|
+
export * from './Interface/models/ISaleEmail';
|
|
341
342
|
|
|
342
343
|
|
|
343
344
|
// Schemas
|
|
@@ -1128,6 +1129,7 @@ export * from './Interface/api/previsionalForm/PrevisionalFormPayload';
|
|
|
1128
1129
|
export * from './Interface/api/previsionalForm/CreatePrevisionalForm';
|
|
1129
1130
|
export * from './Interface/api/toDoExpress/Query';
|
|
1130
1131
|
export * from './Interface/api/toDoExpress/Read';
|
|
1132
|
+
export * from './Interface/api/config/ConfigType';
|
|
1131
1133
|
export * from './Interface/api/card/OrganizeBalanceSheets';
|
|
1132
1134
|
|
|
1133
1135
|
|
package/ts/utils/brands.ts
CHANGED
|
@@ -145,6 +145,7 @@ export type Brand = {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
148
149
|
const allBrands = ['Legalstart', 'Comptalib', 'Clementine', 'Pourcentage', 'StatutsExpress', 'Anytime'] as const;
|
|
149
150
|
type BrandList = typeof allBrands[number];
|
|
150
151
|
|
|
@@ -212,6 +213,7 @@ const getAllBrandByNodeEnv = (nodeEnv?: string): Array<Brand> => {
|
|
|
212
213
|
|
|
213
214
|
const brand = currentConfigFile;
|
|
214
215
|
|
|
216
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
215
217
|
return brand;
|
|
216
218
|
};
|
|
217
219
|
|
|
@@ -275,9 +277,11 @@ const getBrandConfig = (params: GetBrandConfigParam): Brand => {
|
|
|
275
277
|
const brandDefault = currentConfigFile.find((b: Brand) => b.name === currentEnvName);
|
|
276
278
|
objectToReturn = getLodash(brandDefault, objectWaited);
|
|
277
279
|
}
|
|
280
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
278
281
|
return objectToReturn;
|
|
279
282
|
}
|
|
280
283
|
|
|
284
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
281
285
|
return brand;
|
|
282
286
|
};
|
|
283
287
|
|
|
@@ -299,6 +303,7 @@ const getSubBrandList = (nodeEnv?: string): Array<object> => {
|
|
|
299
303
|
// @ts-ignore
|
|
300
304
|
const currentConfigFile: brand[] = listEnvEnum[`Brand${currentEnvName}`];
|
|
301
305
|
|
|
306
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
302
307
|
return currentConfigFile;
|
|
303
308
|
};
|
|
304
309
|
|
package/ts/utils/checkup.ts
CHANGED
|
@@ -9,6 +9,7 @@ export const setRangeItems = (maxRange:number) => {
|
|
|
9
9
|
for (let i = 0; i < maxRange; i += 1) {
|
|
10
10
|
res.push({ text: i, value: i });
|
|
11
11
|
}
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
12
13
|
return res;
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -46,6 +47,7 @@ export const getCheckupDetailForm = (
|
|
|
46
47
|
component: 'FormInputSelect',
|
|
47
48
|
text: 'Combien de comptes bancaires avez-vous ?',
|
|
48
49
|
meta: {
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
49
51
|
items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
|
|
50
52
|
hideDetails: true,
|
|
51
53
|
},
|
|
@@ -183,6 +185,7 @@ export const getCheckupDetailForm = (
|
|
|
183
185
|
text: 'Votre structure a-t-elle des participations dans d\'autres sociétés ?',
|
|
184
186
|
value: 'interestOtherCompanies',
|
|
185
187
|
meta: {
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
186
189
|
items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
|
|
187
190
|
hideDetails: true,
|
|
188
191
|
},
|
|
@@ -476,6 +479,7 @@ export const getCheckupDetailForm = (
|
|
|
476
479
|
text: 'Existe-t-il des emprunts en cours ?',
|
|
477
480
|
value: 'isLoans',
|
|
478
481
|
meta: {
|
|
482
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
479
483
|
items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
|
|
480
484
|
hideDetails: true,
|
|
481
485
|
},
|
|
@@ -540,6 +544,7 @@ export const getCheckupDetailForm = (
|
|
|
540
544
|
text: 'Existe-t-il des emprunts en cours ?',
|
|
541
545
|
value: 'borrowingInProgress',
|
|
542
546
|
meta: {
|
|
547
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
543
548
|
items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
|
|
544
549
|
hideDetails: true,
|
|
545
550
|
},
|
|
@@ -21,7 +21,8 @@ import { thirdPartyToReadThirdPartyEditing } from './thirdParty';
|
|
|
21
21
|
import { getBrandConfig } from '../brands';
|
|
22
22
|
import { internationalizationChoices } from './internationalization/choices';
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
import ejs from 'ejs';
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
25
26
|
require('dayjs/locale/fr');
|
|
26
27
|
|
|
27
28
|
type brandColorType = {
|
|
@@ -109,7 +110,7 @@ export function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoic
|
|
|
109
110
|
?.label ?? null,
|
|
110
111
|
// @ts-ignore
|
|
111
112
|
brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,
|
|
112
|
-
brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv })}`,
|
|
113
|
+
brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv }) as unknown as string}`,
|
|
113
114
|
shouldHideBrandName,
|
|
114
115
|
paymentType: payload.paymentType,
|
|
115
116
|
languageTemplate: languageOption,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as dayjs from 'dayjs';
|
|
2
2
|
import { RecurrenceType } from '../../types/Enum/RecurrenceType';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import * as quarterOfYear from 'dayjs/plugin/quarterOfYear';
|
|
5
|
+
import * as isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
|
6
6
|
|
|
7
7
|
dayjs.extend(quarterOfYear);
|
|
8
8
|
dayjs.extend(isSameOrBefore);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { emailTemplateVariableAffiliatedData, intersection } from '../../types';
|
|
2
|
+
|
|
3
|
+
export type InfoToUseType = {
|
|
4
|
+
reference?: string;
|
|
5
|
+
totalIncludedAmount?: number;
|
|
6
|
+
societyName?: string;
|
|
7
|
+
company?: string | null;
|
|
8
|
+
fullname?: string | null;
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function transformModelWithCharcodeToString(datas: InfoToUseType, template: string): string {
|
|
13
|
+
// this regex match the carac with []
|
|
14
|
+
const reg = /\[(.*?)\]/g;
|
|
15
|
+
|
|
16
|
+
const charcodesFound = template.match(reg) ?? [];
|
|
17
|
+
const charcodesFoundWithoutBrackets: string[] = [];
|
|
18
|
+
charcodesFound?.forEach((f) => charcodesFoundWithoutBrackets.push(f.replace(/[\[\]']+/g, '')));
|
|
19
|
+
|
|
20
|
+
// we get the list of matching key template with key data
|
|
21
|
+
const charcodesDetected = emailTemplateVariableAffiliatedData.filter((data) => intersection(emailTemplateVariableAffiliatedData.map((d) => d.name), charcodesFoundWithoutBrackets).includes(data.name));
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
let newString = template;
|
|
25
|
+
charcodesDetected.forEach((char) => {
|
|
26
|
+
// we split the string just after the first occurence found, the first one will be replace by data
|
|
27
|
+
// and the last one will be paste at the end, to be used for the next loop.
|
|
28
|
+
const endOfString = newString.substring(newString.indexOf(']') + 1, newString.length);
|
|
29
|
+
const splitString = newString.substring(0, newString.indexOf(']') + 1);
|
|
30
|
+
|
|
31
|
+
let dataToInfer = datas[char.data[0]];
|
|
32
|
+
if (!dataToInfer && char.data.length > 1) {
|
|
33
|
+
dataToInfer = datas[char.data[1]];
|
|
34
|
+
}
|
|
35
|
+
// if we don't find an occurence in the first part, then it means that we have an unknow occurence and then we pass to the next one
|
|
36
|
+
if (splitString.indexOf(`[${char.name}]`) === -1) {
|
|
37
|
+
newString = splitString + endOfString.replace(`[${char.name}]`, `${dataToInfer}`);
|
|
38
|
+
} else {
|
|
39
|
+
newString = splitString.replace(`[${char.name}]`, `${dataToInfer}`) + endOfString;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return newString;
|
|
43
|
+
}
|
|
@@ -9,6 +9,7 @@ export function getAmount(amount: number | null, vatValue: number): number {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function getById(id: number): VatType | undefined {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
12
13
|
return Object.values(Vat).find((vat) => vat.id === id);
|
|
13
14
|
}
|
|
14
15
|
|
package/ts/utils/date.ts
CHANGED
|
@@ -20,10 +20,13 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
|
|
|
20
20
|
const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`;
|
|
21
21
|
|
|
22
22
|
// on cherche la bonne specialhour pour comparer les horaires
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
23
24
|
const hoursOfPeriod = hoursObject.filter((h) => (h.endTime && (dateToCompareStart - new Date(`${textDate} ${h.endTime}`).getTime() <= 0)) && (h.startTime && (dateToCompareEnd - new Date(`${textDate} ${h.startTime}`).getTime() >= 0)));
|
|
24
25
|
|
|
25
26
|
if (hoursOfPeriod?.length > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
26
28
|
const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
27
30
|
const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime();
|
|
28
31
|
|
|
29
32
|
// on check si les horaires de l'event sont dans les horaires du collab sinon on les fait commencer à l'heure à laquelle il s'est connecté
|
|
@@ -38,6 +41,7 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
|
|
|
38
41
|
id: i,
|
|
39
42
|
start: true,
|
|
40
43
|
end: false,
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
41
45
|
diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].startTime}`).getTime()),
|
|
42
46
|
});
|
|
43
47
|
// ajout de la différence entre la date de début de notre événement et la date de fin de notre période
|
|
@@ -45,6 +49,7 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
|
|
|
45
49
|
id: i,
|
|
46
50
|
start: false,
|
|
47
51
|
end: true,
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
48
53
|
diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].endTime}`).getTime()),
|
|
49
54
|
});
|
|
50
55
|
}
|
|
@@ -54,13 +59,17 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
|
|
|
54
59
|
// date de début event = date de début période
|
|
55
60
|
// date de fin event = date de début période + 1 heure
|
|
56
61
|
if (hoursDiff[0].start) {
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
57
63
|
res.dateStart = new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`);
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
58
65
|
res.dateEnd = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`).getTime() + 3600000);
|
|
59
66
|
// si proche de la date de fin :
|
|
60
67
|
// date de début event = date de fin période - 1 heure
|
|
61
68
|
// date de fin event = date de fin période
|
|
62
69
|
} else if (hoursDiff[0].end) {
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
63
71
|
res.dateStart = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`).getTime() - 3600000);
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
64
73
|
res.dateEnd = new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`);
|
|
65
74
|
}
|
|
66
75
|
}
|
package/ts/utils/decorators.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
1
3
|
import { isNode } from 'browser-or-node';
|
|
2
4
|
|
|
3
5
|
enum Library {
|
|
@@ -5,17 +7,16 @@ enum Library {
|
|
|
5
7
|
CLASS_TRANSFORMER = 'node_modules/class-transformer/cjs/index.js',
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
const retrieveDecorator = (library: Library, name: 'ApiPropertyOptional' | 'ApiProperty' | 'Type') => {
|
|
10
12
|
if (!isNode) {
|
|
11
13
|
return (target: any, key: string) => {};
|
|
12
14
|
}
|
|
13
15
|
try {
|
|
14
|
-
|
|
16
|
+
|
|
15
17
|
const path = require('path');
|
|
16
|
-
// eslint-disable-next-line global-require,import/no-dynamic-require
|
|
17
18
|
return require(path.resolve(process.cwd(), library))[name];
|
|
18
|
-
} catch
|
|
19
|
+
} catch {
|
|
19
20
|
return (target: any, key: string) => {};
|
|
20
21
|
}
|
|
21
22
|
};
|
package/ts/utils/email.ts
CHANGED
|
@@ -8,26 +8,42 @@ import { getBrandConfig, isItThisEnv } from './brands';
|
|
|
8
8
|
import { signatureTemplate } from './email/templates/signature';
|
|
9
9
|
import { intersection } from './noLodash';
|
|
10
10
|
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
11
12
|
const ejs = require('ejs');
|
|
12
13
|
|
|
13
14
|
function getRoleSignature(user:any) {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
14
16
|
if (user.positionLabel) return user.positionLabel;
|
|
15
17
|
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
16
19
|
const isStagiaireOrAlternant = user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
17
21
|
const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);
|
|
18
|
-
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
19
23
|
const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
20
25
|
const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
21
27
|
const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
22
29
|
const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
23
31
|
const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
24
33
|
const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
35
|
const isTermination = user.roles.map((r: any) => r.id).includes(Role.TERMINATION);
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
26
37
|
const isLitige = user.roles.map((r: any) => r.id).includes(Role.LITIGE);
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
27
39
|
const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
28
41
|
const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
29
43
|
const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
30
45
|
const isTechnicalAdvisor = user.roles.map((r: any) => r.id).includes(Role.TECHNICAL_ADVISOR);
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
31
47
|
const isFront = !!intersection(user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS]).length;
|
|
32
48
|
|
|
33
49
|
if (isSales && isManager) { return 'Responsable commercial'; }
|
|
@@ -128,12 +144,15 @@ function getMailSignature(user:any, idTypeBrand:number) {
|
|
|
128
144
|
objectWaited: 'listMails.bonjour',
|
|
129
145
|
}) as unknown as string;
|
|
130
146
|
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
131
148
|
if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) { return informatiqueMail; }
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
132
150
|
if (user && !!intersection(user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.COMMERCIAL, Role.TECHNICAL_ADVISOR]).length) return user.email;
|
|
133
151
|
return bonjourMail;
|
|
134
152
|
}
|
|
135
153
|
|
|
136
154
|
function getPhoneSignature(user:any) {
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
137
156
|
if (user.phone !== '0383931414') { return user.phone.replace(/\B(?=(\d{2})+(?!\d))/g, ' '); }
|
|
138
157
|
return null;
|
|
139
158
|
}
|
|
@@ -229,6 +248,7 @@ export function generateSignature(params: any): string {
|
|
|
229
248
|
};
|
|
230
249
|
mailSignature = dataOfficerMail;
|
|
231
250
|
roleSignature = '';
|
|
251
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
232
252
|
} else if (intersection((user?.roles ?? []).map((r: any) => r.id), [Role.FRONT_OFFICE, Role.SENIOR]).length === 2) { // Signature front senior
|
|
233
253
|
user = {
|
|
234
254
|
firstname: `L'équipe ${commercialName}`,
|
|
@@ -294,6 +314,7 @@ export function generateSignature(params: any): string {
|
|
|
294
314
|
user.calendlyUrl = `${urlApp}/appointment?uuid=${society?.externalId ? society.externalId : ''}&idType=${idType}`;
|
|
295
315
|
}
|
|
296
316
|
|
|
317
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
297
318
|
return ejs.render(signatureTemplate, {
|
|
298
319
|
forceRole,
|
|
299
320
|
isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,
|
package/ts/utils/isUrl.ts
CHANGED
package/ts/utils/noLodash.ts
CHANGED
|
@@ -21,6 +21,7 @@ export function intersection<T>(arr1: T[], arr2: T[]): T[] {
|
|
|
21
21
|
return [...set1].filter((element) => set2.has(element));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
24
25
|
export const difference = (arr1: any[], arr2: any[]) => arr1.filter((x) => !arr2.includes(x));
|
|
25
26
|
|
|
26
27
|
export const uniqBy = <T>(arr: T[], key: keyof T): T[] => {
|
|
@@ -28,6 +29,7 @@ export const uniqBy = <T>(arr: T[], key: keyof T): T[] => {
|
|
|
28
29
|
arr.reduce(
|
|
29
30
|
(map, item) => ({
|
|
30
31
|
...map,
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-base-to-string
|
|
31
33
|
[`${item[key]}`]: item,
|
|
32
34
|
}),
|
|
33
35
|
{},
|
|
@@ -45,6 +47,7 @@ export const sumBy = <T extends PropertyKey>(
|
|
|
45
47
|
// À contrôler
|
|
46
48
|
export const sortBy = (key: any, cb: (a: any, b: any) => any) => {
|
|
47
49
|
if (!cb) cb = () => 0;
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
48
51
|
return (a?: any, b?: any) => (a[key] > b[key]) ? 1
|
|
49
52
|
: ((b[key] > a[key]) ? -1 : cb(a, b));
|
|
50
53
|
};
|
|
@@ -52,6 +55,7 @@ export const sortBy = (key: any, cb: (a: any, b: any) => any) => {
|
|
|
52
55
|
// À contrôler
|
|
53
56
|
export const sortByDesc = (key: any, cb: (a: any, b: any) => any) => {
|
|
54
57
|
if (!cb) cb = () => 0;
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
55
59
|
return (b?: any, a?: any) => (a[key] > b[key]) ? 1
|
|
56
60
|
: ((b[key] > a[key]) ? -1 : cb(b, a));
|
|
57
61
|
};
|
|
@@ -96,8 +100,10 @@ export function getValue<
|
|
|
96
100
|
.split(/[.[\]]/)
|
|
97
101
|
.filter(Boolean)
|
|
98
102
|
.reduce<GetFieldType<TData, TPath>>(
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
99
104
|
(v, key) => (v as any)?.[key],
|
|
100
105
|
data as any,
|
|
101
106
|
);
|
|
102
|
-
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
108
|
+
return value !== undefined ? value : (defaultValue as any);
|
|
103
109
|
}
|
|
@@ -9,6 +9,7 @@ import { isValidObject } from './isValidObject';
|
|
|
9
9
|
* @param separator the string used to separate paths in keys
|
|
10
10
|
*/
|
|
11
11
|
export function flattenObject(object: any, separator = '.'): any {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
12
13
|
const walker = (child: { [key: string]: any }, path: Array<string> = []): any => Object.assign({}, ...Object.keys(child).map((key) => (isValidObject(child[key])
|
|
13
14
|
? walker(child[key], path.concat([key]))
|
|
14
15
|
: { [path.concat([key]).join(separator)]: child[key] })));
|
|
@@ -5,6 +5,7 @@ import { isValidObject } from './isValidObject';
|
|
|
5
5
|
* @param object the object to full flatten
|
|
6
6
|
*/
|
|
7
7
|
export function fullFlattenObject(object: any): any {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
8
9
|
const walker = (child: { [key: string]: any }): any => Object.assign({}, ...Object.keys(child).map((key: string) => (isValidObject(child[key])
|
|
9
10
|
? walker(child[key]) : { [key]: child[key] })));
|
|
10
11
|
|
package/ts/utils/payment.ts
CHANGED
|
@@ -96,13 +96,18 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
|
|
|
96
96
|
|
|
97
97
|
if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
// Si on est dans les 3 derniers jours du mois actuel,
|
|
100
|
+
// on ne le compte pas et on facture à partir du début de mois suivant
|
|
101
|
+
let initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 14 */
|
|
100
102
|
? dayjs().add(2, 'month').startOf('month').toDate()
|
|
101
103
|
: dayjs().add(1, 'month').startOf('month').toDate();
|
|
102
104
|
|
|
103
105
|
//Si date de reprise, alors on initialise à cette date
|
|
104
106
|
if (recoveryDate && dayjs(recoveryDate).isAfter(dayjs(), 'month')) {
|
|
105
107
|
initializedPaymentDate = dayjs(recoveryDate).startOf('month').toDate();
|
|
108
|
+
|
|
109
|
+
//Si jour de la date de reprise >= 14, alors on débute la facturation 1 mois plus tard
|
|
110
|
+
if (dayjs(initializedPaymentDate).date() >= 14) initializedPaymentDate = dayjs(initializedPaymentDate).add(1, 'month').startOf('month').toDate();
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
// On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC
|
|
@@ -153,8 +158,8 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
|
|
|
153
158
|
|
|
154
159
|
//On order les exercicePrestation par startDate ASC et id ASC
|
|
155
160
|
listPartialExercicePrestationExpress.sort((a, b) => {
|
|
156
|
-
const aStartDate = a?.startDate
|
|
157
|
-
const bStartDate = b?.startDate
|
|
161
|
+
const aStartDate = a?.startDate;
|
|
162
|
+
const bStartDate = b?.startDate;
|
|
158
163
|
return dayjs(aStartDate).diff(bStartDate);
|
|
159
164
|
});
|
|
160
165
|
|
package/ts/utils/phone.ts
CHANGED
|
@@ -22,6 +22,7 @@ export function formatPhoneNumberToE164(phoneNumber: string | null, prefix = '+3
|
|
|
22
22
|
export function getPhoneNumberWithoutPrefix(phoneNumber: string): string {
|
|
23
23
|
let number = phoneNumber;
|
|
24
24
|
// @ts-ignore
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
26
|
Object.keys(PhonePrefix).map((index) => PhonePrefix[index].prefix).forEach((prefix) => {
|
|
26
27
|
number = number.replace(prefix, '');
|
|
27
28
|
});
|
package/ts/utils/quotation.ts
CHANGED