@silexpert/core 1.1.25 → 1.1.26
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/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts +3 -1
- package/es/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts.map +1 -1
- package/es/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +13 -2
- package/es/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
- package/es/utils/vat/3517/century23.js +9 -9
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/es/utils/vat/utils.d.ts.map +1 -1
- package/es/utils/vat/utils.js +1 -3
- package/es/utils/vat/utils.js.map +1 -1
- package/js/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +3 -1
- package/js/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
- package/js/utils/vat/3517/century23.js +9 -9
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/js/utils/vat/utils.js +1 -3
- package/js/utils/vat/utils.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Interface/api/vatDeclaration/QueryVatDeclaration.ts +11 -2
- package/ts/utils/vat/3517/century23.ts +9 -9
- package/ts/utils/vat/utils.ts +1 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,KAAK,UAAQ,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,KAAK,UAAQ,GAAG,MAAM,CAc9I;AAED,wBAAgB,2BAA2B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,GAAG,MAAM,CAalI;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,GAAG,IAAI,CActF"}
|
package/es/utils/vat/utils.js
CHANGED
|
@@ -6,9 +6,7 @@ export function getAmountByAccountNumber(accountingEntries, accountsNumber, prec
|
|
|
6
6
|
let accTmp = acc;
|
|
7
7
|
accountsNumber.some((number) => {
|
|
8
8
|
if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {
|
|
9
|
-
|
|
10
|
-
accTmp += (accountingEntry.debit - accountingEntry.credit);
|
|
11
|
-
}
|
|
9
|
+
accTmp += (accountingEntry.debit - accountingEntry.credit);
|
|
12
10
|
return true;
|
|
13
11
|
}
|
|
14
12
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,UAAU,wBAAwB,CAAC,iBAAqC,EAAE,cAAwB,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK;IACpI,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EA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G,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC,iCAAiC;QAC9F,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB;QACvE,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB;QACvE,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,8BAA8B;QACpF,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,oBAAoB;QACzE,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB;QACvE,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,mCAAmC;QACvF,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,iCAAiC;QACrF,IAAI,MAAM;YAAE,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QAC7D,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,IAAI,CAAC;AACd,CAAC","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 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}"]}
|
|
@@ -23,7 +23,9 @@ __decorate([(0, _decorators.ApiProperty)(), (0, _classValidator.IsDateString)(),
|
|
|
23
23
|
__decorate([(0, _decorators.ApiProperty)(), (0, _classValidator.IsNumber)(), __metadata("design:type", Number)], QueryPreviousVatDeclaration.prototype, "idCerfaType", void 0);
|
|
24
24
|
class QueryVatMigrationEntry {}
|
|
25
25
|
exports.QueryVatMigrationEntry = QueryVatMigrationEntry;
|
|
26
|
-
__decorate([(0, _decorators.
|
|
26
|
+
__decorate([(0, _decorators.ApiProperty)(), (0, _classValidator.IsNumber)(), __metadata("design:type", Number)], QueryVatMigrationEntry.prototype, "id", void 0);
|
|
27
|
+
__decorate([(0, _decorators.ApiPropertyOptional)(), (0, _classValidator.IsDateString)(), (0, _classValidator.IsOptional)(), __metadata("design:type", String)], QueryVatMigrationEntry.prototype, "startDate", void 0);
|
|
28
|
+
__decorate([(0, _decorators.ApiPropertyOptional)(), (0, _classValidator.IsDateString)(), (0, _classValidator.IsOptional)(), __metadata("design:type", String)], QueryVatMigrationEntry.prototype, "endDate", void 0);
|
|
27
29
|
class QueryVatDeclaration {}
|
|
28
30
|
exports.QueryVatDeclaration = QueryVatDeclaration;
|
|
29
31
|
__decorate([(0, _decorators.ApiPropertyOptional)(), (0, _classValidator.IsDate)(), (0, _classValidator.IsOptional)(), __metadata("design:type", Date)], QueryVatDeclaration.prototype, "declarationDate", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryVatDeclaration.js","names":["_classValidator","require","_CerfaType","_decorators","QueryPreviousVatDeclaration","exports","__decorate","ApiProperty","IsDateString","IsNumber","QueryVatMigrationEntry","ApiPropertyOptional","IsOptional","QueryVatDeclaration","IsDate","Date","IsEnum","CerfaType","QueryVatEntry","IsString","QueryCerfa"],"sources":["../../../../../ts/types/Interface/api/vatDeclaration/QueryVatDeclaration.ts"],"sourcesContent":["import {\n IsDate, IsDateString, IsEnum, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { CerfaType } from '../../../Enum/CerfaType';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\n\nexport class QueryPreviousVatDeclaration {\n @ApiProperty()\n @IsDateString()\n fromDate: string;\n\n @ApiProperty()\n @IsNumber()\n idCerfaType: number;\n}\n\nexport class QueryVatMigrationEntry {\n @
|
|
1
|
+
{"version":3,"file":"QueryVatDeclaration.js","names":["_classValidator","require","_CerfaType","_decorators","QueryPreviousVatDeclaration","exports","__decorate","ApiProperty","IsDateString","IsNumber","QueryVatMigrationEntry","ApiPropertyOptional","IsOptional","QueryVatDeclaration","IsDate","Date","IsEnum","CerfaType","QueryVatEntry","IsString","QueryCerfa"],"sources":["../../../../../ts/types/Interface/api/vatDeclaration/QueryVatDeclaration.ts"],"sourcesContent":["import {\n IsDate, IsDateString, IsEnum, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { CerfaType } from '../../../Enum/CerfaType';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\n\nexport class QueryPreviousVatDeclaration {\n @ApiProperty()\n @IsDateString()\n fromDate: string;\n\n @ApiProperty()\n @IsNumber()\n idCerfaType: number;\n}\n\nexport class QueryVatMigrationEntry {\n @ApiProperty()\n @IsNumber()\n id: number;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n startDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n endDate?: string;\n}\n\nexport class QueryVatDeclaration {\n @ApiPropertyOptional()\n @IsDate()\n @IsOptional()\n declarationDate?: Date;\n\n @ApiProperty()\n @IsEnum(CerfaType)\n idCerfaType: CerfaType;\n}\n\nexport class QueryVatEntry {\n @ApiProperty()\n @IsDateString()\n startDate: string;\n\n @ApiProperty()\n @IsDateString()\n endDate: string;\n\n @ApiProperty()\n @IsString()\n type: 'collected' | 'deductible';\n}\n\nexport class QueryCerfa {\n @ApiProperty()\n @IsString()\n fileName: string;\n}"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;;;;;;;;;;;AAEM,MAAOG,2BAA2B;AAQvCC,OAAA,CARYD,2BAA2B,GAA3BA,2BAA2B;AACtCE,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAC,4BAAY,GAAE,E,8FACE;AAEjBF,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAE,wBAAQ,GAAE,E,iGACS;AAGhB,MAAOC,sBAAsB;AAclCL,OAAA,CAdYK,sBAAsB,GAAtBA,sBAAsB;AACjCJ,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAE,wBAAQ,GAAE,E,mFACA;AAEXH,UAAA,EAAC,IAAAK,+BAAmB,GAAE,EACrB,IAAAH,4BAAY,GAAE,EACd,IAAAI,0BAAU,GAAE,E,0FACM;AAEnBN,UAAA,EAAC,IAAAK,+BAAmB,GAAE,EACrB,IAAAH,4BAAY,GAAE,EACd,IAAAI,0BAAU,GAAE,E,wFACI;AAGb,MAAOC,mBAAmB;AAS/BR,OAAA,CATYQ,mBAAmB,GAAnBA,mBAAmB;AAC9BP,UAAA,EAAC,IAAAK,+BAAmB,GAAE,EACrB,IAAAG,sBAAM,GAAE,EACR,IAAAF,0BAAU,GAAE,E,0BACKG,IAAI,E,2DAAC;AAEvBT,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAS,sBAAM,EAACC,oBAAS,CAAC,E,yFACK;AAGnB,MAAOC,aAAa;AAYzBb,OAAA,CAZYa,aAAa,GAAbA,aAAa;AACxBZ,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAC,4BAAY,GAAE,E,iFACG;AAElBF,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAC,4BAAY,GAAE,E,+EACC;AAEhBF,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAY,wBAAQ,GAAE,E,4EACsB;AAG7B,MAAOC,UAAU;AAItBf,OAAA,CAJYe,UAAU,GAAVA,UAAU;AACrBd,UAAA,EAAC,IAAAC,uBAAW,GAAE,EACb,IAAAY,wBAAQ,GAAE,E,6EACM"}
|
|
@@ -25,18 +25,18 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
25
25
|
const intracomVat = vats.filter(v => v.isVatIntracom && !v.isVatImportation).map(v => v.id);
|
|
26
26
|
const frenchVat = vats.filter(v => !v.isVatImportation && !v.isVatIntracom).map(v => v.id);
|
|
27
27
|
const taxedOperationsAccounts = ['701', '702', '703', '704', '705', '706', '707', '708'];
|
|
28
|
-
const vatNormalRate20 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_20.id), taxedOperationsAccounts);
|
|
29
|
-
const vatReducedRate5Dot5 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_5_5.id), taxedOperationsAccounts);
|
|
30
|
-
const vatReducedRate10 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_10.id), taxedOperationsAccounts);
|
|
31
|
-
const vatReducedRate8Dot5 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_8_5.id), taxedOperationsAccounts);
|
|
32
|
-
const vatReducedRate2Dot1 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_2_1.id), taxedOperationsAccounts);
|
|
28
|
+
const vatNormalRate20 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_20.id), taxedOperationsAccounts, 0, true);
|
|
29
|
+
const vatReducedRate5Dot5 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_5_5.id), taxedOperationsAccounts, 0, true);
|
|
30
|
+
const vatReducedRate10 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_10.id), taxedOperationsAccounts, 0, true);
|
|
31
|
+
const vatReducedRate8Dot5 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_8_5.id), taxedOperationsAccounts, 0, true);
|
|
32
|
+
const vatReducedRate2Dot1 = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_2_1.id), taxedOperationsAccounts, 0, true);
|
|
33
33
|
const prestation2Entries = vatEntries.filter(ae => intracomVat.includes(ae.idVat));
|
|
34
34
|
const presta2Accounts = ['604', '61', '62'];
|
|
35
|
-
const prestation2Base = (0, _utils.getAmountByAccountNumber)(prestation2Entries, presta2Accounts);
|
|
35
|
+
const prestation2Base = (0, _utils.getAmountByAccountNumber)(prestation2Entries, presta2Accounts, 0, true);
|
|
36
36
|
const prestation2AmountOfVat = (0, _utils.getTaxAmountByAccountNumber)(prestation2Entries, presta2Accounts);
|
|
37
|
-
const saleOfImmobilization = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775']);
|
|
38
|
-
const onInvoiceDeductible = (0, _utils.getAmountByAccountNumber)(vatEntries, ['445660']);
|
|
39
|
-
const onImmobilizationDeductible = (0, _utils.getAmountByAccountNumber)(vatEntries, ['445662']);
|
|
37
|
+
const saleOfImmobilization = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775'], 0, true);
|
|
38
|
+
const onInvoiceDeductible = (0, _utils.getAmountByAccountNumber)(vatEntries, ['445660'], 0, true);
|
|
39
|
+
const onImmobilizationDeductible = (0, _utils.getAmountByAccountNumber)(vatEntries, ['445662'], 0, true);
|
|
40
40
|
const julyAdvance = (_e = (_d = payload === null || payload === void 0 ? void 0 : payload.exerciceAdvanceRegistrations) === null || _d === void 0 ? void 0 : _d.find(a => dayjs(a.endDate).month() === 6)) !== null && _e !== void 0 ? _e : null;
|
|
41
41
|
const julyAdvancePayload = (_f = julyAdvance === null || julyAdvance === void 0 ? void 0 : julyAdvance.payload) !== null && _f !== void 0 ? _f : null;
|
|
42
42
|
const decemberAdvance = (_h = (_g = payload === null || payload === void 0 ? void 0 : payload.exerciceAdvanceRegistrations) === null || _g === void 0 ? void 0 : _g.find(a => dayjs(a.endDate).month() === 11)) !== null && _h !== void 0 ? _h : null;
|