@silexpert/core 2.0.57 → 2.0.58
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/api/resources/CommercialDocument.d.ts +4 -1
- package/dist/api/resources/CommercialDocument.d.ts.map +1 -1
- package/dist/api/resources/CommercialDocument.js +9 -0
- package/dist/api/resources/CommercialDocument.js.map +1 -1
- package/dist/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/types/Enum/BrandClementine.js +1 -0
- package/dist/types/Enum/BrandClementine.js.map +1 -1
- package/dist/types/Enum/EInvoicingReasonType.d.ts +44 -0
- package/dist/types/Enum/EInvoicingReasonType.d.ts.map +1 -0
- package/dist/types/Enum/EInvoicingReasonType.js +143 -0
- package/dist/types/Enum/EInvoicingReasonType.js.map +1 -0
- package/dist/types/Enum/EInvoicingStatusCode.d.ts +2 -1
- package/dist/types/Enum/EInvoicingStatusCode.d.ts.map +1 -1
- package/dist/types/Enum/EInvoicingStatusCode.js +1 -0
- package/dist/types/Enum/EInvoicingStatusCode.js.map +1 -1
- package/dist/types/Enum/MimeType.d.ts +2 -0
- package/dist/types/Enum/MimeType.d.ts.map +1 -1
- package/dist/types/Enum/MimeType.js +1 -0
- package/dist/types/Enum/MimeType.js.map +1 -1
- package/dist/types/Enum/Unit.d.ts +2 -0
- package/dist/types/Enum/Unit.d.ts.map +1 -1
- package/dist/types/Enum/Unit.js +22 -0
- package/dist/types/Enum/Unit.js.map +1 -1
- package/dist/types/Interface/api/commercialManagement/Read.d.ts +26 -0
- package/dist/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
- package/dist/types/Interface/api/commercialManagement/Read.js.map +1 -1
- package/dist/types/Interface/api/docoon/Create.d.ts +17 -0
- package/dist/types/Interface/api/docoon/Create.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/Create.js +72 -1
- package/dist/types/Interface/api/docoon/Create.js.map +1 -1
- package/dist/types/Interface/api/docoon/DocoonInvoice.d.ts +16 -4
- package/dist/types/Interface/api/docoon/DocoonInvoice.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/DocoonInvoice.js.map +1 -1
- package/dist/types/Interface/models/IAccountingFile.d.ts +4 -0
- package/dist/types/Interface/models/IAccountingFile.d.ts.map +1 -1
- package/dist/types/Interface/models/IAccountingFile.js +3 -0
- package/dist/types/Interface/models/IAccountingFile.js.map +1 -1
- package/dist/types/Interface/models/IEInvoicing.d.ts +6 -0
- package/dist/types/Interface/models/IEInvoicing.d.ts.map +1 -1
- package/dist/types/Interface/models/IEInvoicing.js +3 -0
- package/dist/types/Interface/models/IEInvoicing.js.map +1 -1
- package/dist/types/Interface/models/IEInvoicingStatus.d.ts +2 -0
- package/dist/types/Interface/models/IEInvoicingStatus.d.ts.map +1 -1
- package/dist/types/Interface/models/IEInvoicingStatus.js +1 -0
- package/dist/types/Interface/models/IEInvoicingStatus.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/vat/centuries.d.ts.map +1 -1
- package/dist/utils/vat/centuries.js +11 -1
- package/dist/utils/vat/centuries.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/CommercialDocument.ts +16 -0
- package/ts/types/Enum/BrandClementine.ts +1 -0
- package/ts/types/Enum/EInvoicingReasonType.ts +156 -0
- package/ts/types/Enum/EInvoicingStatusCode.ts +1 -0
- package/ts/types/Enum/MimeType.ts +1 -0
- package/ts/types/Enum/Unit.ts +24 -1
- package/ts/types/Interface/api/commercialManagement/Read.ts +25 -0
- package/ts/types/Interface/api/docoon/Create.ts +46 -0
- package/ts/types/Interface/api/docoon/DocoonInvoice.ts +16 -3
- package/ts/types/Interface/models/IAccountingFile.ts +4 -0
- package/ts/types/Interface/models/IEInvoicing.ts +6 -0
- package/ts/types/Interface/models/IEInvoicingStatus.ts +2 -0
- package/ts/types/index.ts +1 -0
- package/ts/utils/vat/centuries.ts +11 -1
|
@@ -71,12 +71,22 @@ const vatDocuments = [
|
|
|
71
71
|
idCerfaType: CerfaType.CERFA_3514,
|
|
72
72
|
name: '3514',
|
|
73
73
|
century: '23',
|
|
74
|
-
centuries: [2022, 2023, 2024, 2025
|
|
74
|
+
centuries: [2022, 2023, 2024, 2025],
|
|
75
75
|
payload: (payload) => getCerfa3514Century22Payload(payload),
|
|
76
76
|
asponePayload: (data) => getCerfa3514Century23RegistrationFields(data),
|
|
77
77
|
fields: cerfa3514Century22Fields,
|
|
78
78
|
fileName: '3514-2022',
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
idCerfaType: CerfaType.CERFA_3514,
|
|
82
|
+
name: '3514',
|
|
83
|
+
century: '26',
|
|
84
|
+
centuries: [2026, 2027],
|
|
85
|
+
payload: (payload) => getCerfa3514Century22Payload(payload),
|
|
86
|
+
asponePayload: (data) => getCerfa3514Century23RegistrationFields(data),
|
|
87
|
+
fields: cerfa3514Century22Fields,
|
|
88
|
+
fileName: '3514-2022', // TODO:
|
|
89
|
+
},
|
|
80
90
|
{
|
|
81
91
|
idCerfaType: CerfaType.CERFA_3517,
|
|
82
92
|
name: '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,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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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} 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"]}
|
|
1
|
+
{"version":3,"file":"centuries.js","sourceRoot":"","sources":["../../../ts/utils/vat/centuries.ts"],"names":[],"mappings":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I,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} 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],\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_3514,\n name: '3514',\n century: '26',\n centuries: [2026, 2027],\n payload: (payload: PayloadCerfa3514_2022) => getCerfa3514Century22Payload(payload),\n asponePayload: (data: Cerfa3514_2022) => getCerfa3514Century23RegistrationFields(data),\n fields: cerfa3514Century22Fields,\n fileName: '3514-2022', // TODO:\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,11 +1,13 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import { Resource } from '../Resource.js';
|
|
3
3
|
import {
|
|
4
|
+
AcceptEInvoice,
|
|
4
5
|
BasePaginate,
|
|
5
6
|
CreateInvoiceDocument,
|
|
6
7
|
CreatePreSaleDocument,
|
|
7
8
|
CreateRegenerateDocument,
|
|
8
9
|
EstimateInvoiceType,
|
|
10
|
+
IEInvoicing,
|
|
9
11
|
IEstimateInvoice,
|
|
10
12
|
QueryCountByStatus,
|
|
11
13
|
QueryDocumentPaginated,
|
|
@@ -13,8 +15,10 @@ import {
|
|
|
13
15
|
QueryNextReference,
|
|
14
16
|
QueryPaginate,
|
|
15
17
|
ReadCountDocumentByStatus,
|
|
18
|
+
ReadEinvoiceInfo,
|
|
16
19
|
ReadEstimateInvoice,
|
|
17
20
|
ReadPreview,
|
|
21
|
+
RejectEInvoice,
|
|
18
22
|
UpdateCommercialDocument,
|
|
19
23
|
} from '../../types/index.js';
|
|
20
24
|
|
|
@@ -108,4 +112,16 @@ export class CommercialDocument extends Resource {
|
|
|
108
112
|
},
|
|
109
113
|
});
|
|
110
114
|
}
|
|
115
|
+
|
|
116
|
+
decline(idEInvoicing: number, payload: RejectEInvoice): Promise<IEInvoicing> {
|
|
117
|
+
return this.axios.$post(`/commercial-management/e-invoicing/${idEInvoicing}/decline`, payload);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
accept(idEInvoicing: number, payload: AcceptEInvoice): Promise<IEInvoicing> {
|
|
121
|
+
return this.axios.$post(`/commercial-management/e-invoicing/${idEInvoicing}/accept`, payload);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
eInvoiceInformation(idEInvoicing: number): Promise<ReadEinvoiceInfo> {
|
|
125
|
+
return this.axios.$get(`/commercial-management/e-invoicing/${idEInvoicing}`);
|
|
126
|
+
}
|
|
111
127
|
}
|
|
@@ -148,6 +148,7 @@ export const BrandClementine: Brand[] = [
|
|
|
148
148
|
resiliation: 'resiliation@comptastartbyclementine.fr',
|
|
149
149
|
satisfaction: 'satisfaction-client@comptastartbyclementine.fr',
|
|
150
150
|
gestion: 'gestion@clementine.fr',
|
|
151
|
+
facturation: 'facturation@clementine.fr',
|
|
151
152
|
},
|
|
152
153
|
companyInformation: {
|
|
153
154
|
ape: '6920Z',
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { EInvoicingDirection } from './EInvoicingDirection.js';
|
|
2
|
+
|
|
3
|
+
export enum EInvoicingReasonType {
|
|
4
|
+
INCORRECT_AMOUNT = 1,
|
|
5
|
+
CALCULATION_ERROR = 2,
|
|
6
|
+
E_ADDRESS_ERROR = 3,
|
|
7
|
+
SEMANTIC_ERROR = 4,
|
|
8
|
+
CONSISTENCY_CHECK_ERROR = 5,
|
|
9
|
+
E_ADDRESS_CONTROL_ERROR = 6,
|
|
10
|
+
B2G_CONTROL_ERROR = 7,
|
|
11
|
+
ATTACHMENT_REFERENCE_ERROR = 8,
|
|
12
|
+
ATTACHMENT_ASSOCIATION_ERROR = 9,
|
|
13
|
+
RECIPIENT_ERROR = 10,
|
|
14
|
+
ROUTING_ERROR = 11,
|
|
15
|
+
UNITY_ERROR = 12,
|
|
16
|
+
DUPLICATE_INVOICE = 13,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export enum EInvoicingReasonTypeCode {
|
|
20
|
+
INCORRECT_AMOUNT = 'MONTANTTOTAL_ERR',
|
|
21
|
+
CALCULATION_ERROR = 'CALCUL_ERR',
|
|
22
|
+
E_ADDRESS_ERROR = 'ADR_ERR',
|
|
23
|
+
SEMANTIC_ERROR = 'REJ_SEMAN',
|
|
24
|
+
CONSISTENCY_CHECK_ERROR = 'REJ_COH',
|
|
25
|
+
E_ADDRESS_CONTROL_ERROR = 'REJ_ADR',
|
|
26
|
+
B2G_CONTROL_ERROR = 'REJ_CONT_B2G',
|
|
27
|
+
ATTACHMENT_REFERENCE_ERROR = 'REJ_REF_PJ',
|
|
28
|
+
ATTACHMENT_ASSOCIATION_ERROR = 'REJ_ASS_PJ',
|
|
29
|
+
RECIPIENT_ERROR = 'DEST_INC',
|
|
30
|
+
ROUTING_ERROR = 'ROUTAGE_ERR',
|
|
31
|
+
UNITY_ERROR = 'REJ_UNI',
|
|
32
|
+
DUPLICATE_INVOICE = 'DOUBLON',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type EInvoicingReason = {
|
|
36
|
+
id: EInvoicingReasonType;
|
|
37
|
+
reasonCode: EInvoicingReasonTypeCode;
|
|
38
|
+
label: string;
|
|
39
|
+
description: string;
|
|
40
|
+
type: EInvoicingDirection[];
|
|
41
|
+
isVisibleByClient: boolean;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type EInvocingReasonListType = {
|
|
45
|
+
[key: string]: EInvoicingReason;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const einvoicingReasonList: EInvocingReasonListType = {
|
|
49
|
+
INCORRECT_AMOUNT: {
|
|
50
|
+
id: EInvoicingReasonType.INCORRECT_AMOUNT,
|
|
51
|
+
reasonCode: EInvoicingReasonTypeCode.INCORRECT_AMOUNT,
|
|
52
|
+
label: 'Montant total erroné',
|
|
53
|
+
description: 'Un des montants totaux de la facutre est erronée, par exemple Net à payer',
|
|
54
|
+
type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
|
|
55
|
+
isVisibleByClient: true,
|
|
56
|
+
},
|
|
57
|
+
CALCULATION_ERROR: {
|
|
58
|
+
id: EInvoicingReasonType.CALCULATION_ERROR,
|
|
59
|
+
reasonCode: EInvoicingReasonTypeCode.CALCULATION_ERROR,
|
|
60
|
+
label: 'Erreur de calcul de la facture',
|
|
61
|
+
description: 'Soit détecté au schematron, soit après (pour les lignes, ou arrondi non accepté)',
|
|
62
|
+
type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
|
|
63
|
+
isVisibleByClient: true,
|
|
64
|
+
},
|
|
65
|
+
E_ADDRESS_ERROR: {
|
|
66
|
+
id: EInvoicingReasonType.E_ADDRESS_ERROR,
|
|
67
|
+
reasonCode: EInvoicingReasonTypeCode.E_ADDRESS_ERROR,
|
|
68
|
+
label: 'Adresse de facturation électronique erronée',
|
|
69
|
+
description: "L'adresse de facturation électronique du destinataire(BT-49 ou BT-34) est absente ou erronée",
|
|
70
|
+
type: [EInvoicingDirection.EMISSION],
|
|
71
|
+
isVisibleByClient: false,
|
|
72
|
+
},
|
|
73
|
+
SEMANTIC_ERROR: {
|
|
74
|
+
id: EInvoicingReasonType.SEMANTIC_ERROR,
|
|
75
|
+
reasonCode: EInvoicingReasonTypeCode.SEMANTIC_ERROR,
|
|
76
|
+
label: 'Rejet pour erreur sémantique',
|
|
77
|
+
description: 'Analyse du format sémantique',
|
|
78
|
+
type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
|
|
79
|
+
isVisibleByClient: true,
|
|
80
|
+
},
|
|
81
|
+
CONSISTENCY_CHECK_ERROR: {
|
|
82
|
+
id: EInvoicingReasonType.CONSISTENCY_CHECK_ERROR,
|
|
83
|
+
reasonCode: EInvoicingReasonTypeCode.CONSISTENCY_CHECK_ERROR,
|
|
84
|
+
label: 'Rejet sur contrôle Cohérence de données',
|
|
85
|
+
description: 'Contrôle de cohérence des données (les balises et les référentiels)',
|
|
86
|
+
type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
|
|
87
|
+
isVisibleByClient: false,
|
|
88
|
+
},
|
|
89
|
+
E_ADDRESS_CONTROL_ERROR: {
|
|
90
|
+
id: EInvoicingReasonType.E_ADDRESS_CONTROL_ERROR,
|
|
91
|
+
reasonCode: EInvoicingReasonTypeCode.E_ADDRESS_CONTROL_ERROR,
|
|
92
|
+
label: "Rejet sur Contrôle d'adressage",
|
|
93
|
+
description: "Contrôle d'adressage",
|
|
94
|
+
type: [EInvoicingDirection.EMISSION],
|
|
95
|
+
isVisibleByClient: false,
|
|
96
|
+
},
|
|
97
|
+
B2G_CONTROL_ERROR: {
|
|
98
|
+
id: EInvoicingReasonType.B2G_CONTROL_ERROR,
|
|
99
|
+
reasonCode: EInvoicingReasonTypeCode.B2G_CONTROL_ERROR,
|
|
100
|
+
label: 'Rejet sur Contrôle métier B2G',
|
|
101
|
+
description: "Contrôle B2G (vérification du n° d'engagement)",
|
|
102
|
+
type: [EInvoicingDirection.EMISSION],
|
|
103
|
+
isVisibleByClient: false,
|
|
104
|
+
},
|
|
105
|
+
ATTACHMENT_REFERENCE_ERROR: {
|
|
106
|
+
id: EInvoicingReasonType.ATTACHMENT_REFERENCE_ERROR,
|
|
107
|
+
reasonCode: EInvoicingReasonTypeCode.ATTACHMENT_REFERENCE_ERROR,
|
|
108
|
+
label: 'Rejet sur Référence de la PJ',
|
|
109
|
+
description: 'Référence de la PJ',
|
|
110
|
+
type: [EInvoicingDirection.EMISSION],
|
|
111
|
+
isVisibleByClient: false,
|
|
112
|
+
},
|
|
113
|
+
ATTACHMENT_ASSOCIATION_ERROR: {
|
|
114
|
+
id: EInvoicingReasonType.ATTACHMENT_ASSOCIATION_ERROR,
|
|
115
|
+
reasonCode: EInvoicingReasonTypeCode.ATTACHMENT_ASSOCIATION_ERROR,
|
|
116
|
+
label: "Rejet sur erreur d'association de la PJ",
|
|
117
|
+
description: "Erreur d'associartion de la PJ",
|
|
118
|
+
type: [EInvoicingDirection.EMISSION],
|
|
119
|
+
isVisibleByClient: false,
|
|
120
|
+
},
|
|
121
|
+
RECIPIENT_ERROR: {
|
|
122
|
+
id: EInvoicingReasonType.RECIPIENT_ERROR,
|
|
123
|
+
reasonCode: EInvoicingReasonTypeCode.RECIPIENT_ERROR,
|
|
124
|
+
label: 'Destinataire inconnu',
|
|
125
|
+
description: "À l'émission, le destinataire est inconnu. Il n'existe pas dans l'annuaire",
|
|
126
|
+
type: [EInvoicingDirection.EMISSION],
|
|
127
|
+
isVisibleByClient: false,
|
|
128
|
+
},
|
|
129
|
+
ROUTING_ERROR: {
|
|
130
|
+
id: EInvoicingReasonType.ROUTING_ERROR,
|
|
131
|
+
reasonCode: EInvoicingReasonTypeCode.ROUTING_ERROR,
|
|
132
|
+
label: 'Erreur de routage',
|
|
133
|
+
description: `Ce motif doit être utilisé dans le cas où les informations servant au routage de la facture sont devenues obsolètes. Ceci peut se produire par exmple:
|
|
134
|
+
- en case de décalage de mise à jour de l'annuaire
|
|
135
|
+
- une erreur de la PDP émettrice
|
|
136
|
+
Post correction de l'annuaire par le destinataire de la facture, la facture peut être transmise à nouveau (sans aucun changement sur les données de la facture)`,
|
|
137
|
+
type: [EInvoicingDirection.EMISSION],
|
|
138
|
+
isVisibleByClient: false,
|
|
139
|
+
},
|
|
140
|
+
UNITY_ERROR: {
|
|
141
|
+
id: EInvoicingReasonType.UNITY_ERROR,
|
|
142
|
+
reasonCode: EInvoicingReasonTypeCode.UNITY_ERROR,
|
|
143
|
+
label: 'Rejet sur contrôle unicité',
|
|
144
|
+
description: "Contôle d'unicité",
|
|
145
|
+
type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
|
|
146
|
+
isVisibleByClient: true,
|
|
147
|
+
},
|
|
148
|
+
DUPLICATE_INVOICE: {
|
|
149
|
+
id: EInvoicingReasonType.DUPLICATE_INVOICE,
|
|
150
|
+
reasonCode: EInvoicingReasonTypeCode.DUPLICATE_INVOICE,
|
|
151
|
+
label: 'Facture en doublon',
|
|
152
|
+
description: 'Facture en doublon (même numéro, même fournisseur et même année de la date de la facture)',
|
|
153
|
+
type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
|
|
154
|
+
isVisibleByClient: true,
|
|
155
|
+
},
|
|
156
|
+
};
|
package/ts/types/Enum/Unit.ts
CHANGED
|
@@ -3,6 +3,7 @@ export class IUnit {
|
|
|
3
3
|
id: number;
|
|
4
4
|
name: string;
|
|
5
5
|
shortName: string;
|
|
6
|
+
codeEN16931: string;
|
|
6
7
|
};
|
|
7
8
|
}
|
|
8
9
|
|
|
@@ -31,118 +32,140 @@ export enum UnitId {
|
|
|
31
32
|
GRAM = 22,
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
export type IUnitList = Array<{ name: string; id: number; shortName: string }>;
|
|
35
|
+
export type IUnitList = Array<{ name: string; id: number; shortName: string; eInvoicingCode: string | null }>;
|
|
35
36
|
|
|
36
37
|
export const Unit: IUnit = {
|
|
37
38
|
ITEM: {
|
|
38
39
|
id: UnitId.ITEM,
|
|
39
40
|
name: 'Article',
|
|
40
41
|
shortName: 'art',
|
|
42
|
+
codeEN16931: 'NAR',
|
|
41
43
|
},
|
|
42
44
|
HOUR: {
|
|
43
45
|
id: UnitId.HOUR,
|
|
44
46
|
name: 'Heure',
|
|
45
47
|
shortName: 'h',
|
|
48
|
+
codeEN16931: 'HUR',
|
|
46
49
|
},
|
|
47
50
|
DAY: {
|
|
48
51
|
id: UnitId.DAY,
|
|
49
52
|
name: 'Jour',
|
|
50
53
|
shortName: 'j',
|
|
54
|
+
codeEN16931: 'DAY',
|
|
51
55
|
},
|
|
52
56
|
KILOGRAM: {
|
|
53
57
|
id: UnitId.KILOGRAM,
|
|
54
58
|
name: 'Kilogramme',
|
|
55
59
|
shortName: 'kg',
|
|
60
|
+
codeEN16931: 'KGM',
|
|
56
61
|
},
|
|
57
62
|
LITER: {
|
|
58
63
|
id: UnitId.LITER,
|
|
59
64
|
name: 'Litre',
|
|
60
65
|
shortName: 'l',
|
|
66
|
+
codeEN16931: 'LTR',
|
|
61
67
|
},
|
|
62
68
|
KILOMETER: {
|
|
63
69
|
id: UnitId.KILOMETER,
|
|
64
70
|
name: 'Kilomètres',
|
|
65
71
|
shortName: 'km',
|
|
72
|
+
codeEN16931: 'KMT',
|
|
66
73
|
},
|
|
67
74
|
HALF_DAY: {
|
|
68
75
|
id: UnitId.HALF_DAY,
|
|
69
76
|
name: 'Demi journée',
|
|
70
77
|
shortName: 'demi j',
|
|
78
|
+
codeEN16931: 'LS', // (Half hour existe, mais pas de code standard pour "demi-journée")
|
|
71
79
|
},
|
|
72
80
|
YEAR: {
|
|
73
81
|
id: UnitId.YEAR,
|
|
74
82
|
name: 'Année',
|
|
75
83
|
shortName: 'an',
|
|
84
|
+
codeEN16931: 'ANN',
|
|
76
85
|
},
|
|
77
86
|
WEEK: {
|
|
78
87
|
id: UnitId.WEEK,
|
|
79
88
|
name: 'Semaine',
|
|
80
89
|
shortName: 'sem',
|
|
90
|
+
codeEN16931: 'WEE',
|
|
81
91
|
},
|
|
82
92
|
MONTH: {
|
|
83
93
|
id: UnitId.MONTH,
|
|
84
94
|
name: 'Mois',
|
|
85
95
|
shortName: 'mois',
|
|
96
|
+
codeEN16931: 'MON',
|
|
86
97
|
},
|
|
87
98
|
QUARTER: {
|
|
88
99
|
id: UnitId.QUARTER,
|
|
89
100
|
name: 'Trimestre',
|
|
90
101
|
shortName: 'trim',
|
|
102
|
+
codeEN16931: 'QAN',
|
|
91
103
|
},
|
|
92
104
|
PIECE: {
|
|
93
105
|
id: UnitId.PIECE,
|
|
94
106
|
name: 'Pièce',
|
|
95
107
|
shortName: 'p',
|
|
108
|
+
codeEN16931: 'H87',
|
|
96
109
|
},
|
|
97
110
|
FIXED: {
|
|
98
111
|
id: UnitId.FIXED,
|
|
99
112
|
name: 'Forfaitaire',
|
|
100
113
|
shortName: 'f',
|
|
114
|
+
codeEN16931: 'LS',
|
|
101
115
|
},
|
|
102
116
|
SQUARE_METER: {
|
|
103
117
|
id: UnitId.SQUARE_METER,
|
|
104
118
|
name: 'Mètre carré',
|
|
105
119
|
shortName: 'm2',
|
|
120
|
+
codeEN16931: 'MTK',
|
|
106
121
|
},
|
|
107
122
|
CUBIC_METER: {
|
|
108
123
|
id: UnitId.CUBIC_METER,
|
|
109
124
|
name: 'Mètre cube',
|
|
110
125
|
shortName: 'm3',
|
|
126
|
+
codeEN16931: 'MTQ',
|
|
111
127
|
},
|
|
112
128
|
METER: {
|
|
113
129
|
id: UnitId.METER,
|
|
114
130
|
name: 'Mètre',
|
|
115
131
|
shortName: 'm',
|
|
132
|
+
codeEN16931: 'MTR',
|
|
116
133
|
},
|
|
117
134
|
SUBSCRIPTION: {
|
|
118
135
|
id: UnitId.SUBSCRIPTION,
|
|
119
136
|
name: 'Abonnement',
|
|
120
137
|
shortName: 'abo',
|
|
138
|
+
codeEN16931: 'LS',
|
|
121
139
|
},
|
|
122
140
|
NIGHT: {
|
|
123
141
|
id: UnitId.NIGHT,
|
|
124
142
|
name: 'Nuitée',
|
|
125
143
|
shortName: 'nuit',
|
|
144
|
+
codeEN16931: 'NI',
|
|
126
145
|
},
|
|
127
146
|
TON: {
|
|
128
147
|
id: UnitId.TON,
|
|
129
148
|
name: 'Tonne',
|
|
130
149
|
shortName: 't',
|
|
150
|
+
codeEN16931: 'TNE',
|
|
131
151
|
},
|
|
132
152
|
HECTARE: {
|
|
133
153
|
id: UnitId.HECTARE,
|
|
134
154
|
name: 'Hectare',
|
|
135
155
|
shortName: 'ha',
|
|
156
|
+
codeEN16931: 'HAR',
|
|
136
157
|
},
|
|
137
158
|
MINUTE: {
|
|
138
159
|
id: UnitId.MINUTE,
|
|
139
160
|
name: 'Minute',
|
|
140
161
|
shortName: 'min',
|
|
162
|
+
codeEN16931: 'MIN',
|
|
141
163
|
},
|
|
142
164
|
GRAM: {
|
|
143
165
|
id: UnitId.GRAM,
|
|
144
166
|
name: 'Gramme',
|
|
145
167
|
shortName: 'g',
|
|
168
|
+
codeEN16931: 'GRM',
|
|
146
169
|
},
|
|
147
170
|
};
|
|
148
171
|
|
|
@@ -9,6 +9,7 @@ import { IThirdParty } from '../../models/IThirdParty.js';
|
|
|
9
9
|
import { InternationalizationChoices } from '../../../../utils/commercialManagement/internationalization/type.js';
|
|
10
10
|
import { ISaleEmail } from '../../models/ISaleEmail.js';
|
|
11
11
|
import { CountryId } from '#types/Enum/Country.js';
|
|
12
|
+
import { IAccountingTransaction } from '#types/Interface/models/IAccountingTransaction.js';
|
|
12
13
|
|
|
13
14
|
export type ReadCashBasedInvoice = Partial<IAccountingFile>;
|
|
14
15
|
|
|
@@ -213,3 +214,27 @@ export type ReadEInvoicingReception = {
|
|
|
213
214
|
}>;
|
|
214
215
|
};
|
|
215
216
|
};
|
|
217
|
+
|
|
218
|
+
export type ProductInvoiceFromEInvoice = Omit<IProductInvoice, 'id' | 'idEstimateInvoice' | 'createdAt' | 'updatedAt'>;
|
|
219
|
+
|
|
220
|
+
export type ReadEinvoiceInfo = {
|
|
221
|
+
item: IAccountingFile | IAccountingTransaction;
|
|
222
|
+
products: ProductInvoiceFromEInvoice[];
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export type ReadEInvoice = {
|
|
226
|
+
externalId: string;
|
|
227
|
+
direction: 'In' | 'Out';
|
|
228
|
+
type: string;
|
|
229
|
+
flow: 'CustomerInvoice' | 'SupplierInvoice';
|
|
230
|
+
syntax: 'UBL' | 'CII' | 'Factur-X';
|
|
231
|
+
category: 'FLUX1' | 'FLUX2' | 'FLUX3' | 'FLUX4' | 'FLUX5' | 'FLUX6';
|
|
232
|
+
name: string;
|
|
233
|
+
status: string;
|
|
234
|
+
statusDetails: Array<{ code: string; description: string; fullDescription: string }>;
|
|
235
|
+
updatedAt: string;
|
|
236
|
+
submittedAt: string;
|
|
237
|
+
documentStatus: string;
|
|
238
|
+
externalStructureId: string;
|
|
239
|
+
documentId: string;
|
|
240
|
+
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { IsString, IsOptional, IsArray, IsEnum, IsDateString } from 'class-validator';
|
|
3
|
+
import { DocoonFlowType } from './DocoonInvoice.js';
|
|
4
|
+
import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';
|
|
5
|
+
import { EInvoicingReasonType } from '#types/Enum/EInvoicingReasonType.js';
|
|
6
|
+
|
|
1
7
|
export type CreateLegalEntity = {
|
|
2
8
|
name: string;
|
|
3
9
|
legalId: string;
|
|
@@ -40,3 +46,43 @@ export type RelaunchDirectoryLine = {
|
|
|
40
46
|
addressingIdentifier: string;
|
|
41
47
|
};
|
|
42
48
|
};
|
|
49
|
+
export class ImportDocoonInvoice {
|
|
50
|
+
@ApiPropertyOptional()
|
|
51
|
+
@IsDateString()
|
|
52
|
+
@IsOptional()
|
|
53
|
+
updatedAfter?: string;
|
|
54
|
+
|
|
55
|
+
@ApiPropertyOptional()
|
|
56
|
+
@IsArray()
|
|
57
|
+
@IsString({ each: true })
|
|
58
|
+
@IsOptional()
|
|
59
|
+
flowType?: DocoonFlowType[];
|
|
60
|
+
}
|
|
61
|
+
export class RejectEInvoice {
|
|
62
|
+
@ApiProperty()
|
|
63
|
+
@IsEnum(EInvoicingStatusCode)
|
|
64
|
+
status: EInvoicingStatusCode;
|
|
65
|
+
|
|
66
|
+
@ApiProperty()
|
|
67
|
+
@IsEnum(EInvoicingReasonType)
|
|
68
|
+
reasonType: EInvoicingReasonType;
|
|
69
|
+
|
|
70
|
+
@ApiProperty()
|
|
71
|
+
@IsString()
|
|
72
|
+
reason: string;
|
|
73
|
+
}
|
|
74
|
+
export class AcceptEInvoice {
|
|
75
|
+
@ApiProperty()
|
|
76
|
+
@IsEnum(EInvoicingStatusCode)
|
|
77
|
+
status: EInvoicingStatusCode;
|
|
78
|
+
|
|
79
|
+
@ApiPropertyOptional()
|
|
80
|
+
@IsString()
|
|
81
|
+
@IsOptional()
|
|
82
|
+
internalNumber?: string;
|
|
83
|
+
|
|
84
|
+
@ApiPropertyOptional()
|
|
85
|
+
@IsString()
|
|
86
|
+
@IsOptional()
|
|
87
|
+
internalComment?: string;
|
|
88
|
+
}
|
|
@@ -163,7 +163,7 @@ export type ReadDocoonSearch = {
|
|
|
163
163
|
result: ReadDocoonResultSearch[];
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
type ReadDocoonResultSearch = {
|
|
166
|
+
export type ReadDocoonResultSearch = {
|
|
167
167
|
documentId: string;
|
|
168
168
|
structureId: string;
|
|
169
169
|
submittedAt: string;
|
|
@@ -173,16 +173,29 @@ type ReadDocoonResultSearch = {
|
|
|
173
173
|
flowDirection: DocoonFlowDirection;
|
|
174
174
|
flowType: DocoonFlowType;
|
|
175
175
|
flowStatus: string;
|
|
176
|
-
flowSyntax:
|
|
176
|
+
flowSyntax: DocoonFlowSyntax;
|
|
177
177
|
flowProfile: string;
|
|
178
|
-
flowCategory:
|
|
178
|
+
flowCategory: DocoonFlowCategory;
|
|
179
179
|
isRead: boolean;
|
|
180
180
|
documentTypeCode: string;
|
|
181
181
|
documentStatus: string;
|
|
182
182
|
name: string;
|
|
183
|
+
acknowledgement: DocoonFlowAcknowledgement;
|
|
183
184
|
};
|
|
184
185
|
|
|
186
|
+
export type DocoonFlowAcknowledgement = {
|
|
187
|
+
status: 'Ok' | 'Error';
|
|
188
|
+
details: Array<{
|
|
189
|
+
level: string | null;
|
|
190
|
+
item: string | null;
|
|
191
|
+
reasonCode: string | null;
|
|
192
|
+
reasonMessage: string | null;
|
|
193
|
+
fullMessage: string | null;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
185
196
|
export type DocoonFlowType = 'CustomerInvoice' | 'SupplierInvoice';
|
|
186
197
|
export type DocoonFlowDirection = 'In' | 'Out';
|
|
198
|
+
export type DocoonFlowSyntax = 'UBL' | 'CII' | 'Factur-X';
|
|
199
|
+
export type DocoonFlowCategory = 'FLUX1' | 'FLUX2' | 'FLUX3' | 'FLUX4' | 'FLUX5' | 'FLUX6';
|
|
187
200
|
|
|
188
201
|
export type DocoonFlowDocType = 'Original' | 'ReadableView';
|
|
@@ -5,6 +5,7 @@ import { IFile } from './IFile.js';
|
|
|
5
5
|
import { ISociety } from './ISociety.js';
|
|
6
6
|
import { IAccountingFileType } from './IAccountingFileType.js';
|
|
7
7
|
import { IEInvoicing } from './IEInvoicing.js';
|
|
8
|
+
import { IThirdParty } from './IThirdParty.js';
|
|
8
9
|
|
|
9
10
|
// accountingFile
|
|
10
11
|
export class IAccountingFile {
|
|
@@ -17,9 +18,11 @@ export class IAccountingFile {
|
|
|
17
18
|
totalTaxIncluded?: number | null;
|
|
18
19
|
totalTaxExcluded?: number | null;
|
|
19
20
|
isMobile: boolean;
|
|
21
|
+
internComment?: string | null;
|
|
20
22
|
idAccountingTransaction?: number | null;
|
|
21
23
|
idEstimateInvoice?: number | null;
|
|
22
24
|
idAccountingFileType: number;
|
|
25
|
+
idThirdParty?: number | null;
|
|
23
26
|
idSociety: number;
|
|
24
27
|
idFile: number;
|
|
25
28
|
idEInvoicing?: number | null;
|
|
@@ -36,5 +39,6 @@ export class IAccountingFile {
|
|
|
36
39
|
fileType?: IFileType;
|
|
37
40
|
file?: IFile;
|
|
38
41
|
society?: ISociety;
|
|
42
|
+
thirdParty?: IThirdParty | null;
|
|
39
43
|
eInvoicing?: IEInvoicing | null;
|
|
40
44
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { IFile } from './IFile.js';
|
|
2
2
|
import { EInvoicingDirection } from '../../Enum/EInvoicingDirection.js';
|
|
3
|
+
import { IEInvoicingStatus } from './IEInvoicingStatus.js';
|
|
4
|
+
import { IAccountingFile } from './IAccountingFile.js';
|
|
5
|
+
import { IAccountingTransaction } from './IAccountingTransaction.js';
|
|
3
6
|
|
|
4
7
|
export class IEInvoicing {
|
|
5
8
|
id?: number;
|
|
@@ -12,4 +15,7 @@ export class IEInvoicing {
|
|
|
12
15
|
updatedAt?: Date | null;
|
|
13
16
|
|
|
14
17
|
xmlFile?: IFile;
|
|
18
|
+
eInvoicingStatus?: IEInvoicingStatus[];
|
|
19
|
+
AccountingFile?: IAccountingFile;
|
|
20
|
+
AccountingTransaction?: IAccountingTransaction;
|
|
15
21
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { IUser } from './IUser.js';
|
|
2
2
|
import { EInvoicingStatusCode } from '../../Enum/EInvoicingStatusCode.js';
|
|
3
3
|
import { IEInvoicing } from './IEInvoicing.js';
|
|
4
|
+
import { EInvoicingReasonType } from '../../../index.js';
|
|
4
5
|
|
|
5
6
|
export class IEInvoicingStatus {
|
|
6
7
|
id?: number;
|
|
7
8
|
status: EInvoicingStatusCode;
|
|
9
|
+
reasonType: EInvoicingReasonType | null;
|
|
8
10
|
message: string | null;
|
|
9
11
|
idUser: number;
|
|
10
12
|
idEInvoicing: number;
|
package/ts/types/index.ts
CHANGED
|
@@ -303,6 +303,7 @@ export * from './Form/FormConnector.js';
|
|
|
303
303
|
export * from './Enum/AccountingTransactionTracking.js';
|
|
304
304
|
export * from './Enum/EInvoicingDirection.js';
|
|
305
305
|
export * from './Enum/EInvoicingStatusCode.js';
|
|
306
|
+
export * from './Enum/EInvoicingReasonType.js';
|
|
306
307
|
export * from './Enum/Feature.js';
|
|
307
308
|
export * from './Enum/JuridicalSocietyEnum.js';
|
|
308
309
|
export * from './Enum/Template.js';
|