@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
package/ts/utils/social.ts
CHANGED
|
@@ -7,7 +7,7 @@ const diffHours = (start: Date, end: Date): number => {
|
|
|
7
7
|
export function getBusinessDatesCount(startDate: Date, endDate: Date): number {
|
|
8
8
|
const day = startDate;
|
|
9
9
|
let businessDays = 0;
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
while (day <= endDate) {
|
|
12
12
|
if (day.getDay() !== 0 && day.getDay() !== 6) {
|
|
13
13
|
if (diffHours(day, endDate) <= 4) {
|
|
@@ -110,12 +110,12 @@ export const creaEIMicro = {
|
|
|
110
110
|
export const offers = [justCreation, creaEIMicro, justStatuts, creaSociete];
|
|
111
111
|
|
|
112
112
|
export const getStatutsAmount = (idLegalForm: LegalFormTypeEnum, idPrestationList: PrestationType): number => {
|
|
113
|
-
const offer = offers.find((e) => e.id === idPrestationList)
|
|
113
|
+
const offer = offers.find((e) => e.id === idPrestationList);
|
|
114
114
|
|
|
115
|
-
const price =
|
|
116
|
-
typeof offer
|
|
115
|
+
const price: number =
|
|
116
|
+
typeof offer?.price === 'object'
|
|
117
117
|
? offer.price[idLegalForm]
|
|
118
|
-
: offer
|
|
118
|
+
: offer?.price || 0;
|
|
119
119
|
|
|
120
120
|
return price +
|
|
121
121
|
legalNoticesCosts[idLegalForm] +
|
|
@@ -103,7 +103,7 @@ describe('Payment', () => {
|
|
|
103
103
|
// logical
|
|
104
104
|
// =====================
|
|
105
105
|
// express
|
|
106
|
-
test('if only one express, monthly payments of actual exo should be in parallel of express monthly payments, smoothed in number of remaining months (mini 3 months) (if not in 3 last month)',
|
|
106
|
+
test('if only one express, monthly payments of actual exo should be in parallel of express monthly payments, smoothed in number of remaining months (mini 3 months) (if not in 3 last month)', () => {
|
|
107
107
|
const payments = calculatePaymentsAuto({
|
|
108
108
|
idTypeBrand: 1,
|
|
109
109
|
firstExerciceNonExpresssEndDate,
|
|
@@ -121,7 +121,7 @@ describe('Payment', () => {
|
|
|
121
121
|
const firstNonExpressDatePayment = payments.filter(p => dayjs(p.closingDate).diff(firstExerciceNonExpresssEndDate) === 0)[0].datePayment;
|
|
122
122
|
expect(dayjs(firstNonExpressDatePayment).diff(firstExpressDatePayment, 'month')).toStrictEqual(0);
|
|
123
123
|
});
|
|
124
|
-
test('if more than one express, monthly payments of actual exo should be in a row of express monthly payments and smoothed, smoothed in number of remaining months after express monthly payments (mini 3 months) (if in 3 last month of exercice)',
|
|
124
|
+
test('if more than one express, monthly payments of actual exo should be in a row of express monthly payments and smoothed, smoothed in number of remaining months after express monthly payments (mini 3 months) (if in 3 last month of exercice)', () => {
|
|
125
125
|
const payments = calculatePaymentsAuto({
|
|
126
126
|
idTypeBrand: 1,
|
|
127
127
|
firstExerciceNonExpresssEndDate,
|
|
@@ -140,7 +140,7 @@ describe('Payment', () => {
|
|
|
140
140
|
expect(dayjs(firstNonExpressDatePayment).diff(lastExpressDatePayment, 'month')).toStrictEqual(1);
|
|
141
141
|
});
|
|
142
142
|
// non express
|
|
143
|
-
test('should return a number of payments equal to nb of remaining months in exercice (if not in 3 last months)',
|
|
143
|
+
test('should return a number of payments equal to nb of remaining months in exercice (if not in 3 last months)', () => {
|
|
144
144
|
const mockedDate = dayjs('2024-05-15').toDate();
|
|
145
145
|
MockDate.set(mockedDate);
|
|
146
146
|
|
|
@@ -169,7 +169,7 @@ describe('Payment', () => {
|
|
|
169
169
|
|
|
170
170
|
MockDate.reset();
|
|
171
171
|
});
|
|
172
|
-
test('should return a number of payments equal to 3 (if in 3 last month of exercice)',
|
|
172
|
+
test('should return a number of payments equal to 3 (if in 3 last month of exercice)', () => {
|
|
173
173
|
const nbMonthDelay = 1;
|
|
174
174
|
const newFirstExerciceNonExpresssEndDate = dayjs().add(nbMonthDelay, 'month').endOf('month').toDate();
|
|
175
175
|
|
|
@@ -192,7 +192,7 @@ describe('Payment', () => {
|
|
|
192
192
|
const listNonExpressPayments = payments.filter(p => dayjs(p.closingDate).diff(newFirstExerciceNonExpresssEndDate) === 0);
|
|
193
193
|
expect(listNonExpressPayments.length).toStrictEqual(1 + 3); //On ajoute 1 pour les frais de dossier
|
|
194
194
|
});
|
|
195
|
-
test('should (yearlyAmountNonExpress - sum of listRegulations) / count of monthly payments be equal to monthly payment amount (if not in 3 last month)',
|
|
195
|
+
test('should (yearlyAmountNonExpress - sum of listRegulations) / count of monthly payments be equal to monthly payment amount (if not in 3 last month)', () => {
|
|
196
196
|
const mockedDate = dayjs('2024-05-15').toDate();
|
|
197
197
|
MockDate.set(mockedDate);
|
|
198
198
|
|
|
@@ -222,7 +222,7 @@ describe('Payment', () => {
|
|
|
222
222
|
|
|
223
223
|
MockDate.reset();
|
|
224
224
|
});
|
|
225
|
-
test('should (totalAmount - firstPaymentAmount) / 3 be equal to monthly payment amount (if in 3 last month of exercice)',
|
|
225
|
+
test('should (totalAmount - firstPaymentAmount) / 3 be equal to monthly payment amount (if in 3 last month of exercice)', () => {
|
|
226
226
|
const nbMonthDelay = 1;
|
|
227
227
|
const newFirstExerciceNonExpresssEndDate = dayjs().add(nbMonthDelay, 'month').endOf('month').toDate();
|
|
228
228
|
const newListRegulations = [{
|
|
@@ -248,7 +248,7 @@ describe('Payment', () => {
|
|
|
248
248
|
expect(payments[1].amount).toStrictEqual(amount);
|
|
249
249
|
});
|
|
250
250
|
// annual price increase
|
|
251
|
-
test('should apply annual price increase (2,75%) if signed before last 3 months of civil year',
|
|
251
|
+
test('should apply annual price increase (2,75%) if signed before last 3 months of civil year', () => {
|
|
252
252
|
const mockedDate = dayjs('2024-08-15').toDate();
|
|
253
253
|
MockDate.set(mockedDate);
|
|
254
254
|
|
|
@@ -276,7 +276,7 @@ describe('Payment', () => {
|
|
|
276
276
|
|
|
277
277
|
MockDate.reset();
|
|
278
278
|
});
|
|
279
|
-
test('should not apply annual price increase (2,75%) if signed in last 3 months of civil year',
|
|
279
|
+
test('should not apply annual price increase (2,75%) if signed in last 3 months of civil year', () => {
|
|
280
280
|
const mockedDate = dayjs('2024-11-15').toDate();
|
|
281
281
|
MockDate.set(mockedDate);
|
|
282
282
|
|
|
@@ -304,7 +304,7 @@ describe('Payment', () => {
|
|
|
304
304
|
MockDate.reset();
|
|
305
305
|
});
|
|
306
306
|
|
|
307
|
-
test('should apply 14,9€ HT increase for the second exercice created (only offered on first exo) (no rules for 3 last months)',
|
|
307
|
+
test('should apply 14,9€ HT increase for the second exercice created (only offered on first exo) (no rules for 3 last months)', () => {
|
|
308
308
|
const mockedDate = dayjs('2024-06-15').toDate();
|
|
309
309
|
MockDate.set(mockedDate);
|
|
310
310
|
|
|
@@ -334,7 +334,7 @@ describe('Payment', () => {
|
|
|
334
334
|
});
|
|
335
335
|
|
|
336
336
|
// misc
|
|
337
|
-
test('should payments been generated sorted by exercices start date',
|
|
337
|
+
test('should payments been generated sorted by exercices start date', () => {
|
|
338
338
|
const listPartialExercicePrestationExpressCloned = [...listPartialExercicePrestationExpress];
|
|
339
339
|
listPartialExercicePrestationExpressCloned[0] = {
|
|
340
340
|
...listPartialExercicePrestationExpress[0],
|
|
@@ -359,7 +359,7 @@ describe('Payment', () => {
|
|
|
359
359
|
expect(payments.length).toBeGreaterThanOrEqual(4);
|
|
360
360
|
expect(dayjs(payments[payments.length - 1].datePayment).diff(dayjs(payments?.[0]?.datePayment), 'month')).toBeGreaterThan(0);
|
|
361
361
|
});
|
|
362
|
-
test('if regulations are bigger than sum exercice prestation amounts, should pass some exercice payments',
|
|
362
|
+
test('if regulations are bigger than sum exercice prestation amounts, should pass some exercice payments', () => {
|
|
363
363
|
const mockedDate = dayjs('2024-03-15').toDate();
|
|
364
364
|
MockDate.set(mockedDate);
|
|
365
365
|
|
|
@@ -397,7 +397,7 @@ describe('Payment', () => {
|
|
|
397
397
|
});
|
|
398
398
|
MockDate.reset();
|
|
399
399
|
});
|
|
400
|
-
test('should not consider actual month if signed in last 3 days of month',
|
|
400
|
+
test('should not consider actual month if signed in last 3 days of month', () => {
|
|
401
401
|
const mockedDate = dayjs('2024-03-29').toDate();
|
|
402
402
|
MockDate.set(mockedDate);
|
|
403
403
|
|
|
@@ -417,7 +417,7 @@ describe('Payment', () => {
|
|
|
417
417
|
expect(payments?.[1]?.datePayment).toStrictEqual(dayjs().add(2, 'month').startOf('month').toDate());
|
|
418
418
|
MockDate.reset();
|
|
419
419
|
});
|
|
420
|
-
test('last payment returned should be last of a year (12/XX)',
|
|
420
|
+
test('last payment returned should be last of a year (12/XX)', () => {
|
|
421
421
|
const mockedDate = dayjs('2024-03-29').toDate();
|
|
422
422
|
MockDate.set(mockedDate);
|
|
423
423
|
|
|
@@ -436,7 +436,7 @@ describe('Payment', () => {
|
|
|
436
436
|
expect(payments.length).toBeGreaterThanOrEqual(4);
|
|
437
437
|
expect(dayjs(payments[payments.length - 1].datePayment).month()).toStrictEqual(11);
|
|
438
438
|
});
|
|
439
|
-
test('first payment and last payment should have at least one year difference (ex. : 23 - 24)',
|
|
439
|
+
test('first payment and last payment should have at least one year difference (ex. : 23 - 24)', () => {
|
|
440
440
|
const payments = calculatePaymentsAuto({
|
|
441
441
|
idTypeBrand: 1,
|
|
442
442
|
firstExerciceNonExpresssEndDate,
|
|
@@ -451,7 +451,7 @@ describe('Payment', () => {
|
|
|
451
451
|
nextYearlyAmountNonExpress });
|
|
452
452
|
expect(dayjs(payments.slice(-1)?.[0]?.datePayment).diff(dayjs(payments?.[0]?.datePayment), 'year', true)).toBeGreaterThan(1);
|
|
453
453
|
});
|
|
454
|
-
test('real case : idSociety 114440',
|
|
454
|
+
test('real case : idSociety 114440', () => {
|
|
455
455
|
const payments = calculatePaymentsAuto({
|
|
456
456
|
idTypeBrand: 1,
|
|
457
457
|
firstExerciceNonExpresssEndDate: dayjs('2024-12-31').toDate(),
|
|
@@ -21,10 +21,15 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
21
21
|
// On désactive les automatismes des déclarations précédentes dans le contrôle de TVA
|
|
22
22
|
if (isVatControl) payload.previousVatDeclaration = null;
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
24
25
|
const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
27
|
const withTaxVat = vats.filter((v) => v.value > 0).map((v) => v.id);
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
26
29
|
const intracomVat = vats.filter((v) => v.isVatIntracom && !v.isVatImportation).map((v) => v.id);
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
27
31
|
const withoutTaxVat = vats.filter((v) => v.value === 0).map((v) => v.id);
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
28
33
|
const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
29
34
|
|
|
30
35
|
const vatEntries = uniqBy(accountingEntries.filter((ae) => typeof ae.idVat === 'number'), 'id') as Array<IAccountingEntry & { idVat: number }>;
|
|
@@ -75,44 +80,63 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
75
80
|
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true)) + (payload?.vatControl?.untaxed?.intracomunity ?? 0);
|
|
76
81
|
const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
|
|
77
82
|
// TVA brute
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
78
84
|
const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
79
86
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base20 ?? 0) + (payload?.vatControl?.other?.base20 ?? 0);
|
|
80
87
|
|
|
81
88
|
const normalRateTax = _round(normalRate * 0.2);
|
|
82
89
|
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
83
91
|
const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
84
93
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base5Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
|
|
85
94
|
const reducedRate5Dot5Tax = _round(reducedRate5Dot5 * 0.055);
|
|
86
95
|
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
87
97
|
const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
88
99
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base10 ?? 0) + (payload?.vatControl?.other?.base10 ?? 0);
|
|
89
100
|
const reducedRate10Tax = _round(reducedRate10 * 0.1);
|
|
90
101
|
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
91
103
|
const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
92
105
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base8Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
|
|
93
106
|
const reducedRate8Dot5Tax = _round(reducedRate8Dot5 * 0.085);
|
|
94
107
|
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
95
109
|
const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
96
111
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base2Dot1 ?? 0) + (payload?.vatControl?.other?.base2Dot1 ?? 0);
|
|
97
112
|
const reducedRate2Dot1Tax = _round(reducedRate2Dot1 * 0.021);
|
|
98
113
|
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
99
115
|
const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base20 ?? 0);
|
|
116
|
+
|
|
100
117
|
const importNormalRateTax = _round(importNormalRate * 0.2);
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
101
119
|
const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base10 ?? 0);
|
|
102
120
|
const importReducedRate10Tax = _round(importReducedRate10 * 0.1);
|
|
121
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
103
122
|
const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base8Dot5 ?? 0);
|
|
104
123
|
const importReducedRate8Dot5Tax = _round(importReducedRate8Dot5 * 0.085);
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
105
125
|
const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base5Dot5 ?? 0);
|
|
106
126
|
const importReducedRate5Dot5Tax = _round(importReducedRate8Dot5 * 0.055);
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
107
128
|
const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base2Dot1 ?? 0);
|
|
108
129
|
const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
109
131
|
const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
110
132
|
const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
|
|
111
133
|
const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
|
|
112
134
|
|
|
113
135
|
// TVA Déductible
|
|
114
136
|
const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2'])) + (payload?.vatControl?.deducted?.immobilization ?? 0);
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
115
138
|
const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
116
140
|
const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
|
|
117
141
|
|
|
118
142
|
const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport >= 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
|
|
@@ -21,10 +21,15 @@ export function getCerfa3310Century24Payload(accountingEntries: IAccountingEntry
|
|
|
21
21
|
// On désactive les automatismes des déclarations précédentes dans le contrôle de TVA
|
|
22
22
|
if (isVatControl) payload.previousVatDeclaration = null;
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
24
25
|
const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
27
|
const withTaxVat = vats.filter((v) => v.value > 0).map((v) => v.id);
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
26
29
|
const intracomVat = vats.filter((v) => v.isVatIntracom && !v.isVatImportation).map((v) => v.id);
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
27
31
|
const withoutTaxVat = vats.filter((v) => v.value === 0).map((v) => v.id);
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
28
33
|
const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
29
34
|
|
|
30
35
|
const vatEntries = uniqBy(accountingEntries.filter((ae) => typeof ae.idVat === 'number'), 'id') as Array<IAccountingEntry & { idVat: number }>;
|
|
@@ -75,44 +80,62 @@ export function getCerfa3310Century24Payload(accountingEntries: IAccountingEntry
|
|
|
75
80
|
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true)) + (payload?.vatControl?.untaxed?.intracomunity ?? 0);
|
|
76
81
|
const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
|
|
77
82
|
// TVA brute
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
78
84
|
const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
79
86
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base20 ?? 0) + (payload?.vatControl?.other?.base20 ?? 0);
|
|
80
87
|
|
|
81
88
|
const normalRateTax = _round(normalRate * 0.2);
|
|
82
89
|
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
83
91
|
const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
84
93
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base5Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
|
|
85
94
|
const reducedRate5Dot5Tax = _round(reducedRate5Dot5 * 0.055);
|
|
86
95
|
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
87
97
|
const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
88
99
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base10 ?? 0) + (payload?.vatControl?.other?.base10 ?? 0);
|
|
89
100
|
const reducedRate10Tax = _round(reducedRate10 * 0.1);
|
|
90
101
|
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
91
103
|
const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
92
105
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base8Dot5 ?? 0) + (payload?.vatControl?.other?.base5Dot5 ?? 0);
|
|
93
106
|
const reducedRate8Dot5Tax = _round(reducedRate8Dot5 * 0.085);
|
|
94
107
|
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
95
109
|
const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
96
111
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + (payload?.vatControl?.france?.base2Dot1 ?? 0) + (payload?.vatControl?.other?.base2Dot1 ?? 0);
|
|
97
112
|
const reducedRate2Dot1Tax = _round(reducedRate2Dot1 * 0.021);
|
|
98
113
|
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
99
115
|
const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base20 ?? 0);
|
|
100
116
|
const importNormalRateTax = _round(importNormalRate * 0.2);
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
101
118
|
const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base10 ?? 0);
|
|
102
119
|
const importReducedRate10Tax = _round(importReducedRate10 * 0.1);
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
103
121
|
const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base8Dot5 ?? 0);
|
|
104
122
|
const importReducedRate8Dot5Tax = _round(importReducedRate8Dot5 * 0.085);
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
105
124
|
const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base5Dot5 ?? 0);
|
|
106
125
|
const importReducedRate5Dot5Tax = _round(importReducedRate8Dot5 * 0.055);
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
107
127
|
const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + (payload?.vatControl?.importations?.base2Dot1 ?? 0);
|
|
108
128
|
const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
109
130
|
const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
110
131
|
const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
|
|
111
132
|
const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
|
|
112
133
|
|
|
113
134
|
// TVA Déductible
|
|
114
135
|
const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2'])) + (payload?.vatControl?.deducted?.immobilization ?? 0);
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
115
137
|
const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
116
139
|
const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
|
|
117
140
|
|
|
118
141
|
const report = (isDefined(payload.vat?.deductible?.toReport) && payload.vat?.deductible?.toReport >= 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
|
|
@@ -19,9 +19,13 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
|
|
|
19
19
|
|
|
20
20
|
const vatEntries = uniqBy(accountingEntries.filter((ae) => typeof ae.idVat === 'number'), 'id') as Array<IAccountingEntry & { idVat: number }>;
|
|
21
21
|
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
22
23
|
const withoutTaxVat = vats.filter((v) => v.value === 0).map((v) => v.id);
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
23
25
|
const intracomVat = vats.filter((v) => v.isVatIntracom && !v.isVatImportation).map((v) => v.id);
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
24
27
|
const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
29
|
const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
26
30
|
|
|
27
31
|
const untaxedOperationBuy = 0; // FIXME: "TOTAL COMPTE" sur CDC
|
|
@@ -136,7 +136,6 @@ export function getTypeAndAmountFromRegistration(registration: IRegistration): {
|
|
|
136
136
|
if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };
|
|
137
137
|
return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };
|
|
138
138
|
} if (registration.idCerfaType === CerfaType.CERFA_3514) {
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
140
139
|
const payload = registration.payload.cerfa3514 as Cerfa3514_2022;
|
|
141
140
|
const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };
|
|
142
141
|
if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };
|