@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
|
@@ -26,18 +26,18 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
26
26
|
const frenchVat = vats.filter(v => !v.isVatImportation && !v.isVatIntracom).map(v => v.id);
|
|
27
27
|
const importationVat = vats.filter(v => v.isVatImportation && !v.isVatIntracom).map(v => v.id);
|
|
28
28
|
const taxedOperationsAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
29
|
-
const vatNormalRate20 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_20.id), taxedOperationsAccounts, 0, true);
|
|
30
|
-
const vatReducedRate5Dot5 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_5_5.id), taxedOperationsAccounts, 0, true);
|
|
31
|
-
const vatReducedRate10 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_10.id), taxedOperationsAccounts, 0, true);
|
|
32
|
-
const vatReducedRate8Dot5 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_8_5.id), taxedOperationsAccounts, 0, true);
|
|
33
|
-
const vatReducedRate2Dot1 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_2_1.id), taxedOperationsAccounts, 0, true);
|
|
29
|
+
const vatNormalRate20 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_20.id), taxedOperationsAccounts, 0, true));
|
|
30
|
+
const vatReducedRate5Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_5_5.id), taxedOperationsAccounts, 0, true));
|
|
31
|
+
const vatReducedRate10 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_10.id), taxedOperationsAccounts, 0, true));
|
|
32
|
+
const vatReducedRate8Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_8_5.id), taxedOperationsAccounts, 0, true));
|
|
33
|
+
const vatReducedRate2Dot1 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_2_1.id), taxedOperationsAccounts, 0, true));
|
|
34
34
|
const prestation2Entries = vatEntries.filter(ae => intracomVat.includes(ae.idVat));
|
|
35
35
|
const presta2Accounts = ['604', '61', '62'];
|
|
36
|
-
const prestation2Base = (0, _utils.getAmountByAccountNumber)(prestation2Entries, presta2Accounts, 0, true);
|
|
37
|
-
const prestation2AmountOfVat = (0, _utils.getTaxAmountByAccountNumber)(prestation2Entries, presta2Accounts);
|
|
38
|
-
const saleOfImmobilization = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775'], 0, true);
|
|
39
|
-
const onInvoiceDeductible = (0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(ae => !importationVat.includes(ae.idVat)), ['6']);
|
|
40
|
-
const onImmobilizationDeductible = (0, _utils.getTaxAmountByAccountNumber)(vatEntries, ['2']);
|
|
36
|
+
const prestation2Base = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(prestation2Entries, presta2Accounts, 0, true));
|
|
37
|
+
const prestation2AmountOfVat = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(prestation2Entries, presta2Accounts));
|
|
38
|
+
const saleOfImmobilization = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775'], 0, true));
|
|
39
|
+
const onInvoiceDeductible = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(ae => !importationVat.includes(ae.idVat)), ['6']));
|
|
40
|
+
const onImmobilizationDeductible = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries, ['2']));
|
|
41
41
|
const julyAdvance = (_e = (_d = payload === null || payload === void 0 ? void 0 : payload.exerciceAdvanceRegistrations) === null || _d === void 0 ? void 0 : _d.find(a => [5, 6].includes(dayjs(a.endDate).month()))) !== null && _e !== void 0 ? _e : null;
|
|
42
42
|
const julyAdvancePayload = (_g = (_f = julyAdvance === null || julyAdvance === void 0 ? void 0 : julyAdvance.payload) === null || _f === void 0 ? void 0 : _f.cerfa3514) !== null && _g !== void 0 ? _g : null;
|
|
43
43
|
const decemberAdvance = (_j = (_h = payload === null || payload === void 0 ? void 0 : payload.exerciceAdvanceRegistrations) === null || _h === void 0 ? void 0 : _h.find(a => [10, 11].includes(dayjs(a.endDate).month()))) !== null && _j !== void 0 ? _j : null;
|