@silexpert/core 2.0.32 → 2.0.34

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.
Files changed (55) hide show
  1. package/dist/types/Enum/CommercialManagement.d.ts +7 -1
  2. package/dist/types/Enum/CommercialManagement.d.ts.map +1 -1
  3. package/dist/types/Enum/CommercialManagement.js +32 -17
  4. package/dist/types/Enum/CommercialManagement.js.map +1 -1
  5. package/dist/types/Enum/EstimateInvoice.d.ts.map +1 -1
  6. package/dist/types/Enum/EstimateInvoice.js +2 -1
  7. package/dist/types/Enum/EstimateInvoice.js.map +1 -1
  8. package/dist/types/Enum/KilometricAllowanceScale.d.ts.map +1 -1
  9. package/dist/types/Enum/KilometricAllowanceScale.js +119 -0
  10. package/dist/types/Enum/KilometricAllowanceScale.js.map +1 -1
  11. package/dist/types/Interface/api/documentRequest/Query.d.ts +1 -0
  12. package/dist/types/Interface/api/documentRequest/Query.d.ts.map +1 -1
  13. package/dist/types/Interface/api/documentRequest/Query.js +8 -0
  14. package/dist/types/Interface/api/documentRequest/Query.js.map +1 -1
  15. package/dist/types/Interface/api/society/CreateUserToSocietyWithPermission.d.ts +2 -2
  16. package/dist/types/Interface/api/society/CreateUserToSocietyWithPermission.d.ts.map +1 -1
  17. package/dist/types/Interface/api/society/CreateUserToSocietyWithPermission.js.map +1 -1
  18. package/dist/types/Interface/api/society/ReadSocietyUsers.d.ts +2 -3
  19. package/dist/types/Interface/api/society/ReadSocietyUsers.d.ts.map +1 -1
  20. package/dist/types/Interface/api/society/ReadSocietyUsers.js.map +1 -1
  21. package/dist/types/index.d.ts +0 -1
  22. package/dist/types/index.d.ts.map +1 -1
  23. package/dist/types/index.js +0 -1
  24. package/dist/types/index.js.map +1 -1
  25. package/dist/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
  26. package/dist/utils/commercialManagement/internationalization/choices.js +40 -55
  27. package/dist/utils/commercialManagement/internationalization/choices.js.map +1 -1
  28. package/dist/utils/vat/3517/century25.d.ts +0 -1
  29. package/dist/utils/vat/3517/century25.d.ts.map +1 -1
  30. package/dist/utils/vat/3517/century25.js +1 -154
  31. package/dist/utils/vat/3517/century25.js.map +1 -1
  32. package/dist/utils/vat/3517/century26.d.ts +2 -2
  33. package/dist/utils/vat/3517/century26.d.ts.map +1 -1
  34. package/dist/utils/vat/3517/century26.js +1 -1
  35. package/dist/utils/vat/3517/century26.js.map +1 -1
  36. package/dist/utils/vat/centuries.d.ts.map +1 -1
  37. package/dist/utils/vat/centuries.js +2 -2
  38. package/dist/utils/vat/centuries.js.map +1 -1
  39. package/package.json +1 -1
  40. package/ts/types/Enum/CommercialManagement.ts +34 -18
  41. package/ts/types/Enum/EstimateInvoice.ts +2 -1
  42. package/ts/types/Enum/KilometricAllowanceScale.ts +119 -0
  43. package/ts/types/Interface/api/documentRequest/Query.ts +6 -0
  44. package/ts/types/Interface/api/society/CreateUserToSocietyWithPermission.ts +3 -2
  45. package/ts/types/Interface/api/society/ReadSocietyUsers.ts +2 -3
  46. package/ts/types/index.ts +0 -1
  47. package/ts/utils/commercialManagement/internationalization/choices.ts +48 -55
  48. package/ts/utils/vat/3517/century25.ts +1 -159
  49. package/ts/utils/vat/3517/century26.ts +3 -3
  50. package/ts/utils/vat/centuries.ts +1 -2
  51. package/dist/types/Interface/api/user/Permissions.d.ts +0 -12
  52. package/dist/types/Interface/api/user/Permissions.d.ts.map +0 -1
  53. package/dist/types/Interface/api/user/Permissions.js +0 -2
  54. package/dist/types/Interface/api/user/Permissions.js.map +0 -1
  55. package/ts/types/Interface/api/user/Permissions.ts +0 -11
