@silexpert/core 2.0.32 → 2.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/Interface/api/documentRequest/Query.d.ts +1 -0
- package/dist/types/Interface/api/documentRequest/Query.d.ts.map +1 -1
- package/dist/types/Interface/api/documentRequest/Query.js +8 -0
- package/dist/types/Interface/api/documentRequest/Query.js.map +1 -1
- package/dist/utils/vat/3517/century25.d.ts +0 -1
- package/dist/utils/vat/3517/century25.d.ts.map +1 -1
- package/dist/utils/vat/3517/century25.js +1 -154
- package/dist/utils/vat/3517/century25.js.map +1 -1
- package/dist/utils/vat/3517/century26.d.ts +2 -2
- package/dist/utils/vat/3517/century26.d.ts.map +1 -1
- package/dist/utils/vat/3517/century26.js +1 -1
- package/dist/utils/vat/3517/century26.js.map +1 -1
- package/dist/utils/vat/centuries.d.ts.map +1 -1
- package/dist/utils/vat/centuries.js +2 -2
- package/dist/utils/vat/centuries.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Interface/api/documentRequest/Query.ts +6 -0
- package/ts/utils/vat/3517/century25.ts +1 -159
- package/ts/utils/vat/3517/century26.ts +3 -3
- package/ts/utils/vat/centuries.ts +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"centuries.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"centuries.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAgK3E,eAAO,MAAM,iBAAiB,GAAI,aAAa,SAAS,EAAE,SAAS,MAAM,KAAG,WAc3E,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { getCerfa3519Century23RegistrationFields } from './3519/century23.js';
|
|
|
5
5
|
import { cerfa3514Century22Fields, getCerfa3514Century22Payload } from './3514/century22.js';
|
|
6
6
|
import { getCerfa3514Century23RegistrationFields } from './3514/century23.js';
|
|
7
7
|
import { cerfa3310Century24Fields, getCerfa3310Century24Payload, getCerfa3310Century24RegistrationFields, } from './3310/century24.js';
|
|
8
|
-
import { cerfa3517Century25Fields, getCerfa3517Century25Payload, getCerfa3517Century25RegistrationField,
|
|
8
|
+
import { cerfa3517Century25Fields, getCerfa3517Century25Payload, getCerfa3517Century25RegistrationField, } from './3517/century25.js';
|
|
9
9
|
import { cerfa3310Century25Fields, getCerfa3310Century25Payload, getCerfa3310Century25RegistrationFields, } from './3310/century25.js';
|
|
10
10
|
import { cerfa3310Century26Fields, getCerfa3310Century26Payload, getCerfa3310Century26RegistrationFields, } from './3310/century26.js';
|
|
11
11
|
import { cerfa3517Century26Fields, getCerfa3517Century26Payload, getCerfa3517Century26RegistrationField, getCerfa3517DDRCentury26RegistrationField, } from './3517/century26.js';
|
|
@@ -86,7 +86,7 @@ const vatDocuments = [
|
|
|
86
86
|
asponePayload: (data) => getCerfa3517Century25RegistrationField(data),
|
|
87
87
|
fields: cerfa3517Century25Fields,
|
|
88
88
|
fileName: '3517-2025',
|
|
89
|
-
annexFields: (data) =>
|
|
89
|
+
annexFields: (data) => getCerfa3517DDRCentury26RegistrationField(data),
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
idCerfaType: CerfaType.CERFA_3517,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"centuries.js","sourceRoot":"","sources":["../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAkB1D,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,M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CAAC,IAAI,CAAC;QACrF,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,CAAC,IAAoB,EAAE,EAAE,CAAC,yCAAyC,CAAC,IAAI,CAAC;KACvF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,WAAsB,EAAE,OAAe,EAAe,EAAE;IACxF,yJAAyJ;IAEzJ,2GAA2G;IAC3G,0GAA0G;IAC1G,MAAM,IAAI,GACR,WAAW,KAAK,SAAS,CAAC,UAAU,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,OAAO;QAChF,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC;QAC5B,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IAE7B,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAC7G,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,WAAW,iBAAiB,IAAI,sBAAsB,CAAC,CAAC;IAEnG,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport { CerfaType } from '../../types/Enum/CerfaType.js';\nimport { VatDocument } from '../../types/Interface/api/cerfa/ReadCerfa.js';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry.js';\nimport {\n Cerfa3310_2024,\n Cerfa3310_2025,\n Cerfa3310_2026,\n PayloadCerfa3310_2024,\n PayloadCerfa3310_2025,\n PayloadCerfa3310_2026,\n} from '../../types/Interface/api/cerfa/3310.js';\nimport {\n Cerfa3514_2022,\n Cerfa3519_2017,\n PayloadCerfa3514_2022,\n PayloadCerfa3519_2017,\n UpdatedAnnotation,\n} from '../../types/index.js';\nimport { cerfa3519Century17Fields, getCerfa3519Century17Payload } from './3519/century17.js';\nimport { getCerfa3519Century23RegistrationFields } from './3519/century23.js';\nimport { cerfa3514Century22Fields, getCerfa3514Century22Payload } from './3514/century22.js';\nimport { getCerfa3514Century23RegistrationFields } from './3514/century23.js';\nimport {\n Cerfa3517_2025,\n Cerfa3517_2026,\n PayloadCerfa3517_2025,\n PayloadCerfa3517_2026,\n} from '../../types/Interface/api/cerfa/3517.js';\nimport {\n cerfa3310Century24Fields,\n getCerfa3310Century24Payload,\n getCerfa3310Century24RegistrationFields,\n} from './3310/century24.js';\nimport {\n cerfa3517Century25Fields,\n getCerfa3517Century25Payload,\n getCerfa3517Century25RegistrationField,\n getCerfa3517DDRCentury25egistrationField,\n} from './3517/century25.js';\nimport {\n cerfa3310Century25Fields,\n getCerfa3310Century25Payload,\n getCerfa3310Century25RegistrationFields,\n} from './3310/century25.js';\nimport {\n cerfa3310Century26Fields,\n getCerfa3310Century26Payload,\n getCerfa3310Century26RegistrationFields,\n} from './3310/century26.js';\nimport {\n cerfa3517Century26Fields,\n getCerfa3517Century26Payload,\n getCerfa3517Century26RegistrationField,\n getCerfa3517DDRCentury26RegistrationField,\n} from './3517/century26.js';\n\nconst vatDocuments: VatDocument[] = [\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '24',\n centuries: [2022, 2023, 2024],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2024,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century24Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2024) => getCerfa3310Century24RegistrationFields(data),\n fields: cerfa3310Century24Fields,\n fileName: '3310-2024',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2024) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '25',\n centuries: [2025],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2025,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century25Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2025) => getCerfa3310Century25RegistrationFields(data),\n fields: cerfa3310Century25Fields,\n fileName: '3310-2025',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2025) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '26',\n centuries: [2026],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2026,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century26Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2026) => getCerfa3310Century26RegistrationFields(data),\n fields: cerfa3310Century26Fields,\n fileName: '3310-2026',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2026) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3514,\n name: '3514',\n century: '23',\n centuries: [2022, 2023, 2024, 2025, 2026],\n payload: (payload: PayloadCerfa3514_2022) => getCerfa3514Century22Payload(payload),\n asponePayload: (data: Cerfa3514_2022) => getCerfa3514Century23RegistrationFields(data),\n fields: cerfa3514Century22Fields,\n fileName: '3514-2022',\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '25',\n centuries: [2022, 2023, 2024, 2025],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2025) =>\n getCerfa3517Century25Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2025) => getCerfa3517Century25RegistrationField(data),\n fields: cerfa3517Century25Fields,\n fileName: '3517-2025',\n annexFields: (data: Cerfa3517_2025) => getCerfa3517DDRCentury25egistrationField(data),\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '26',\n centuries: [2026],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2026) =>\n getCerfa3517Century26Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2026) => getCerfa3517Century26RegistrationField(data),\n fields: cerfa3517Century26Fields,\n fileName: '3517-2026',\n annexFields: (data: Cerfa3517_2026) => getCerfa3517DDRCentury26RegistrationField(data),\n },\n];\n\nexport const getVatCerfaObject = (idCerfaType: CerfaType, endDate: string): VatDocument => {\n // Suppression du add(1, 'day') suite à une déclaration 3310 31/12 rejetée car millésime trop avancé pour le champ (0C3CE366-26EB-4BBA-AB61-93A606686C9A)\n\n // CA12 => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 31/12/N-1\n // Autre => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 01/01/N\n const year =\n idCerfaType === CerfaType.CERFA_3517 && dayjs(endDate).format('MM-DD') === '12-31'\n ? +dayjs(endDate).year() + 1\n : +dayjs(endDate).year();\n\n const cerfa = vatDocuments.find((v) => v.idCerfaType === idCerfaType && v.centuries.find((c) => c === year));\n if (!cerfa) throw new Error(`Cerfa type #${idCerfaType} with century ${year} is not managed yet.`);\n\n return cerfa;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"centuries.js","sourceRoot":"","sources":["../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAkB1D,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAO9E,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,sCAAsC,GACvC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,uCAAuC,GACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,qBAAqB,CAAC;AAE7B,MAAM,YAAY,GAAkB;IAClC;QACE,WAAW,EAAE,SAAS,CAAC,UAAU;QACjC,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,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AK;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,WAAW,iBAAiB,IAAI,sBAAsB,CAAC,CAAC;IAEnG,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport { CerfaType } from '../../types/Enum/CerfaType.js';\nimport { VatDocument } from '../../types/Interface/api/cerfa/ReadCerfa.js';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry.js';\nimport {\n Cerfa3310_2024,\n Cerfa3310_2025,\n Cerfa3310_2026,\n PayloadCerfa3310_2024,\n PayloadCerfa3310_2025,\n PayloadCerfa3310_2026,\n} from '../../types/Interface/api/cerfa/3310.js';\nimport {\n Cerfa3514_2022,\n Cerfa3519_2017,\n PayloadCerfa3514_2022,\n PayloadCerfa3519_2017,\n UpdatedAnnotation,\n} from '../../types/index.js';\nimport { cerfa3519Century17Fields, getCerfa3519Century17Payload } from './3519/century17.js';\nimport { getCerfa3519Century23RegistrationFields } from './3519/century23.js';\nimport { cerfa3514Century22Fields, getCerfa3514Century22Payload } from './3514/century22.js';\nimport { getCerfa3514Century23RegistrationFields } from './3514/century23.js';\nimport {\n Cerfa3517_2025,\n Cerfa3517_2026,\n PayloadCerfa3517_2025,\n PayloadCerfa3517_2026,\n} from '../../types/Interface/api/cerfa/3517.js';\nimport {\n cerfa3310Century24Fields,\n getCerfa3310Century24Payload,\n getCerfa3310Century24RegistrationFields,\n} from './3310/century24.js';\nimport {\n cerfa3517Century25Fields,\n getCerfa3517Century25Payload,\n getCerfa3517Century25RegistrationField,\n} from './3517/century25.js';\nimport {\n cerfa3310Century25Fields,\n getCerfa3310Century25Payload,\n getCerfa3310Century25RegistrationFields,\n} from './3310/century25.js';\nimport {\n cerfa3310Century26Fields,\n getCerfa3310Century26Payload,\n getCerfa3310Century26RegistrationFields,\n} from './3310/century26.js';\nimport {\n cerfa3517Century26Fields,\n getCerfa3517Century26Payload,\n getCerfa3517Century26RegistrationField,\n getCerfa3517DDRCentury26RegistrationField,\n} from './3517/century26.js';\n\nconst vatDocuments: VatDocument[] = [\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '24',\n centuries: [2022, 2023, 2024],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2024,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century24Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2024) => getCerfa3310Century24RegistrationFields(data),\n fields: cerfa3310Century24Fields,\n fileName: '3310-2024',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2024) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '25',\n centuries: [2025],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2025,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century25Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2025) => getCerfa3310Century25RegistrationFields(data),\n fields: cerfa3310Century25Fields,\n fileName: '3310-2025',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2025) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3310,\n name: '3310',\n century: '26',\n centuries: [2026],\n payload: (\n accountingEntries: IAccountingEntry[],\n payload: PayloadCerfa3310_2026,\n updatedEntries: UpdatedAnnotation,\n ) => getCerfa3310Century26Payload(accountingEntries, payload, updatedEntries),\n asponePayload: (data: Cerfa3310_2026) => getCerfa3310Century26RegistrationFields(data),\n fields: cerfa3310Century26Fields,\n fileName: '3310-2026',\n annex: {\n name: '3519',\n century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),\n shouldInclude: (data: Cerfa3310_2026) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),\n payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),\n asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),\n fields: cerfa3519Century17Fields,\n fileName: '3519-2017',\n },\n },\n {\n idCerfaType: CerfaType.CERFA_3514,\n name: '3514',\n century: '23',\n centuries: [2022, 2023, 2024, 2025, 2026],\n payload: (payload: PayloadCerfa3514_2022) => getCerfa3514Century22Payload(payload),\n asponePayload: (data: Cerfa3514_2022) => getCerfa3514Century23RegistrationFields(data),\n fields: cerfa3514Century22Fields,\n fileName: '3514-2022',\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '25',\n centuries: [2022, 2023, 2024, 2025],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2025) =>\n getCerfa3517Century25Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2025) => getCerfa3517Century25RegistrationField(data),\n fields: cerfa3517Century25Fields,\n fileName: '3517-2025',\n annexFields: (data: Cerfa3517_2025) => getCerfa3517DDRCentury26RegistrationField(data),\n },\n {\n idCerfaType: CerfaType.CERFA_3517,\n name: '3517',\n century: '26',\n centuries: [2026],\n payload: (accountingEntries: IAccountingEntry[], payload: PayloadCerfa3517_2026) =>\n getCerfa3517Century26Payload(accountingEntries, payload),\n asponePayload: (data: Cerfa3517_2026) => getCerfa3517Century26RegistrationField(data),\n fields: cerfa3517Century26Fields,\n fileName: '3517-2026',\n annexFields: (data: Cerfa3517_2026) => getCerfa3517DDRCentury26RegistrationField(data),\n },\n];\n\nexport const getVatCerfaObject = (idCerfaType: CerfaType, endDate: string): VatDocument => {\n // Suppression du add(1, 'day') suite à une déclaration 3310 31/12 rejetée car millésime trop avancé pour le champ (0C3CE366-26EB-4BBA-AB61-93A606686C9A)\n\n // CA12 => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 31/12/N-1\n // Autre => Utiliser le millésime N pour les déclarations dont la date de fin de période CB/DTM >= 01/01/N\n const year =\n idCerfaType === CerfaType.CERFA_3517 && dayjs(endDate).format('MM-DD') === '12-31'\n ? +dayjs(endDate).year() + 1\n : +dayjs(endDate).year();\n\n const cerfa = vatDocuments.find((v) => v.idCerfaType === idCerfaType && v.centuries.find((c) => c === year));\n if (!cerfa) throw new Error(`Cerfa type #${idCerfaType} with century ${year} is not managed yet.`);\n\n return cerfa;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33",
|
|
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
|
"type": "module",
|
|
@@ -24,6 +24,12 @@ export class QueryDocumentRequest {
|
|
|
24
24
|
@IsOptional()
|
|
25
25
|
@IsArray()
|
|
26
26
|
typeFile?: TypeFile[];
|
|
27
|
+
|
|
28
|
+
@ApiPropertyOptional()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsBoolean()
|
|
31
|
+
@ToBoolean()
|
|
32
|
+
onlyFileToValidate?: boolean;
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export class SendRelaunchDocumentsMail {
|
|
@@ -263,7 +263,7 @@ export function getCerfa3517Century25Payload(
|
|
|
263
263
|
onInvoice: isNil ? 0 : round(onInvoiceDeductible),
|
|
264
264
|
onFlatRate: isNil ? 0 : round(payload.deductible?.onFlatRate ?? 0),
|
|
265
265
|
total1: 0, // Calculé plus bas
|
|
266
|
-
rate: isNil ?
|
|
266
|
+
rate: isNil ? 100 : round(payload.deductible?.rate ?? 100, 2),
|
|
267
267
|
onImmobilization: isNil ? 0 : round(onImmobilizationDeductible),
|
|
268
268
|
previousCredit: isNil ? 0 : round(payload.deductible?.previousCredit ?? 0),
|
|
269
269
|
forget: isNil ? 0 : round(payload.deductible?.forget ?? 0),
|
|
@@ -1812,164 +1812,6 @@ export function getCerfa3517Century25RegistrationField(data: Cerfa3517_2025): As
|
|
|
1812
1812
|
];
|
|
1813
1813
|
}
|
|
1814
1814
|
|
|
1815
|
-
export function getCerfa3517DDRCentury25egistrationField(data: Cerfa3517_2025): AsponeFormFields {
|
|
1816
|
-
if (data.refund.asked > 0) {
|
|
1817
|
-
return [
|
|
1818
|
-
{
|
|
1819
|
-
name: '3517DDR',
|
|
1820
|
-
fields: [
|
|
1821
|
-
{
|
|
1822
|
-
key: 'AA',
|
|
1823
|
-
tag: 'Valeur',
|
|
1824
|
-
isMultiple: false,
|
|
1825
|
-
description:
|
|
1826
|
-
'MOA Crédit remboursable dégagé à la clôture de lannée ou de lexercice si celui-ci est supérieur ou égal à 150 euros 100173 a',
|
|
1827
|
-
value: data.refund.creditRefundable,
|
|
1828
|
-
},
|
|
1829
|
-
{
|
|
1830
|
-
key: 'AB',
|
|
1831
|
-
tag: 'Valeur',
|
|
1832
|
-
isMultiple: false,
|
|
1833
|
-
description: 'MOA Excédent de versement de TVA dégagé 100174 b',
|
|
1834
|
-
value: data.refund.surplus,
|
|
1835
|
-
},
|
|
1836
|
-
{
|
|
1837
|
-
key: 'AC',
|
|
1838
|
-
tag: 'Valeur',
|
|
1839
|
-
isMultiple: false,
|
|
1840
|
-
description: 'MOA Maximum remboursable 100175 c',
|
|
1841
|
-
value: data.refund.maximum,
|
|
1842
|
-
},
|
|
1843
|
-
{
|
|
1844
|
-
key: 'AD',
|
|
1845
|
-
tag: 'Valeur',
|
|
1846
|
-
isMultiple: false,
|
|
1847
|
-
description: 'MOA Remboursement demandé 100176 d',
|
|
1848
|
-
value: data.refund.asked,
|
|
1849
|
-
},
|
|
1850
|
-
{
|
|
1851
|
-
key: 'AE',
|
|
1852
|
-
tag: 'Valeur',
|
|
1853
|
-
isMultiple: false,
|
|
1854
|
-
description: 'MOA Crédit reportable si le crédit dégagé est inférieur à 150 euros 100177 e',
|
|
1855
|
-
value: data.refund.reportable,
|
|
1856
|
-
},
|
|
1857
|
-
{
|
|
1858
|
-
key: 'AF',
|
|
1859
|
-
value: null,
|
|
1860
|
-
isMultiple: false,
|
|
1861
|
-
tags: [
|
|
1862
|
-
{
|
|
1863
|
-
tag: 'Designation',
|
|
1864
|
-
description: 'NAD Nom et prénom du demandeur 100178 ',
|
|
1865
|
-
value: textFormatting(data.refund.name, 35),
|
|
1866
|
-
},
|
|
1867
|
-
{
|
|
1868
|
-
tag: 'AdresseVille',
|
|
1869
|
-
description: 'NAD Lieu de dépôt de la demande 100184 ',
|
|
1870
|
-
value: data.refund.place,
|
|
1871
|
-
},
|
|
1872
|
-
],
|
|
1873
|
-
},
|
|
1874
|
-
{
|
|
1875
|
-
key: 'AG',
|
|
1876
|
-
tag: 'Valeur',
|
|
1877
|
-
isMultiple: false,
|
|
1878
|
-
description: 'MOA Montant dont le remboursement est demandé 100180 ',
|
|
1879
|
-
value: data.refund.asked,
|
|
1880
|
-
},
|
|
1881
|
-
{
|
|
1882
|
-
key: 'AH',
|
|
1883
|
-
tag: 'Valeur',
|
|
1884
|
-
isMultiple: false,
|
|
1885
|
-
description:
|
|
1886
|
-
'CCI Demande de remboursement à créditer au compte désigné Table TBX avec X pour sélectionné, CCI/7037 = CAV/1131 = TBX 100189 ',
|
|
1887
|
-
value: data.refund.shouldCredit ? 'X' : null,
|
|
1888
|
-
},
|
|
1889
|
-
{
|
|
1890
|
-
key: 'AJ',
|
|
1891
|
-
tag: 'Valeur',
|
|
1892
|
-
isMultiple: false,
|
|
1893
|
-
description:
|
|
1894
|
-
'CCI Demande de remboursement à imputer sur échéance future Table TBX avec X pour sélectionné, CCI/7037 = CAV/1131 = TBX 100186 ',
|
|
1895
|
-
value: data.refund.shouldImpute ? 'X' : null,
|
|
1896
|
-
},
|
|
1897
|
-
{
|
|
1898
|
-
key: 'AK',
|
|
1899
|
-
value: null,
|
|
1900
|
-
isMultiple: false,
|
|
1901
|
-
tags: [
|
|
1902
|
-
{
|
|
1903
|
-
tag: 'Iban',
|
|
1904
|
-
description: 'FII IBAN IBAN: 34 caractères alphanumériques (INTERNATIONAL BANK ACCOUNT NUMBER) 902429 ',
|
|
1905
|
-
value: 'DYNAMIC_IBAN',
|
|
1906
|
-
},
|
|
1907
|
-
{
|
|
1908
|
-
tag: 'Bic',
|
|
1909
|
-
description: 'FII BIC BIC : 8 ou 11 caractères alphanumériques (BANK IDENTIFIER CODE) 902409 ',
|
|
1910
|
-
value: 'DYNAMIC_BIC',
|
|
1911
|
-
},
|
|
1912
|
-
{
|
|
1913
|
-
tag: 'TitulaireDesignation',
|
|
1914
|
-
description: 'FII Nom du titulaire du compte 100187 ',
|
|
1915
|
-
value: textFormatting(data.refund.name, 35),
|
|
1916
|
-
},
|
|
1917
|
-
],
|
|
1918
|
-
},
|
|
1919
|
-
{
|
|
1920
|
-
key: 'AL',
|
|
1921
|
-
value: null,
|
|
1922
|
-
isMultiple: false,
|
|
1923
|
-
tags: [
|
|
1924
|
-
{
|
|
1925
|
-
tag: 'TexteLibre1',
|
|
1926
|
-
description: 'FTX Commentaires type 1, ligne 1 1° zone de 512 c 100447 ',
|
|
1927
|
-
value: null,
|
|
1928
|
-
},
|
|
1929
|
-
{
|
|
1930
|
-
tag: 'TexteLibre2',
|
|
1931
|
-
description: 'FTX Commentaires type 1, ligne 2 2° zone de 512 c 100547 ',
|
|
1932
|
-
value: null,
|
|
1933
|
-
},
|
|
1934
|
-
{
|
|
1935
|
-
tag: 'TexteLibre3',
|
|
1936
|
-
description: 'FTX Commentaires type 1, ligne 3 3° zone de 512 c 100548 ',
|
|
1937
|
-
value: null,
|
|
1938
|
-
},
|
|
1939
|
-
{
|
|
1940
|
-
tag: 'TexteLibre4',
|
|
1941
|
-
description: 'FTX Commentaires type 1, ligne 4 4° zone de 512 c 100549 ',
|
|
1942
|
-
value: null,
|
|
1943
|
-
},
|
|
1944
|
-
{
|
|
1945
|
-
tag: 'TexteLibre5',
|
|
1946
|
-
description: 'FTX Commentaires type 1, ligne 5 5° zone de 512 c 100550 ',
|
|
1947
|
-
value: null,
|
|
1948
|
-
},
|
|
1949
|
-
],
|
|
1950
|
-
},
|
|
1951
|
-
{
|
|
1952
|
-
key: 'BA',
|
|
1953
|
-
tag: 'Valeur',
|
|
1954
|
-
isMultiple: false,
|
|
1955
|
-
description:
|
|
1956
|
-
'DTM Cession ou cessation ou décès ou entrée dans un groupe TVA, date de lévènement Format attendu : yyyyMMdd 905929 ',
|
|
1957
|
-
value: null,
|
|
1958
|
-
},
|
|
1959
|
-
{
|
|
1960
|
-
key: 'BB',
|
|
1961
|
-
tag: 'Valeur',
|
|
1962
|
-
isMultiple: false,
|
|
1963
|
-
description: 'CCI Cession ou cessation ou décès ou entrée dans un groupe TVA 905930 ',
|
|
1964
|
-
value: null,
|
|
1965
|
-
},
|
|
1966
|
-
],
|
|
1967
|
-
},
|
|
1968
|
-
];
|
|
1969
|
-
}
|
|
1970
|
-
return [];
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
1815
|
export const cerfa3517Century25Fields: CerfaPayloadForm[] = [
|
|
1974
1816
|
{
|
|
1975
1817
|
sectionName: 'Général',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
2
|
import { isDefined } from 'class-validator';
|
|
3
3
|
import { uniqBy, round } from 'lodash-es';
|
|
4
|
-
import { Cerfa3517_2026, PayloadCerfa3517_2026 } from '../../../types/Interface/api/cerfa/3517.js';
|
|
4
|
+
import { Cerfa3517_2025, Cerfa3517_2026, PayloadCerfa3517_2026 } from '../../../types/Interface/api/cerfa/3517.js';
|
|
5
5
|
import { IAccountingEntry } from '../../../types/Interface/models/IAccountingEntry.js';
|
|
6
6
|
import { Vat } from '../../../types/Enum/Vat.js';
|
|
7
7
|
import {
|
|
@@ -269,7 +269,7 @@ export function getCerfa3517Century26Payload(
|
|
|
269
269
|
onInvoice: isNil ? 0 : round(onInvoiceDeductible),
|
|
270
270
|
onFlatRate: isNil ? 0 : round(payload.deductible?.onFlatRate ?? 0),
|
|
271
271
|
total1: 0, // Calculé plus bas
|
|
272
|
-
rate: isNil ?
|
|
272
|
+
rate: isNil ? 100 : round(payload.deductible?.rate ?? 100, 2),
|
|
273
273
|
onImmobilization: isNil ? 0 : round(onImmobilizationDeductible),
|
|
274
274
|
previousCredit: isNil ? 0 : round(payload.deductible?.previousCredit ?? 0),
|
|
275
275
|
forget: isNil ? 0 : round(payload.deductible?.forget ?? 0),
|
|
@@ -1722,7 +1722,7 @@ export function getCerfa3517Century26RegistrationField(data: Cerfa3517_2026): As
|
|
|
1722
1722
|
];
|
|
1723
1723
|
}
|
|
1724
1724
|
|
|
1725
|
-
export function getCerfa3517DDRCentury26RegistrationField(data: Cerfa3517_2026): AsponeFormFields {
|
|
1725
|
+
export function getCerfa3517DDRCentury26RegistrationField(data: Cerfa3517_2025 | Cerfa3517_2026): AsponeFormFields {
|
|
1726
1726
|
if (data.refund.asked > 0) {
|
|
1727
1727
|
return [
|
|
1728
1728
|
{
|
|
@@ -36,7 +36,6 @@ import {
|
|
|
36
36
|
cerfa3517Century25Fields,
|
|
37
37
|
getCerfa3517Century25Payload,
|
|
38
38
|
getCerfa3517Century25RegistrationField,
|
|
39
|
-
getCerfa3517DDRCentury25egistrationField,
|
|
40
39
|
} from './3517/century25.js';
|
|
41
40
|
import {
|
|
42
41
|
cerfa3310Century25Fields,
|
|
@@ -145,7 +144,7 @@ const vatDocuments: VatDocument[] = [
|
|
|
145
144
|
asponePayload: (data: Cerfa3517_2025) => getCerfa3517Century25RegistrationField(data),
|
|
146
145
|
fields: cerfa3517Century25Fields,
|
|
147
146
|
fileName: '3517-2025',
|
|
148
|
-
annexFields: (data: Cerfa3517_2025) =>
|
|
147
|
+
annexFields: (data: Cerfa3517_2025) => getCerfa3517DDRCentury26RegistrationField(data),
|
|
149
148
|
},
|
|
150
149
|
{
|
|
151
150
|
idCerfaType: CerfaType.CERFA_3517,
|