@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
package/js/utils/vat/utils.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getAmountByAccountNumber = getAmountByAccountNumber;
|
|
7
|
+
exports.setZeroIfIsNegative = setZeroIfIsNegative;
|
|
7
8
|
exports.getTaxAmountByAccountNumber = getTaxAmountByAccountNumber;
|
|
8
9
|
exports.textFormatting = textFormatting;
|
|
9
10
|
var _lodash = require("lodash");
|
|
@@ -23,6 +24,9 @@ function getAmountByAccountNumber(accountingEntries, accountsNumber, precision =
|
|
|
23
24
|
}, 0), precision);
|
|
24
25
|
return isAbs ? Math.abs(result) : result;
|
|
25
26
|
}
|
|
27
|
+
function setZeroIfIsNegative(value) {
|
|
28
|
+
return value < 0 ? 0 : value;
|
|
29
|
+
}
|
|
26
30
|
function getTaxAmountByAccountNumber(accountingEntries, accountsNumber, precision = 0) {
|
|
27
31
|
const accountingEntriesUniq = (0, _lodash.uniqBy)(accountingEntries, 'id');
|
|
28
32
|
return (0, _lodash.round)(accountingEntriesUniq.reduce((acc, accountingEntry) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["getAmountByAccountNumber","exports","getTaxAmountByAccountNumber","textFormatting","_lodash","require","_Vat","accountingEntries","accountsNumber","precision","isAbs","accountingEntriesUniq","_uniqBy","result","_round","reduce","acc","accountingEntry","accTmp","some","number","account","toString","startsWith","debit","credit","Math","abs","_b","_a","Object","values","Vat","find","v","id","idVat","
|
|
1
|
+
{"version":3,"file":"utils.js","names":["getAmountByAccountNumber","exports","setZeroIfIsNegative","getTaxAmountByAccountNumber","textFormatting","_lodash","require","_Vat","accountingEntries","accountsNumber","precision","isAbs","accountingEntriesUniq","_uniqBy","result","_round","reduce","acc","accountingEntry","accTmp","some","number","account","toString","startsWith","debit","credit","Math","abs","value","_b","_a","Object","values","Vat","find","v","id","idVat","length","formattedValue","replace","slice"],"sources":["../../../ts/utils/vat/utils.ts"],"sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, isAbs = false): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0), precision);\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function setZeroIfIsNegative(value: number): number {\n return value < 0 ? 0 : value;\n}\n\nexport function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n accTmp += ((accountingEntry.debit - accountingEntry.credit) * (((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100)));\n return true;\n }\n return false;\n });\n return accTmp;\n }, precision));\n}\n\nexport function textFormatting(value: any, length: number | null = null): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n if (length) formattedValue = formattedValue.slice(0, length);\n return formattedValue;\n }\n return null;\n}"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.36",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import {
|
|
3
|
-
BasePaginate, IAccountingFile, QueryAccountingFiles, QueryTransaction, ReadFormattedAccountingTransaction,
|
|
3
|
+
BasePaginate, IAccountingFile, QueryAccountingFiles, QueryTransaction, ReadFormattedAccountingTransaction, ReadUpdateAccouningFile,
|
|
4
4
|
} from '../../types';
|
|
5
5
|
|
|
6
6
|
export class AccountingFiles extends Resource {
|
|
@@ -29,4 +29,8 @@ export class AccountingFiles extends Resource {
|
|
|
29
29
|
getPaginated(idSociety: number, params: QueryTransaction): Promise<BasePaginate<IAccountingFile>> {
|
|
30
30
|
return this.axios.$get(`/society/${idSociety}/accountingFiles`, { params });
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
update(id:number, payload: Partial<IAccountingFile>): Promise<ReadUpdateAccouningFile> {
|
|
34
|
+
return this.axios.$put(`/accounting-files/${id}`, payload);
|
|
35
|
+
}
|
|
32
36
|
}
|
package/ts/api/resources/Rule.ts
CHANGED
|
@@ -21,4 +21,8 @@ export class Rule extends Resource {
|
|
|
21
21
|
update(idRule: number, params: UpdateRule): Promise<IRule> {
|
|
22
22
|
return this.axios.$post(`rules/${idRule}`, params);
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
delete(idRule: number): Promise<number> {
|
|
26
|
+
return this.axios.$delete(`rules/${idRule}`);
|
|
27
|
+
}
|
|
24
28
|
}
|
|
@@ -13,23 +13,23 @@ export const BrandLegalstart = [
|
|
|
13
13
|
juridique: '01 76 39 00 60',
|
|
14
14
|
},
|
|
15
15
|
listMails: {
|
|
16
|
-
administratif: 'comptastart@
|
|
17
|
-
app: 'comptastart@
|
|
18
|
-
bonjour: '
|
|
19
|
-
contact: '
|
|
20
|
-
facturation: '
|
|
21
|
-
feedback: 'comptastart@
|
|
22
|
-
juridique: '
|
|
23
|
-
informatique: '
|
|
24
|
-
msd: 'comptastart@
|
|
25
|
-
noreply: '
|
|
26
|
-
qualite: 'comptastart@
|
|
27
|
-
paiement: 'comptastart@
|
|
28
|
-
rh: 'comptastart@
|
|
29
|
-
social: '
|
|
30
|
-
support: 'comptastart@
|
|
31
|
-
tva: 'comptastart@
|
|
32
|
-
wb: 'comptastart@
|
|
16
|
+
administratif: 'comptastart@comptastartbyclementine.fr',
|
|
17
|
+
app: 'comptastart@comptastartbyclementine.fr',
|
|
18
|
+
bonjour: 'bonjour@comptastartbyclementine.fr',
|
|
19
|
+
contact: 'contact@comptastartbyclementine.fr',
|
|
20
|
+
facturation: 'facturation@comptastartbyclementine.fr',
|
|
21
|
+
feedback: 'comptastart@comptastartbyclementine.fr',
|
|
22
|
+
juridique: 'juridique@comptastartbyclementine.fr',
|
|
23
|
+
informatique: 'informatique@comptastartbyclementine.fr',
|
|
24
|
+
msd: 'comptastart@comptastartbyclementine.fr',
|
|
25
|
+
noreply: 'noreply@comptastartbyclementine.fr',
|
|
26
|
+
qualite: 'comptastart@comptastartbyclementine.fr',
|
|
27
|
+
paiement: 'comptastart@comptastartbyclementine.fr',
|
|
28
|
+
rh: 'comptastart@comptastartbyclementine.fr',
|
|
29
|
+
social: 'social@comptastartbyclementine.fr',
|
|
30
|
+
support: 'comptastart@comptastartbyclementine.fr',
|
|
31
|
+
tva: 'comptastart@comptastartbyclementine.fr',
|
|
32
|
+
wb: 'comptastart@comptastartbyclementine.fr',
|
|
33
33
|
},
|
|
34
34
|
companyInformation: {
|
|
35
35
|
ape: '6920Z',
|
|
@@ -54,7 +54,7 @@ export const BrandLegalstart = [
|
|
|
54
54
|
urlApi1: 'https://api-legalstart.compta-clementine.fr',
|
|
55
55
|
urlApi2: 'https://api-next-legalstart.compta-clementine.fr',
|
|
56
56
|
urlExpert: 'https://pro.comptalib.com',
|
|
57
|
-
urlClient: 'https://
|
|
57
|
+
urlClient: 'https://clementine.fr',
|
|
58
58
|
bank: {
|
|
59
59
|
IBAN: 'FR7616106840138646838239863',
|
|
60
60
|
BIC: 'AGRIFRPP861',
|
|
@@ -74,10 +74,10 @@ export const BrandLegalstart = [
|
|
|
74
74
|
rcs: '752 566 687',
|
|
75
75
|
phone: '03 83 93 14 14',
|
|
76
76
|
vatIntracom: 'FR47752566687',
|
|
77
|
-
email: 'facturation@
|
|
77
|
+
email: 'facturation@comptastartbyclementine.fr',
|
|
78
78
|
},
|
|
79
79
|
webmail: {
|
|
80
|
-
domain: '@
|
|
80
|
+
domain: '@comptastartbyclementine.fr',
|
|
81
81
|
},
|
|
82
82
|
offices: {
|
|
83
83
|
LAXOU: {
|
package/ts/types/Enum/Unit.ts
CHANGED
|
@@ -26,6 +26,7 @@ export enum UnitId {
|
|
|
26
26
|
SUBSCRIPTION = 17,
|
|
27
27
|
NIGHT = 18,
|
|
28
28
|
TON = 19,
|
|
29
|
+
HECTARE = 20,
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export type IUnitList = Array<{ name: string; id: number; shortName: string; }>;
|
|
@@ -126,6 +127,11 @@ export const Unit: IUnit = {
|
|
|
126
127
|
name: 'Tonne',
|
|
127
128
|
shortName: 't',
|
|
128
129
|
},
|
|
130
|
+
HECTARE: {
|
|
131
|
+
id: UnitId.HECTARE,
|
|
132
|
+
name: 'Hectare',
|
|
133
|
+
shortName: 'ha',
|
|
134
|
+
},
|
|
129
135
|
};
|
|
130
136
|
|
|
131
137
|
export const UnitList = [
|
|
@@ -224,4 +230,9 @@ export const UnitList = [
|
|
|
224
230
|
name: 'Tonne',
|
|
225
231
|
shortName: 't',
|
|
226
232
|
},
|
|
233
|
+
{
|
|
234
|
+
id: UnitId.HECTARE,
|
|
235
|
+
name: 'Hectare',
|
|
236
|
+
shortName: 'ha',
|
|
237
|
+
},
|
|
227
238
|
];
|
|
@@ -39,6 +39,9 @@ export interface ReadVatEntry {
|
|
|
39
39
|
entry?: IAccountingEntry
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export
|
|
42
|
+
export class UpdatedAnnotationObject {
|
|
43
|
+
old: IAccountingEntry[];
|
|
44
|
+
new: IAccountingEntry[];
|
|
45
|
+
}
|
|
43
46
|
|
|
44
47
|
export type UpdatedAnnotation = UpdatedAnnotationObject[];
|
|
@@ -3,7 +3,6 @@ import { IThirdParty } from './IThirdParty';
|
|
|
3
3
|
import { IAccountingTransaction } from './IAccountingTransaction';
|
|
4
4
|
import { IVat } from './IVat';
|
|
5
5
|
import { IImmobilization } from './IImmobilization';
|
|
6
|
-
import { ISuggestion } from './ISuggestion';
|
|
7
6
|
|
|
8
7
|
// accountingEntries
|
|
9
8
|
export interface IAccountingEntry {
|
|
@@ -34,5 +33,4 @@ export interface IAccountingEntry {
|
|
|
34
33
|
accountingTransaction?: IAccountingTransaction;
|
|
35
34
|
vat?: IVat;
|
|
36
35
|
immobilization?: IImmobilization;
|
|
37
|
-
suggestions?: ISuggestion[];
|
|
38
36
|
}
|
|
@@ -4,7 +4,6 @@ import { IThirdParty } from './IThirdParty';
|
|
|
4
4
|
import { IReport } from './IReport';
|
|
5
5
|
import { IConnector } from './IConnector';
|
|
6
6
|
import { IBankConnection } from './IBankConnection';
|
|
7
|
-
import { IFollowedQualityMail } from './IFollowedQualityMail';
|
|
8
7
|
import { IFollow } from './IFollow';
|
|
9
8
|
import { IPaymentExpectation } from './IPaymentExpectation';
|
|
10
9
|
import { ILegalForm } from './ILegalForm';
|
|
@@ -165,7 +164,6 @@ export interface ISociety {
|
|
|
165
164
|
reports?: IReport[];
|
|
166
165
|
connectors?: IConnector[];
|
|
167
166
|
bankConnections?: IBankConnection[];
|
|
168
|
-
societiesFollowedQualityMail?: IFollowedQualityMail[];
|
|
169
167
|
societyConfigBalanceSheet?: ISocietyConfigBalanceSheet[];
|
|
170
168
|
societyFollow?: IFollow[];
|
|
171
169
|
paymentsExpectations?: IPaymentExpectation[];
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { IExercice } from './IExercice';
|
|
2
|
-
import { ISupervisionJob } from './ISupervisionJob';
|
|
3
2
|
import { IUser } from './IUser';
|
|
4
3
|
import { IBalanceSheet } from './IBalanceSheet';
|
|
5
4
|
import { IFile } from './IFile';
|
|
6
5
|
import { IPendingPoint } from './IPendingPoint';
|
|
7
|
-
import { IJob } from './IJob';
|
|
8
6
|
import { ILetter } from './ILetter';
|
|
9
7
|
|
|
10
8
|
// supervisions
|
|
@@ -28,7 +26,6 @@ export interface ISupervision {
|
|
|
28
26
|
|
|
29
27
|
// Associations
|
|
30
28
|
exercice: IExercice;
|
|
31
|
-
supervisionsToJobs: ISupervisionJob[];
|
|
32
29
|
supervisionUsers: IUser;
|
|
33
30
|
supervisionExpertUsers: IUser;
|
|
34
31
|
supervisionAccountant: IUser;
|
|
@@ -36,5 +33,4 @@ export interface ISupervision {
|
|
|
36
33
|
file: IFile;
|
|
37
34
|
letter: ILetter;
|
|
38
35
|
pendingPoints: IPendingPoint[];
|
|
39
|
-
jobs: IJob[];
|
|
40
36
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -25,7 +25,6 @@ export * from './Interface/models/IAbsenceRequestTime';
|
|
|
25
25
|
export * from './Interface/models/IAttachmentFile';
|
|
26
26
|
export * from './Interface/models/IAttestation';
|
|
27
27
|
export * from './Interface/models/IAttributionHistory';
|
|
28
|
-
export * from './Interface/models/IAutoLoginToken';
|
|
29
28
|
export * from './Interface/models/IBalanceBankAccount';
|
|
30
29
|
export * from './Interface/models/IBalanceSheet';
|
|
31
30
|
export * from './Interface/models/IAccountingStatementHistory';
|
|
@@ -33,12 +32,10 @@ export * from './Interface/models/IBankAccountSynchroHistory';
|
|
|
33
32
|
export * from './Interface/models/IBankAccount';
|
|
34
33
|
export * from './Interface/models/IBankConnection';
|
|
35
34
|
export * from './Interface/models/IBankList';
|
|
36
|
-
export * from './Interface/models/IBankTransaction';
|
|
37
35
|
export * from './Interface/models/IBusinessLine';
|
|
38
36
|
export * from './Interface/models/IBusinessPartner';
|
|
39
37
|
export * from './Interface/models/ICalendarEvent';
|
|
40
38
|
export * from './Interface/models/ICalendarEventUser';
|
|
41
|
-
export * from './Interface/models/ICallDirectly';
|
|
42
39
|
export * from './Interface/models/ICategory';
|
|
43
40
|
export * from './Interface/models/ICerfaType';
|
|
44
41
|
export * from './Interface/models/ICerfaValue';
|
|
@@ -71,14 +68,11 @@ export * from './Interface/models/IExerciceComment';
|
|
|
71
68
|
export * from './Interface/models/IExercice';
|
|
72
69
|
export * from './Interface/models/IExercicePrestation';
|
|
73
70
|
export * from './Interface/models/IFailedLoginAttempt';
|
|
74
|
-
export * from './Interface/models/IFaqCategory';
|
|
75
|
-
export * from './Interface/models/IFaq';
|
|
76
71
|
export * from './Interface/models/IFileType';
|
|
77
72
|
export * from './Interface/models/IFile';
|
|
78
73
|
export * from './Interface/models/IFileMissing';
|
|
79
74
|
export * from './Interface/models/IFiscalRegime';
|
|
80
75
|
export * from './Interface/models/IFolderFile';
|
|
81
|
-
export * from './Interface/models/IFollowedQualityMail';
|
|
82
76
|
export * from './Interface/models/IFollow';
|
|
83
77
|
export * from './Interface/models/IFollowList';
|
|
84
78
|
export * from './Interface/models/IFormalismValue';
|
|
@@ -88,14 +82,11 @@ export * from './Interface/models/IFuel';
|
|
|
88
82
|
export * from './Interface/models/IGedCategory';
|
|
89
83
|
export * from './Interface/models/IGedFile';
|
|
90
84
|
export * from './Interface/models/IGedFolder';
|
|
91
|
-
export * from './Interface/models/IIdentification';
|
|
92
85
|
export * from './Interface/models/IIndependentReview';
|
|
93
86
|
export * from './Interface/models/IInternalEstimate';
|
|
94
87
|
export * from './Interface/models/IIpTmpBlocked';
|
|
95
88
|
export * from './Interface/models/IProductInvoice';
|
|
96
|
-
export * from './Interface/models/IJobCategory';
|
|
97
89
|
export * from './Interface/models/IImmobilization';
|
|
98
|
-
export * from './Interface/models/IJob';
|
|
99
90
|
export * from './Interface/models/IKilometricAllowanceScale';
|
|
100
91
|
export * from './Interface/models/ILabelPaymentWaiting';
|
|
101
92
|
export * from './Interface/models/ILegalForm';
|
|
@@ -132,7 +123,6 @@ export * from './Interface/models/IPaymentExpectation';
|
|
|
132
123
|
export * from './Interface/models/IPaymentExpectationCustomer';
|
|
133
124
|
export * from './Interface/models/IPaymentMethod';
|
|
134
125
|
export * from './Interface/models/IPaymentWaiting';
|
|
135
|
-
export * from './Interface/models/IPenalty';
|
|
136
126
|
export * from './Interface/models/IPendingPoint';
|
|
137
127
|
export * from './Interface/models/IPermission';
|
|
138
128
|
export * from './Interface/models/IPhoneNumber';
|
|
@@ -207,7 +197,6 @@ export * from './Interface/models/ISponsorshipCheck';
|
|
|
207
197
|
export * from './Interface/models/IStatusSignature';
|
|
208
198
|
export * from './Interface/models/IStripeEvent';
|
|
209
199
|
export * from './Interface/models/ISupervision';
|
|
210
|
-
export * from './Interface/models/ISupervisionJob';
|
|
211
200
|
export * from './Interface/models/ISupervisionPendingPoint';
|
|
212
201
|
export * from './Interface/models/ISurvey';
|
|
213
202
|
export * from './Interface/models/ITag';
|
|
@@ -221,9 +210,7 @@ export * from './Interface/models/IThirdParty';
|
|
|
221
210
|
export * from './Interface/models/IThirdPartySociety';
|
|
222
211
|
export * from './Interface/models/ITimeTracking';
|
|
223
212
|
export * from './Interface/models/ITimeTrackingSource';
|
|
224
|
-
export * from './Interface/models/ITmpValidationToken';
|
|
225
213
|
export * from './Interface/models/IAccountantTracker';
|
|
226
|
-
export * from './Interface/models/IVatMargin';
|
|
227
214
|
export * from './Interface/models/IVatRegime';
|
|
228
215
|
export * from './Interface/models/IVat';
|
|
229
216
|
export * from './Interface/models/IAbsenceType';
|
|
@@ -242,7 +229,6 @@ export * from './Interface/models/IContractType';
|
|
|
242
229
|
export * from './Interface/models/ICustomizationType';
|
|
243
230
|
export * from './Interface/models/IDocumentWaitingType';
|
|
244
231
|
export * from './Interface/models/IEstimateInvoiceType';
|
|
245
|
-
export * from './Interface/models/IFollowedQualityMailType';
|
|
246
232
|
export * from './Interface/models/IFirstStep';
|
|
247
233
|
export * from './Interface/models/IGedFileType';
|
|
248
234
|
export * from './Interface/models/ILetterType';
|
|
@@ -250,7 +236,6 @@ export * from './Interface/models/ILogType';
|
|
|
250
236
|
export * from './Interface/models/INotificationCodeType';
|
|
251
237
|
export * from './Interface/models/INotificationType';
|
|
252
238
|
export * from './Interface/models/IPartnerTransactionType';
|
|
253
|
-
export * from './Interface/models/IPenaltyType';
|
|
254
239
|
export * from './Interface/models/IRepeatType';
|
|
255
240
|
export * from './Interface/models/IReportType';
|
|
256
241
|
export * from './Interface/models/IAdjustment';
|
|
@@ -262,7 +247,6 @@ export * from './Interface/models/IVehicleType';
|
|
|
262
247
|
export * from './Interface/models/IUser';
|
|
263
248
|
export * from './Interface/models/IUserNotification';
|
|
264
249
|
export * from './Interface/models/IUserSocietyPermission';
|
|
265
|
-
export * from './Interface/models/IUserSocietyTicketSupport';
|
|
266
250
|
export * from './Interface/models/IUserTeam';
|
|
267
251
|
export * from './Interface/models/IUserFile';
|
|
268
252
|
export * from './Interface/models/IUserTest';
|
|
@@ -277,14 +261,11 @@ export * from './Interface/models/ITaskAttachment';
|
|
|
277
261
|
export * from './Interface/models/IMailContent';
|
|
278
262
|
export * from './Interface/models/IWebMail';
|
|
279
263
|
export * from './Interface/models/IWebMailAttachment';
|
|
280
|
-
export * from './Interface/models/IWebMailSpam';
|
|
281
264
|
export * from './Interface/models/IWebMailStat';
|
|
282
265
|
export * from './Interface/models/IWebMailType';
|
|
283
|
-
export * from './Interface/models/IWebMailSpamType';
|
|
284
266
|
export * from './Interface/models/IWorkingSchedule';
|
|
285
267
|
export * from './Interface/models/IField';
|
|
286
268
|
export * from './Interface/models/IFecFile';
|
|
287
|
-
export * from './Interface/models/ISuggestion';
|
|
288
269
|
export * from './Interface/models/ISalariesFile';
|
|
289
270
|
export * from './Interface/models/IPromoCode';
|
|
290
271
|
export * from './Interface/models/ILoan';
|
|
@@ -292,7 +273,6 @@ export * from './Interface/models/IBalanceSheetModule';
|
|
|
292
273
|
export * from './Interface/models/IStock';
|
|
293
274
|
export * from './Interface/models/ISocietyPromoCode';
|
|
294
275
|
export * from './Interface/models/IZTicket';
|
|
295
|
-
export * from './Interface/models/IAccountingTransaction_new';
|
|
296
276
|
export * from './Interface/models/IExerciceNote';
|
|
297
277
|
export * from './Interface/models/IRevisionGuide';
|
|
298
278
|
export * from './Interface/models/ISponsorshipWithSponsorInfo';
|
|
@@ -587,6 +567,7 @@ export * from './Interface/api/accountingFiles/queryAccountingFiles';
|
|
|
587
567
|
export * from './Interface/api/accountingFiles/Ocr';
|
|
588
568
|
export * from './Interface/api/accountingFiles/OcrPayload';
|
|
589
569
|
export * from './Interface/api/accountingFiles/OcrValue';
|
|
570
|
+
export * from './Interface/api/accountingFiles/Read';
|
|
590
571
|
export * from './Interface/api/stock/StockEntries';
|
|
591
572
|
export * from './Interface/api/dashboard/QueryTurnoverProfitAndLoss';
|
|
592
573
|
export * from './Interface/api/dashboard/ReadTurnOverProfitAndLossAndVats';
|
|
@@ -4,7 +4,9 @@ import { round as _round, flatten, uniqBy } from 'lodash';
|
|
|
4
4
|
import { IAccountingEntry } from '../../../types/Interface/models/IAccountingEntry';
|
|
5
5
|
import { Cerfa3310_2023, PayloadCerfa3310_2023 } from '../../../types/Interface/api/cerfa/3310';
|
|
6
6
|
import { Vat } from '../../../types/Enum/Vat';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
getAmountByAccountNumber, getTaxAmountByAccountNumber, setZeroIfIsNegative, textFormatting,
|
|
9
|
+
} from '../utils';
|
|
8
10
|
import { AsponeFormFields, CerfaPayloadForm } from '../../../types/Interface/api/cerfa/ReadCerfa';
|
|
9
11
|
import { UpdatedAnnotation } from '../../../types/Interface/api/registration/ReadRegistration';
|
|
10
12
|
|
|
@@ -44,61 +46,61 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
44
46
|
// Opérations taxées
|
|
45
47
|
const taxedServicesEntries = vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
46
48
|
const servicesAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
47
|
-
const taxedServicesFromFrance = getAmountByAccountNumber(taxedServicesEntries, servicesAccounts, 0, true);
|
|
48
|
-
const taxedOther = getAmountByAccountNumber(vatEntries.filter((ae) => withTaxVat.includes(ae.idVat)), ['775'], 0, true);
|
|
49
|
+
const taxedServicesFromFrance = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries, servicesAccounts, 0, true));
|
|
50
|
+
const taxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withTaxVat.includes(ae.idVat)), ['775'], 0, true));
|
|
49
51
|
const intracommunityServiceAccounts = ['604', '611', '612', '613', '614', '615', '616', '617', '618', '619', '62'];
|
|
50
52
|
const intracommunityServiceEntries = vatEntries.filter((ae) => withTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat));
|
|
51
|
-
const taxedPurchaseOfIntracommunityService = getAmountByAccountNumber(intracommunityServiceEntries, intracommunityServiceAccounts, 0, true);
|
|
53
|
+
const taxedPurchaseOfIntracommunityService = setZeroIfIsNegative(getAmountByAccountNumber(intracommunityServiceEntries, intracommunityServiceAccounts, 0, true));
|
|
52
54
|
const taxedImportEntries = vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
53
55
|
const taxedImportAccounts = ['6'];
|
|
54
|
-
const taxedImport = getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0, true);
|
|
55
|
-
const taxedIntracommunityAcquisitions = getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true);
|
|
56
|
+
const taxedImport = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0, true));
|
|
57
|
+
const taxedIntracommunityAcquisitions = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true));
|
|
56
58
|
// Opérations non taxées
|
|
57
|
-
const untaxedExportationNotInEurope = getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true);
|
|
58
|
-
const untaxedOther = getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true);
|
|
59
|
-
const untaxedImport = getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0, true);
|
|
60
|
-
const untaxedIntracomunity = getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true);
|
|
61
|
-
const untaxedIntracommunityDelivery = getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true);
|
|
59
|
+
const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
|
|
60
|
+
const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true));
|
|
61
|
+
const untaxedImport = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0, true));
|
|
62
|
+
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['601', '602', '603', '605', '606', '607'], 0, true));
|
|
63
|
+
const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
|
|
62
64
|
// TVA brute
|
|
63
|
-
const normalRate = getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
64
|
-
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
65
|
-
|
|
65
|
+
const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
66
|
+
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
67
|
+
|
|
66
68
|
const normalRateTax = _round(normalRate * 0.2);
|
|
67
69
|
|
|
68
|
-
const reducedRate5Dot5 = getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
69
|
-
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
70
|
+
const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
71
|
+
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
70
72
|
const reducedRate5Dot5Tax = _round(reducedRate5Dot5 * 0.055);
|
|
71
73
|
|
|
72
|
-
const reducedRate10 = getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
73
|
-
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
74
|
+
const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
75
|
+
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
74
76
|
const reducedRate10Tax = _round(reducedRate10 * 0.1);
|
|
75
77
|
|
|
76
|
-
const reducedRate8Dot5 = getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
77
|
-
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
78
|
+
const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
79
|
+
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
78
80
|
const reducedRate8Dot5Tax = _round(reducedRate8Dot5 * 0.085);
|
|
79
81
|
|
|
80
|
-
const reducedRate2Dot1 = getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
81
|
-
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true);
|
|
82
|
+
const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
83
|
+
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
82
84
|
const reducedRate2Dot1Tax = _round(reducedRate2Dot1 * 0.021);
|
|
83
85
|
|
|
84
|
-
const importNormalRate = getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
86
|
+
const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
85
87
|
const importNormalRateTax = _round(importNormalRate * 0.2);
|
|
86
|
-
const importReducedRate10 = getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
88
|
+
const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
87
89
|
const importReducedRate10Tax = _round(importReducedRate10 * 0.1);
|
|
88
|
-
const importReducedRate8Dot5 = getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
90
|
+
const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
89
91
|
const importReducedRate8Dot5Tax = _round(importReducedRate8Dot5 * 0.085);
|
|
90
|
-
const importReducedRate5Dot5 = getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
92
|
+
const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
91
93
|
const importReducedRate5Dot5Tax = _round(importReducedRate8Dot5 * 0.055);
|
|
92
|
-
const importReducedRate2Dot1 = getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
94
|
+
const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
93
95
|
const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
|
|
94
|
-
const importReducedRate1Dot05 = getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true);
|
|
96
|
+
const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
95
97
|
const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
|
|
96
|
-
const intracommunityTax = getTaxAmountByAccountNumber(intracommunityServiceEntries, intracommunityServiceAccounts);
|
|
98
|
+
const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, intracommunityServiceAccounts));
|
|
97
99
|
|
|
98
100
|
// TVA Déductible
|
|
99
|
-
const immobilizationTax = getTaxAmountByAccountNumber(vatEntries, ['2']);
|
|
100
|
-
const otherGoodsAndServices = getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']);
|
|
101
|
-
const otherDeductibles = getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']);
|
|
101
|
+
const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2']));
|
|
102
|
+
const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']));
|
|
103
|
+
const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']));
|
|
102
104
|
const report = payload.previousVatDeclaration?.credit?.toReport ?? 0;
|
|
103
105
|
|
|
104
106
|
const coefficient = _round(payload.vat?.deductible?.coefficient ?? 100, 2);
|
|
@@ -4,7 +4,9 @@ import { round as _round, uniqBy } from 'lodash';
|
|
|
4
4
|
import { Cerfa3517_2023, PayloadCerfa3517_2023 } from '../../../types/Interface/api/cerfa/3517';
|
|
5
5
|
import { IAccountingEntry } from '../../../types/Interface/models/IAccountingEntry';
|
|
6
6
|
import { Vat } from '../../../types/Enum/Vat';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
getAmountByAccountNumber, getTaxAmountByAccountNumber, setZeroIfIsNegative, textFormatting,
|
|
9
|
+
} from '../utils';
|
|
8
10
|
import { Cerfa3514_2022, CerfaPayloadForm, IRegistration } from '../../../types';
|
|
9
11
|
|
|
10
12
|
export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2023): Cerfa3517_2023 {
|
|
@@ -22,21 +24,21 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
|
|
|
22
24
|
|
|
23
25
|
const taxedOperationsAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
24
26
|
|
|
25
|
-
const vatNormalRate20 = getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_20.id), taxedOperationsAccounts, 0, true);
|
|
26
|
-
const vatReducedRate5Dot5 = getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_5_5.id), taxedOperationsAccounts, 0, true);
|
|
27
|
-
const vatReducedRate10 = getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_10.id), taxedOperationsAccounts, 0, true);
|
|
28
|
-
const vatReducedRate8Dot5 = getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_8_5.id), taxedOperationsAccounts, 0, true);
|
|
29
|
-
const vatReducedRate2Dot1 = getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_2_1.id), taxedOperationsAccounts, 0, true);
|
|
27
|
+
const vatNormalRate20 = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_20.id), taxedOperationsAccounts, 0, true));
|
|
28
|
+
const vatReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_5_5.id), taxedOperationsAccounts, 0, true));
|
|
29
|
+
const vatReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_10.id), taxedOperationsAccounts, 0, true));
|
|
30
|
+
const vatReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_8_5.id), taxedOperationsAccounts, 0, true));
|
|
31
|
+
const vatReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_2_1.id), taxedOperationsAccounts, 0, true));
|
|
30
32
|
|
|
31
33
|
const prestation2Entries = vatEntries.filter((ae) => intracomVat.includes(ae.idVat));
|
|
32
34
|
const presta2Accounts = ['604', '61', '62'];
|
|
33
|
-
const prestation2Base = getAmountByAccountNumber(prestation2Entries, presta2Accounts, 0, true);
|
|
34
|
-
const prestation2AmountOfVat = getTaxAmountByAccountNumber(prestation2Entries, presta2Accounts);
|
|
35
|
+
const prestation2Base = setZeroIfIsNegative(getAmountByAccountNumber(prestation2Entries, presta2Accounts, 0, true));
|
|
36
|
+
const prestation2AmountOfVat = setZeroIfIsNegative(getTaxAmountByAccountNumber(prestation2Entries, presta2Accounts));
|
|
35
37
|
|
|
36
|
-
const saleOfImmobilization = getAmountByAccountNumber(vatEntries.filter((ae) => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775'], 0, true);
|
|
38
|
+
const saleOfImmobilization = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775'], 0, true));
|
|
37
39
|
|
|
38
|
-
const onInvoiceDeductible = getTaxAmountByAccountNumber(vatEntries.filter(ae => !importationVat.includes(ae.idVat)), ['6']);
|
|
39
|
-
const onImmobilizationDeductible = getTaxAmountByAccountNumber(vatEntries, ['2']);
|
|
40
|
+
const onInvoiceDeductible = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((ae) => !importationVat.includes(ae.idVat)), ['6']));
|
|
41
|
+
const onImmobilizationDeductible = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2']));
|
|
40
42
|
|
|
41
43
|
const julyAdvance: IRegistration | null = payload?.exerciceAdvanceRegistrations?.find((a) => [5, 6].includes(dayjs(a.endDate).month())) ?? null;
|
|
42
44
|
const julyAdvancePayload: Cerfa3514_2022 | null = julyAdvance?.payload?.cerfa3514 ?? null;
|
package/ts/utils/vat/utils.ts
CHANGED
|
@@ -18,6 +18,10 @@ export function getAmountByAccountNumber(accountingEntries: IAccountingEntry[],
|
|
|
18
18
|
return isAbs ? Math.abs(result) : result;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export function setZeroIfIsNegative(value: number): number {
|
|
22
|
+
return value < 0 ? 0 : value;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
export function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0): number {
|
|
22
26
|
const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');
|
|
23
27
|
return _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {
|