@@ -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;AAiK3E,eAAO,MAAM,iBAAiB,GAAI,aAAa,SAAS,EAAE,SAAS,MAAM,KAAG,WAc3E,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, getCerfa3517DDRCentury25egistrationField, } from './3517/century25.js';
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) => getCerfa3517DDRCentury25egistrationField(data),
89
+ annexFields: (data) => getCerfa3517DDRCentury26RegistrationField(data),
90
90
  },
91
91
  {
92
92
  idCerfaType: CerfaType.CERFA_3517,
@@ -1 +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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,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AAY,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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
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",
@@ -75,6 +75,7 @@ export enum AccountingCategoryId {
75
75
  GOOD_AND_SERVICE = 3,
76
76
  }
77
77
 
78
+ // WARN: L'ordre des éléments de la liste TermOfPaymentList a son importance (pour la gestion de l'internationnalisation)
78
79
  export const AccountingCategoryList: Array<{ label: string; id: AccountingCategoryId }> = [
79
80
  {
80
81
  label: 'Livraison de biens',
@@ -227,29 +228,44 @@ export const DefaultEmailTemplateList: Array<Omit<ISaleEmail, 'idSociety'>> = [
227
228
  },
228
229
  ];
229
230
 
230
- export const CommercialDiscountsList: string[] = ['Non applicable', 'Aucun escompte en cas de paiement anticipé'];
231
+ /**
232
+ * WARN: L'ordre de ces listes est important car il correspond à l'ordre d'affichage dans l'interface et est utilisé pour faire le lien avec les options d'internationalisationChoices dans la génération des documents commerciaux
233
+ */
234
+ export const CommercialDiscountsList: string[] = ['Aucun escompte en cas de paiement anticipé', 'Non applicable'];
231
235
 
232
236
  export const CommercialPenaltiesList: string[] = [
233
- 'Non applicable',
234
237
  '3 fois le taux légal',
238
+ 'Non applicable',
235
239
  'Taux directeur de la BCE + 10 points',
236
240
  ];
237
241
 
238
- export const CommercialVatMentionList: string[] = [
239
- 'TVA: Non concerné',
240
- 'TVA: Non applicable',
241
- 'TVA non applicable, art. 293 B du CGI',
242
- 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',
243
- "Non soumis à TVA selon l'article 261C du CGI",
244
- 'Article 261 D du code général des impôts (CGI)',
245
- 'Exonération de TVA, article 283-2 du Code général des impôts',
246
- 'Exonération de la TVA : Article 262 ter I du CGI',
247
- 'Mention de TVA 261.4.4 1 du CGI',
248
- "Régime particulier Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE",
249
- "Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE",
250
- "Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE",
251
- 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',
252
- 'Facture soumise au régime de l’auto-liquidation de la TVA',
242
+ export const CommercialVatMentionList: Array<{ text: string; value: string }> = [
243
+ { text: 'Soumis à TVA', value: 'TVA: Non concerné' },
244
+ { text: 'Pas de TVA', value: 'TVA non applicable, art. 293 B du CGI' },
245
+ { text: 'Exports hors UE', value: 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI' },
246
+ { text: 'TVA exonérée (intérêt général)', value: "Non soumis à TVA selon l'article 261C du CGI" },
247
+ { text: 'TVA exonérée (location)', value: 'Article 261 D du CGI' },
248
+ { text: 'TVA autoliquidée (prestataire étranger)', value: 'Exonération de TVA, article 283-2 du CGI' },
249
+ { text: 'Vente UE sans TVA', value: 'Exonération de la TVA : Article 262 ter I du CGI' },
250
+ { text: 'TVA exonérée (formation)', value: 'Mention de TVA 261.4.4 1 du CGI' },
251
+ {
252
+ text: 'TVA sur marge (occasion)',
253
+ value: "Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE",
254
+ },
255
+ {
256
+ text: 'TVA sur marge (art)',
257
+ value: "Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE",
258
+ },
259
+ {
260
+ text: 'TVA sur marge (collection)',
261
+ value:
262
+ "Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE",
263
+ },
264
+ {
265
+ text: 'TVA - Forfait voyage',
266
+ value: 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',
267
+ },
268
+ { text: 'TVA autoliquidée (sous-traitant)', value: 'Facture soumise au régime de l’auto-liquidation de la TVA' },
253
269
  ];
254
270
 
255
- export const CommercialRecoveryCostList = ['Non applicable', '40€'];
271
+ export const CommercialRecoveryCostList = ['40€', 'Non applicable'];
@@ -30,7 +30,7 @@ export const EstimateInvoiceTypeList: Array<{ id: EstimateInvoiceType; label: st
30
30
  },
31
31
  {
32
32
  id: EstimateInvoiceType.ACOMPTE,
33
- label: 'Facture d\'acompte',
33
+ label: "Facture d'acompte",
34
34
  },
35
35
  ];
36
36
 
@@ -45,6 +45,7 @@ export enum TermOfPayment {
45
45
  DUE_60_DAYS_AFTER_INVOICE = 8,
46
46
  }
47
47
 
48
+ // WARN: L'ordre des éléments de la liste TermOfPaymentList a son importance (pour la gestion de l'internationnalisation)
48
49
  export const TermOfPaymentList: Array<{ id: TermOfPayment; label: string }> = [
49
50
  { id: TermOfPayment.ON_DELIVERY, label: 'À la livraison' },
50
51
  { id: TermOfPayment.ON_ORDER, label: 'À la commande' },
@@ -739,4 +739,123 @@ export const KilometricAllowanceScale: KilometricAllowanceScaleType = {
739
739
  },
740
740
  },
741
741
  },
742
+ 2027: {
743
+ 1: {
744
+ power: {
745
+ 1: {
746
+ km: [
747
+ { maxDistance: 5000, ratio: 0.529, fixAmount: 0 },
748
+ { maxDistance: 20000, ratio: 0.316, fixAmount: 1065 },
749
+ { maxDistance: 0, ratio: 0.37, fixAmount: 0 },
750
+ ],
751
+ },
752
+ 2: {
753
+ km: [
754
+ { maxDistance: 5000, ratio: 0.529, fixAmount: 0 },
755
+ { maxDistance: 20000, ratio: 0.316, fixAmount: 1065 },
756
+ { maxDistance: 0, ratio: 0.37, fixAmount: 0 },
757
+ ],
758
+ },
759
+ 3: {
760
+ km: [
761
+ { maxDistance: 5000, ratio: 0.529, fixAmount: 0 },
762
+ { maxDistance: 20000, ratio: 0.316, fixAmount: 1065 },
763
+ { maxDistance: 0, ratio: 0.37, fixAmount: 0 },
764
+ ],
765
+ },
766
+ 4: {
767
+ km: [
768
+ { maxDistance: 5000, ratio: 0.606, fixAmount: 0 },
769
+ { maxDistance: 20000, ratio: 0.34, fixAmount: 1330 },
770
+ { maxDistance: 0, ratio: 0.407, fixAmount: 0 },
771
+ ],
772
+ },
773
+ 5: {
774
+ km: [
775
+ { maxDistance: 5000, ratio: 0.636, fixAmount: 0 },
776
+ { maxDistance: 20000, ratio: 0.357, fixAmount: 1395 },
777
+ { maxDistance: 0, ratio: 0.427, fixAmount: 0 },
778
+ ],
779
+ },
780
+ 6: {
781
+ km: [
782
+ { maxDistance: 5000, ratio: 0.665, fixAmount: 0 },
783
+ { maxDistance: 20000, ratio: 0.374, fixAmount: 1457 },
784
+ { maxDistance: 0, ratio: 0.447, fixAmount: 0 },
785
+ ],
786
+ },
787
+ 7: {
788
+ km: [
789
+ { maxDistance: 5000, ratio: 0.697, fixAmount: 0 },
790
+ { maxDistance: 20000, ratio: 0.394, fixAmount: 1515 },
791
+ { maxDistance: 0, ratio: 0.47, fixAmount: 0 },
792
+ ],
793
+ },
794
+ },
795
+ },
796
+ 2: {
797
+ power: {
798
+ 1: {
799
+ km: [
800
+ { maxDistance: 3000, ratio: 0.395, fixAmount: 0 },
801
+ { maxDistance: 6000, ratio: 0.099, fixAmount: 891 },
802
+ { maxDistance: 0, ratio: 0.248, fixAmount: 0 },
803
+ ],
804
+ },
805
+ 2: {
806
+ km: [
807
+ { maxDistance: 3000, ratio: 0.395, fixAmount: 0 },
808
+ { maxDistance: 6000, ratio: 0.099, fixAmount: 891 },
809
+ { maxDistance: 0, ratio: 0.248, fixAmount: 0 },
810
+ ],
811
+ },
812
+ 3: {
813
+ km: [
814
+ { maxDistance: 3000, ratio: 0.468, fixAmount: 0 },
815
+ { maxDistance: 6000, ratio: 0.082, fixAmount: 1158 },
816
+ { maxDistance: 0, ratio: 0.275, fixAmount: 0 },
817
+ ],
818
+ },
819
+ 4: {
820
+ km: [
821
+ { maxDistance: 3000, ratio: 0.468, fixAmount: 0 },
822
+ { maxDistance: 6000, ratio: 0.082, fixAmount: 1158 },
823
+ { maxDistance: 0, ratio: 0.275, fixAmount: 0 },
824
+ ],
825
+ },
826
+ 5: {
827
+ km: [
828
+ { maxDistance: 3000, ratio: 0.468, fixAmount: 0 },
829
+ { maxDistance: 6000, ratio: 0.082, fixAmount: 1158 },
830
+ { maxDistance: 0, ratio: 0.275, fixAmount: 0 },
831
+ ],
832
+ },
833
+ 6: {
834
+ km: [
835
+ { maxDistance: 3000, ratio: 0.606, fixAmount: 0 },
836
+ { maxDistance: 6000, ratio: 0.079, fixAmount: 1583 },
837
+ { maxDistance: 0, ratio: 0.343, fixAmount: 0 },
838
+ ],
839
+ },
840
+ 7: {
841
+ km: [
842
+ { maxDistance: 3000, ratio: 0.606, fixAmount: 0 },
843
+ { maxDistance: 6000, ratio: 0.079, fixAmount: 1583 },
844
+ { maxDistance: 0, ratio: 0.343, fixAmount: 0 },
845
+ ],
846
+ },
847
+ },
848
+ },
849
+ 3: {
850
+ power: {
851
+ 1: {
852
+ km: [
853
+ { maxDistance: 2000, ratio: 0.315, fixAmount: 0 },
854
+ { maxDistance: 5000, ratio: 0.079, fixAmount: 711 },
855
+ { maxDistance: 0, ratio: 0.198, fixAmount: 0 },
856
+ ],
857
+ },
858
+ },
859
+ },
860
+ },
742
861
  };
@@ -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 {
@@ -1,7 +1,7 @@
1
1
  import { IsBoolean, IsEmail, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
3
- import { Permissions } from '../user/Permissions.js';
4
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform.js';
4
+ import { IPermission } from '#types/Interface/models/IPermission.js';
5
5
 
6
6
  export class CreateUserToSocietyWithPermission {
7
7
  @ApiProperty()
@@ -23,7 +23,8 @@ export class CreateUserToSocietyWithPermission {
23
23
  acceptCgv?: boolean; // not sure if needed (maybe more a front notion)
24
24
 
25
25
  @ApiPropertyOptional()
26
- permissions?: Partial<Permissions>;
26
+ permissions?: Partial<IPermission>;
27
+
27
28
  @ApiPropertyOptional()
28
29
  @IsBoolean()
29
30
  @ToBoolean()
@@ -1,13 +1,12 @@
1
1
  import { Overwrite } from '../../../../utils/index.js';
2
- import { IUser } from '../../../index.js';
3
- import { Permissions } from '../user/Permissions.js';
2
+ import { IPermission, IUser } from '../../../index.js';
4
3
 
5
4
  export type ReadSocietyUsers = ReadSocietyUser[];
6
5
 
7
6
  export type ReadSocietyUser = Overwrite<
8
7
  IUser,
9
8
  {
10
- userPermissions: Permissions;
9
+ userPermissions: IPermission;
11
10
  isOwner?: boolean;
12
11
  }
13
12
  >;
package/ts/types/index.ts CHANGED
@@ -582,7 +582,6 @@ export * from './Interface/api/user/ParamsGetAllUserWithRoles.js';
582
582
  export * from './Interface/api/user/ParamsGetAllCollaborators.js';
583
583
  export * from './Interface/api/user/CreateCoworker.js';
584
584
  export * from './Interface/api/user/UpdateCoworker.js';
585
- export * from './Interface/api/user/Permissions.js';
586
585
  export * from './Interface/api/user/CollaboratorsByRoles.js';
587
586
  export * from './Interface/api/account/Read.js';
588
587
  export * from './Interface/api/balanceSheet/ReadFreelanceTurnover.js';
@@ -1,4 +1,13 @@
1
- import { AccountingCategoryId, InvoiceLanguage } from '../../../types/Enum/CommercialManagement.js';
1
+ import { TermOfPaymentList } from '#types/Enum/EstimateInvoice.js';
2
+ import {
3
+ AccountingCategoryId,
4
+ AccountingCategoryList,
5
+ CommercialDiscountsList,
6
+ CommercialPenaltiesList,
7
+ CommercialRecoveryCostList,
8
+ CommercialVatMentionList,
9
+ InvoiceLanguage,
10
+ } from '../../../types/Enum/CommercialManagement.js';
2
11
  import { InternationalizationChoicesType } from './type.js';
3
12
 
4
13
  type InternationalizationConsistencyKey =
@@ -32,25 +41,10 @@ export const internationalizationChoices: InternationalizationChoicesType = {
32
41
  ],
33
42
  },
34
43
  options: {
35
- penalties: ['Non applicable', '3 fois le taux légal', 'Taux directeur de la BCE + 10 points'],
36
- discount: ['Non applicable', 'Aucun escompte en cas de paiement anticipé'],
37
- vatMention: [
38
- 'TVA: Non concerné',
39
- 'TVA: Non applicable',
40
- 'TVA non applicable, art. 293 B du CGI',
41
- 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',
42
- "Non soumis à TVA selon l'article 261C du CGI",
43
- 'Article 261 D du code général des impôts (CGI)',
44
- 'Exonération de TVA, article 283-2 du Code général des impôts',
45
- 'Exonération de la TVA : Article 262 ter I du CGI',
46
- 'Mention de TVA 261.4.4 1 du CGI',
47
- "Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE",
48
- "Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE",
49
- "Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE",
50
- 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',
51
- 'Facture soumise au régime de l’auto-liquidation de la TVA',
52
- ],
53
- recoveryCost: ['Non applicable', '40€'],
44
+ penalties: CommercialPenaltiesList,
45
+ discount: CommercialDiscountsList,
46
+ vatMention: CommercialVatMentionList.map((mention) => mention.value),
47
+ recoveryCost: CommercialRecoveryCostList,
54
48
  paymentType: ['Carte bancaire', 'Chèque', 'Espèces', 'Prélèvement', 'Virement bancaire'],
55
49
  },
56
50
  },
@@ -398,17 +392,17 @@ export const internationalizationChoices: InternationalizationChoicesType = {
398
392
 
399
393
  const internationalizationMatching: { [key: string]: { fr: string; en: string }[] } = {
400
394
  penalties: [
401
- { fr: 'Non applicable', en: 'Not applicable' },
402
- { fr: '3 fois le taux légal', en: '3 times the legal rate' },
403
- { fr: 'Taux directeur de la BCE + 10 points', en: 'ECB key rate + 10 points' },
395
+ { fr: CommercialPenaltiesList[0], en: '3 times the legal rate' },
396
+ { fr: CommercialPenaltiesList[1], en: 'Not applicable' },
397
+ { fr: CommercialPenaltiesList[2], en: 'ECB key rate + 10 points' },
404
398
  ],
405
399
  discount: [
406
- { fr: 'Non applicable', en: 'Not applicable' },
407
- { fr: 'Aucun escompte en cas de paiement anticipé', en: 'No discount for early payment' },
400
+ { fr: CommercialDiscountsList[0], en: 'No discount for early payment' },
401
+ { fr: CommercialDiscountsList[1], en: 'Not applicable' },
408
402
  ],
409
403
  recoveryCost: [
410
- { fr: 'Non applicable', en: 'Not applicable' },
411
- { fr: '40€', en: '40€' },
404
+ { fr: CommercialRecoveryCostList[0], en: '40€' },
405
+ { fr: CommercialRecoveryCostList[1], en: 'Not applicable' },
412
406
  ],
413
407
  paymentType: [
414
408
  { fr: 'Carte bancaire', en: 'Credit card' },
@@ -418,96 +412,95 @@ const internationalizationMatching: { [key: string]: { fr: string; en: string }[
418
412
  { fr: 'Virement bancaire', en: 'Bank transfer' },
419
413
  ],
420
414
  vatMention: [
421
- { fr: 'TVA: Non concerné', en: 'VAT: Not affected' },
422
- { fr: 'TVA: Non applicable', en: 'VAT: Not applicable' },
415
+ { fr: CommercialVatMentionList[0].value, en: 'VAT: Not affected' },
423
416
  {
424
- fr: 'TVA non applicable, art. 293 B du CGI',
417
+ fr: CommercialVatMentionList[1].value,
425
418
  en: 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',
426
419
  },
427
420
  {
428
- fr: 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',
421
+ fr: CommercialVatMentionList[2].value,
429
422
  en: 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',
430
423
  },
431
424
  {
432
- fr: "Non soumis à TVA selon l'article 261C du CGI",
425
+ fr: CommercialVatMentionList[3].value,
426
+ en: 'Invoice subject to VAT reverse charge system',
427
+ },
428
+ {
429
+ fr: CommercialVatMentionList[4].value,
433
430
  en: 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',
434
431
  },
435
- { fr: 'Article 261 D du code général des impôts (CGI)', en: 'Article 261D of the French General Tax Code (FGTC)' },
432
+ { fr: CommercialVatMentionList[5].value, en: 'Article 261D of the French General Tax Code (FGTC)' },
436
433
  {
437
- fr: 'Exonération de TVA, article 283-2 du Code général des impôts',
434
+ fr: CommercialVatMentionList[6].value,
438
435
  en: 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',
439
436
  },
440
437
  {
441
- fr: 'Exonération de la TVA : Article 262 ter I du CGI',
438
+ fr: CommercialVatMentionList[7].value,
442
439
  en: 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',
443
440
  },
444
- { fr: 'Mention de TVA 261.4.4 1 du CGI', en: 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)' },
441
+ { fr: CommercialVatMentionList[8].value, en: 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)' },
445
442
  {
446
- fr: "Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE",
443
+ fr: CommercialVatMentionList[9].value,
447
444
  en: 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
448
445
  },
449
446
  {
450
- fr: "Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE",
447
+ fr: CommercialVatMentionList[10].value,
451
448
  en: 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
452
449
  },
453
450
  {
454
- fr: "Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE",
451
+ fr: CommercialVatMentionList[11].value,
455
452
  en: 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
456
453
  },
457
454
  {
458
- fr: 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',
455
+ fr: CommercialVatMentionList[12].value,
459
456
  en: 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
460
457
  },
461
- {
462
- fr: 'Facture soumise au régime de l’auto-liquidation de la TVA',
463
- en: 'Invoice subject to VAT reverse charge system',
464
- },
465
458
  ],
466
459
  termsOfPayment: [
467
460
  {
468
- fr: 'À la livraison',
461
+ fr: TermOfPaymentList[0].label,
469
462
  en: 'On delivery',
470
463
  },
471
464
  {
472
- fr: 'À la command',
465
+ fr: TermOfPaymentList[1].label,
473
466
  en: 'On order',
474
467
  },
475
468
  {
476
- fr: 'À réception de la facture',
469
+ fr: TermOfPaymentList[2].label,
477
470
  en: 'Upon receipt of invoice',
478
471
  },
479
472
  {
480
- fr: 'Exigible sous 14 jours',
473
+ fr: TermOfPaymentList[3].label,
481
474
  en: 'Due within 14 days',
482
475
  },
483
476
  {
484
- fr: 'Exigible sous 30 jours',
477
+ fr: TermOfPaymentList[4].label,
485
478
  en: 'Due within 30 days',
486
479
  },
487
480
  {
488
- fr: '30 jours à réception de la facture',
481
+ fr: TermOfPaymentList[5].label,
489
482
  en: '30 days upon receipt of invoice',
490
483
  },
491
484
  {
492
- fr: '45 jours à réception de la facture',
485
+ fr: TermOfPaymentList[6].label,
493
486
  en: '45 days upon receipt of invoice',
494
487
  },
495
488
  {
496
- fr: '60 jours à réception de la facture',
489
+ fr: TermOfPaymentList[7].label,
497
490
  en: '60 days upon receipt of invoice',
498
491
  },
499
492
  ],
500
493
  accountingCategory: [
501
494
  {
502
- fr: 'Livraison de biens',
495
+ fr: AccountingCategoryList[0].label,
503
496
  en: 'Supply of goods',
504
497
  },
505
498
  {
506
- fr: 'Prestation de services',
499
+ fr: AccountingCategoryList[1].label,
507
500
  en: 'Services provision',
508
501
  },
509
502
  {
510
- fr: 'Prestation de services et livraison de biens',
503
+ fr: AccountingCategoryList[2].label,
511
504
  en: 'Services provision and supply of goods',
512
505
  },
513
506
  ],