@silexpert/core 1.1.34 → 1.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api/resources/AccountingFiles.d.ts +2 -1
- package/es/api/resources/AccountingFiles.d.ts.map +1 -1
- package/es/api/resources/AccountingFiles.js +3 -0
- package/es/api/resources/AccountingFiles.js.map +1 -1
- package/es/api/resources/Rule.d.ts +1 -0
- package/es/api/resources/Rule.d.ts.map +1 -1
- package/es/api/resources/Rule.js +3 -0
- package/es/api/resources/Rule.js.map +1 -1
- package/es/types/Enum/BrandLegalstart.js +20 -20
- package/es/types/Enum/BrandLegalstart.js.map +1 -1
- package/es/types/Enum/ConnectorType.d.ts +0 -1
- package/es/types/Enum/ConnectorType.d.ts.map +1 -1
- package/es/types/Enum/ConnectorType.js +1 -1
- package/es/types/Enum/ConnectorType.js.map +1 -1
- package/es/types/Enum/Unit.d.ts +2 -1
- package/es/types/Enum/Unit.d.ts.map +1 -1
- package/es/types/Enum/Unit.js +11 -0
- package/es/types/Enum/Unit.js.map +1 -1
- package/es/types/Interface/api/accountingFiles/Read.d.ts +6 -0
- package/es/types/Interface/api/accountingFiles/Read.d.ts.map +1 -0
- package/es/types/Interface/api/accountingFiles/Read.js +2 -0
- package/es/types/Interface/api/accountingFiles/Read.js.map +1 -0
- package/es/types/Interface/api/archive/ImportSocietyArchive.d.ts +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.d.ts.map +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.js +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.js.map +1 -1
- package/es/types/Interface/api/exercice/CreateExercice.d.ts +1 -0
- package/es/types/Interface/api/exercice/CreateExercice.d.ts.map +1 -1
- package/es/types/Interface/api/exercice/CreateExercice.js +7 -0
- package/es/types/Interface/api/exercice/CreateExercice.js.map +1 -1
- package/es/types/Interface/api/exercice/UpdateExercice.d.ts +1 -0
- package/es/types/Interface/api/exercice/UpdateExercice.d.ts.map +1 -1
- package/es/types/Interface/api/exercice/UpdateExercice.js +7 -0
- package/es/types/Interface/api/exercice/UpdateExercice.js.map +1 -1
- package/es/types/Interface/api/registration/ReadRegistration.d.ts +2 -2
- package/es/types/Interface/api/registration/ReadRegistration.d.ts.map +1 -1
- package/es/types/Interface/api/registration/ReadRegistration.js +2 -1
- package/es/types/Interface/api/registration/ReadRegistration.js.map +1 -1
- package/es/types/Interface/models/IAccountingEntry.d.ts +0 -2
- package/es/types/Interface/models/IAccountingEntry.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingEntry.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +1 -0
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +1 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/ISociety.d.ts +0 -2
- package/es/types/Interface/models/ISociety.d.ts.map +1 -1
- package/es/types/Interface/models/ISociety.js.map +1 -1
- package/es/types/Interface/models/ISupervision.d.ts +0 -4
- package/es/types/Interface/models/ISupervision.d.ts.map +1 -1
- package/es/types/Interface/models/ISupervision.js.map +1 -1
- package/es/types/index.d.ts +1 -20
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +1 -20
- package/es/types/index.js.map +1 -1
- package/es/utils/vat/3310/century23.d.ts.map +1 -1
- package/es/utils/vat/3310/century23.js +31 -31
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/es/utils/vat/3517/century23.d.ts.map +1 -1
- package/es/utils/vat/3517/century23.js +11 -11
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/es/utils/vat/utils.d.ts +1 -0
- package/es/utils/vat/utils.d.ts.map +1 -1
- package/es/utils/vat/utils.js +3 -0
- package/es/utils/vat/utils.js.map +1 -1
- package/js/api/resources/AccountingFiles.js +3 -0
- package/js/api/resources/AccountingFiles.js.map +1 -1
- package/js/api/resources/Rule.js +3 -0
- package/js/api/resources/Rule.js.map +1 -1
- package/js/types/Enum/BrandLegalstart.js +20 -20
- package/js/types/Enum/BrandLegalstart.js.map +1 -1
- package/js/types/Enum/ConnectorType.js +1 -1
- package/js/types/Enum/ConnectorType.js.map +1 -1
- package/js/types/Enum/Unit.js +10 -0
- package/js/types/Enum/Unit.js.map +1 -1
- package/js/types/Interface/{models/IFaq.js → api/accountingFiles/Read.js} +1 -1
- package/js/types/Interface/api/accountingFiles/Read.js.map +1 -0
- package/js/types/Interface/api/archive/ImportSocietyArchive.js +1 -1
- package/js/types/Interface/api/archive/ImportSocietyArchive.js.map +1 -1
- package/js/types/Interface/api/exercice/CreateExercice.js +1 -0
- package/js/types/Interface/api/exercice/CreateExercice.js.map +1 -1
- package/js/types/Interface/api/exercice/UpdateExercice.js +1 -0
- package/js/types/Interface/api/exercice/UpdateExercice.js.map +1 -1
- package/js/types/Interface/api/registration/ReadRegistration.js +2 -0
- package/js/types/Interface/api/registration/ReadRegistration.js.map +1 -1
- package/js/types/Interface/models/IAccountingEntry.js.map +1 -1
- package/js/types/Interface/models/IApiError.js +1 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/ISociety.js.map +1 -1
- package/js/types/Interface/models/ISupervision.js.map +1 -1
- package/js/types/index.js +34 -224
- package/js/types/index.js.map +1 -1
- package/js/utils/vat/3310/century23.js +25 -25
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/js/utils/vat/3517/century23.js +10 -10
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/js/utils/vat/utils.js +4 -0
- package/js/utils/vat/utils.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/AccountingFiles.ts +5 -1
- package/ts/api/resources/Rule.ts +4 -0
- package/ts/types/Enum/BrandLegalstart.ts +20 -20
- package/ts/types/Enum/ConnectorType.ts +1 -1
- package/ts/types/Enum/Unit.ts +11 -0
- package/ts/types/Interface/api/accountingFiles/Read.ts +6 -0
- package/ts/types/Interface/api/archive/ImportSocietyArchive.ts +1 -1
- package/ts/types/Interface/api/exercice/CreateExercice.ts +6 -0
- package/ts/types/Interface/api/exercice/UpdateExercice.ts +6 -0
- package/ts/types/Interface/api/registration/ReadRegistration.ts +4 -1
- package/ts/types/Interface/models/IAccountingEntry.ts +0 -2
- package/ts/types/Interface/models/IApiError.ts +1 -0
- package/ts/types/Interface/models/ISociety.ts +0 -2
- package/ts/types/Interface/models/ISupervision.ts +0 -4
- package/ts/types/index.ts +1 -20
- package/ts/utils/vat/3310/century23.ts +34 -32
- package/ts/utils/vat/3517/century23.ts +13 -11
- package/ts/utils/vat/utils.ts +4 -0
- package/es/types/Interface/models/IAccountingTransaction_new.d.ts +0 -18
- package/es/types/Interface/models/IAccountingTransaction_new.d.ts.map +0 -1
- package/es/types/Interface/models/IAccountingTransaction_new.js +0 -2
- package/es/types/Interface/models/IAccountingTransaction_new.js.map +0 -1
- package/es/types/Interface/models/IAutoLoginToken.d.ts +0 -10
- package/es/types/Interface/models/IAutoLoginToken.d.ts.map +0 -1
- package/es/types/Interface/models/IAutoLoginToken.js +0 -2
- package/es/types/Interface/models/IAutoLoginToken.js.map +0 -1
- package/es/types/Interface/models/IBankTransaction.d.ts +0 -34
- package/es/types/Interface/models/IBankTransaction.d.ts.map +0 -1
- package/es/types/Interface/models/IBankTransaction.js +0 -2
- package/es/types/Interface/models/IBankTransaction.js.map +0 -1
- package/es/types/Interface/models/ICallDirectly.d.ts +0 -26
- package/es/types/Interface/models/ICallDirectly.d.ts.map +0 -1
- package/es/types/Interface/models/ICallDirectly.js +0 -2
- package/es/types/Interface/models/ICallDirectly.js.map +0 -1
- package/es/types/Interface/models/IFaq.d.ts +0 -15
- package/es/types/Interface/models/IFaq.d.ts.map +0 -1
- package/es/types/Interface/models/IFaq.js +0 -2
- package/es/types/Interface/models/IFaq.js.map +0 -1
- package/es/types/Interface/models/IFaqCategory.d.ts +0 -5
- package/es/types/Interface/models/IFaqCategory.d.ts.map +0 -1
- package/es/types/Interface/models/IFaqCategory.js +0 -2
- package/es/types/Interface/models/IFaqCategory.js.map +0 -1
- package/es/types/Interface/models/IFollowedQualityMail.d.ts +0 -13
- package/es/types/Interface/models/IFollowedQualityMail.d.ts.map +0 -1
- package/es/types/Interface/models/IFollowedQualityMail.js +0 -2
- package/es/types/Interface/models/IFollowedQualityMail.js.map +0 -1
- package/es/types/Interface/models/IFollowedQualityMailType.d.ts +0 -7
- package/es/types/Interface/models/IFollowedQualityMailType.d.ts.map +0 -1
- package/es/types/Interface/models/IFollowedQualityMailType.js +0 -2
- package/es/types/Interface/models/IFollowedQualityMailType.js.map +0 -1
- package/es/types/Interface/models/IIdentification.d.ts +0 -18
- package/es/types/Interface/models/IIdentification.d.ts.map +0 -1
- package/es/types/Interface/models/IIdentification.js +0 -2
- package/es/types/Interface/models/IIdentification.js.map +0 -1
- package/es/types/Interface/models/IJob.d.ts +0 -12
- package/es/types/Interface/models/IJob.d.ts.map +0 -1
- package/es/types/Interface/models/IJob.js +0 -2
- package/es/types/Interface/models/IJob.js.map +0 -1
- package/es/types/Interface/models/IJobCategory.d.ts +0 -9
- package/es/types/Interface/models/IJobCategory.d.ts.map +0 -1
- package/es/types/Interface/models/IJobCategory.js +0 -2
- package/es/types/Interface/models/IJobCategory.js.map +0 -1
- package/es/types/Interface/models/IPenalty.d.ts +0 -27
- package/es/types/Interface/models/IPenalty.d.ts.map +0 -1
- package/es/types/Interface/models/IPenalty.js +0 -2
- package/es/types/Interface/models/IPenalty.js.map +0 -1
- package/es/types/Interface/models/IPenaltyType.d.ts +0 -7
- package/es/types/Interface/models/IPenaltyType.d.ts.map +0 -1
- package/es/types/Interface/models/IPenaltyType.js +0 -2
- package/es/types/Interface/models/IPenaltyType.js.map +0 -1
- package/es/types/Interface/models/ISuggestion.d.ts +0 -14
- package/es/types/Interface/models/ISuggestion.d.ts.map +0 -1
- package/es/types/Interface/models/ISuggestion.js +0 -2
- package/es/types/Interface/models/ISuggestion.js.map +0 -1
- package/es/types/Interface/models/ISupervisionJob.d.ts +0 -8
- package/es/types/Interface/models/ISupervisionJob.d.ts.map +0 -1
- package/es/types/Interface/models/ISupervisionJob.js +0 -2
- package/es/types/Interface/models/ISupervisionJob.js.map +0 -1
- package/es/types/Interface/models/ITmpValidationToken.d.ts +0 -11
- package/es/types/Interface/models/ITmpValidationToken.d.ts.map +0 -1
- package/es/types/Interface/models/ITmpValidationToken.js +0 -2
- package/es/types/Interface/models/ITmpValidationToken.js.map +0 -1
- package/es/types/Interface/models/IUserSocietyTicketSupport.d.ts +0 -9
- package/es/types/Interface/models/IUserSocietyTicketSupport.d.ts.map +0 -1
- package/es/types/Interface/models/IUserSocietyTicketSupport.js +0 -2
- package/es/types/Interface/models/IUserSocietyTicketSupport.js.map +0 -1
- package/es/types/Interface/models/IVatMargin.d.ts +0 -7
- package/es/types/Interface/models/IVatMargin.d.ts.map +0 -1
- package/es/types/Interface/models/IVatMargin.js +0 -2
- package/es/types/Interface/models/IVatMargin.js.map +0 -1
- package/es/types/Interface/models/IWebMailSpam.d.ts +0 -8
- package/es/types/Interface/models/IWebMailSpam.d.ts.map +0 -1
- package/es/types/Interface/models/IWebMailSpam.js +0 -2
- package/es/types/Interface/models/IWebMailSpam.js.map +0 -1
- package/es/types/Interface/models/IWebMailSpamType.d.ts +0 -7
- package/es/types/Interface/models/IWebMailSpamType.d.ts.map +0 -1
- package/es/types/Interface/models/IWebMailSpamType.js +0 -2
- package/es/types/Interface/models/IWebMailSpamType.js.map +0 -1
- package/js/types/Interface/models/IAccountingTransaction_new.js +0 -6
- package/js/types/Interface/models/IAccountingTransaction_new.js.map +0 -1
- package/js/types/Interface/models/IAutoLoginToken.js +0 -6
- package/js/types/Interface/models/IAutoLoginToken.js.map +0 -1
- package/js/types/Interface/models/IBankTransaction.js +0 -6
- package/js/types/Interface/models/IBankTransaction.js.map +0 -1
- package/js/types/Interface/models/ICallDirectly.js +0 -6
- package/js/types/Interface/models/ICallDirectly.js.map +0 -1
- package/js/types/Interface/models/IFaq.js.map +0 -1
- package/js/types/Interface/models/IFaqCategory.js +0 -6
- package/js/types/Interface/models/IFaqCategory.js.map +0 -1
- package/js/types/Interface/models/IFollowedQualityMail.js +0 -6
- package/js/types/Interface/models/IFollowedQualityMail.js.map +0 -1
- package/js/types/Interface/models/IFollowedQualityMailType.js +0 -6
- package/js/types/Interface/models/IFollowedQualityMailType.js.map +0 -1
- package/js/types/Interface/models/IIdentification.js +0 -6
- package/js/types/Interface/models/IIdentification.js.map +0 -1
- package/js/types/Interface/models/IJob.js +0 -6
- package/js/types/Interface/models/IJob.js.map +0 -1
- package/js/types/Interface/models/IJobCategory.js +0 -6
- package/js/types/Interface/models/IJobCategory.js.map +0 -1
- package/js/types/Interface/models/IPenalty.js +0 -6
- package/js/types/Interface/models/IPenalty.js.map +0 -1
- package/js/types/Interface/models/IPenaltyType.js +0 -6
- package/js/types/Interface/models/IPenaltyType.js.map +0 -1
- package/js/types/Interface/models/ISuggestion.js +0 -6
- package/js/types/Interface/models/ISuggestion.js.map +0 -1
- package/js/types/Interface/models/ISupervisionJob.js +0 -6
- package/js/types/Interface/models/ISupervisionJob.js.map +0 -1
- package/js/types/Interface/models/ITmpValidationToken.js +0 -6
- package/js/types/Interface/models/ITmpValidationToken.js.map +0 -1
- package/js/types/Interface/models/IUserSocietyTicketSupport.js +0 -6
- package/js/types/Interface/models/IUserSocietyTicketSupport.js.map +0 -1
- package/js/types/Interface/models/IVatMargin.js +0 -6
- package/js/types/Interface/models/IVatMargin.js.map +0 -1
- package/js/types/Interface/models/IWebMailSpam.js +0 -6
- package/js/types/Interface/models/IWebMailSpam.js.map +0 -1
- package/js/types/Interface/models/IWebMailSpamType.js +0 -6
- package/js/types/Interface/models/IWebMailSpamType.js.map +0 -1
- package/ts/types/Interface/models/IAccountingTransaction_new.ts +0 -20
- package/ts/types/Interface/models/IAutoLoginToken.ts +0 -10
- package/ts/types/Interface/models/IBankTransaction.ts +0 -37
- package/ts/types/Interface/models/ICallDirectly.ts +0 -29
- package/ts/types/Interface/models/IFaq.ts +0 -18
- package/ts/types/Interface/models/IFaqCategory.ts +0 -5
- package/ts/types/Interface/models/IFollowedQualityMail.ts +0 -16
- package/ts/types/Interface/models/IFollowedQualityMailType.ts +0 -7
- package/ts/types/Interface/models/IIdentification.ts +0 -21
- package/ts/types/Interface/models/IJob.ts +0 -15
- package/ts/types/Interface/models/IJobCategory.ts +0 -12
- package/ts/types/Interface/models/IPenalty.ts +0 -30
- package/ts/types/Interface/models/IPenaltyType.ts +0 -7
- package/ts/types/Interface/models/ISuggestion.ts +0 -17
- package/ts/types/Interface/models/ISupervisionJob.ts +0 -8
- package/ts/types/Interface/models/ITmpValidationToken.ts +0 -14
- package/ts/types/Interface/models/IUserSocietyTicketSupport.ts +0 -9
- package/ts/types/Interface/models/IVatMargin.ts +0 -7
- package/ts/types/Interface/models/IWebMailSpam.ts +0 -8
- package/ts/types/Interface/models/IWebMailSpamType.ts +0 -7
|
@@ -49,49 +49,49 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
49
49
|
// Opérations taxées
|
|
50
50
|
const taxedServicesEntries = vatEntries.filter(ae => frenchVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
51
51
|
const servicesAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
52
|
-
const taxedServicesFromFrance = (0, _utils.getAmountByAccountNumber)(taxedServicesEntries, servicesAccounts, 0, true);
|
|
53
|
-
const taxedOther = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withTaxVat.includes(ae.idVat)), ['775'], 0, true);
|
|
52
|
+
const taxedServicesFromFrance = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedServicesEntries, servicesAccounts, 0, true));
|
|
53
|
+
const taxedOther = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withTaxVat.includes(ae.idVat)), ['775'], 0, true));
|
|
54
54
|
const intracommunityServiceAccounts = ['604', '611', '612', '613', '614', '615', '616', '617', '618', '619', '62'];
|
|
55
55
|
const intracommunityServiceEntries = vatEntries.filter(ae => withTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat));
|
|
56
|
-
const taxedPurchaseOfIntracommunityService = (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries, intracommunityServiceAccounts, 0, true);
|
|
56
|
+
const taxedPurchaseOfIntracommunityService = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries, intracommunityServiceAccounts, 0, true));
|
|
57
57
|
const taxedImportEntries = vatEntries.filter(ae => importationVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
58
58
|
const taxedImportAccounts = ['6'];
|
|
59
|
-
const taxedImport = (0, _utils.getAmountByAccountNumber)(taxedImportEntries, taxedImportAccounts, 0, true);
|
|
60
|
-
const taxedIntracommunityAcquisitions = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true);
|
|
59
|
+
const taxedImport = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries, taxedImportAccounts, 0, true));
|
|
60
|
+
const taxedIntracommunityAcquisitions = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true));
|
|
61
61
|
// Opérations non taxées
|
|
62
|
-
const untaxedExportationNotInEurope = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true);
|
|
63
|
-
const untaxedOther = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true);
|
|
64
|
-
const untaxedImport = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0, true);
|
|
65
|
-
const untaxedIntracomunity = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true);
|
|
66
|
-
const untaxedIntracommunityDelivery = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true);
|
|
62
|
+
const untaxedExportationNotInEurope = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
|
|
63
|
+
const untaxedOther = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true));
|
|
64
|
+
const untaxedImport = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0, true));
|
|
65
|
+
const untaxedIntracomunity = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true));
|
|
66
|
+
const untaxedIntracommunityDelivery = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
|
|
67
67
|
// TVA brute
|
|
68
|
-
const normalRate = (0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 20).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 20).map(v => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
68
|
+
const normalRate = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 20).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 20).map(v => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
69
69
|
const normalRateTax = (0, _lodash.round)(normalRate * 0.2);
|
|
70
|
-
const reducedRate5Dot5 = (0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 5.5).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 5.5).map(v => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
70
|
+
const reducedRate5Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 5.5).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 5.5).map(v => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
71
71
|
const reducedRate5Dot5Tax = (0, _lodash.round)(reducedRate5Dot5 * 0.055);
|
|
72
|
-
const reducedRate10 = (0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 10).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 10).map(v => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
72
|
+
const reducedRate10 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 10).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 10).map(v => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
73
73
|
const reducedRate10Tax = (0, _lodash.round)(reducedRate10 * 0.1);
|
|
74
|
-
const reducedRate8Dot5 = (0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 8.5).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 8.5).map(v => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
74
|
+
const reducedRate8Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 8.5).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 8.5).map(v => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
75
75
|
const reducedRate8Dot5Tax = (0, _lodash.round)(reducedRate8Dot5 * 0.085);
|
|
76
|
-
const reducedRate2Dot1 = (0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 2.1).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 2.1).map(v => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
76
|
+
const reducedRate2Dot1 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedServicesEntries.filter(e => vats.filter(v => v.value === 2.1).map(v => v.id).includes(e.idVat)), servicesAccounts, 0, true) + (0, _utils.getAmountByAccountNumber)(intracommunityServiceEntries.filter(e => vats.filter(v => v.value === 2.1).map(v => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
77
77
|
const reducedRate2Dot1Tax = (0, _lodash.round)(reducedRate2Dot1 * 0.021);
|
|
78
|
-
const importNormalRate = (0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 20).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
78
|
+
const importNormalRate = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 20).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
79
79
|
const importNormalRateTax = (0, _lodash.round)(importNormalRate * 0.2);
|
|
80
|
-
const importReducedRate10 = (0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 10).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
80
|
+
const importReducedRate10 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 10).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
81
81
|
const importReducedRate10Tax = (0, _lodash.round)(importReducedRate10 * 0.1);
|
|
82
|
-
const importReducedRate8Dot5 = (0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 8.5).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
82
|
+
const importReducedRate8Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 8.5).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
83
83
|
const importReducedRate8Dot5Tax = (0, _lodash.round)(importReducedRate8Dot5 * 0.085);
|
|
84
|
-
const importReducedRate5Dot5 = (0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 5.5).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
84
|
+
const importReducedRate5Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 5.5).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
85
85
|
const importReducedRate5Dot5Tax = (0, _lodash.round)(importReducedRate8Dot5 * 0.055);
|
|
86
|
-
const importReducedRate2Dot1 = (0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 2.1).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
86
|
+
const importReducedRate2Dot1 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 2.1).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
87
87
|
const importReducedRate2Dot1Tax = (0, _lodash.round)(importReducedRate2Dot1 * 0.021);
|
|
88
|
-
const importReducedRate1Dot05 = (0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 1.05).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
88
|
+
const importReducedRate1Dot05 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries.filter(e => vats.filter(v => v.value === 1.05).map(v => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
89
89
|
const importReducedRate1Dot05Tax = (0, _lodash.round)(importReducedRate1Dot05 * 0.0105);
|
|
90
|
-
const intracommunityTax = (0, _utils.getTaxAmountByAccountNumber)(intracommunityServiceEntries, intracommunityServiceAccounts);
|
|
90
|
+
const intracommunityTax = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(intracommunityServiceEntries, intracommunityServiceAccounts));
|
|
91
91
|
// TVA Déductible
|
|
92
|
-
const immobilizationTax = (0, _utils.getTaxAmountByAccountNumber)(vatEntries, ['2']);
|
|
93
|
-
const otherGoodsAndServices = (0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(e => vats.filter(v => !v.isVatImportation).map(v => v.id).includes(e.idVat)), ['6']);
|
|
94
|
-
const otherDeductibles = (0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(e => vats.filter(v => v.isVatImportation).map(v => v.id).includes(e.idVat)), ['6']);
|
|
92
|
+
const immobilizationTax = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries, ['2']));
|
|
93
|
+
const otherGoodsAndServices = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(e => vats.filter(v => !v.isVatImportation).map(v => v.id).includes(e.idVat)), ['6']));
|
|
94
|
+
const otherDeductibles = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(e => vats.filter(v => v.isVatImportation).map(v => v.id).includes(e.idVat)), ['6']));
|
|
95
95
|
const report = (_d = (_c = (_b = payload.previousVatDeclaration) === null || _b === void 0 ? void 0 : _b.credit) === null || _c === void 0 ? void 0 : _c.toReport) !== null && _d !== void 0 ? _d : 0;
|
|
96
96
|
const coefficient = (0, _lodash.round)((_g = (_f = (_e = payload.vat) === null || _e === void 0 ? void 0 : _e.deductible) === null || _f === void 0 ? void 0 : _f.coefficient) !== null && _g !== void 0 ? _g : 100, 2);
|
|
97
97
|
const isNil = payload.isNil === true;
|