@silexpert/core 1.1.59 → 1.1.63

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 (78) hide show
  1. package/es/api/resources/GeneralLedger.d.ts +3 -1
  2. package/es/api/resources/GeneralLedger.d.ts.map +1 -1
  3. package/es/api/resources/GeneralLedger.js +6 -0
  4. package/es/api/resources/GeneralLedger.js.map +1 -1
  5. package/es/types/Enum/BrandClems.d.ts +2 -93
  6. package/es/types/Enum/BrandClems.d.ts.map +1 -1
  7. package/es/types/Enum/BrandClems.js +0 -80
  8. package/es/types/Enum/BrandClems.js.map +1 -1
  9. package/es/types/Enum/BrandStatutsExpress.d.ts +95 -0
  10. package/es/types/Enum/BrandStatutsExpress.d.ts.map +1 -0
  11. package/es/types/Enum/BrandStatutsExpress.js +97 -0
  12. package/es/types/Enum/BrandStatutsExpress.js.map +1 -0
  13. package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.d.ts +13 -0
  14. package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.d.ts.map +1 -1
  15. package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js +28 -1
  16. package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js.map +1 -1
  17. package/es/types/Interface/api/registration/ReadRegistration.d.ts +1 -0
  18. package/es/types/Interface/api/registration/ReadRegistration.d.ts.map +1 -1
  19. package/es/types/Interface/api/registration/ReadRegistration.js.map +1 -1
  20. package/es/types/index.d.ts +1 -0
  21. package/es/types/index.d.ts.map +1 -1
  22. package/es/types/index.js +1 -0
  23. package/es/types/index.js.map +1 -1
  24. package/es/utils/brands.d.ts +1 -1
  25. package/es/utils/brands.d.ts.map +1 -1
  26. package/es/utils/brands.js +5 -1
  27. package/es/utils/brands.js.map +1 -1
  28. package/es/utils/vat/3310/century23.d.ts.map +1 -1
  29. package/es/utils/vat/3310/century23.js +29 -32
  30. package/es/utils/vat/3310/century23.js.map +1 -1
  31. package/es/utils/vat/3514/century23.d.ts.map +1 -1
  32. package/es/utils/vat/3514/century23.js +28 -31
  33. package/es/utils/vat/3514/century23.js.map +1 -1
  34. package/es/utils/vat/3517/century23.d.ts.map +1 -1
  35. package/es/utils/vat/3517/century23.js +99 -107
  36. package/es/utils/vat/3517/century23.js.map +1 -1
  37. package/es/utils/vat/3519/century23.d.ts.map +1 -1
  38. package/es/utils/vat/3519/century23.js +69 -70
  39. package/es/utils/vat/3519/century23.js.map +1 -1
  40. package/es/utils/vat/registration.d.ts.map +1 -1
  41. package/es/utils/vat/registration.js +3 -1
  42. package/es/utils/vat/registration.js.map +1 -1
  43. package/js/api/resources/GeneralLedger.js +10 -0
  44. package/js/api/resources/GeneralLedger.js.map +1 -1
  45. package/js/types/Enum/BrandClems.js +0 -79
  46. package/js/types/Enum/BrandClems.js.map +1 -1
  47. package/js/types/Enum/BrandStatutsExpress.js +100 -0
  48. package/js/types/Enum/BrandStatutsExpress.js.map +1 -0
  49. package/js/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js +18 -0
  50. package/js/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js.map +1 -1
  51. package/js/types/Interface/api/registration/ReadRegistration.js.map +1 -1
  52. package/js/types/index.js +10 -0
  53. package/js/types/index.js.map +1 -1
  54. package/js/utils/brands.js +6 -1
  55. package/js/utils/brands.js.map +1 -1
  56. package/js/utils/vat/3310/century23.js +24 -29
  57. package/js/utils/vat/3310/century23.js.map +1 -1
  58. package/js/utils/vat/3514/century23.js +22 -27
  59. package/js/utils/vat/3514/century23.js.map +1 -1
  60. package/js/utils/vat/3517/century23.js +85 -95
  61. package/js/utils/vat/3517/century23.js.map +1 -1
  62. package/js/utils/vat/3519/century23.js +60 -65
  63. package/js/utils/vat/3519/century23.js.map +1 -1
  64. package/js/utils/vat/registration.js +3 -1
  65. package/js/utils/vat/registration.js.map +1 -1
  66. package/package.json +1 -1
  67. package/ts/api/resources/GeneralLedger.ts +9 -1
  68. package/ts/types/Enum/BrandClems.ts +0 -80
  69. package/ts/types/Enum/BrandStatutsExpress.ts +96 -0
  70. package/ts/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.ts +25 -0
  71. package/ts/types/Interface/api/registration/ReadRegistration.ts +1 -0
  72. package/ts/types/index.ts +1 -0
  73. package/ts/utils/brands.ts +6 -2
  74. package/ts/utils/vat/3310/century23.ts +29 -32
  75. package/ts/utils/vat/3514/century23.ts +28 -31
  76. package/ts/utils/vat/3517/century23.ts +98 -109
  77. package/ts/utils/vat/3519/century23.ts +68 -69
  78. package/ts/utils/vat/registration.ts +2 -1
@@ -4,6 +4,7 @@ import { BrandLegalstart } from '../types/Enum/BrandLegalstart';
4
4
  import { BrandComptalib } from '../types/Enum/BrandComptalib';
5
5
  import { BrandPourcentage } from '../types/Enum/BrandPourcentage';
6
6
  import { BrandClems } from '../types/Enum/BrandClems';
7
+ import { BrandStatutsExpress } from '../types/Enum/BrandStatutsExpress';
7
8
  const getBrandNameByNodeEnv = (nodeEnv) => {
8
9
  var _a;
9
10
  const env = (_a = nodeEnv !== null && nodeEnv !== void 0 ? nodeEnv : process.env.NODE_ENV) !== null && _a !== void 0 ? _a : process.env.API_HOST;
@@ -20,6 +21,9 @@ const getBrandNameByNodeEnv = (nodeEnv) => {
20
21
  if (env.indexOf('clems') > -1 || env.indexOf('Clems') > -1) {
21
22
  return 'Clems';
22
23
  }
24
+ if (env.indexOf('statuts') > -1 || env.indexOf('Statuts') > -1) {
25
+ return 'StatutsExpress';
26
+ }
23
27
  }
24
28
  return 'Clementine';
25
29
  };
@@ -27,7 +31,7 @@ const getAllBrandByNodeEnv = (nodeEnv) => {
27
31
  const nodeEnvUsed = nodeEnv !== null && nodeEnv !== void 0 ? nodeEnv : process.env.NODE_ENV;
28
32
  const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);
29
33
  const listEnvEnum = {
30
- BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems,
34
+ BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems, BrandStatutsExpress,
31
35
  };
32
36
  // @ts-ignore
33
37
  const currentConfigFile = listEnvEnum[`Brand${currentEnvName}`];
@@ -1 +1 @@
1
- {"version":3,"file":"brands.js","sourceRoot":"","sources":["../../ts/utils/brands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAiCtD,MAAM,qBAAqB,GAAG,CAAC,OAAgB,EAAuE,EAAE;;IACtH,MAAM,GAAG,GAAG,MAAA,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,mCAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;IACpE,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE;YACpE,OAAO,YAAY,CAAC;SACrB;QACD,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE;YAClE,OAAO,WAAW,CAAC;SACpB;QACD,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE;YACtE,OAAO,aAAa,CAAC;SACtB;QACD,IAAI,GAAG,CA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,YAAY,CAAC;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,qBAAqB,CAAC;IAC/E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,OAAO,EACL,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,GAC7E,CAAC","sourcesContent":["import { get as getLodash } from 'lodash';\nimport { BrandClementine } from '../types/Enum/BrandClementine';\nimport { BrandLegalstart } from '../types/Enum/BrandLegalstart';\nimport { BrandComptalib } from '../types/Enum/BrandComptalib';\nimport { BrandPourcentage } from '../types/Enum/BrandPourcentage';\nimport { BrandClems } from '../types/Enum/BrandClems';\n\ntype brand = {\n idTypeBrand: number,\n colors: {\n primary: string,\n },\n listMails: {\n bonjour: string,\n },\n listPhones: {\n contact: string,\n },\n name: string,\n urlApi1?: string,\n urlClient?: string,\n urlApp?: string,\n offices?: {\n LAXOU: {\n id : number,\n },\n HOME_OFFICE: {\n id : number,\n }\n },\n};\n\ntype getBrandConfigParams = {\n idTypeBrand?: number,\n objectWaited?: string,\n nodeEnv?: string\n};\n\nconst getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Clems' => {\n const env = nodeEnv ?? process.env.NODE_ENV ?? process.env.API_HOST;\n if (env) {\n if (env.indexOf('legalstart') > -1 || env.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (env.indexOf('comptalib') > -1 || env.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (env.indexOf('pourcentage') > -1 || env.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n if (env.indexOf('clems') > -1 || env.indexOf('Clems') > -1) {\n return 'Clems';\n }\n }\n return 'Clementine';\n};\n\nconst getAllBrandByNodeEnv = (nodeEnv?: string): Array<brand> => {\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n const brand = currentConfigFile;\n\n return brand;\n};\n\nconst getBrandConfig = (params: getBrandConfigParams): brand => {\n const {\n idTypeBrand = null, objectWaited = null, nodeEnv,\n } = params;\n let brand;\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n if (idTypeBrand) {\n // Récupération de la brand via idTypeBrand\n brand = currentConfigFile.find((b: brand) => b.idTypeBrand === idTypeBrand);\n }\n // else if (idSociety) {\n // Récupération de la brand via l'idSociety -> impossible directement depuis le core (pas d'accès au resources, ni au token pour l'appel via fetch)\n\n if (!brand) {\n // Si aucune brand trouvée, on passe par défaut la première brand de la liste\n [brand] = currentConfigFile.sort((a: brand, b: brand) => a.idTypeBrand - b.idTypeBrand);\n }\n\n if (objectWaited) {\n // Si on attend un attribut particulier de la brand, on le parcourt\n let objectToReturn = getLodash(brand, objectWaited);\n // Si aucun attribut trouvé, on renvoit celui de Clementine par défaut\n if (!objectToReturn) {\n const brandDefault = currentConfigFile.find((b: brand) => b.name === currentEnvName);\n objectToReturn = getLodash(brandDefault, objectWaited);\n }\n return objectToReturn;\n }\n\n return brand;\n};\n\nconst getBrandByEmail = (email: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Lecomptablefrancais' | null => {\n if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';\n if (email.indexOf('comptalib.com') > -1) return 'Comptalib';\n if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';\n if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('lecomptablefrancais.fr') > -1) return 'Lecomptablefrancais';\n return null;\n};\n\nexport {\n getBrandConfig, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail,\n};"]}
1
+ {"version":3,"file":"brands.js","sourceRoot":"","sources":["../../ts/utils/brands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAiCxE,MAAM,qBAAqB,GAAG,CAAC,OAAgB,EAA0F,EAAE;;IACzI,MAAM,GAAG,GAAG,MAAA,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,mCAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;IACpE,IAAI,GAAG,EAAE;QACP,IAAI,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE;YACpE,OAAO,YAAY,CAAC;SACrB;QACD,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE;YAClE,OAAO,WAAW,CAAC;SACpB;QACD,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG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OAAO,WAAW,CAAC;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,aAAa,CAAC;IAC/D,IAAI,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,YAAY,CAAC;IACpE,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,YAAY,CAAC;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,qBAAqB,CAAC;IAC/E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,OAAO,EACL,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,GAC7E,CAAC","sourcesContent":["import { get as getLodash } from 'lodash';\nimport { BrandClementine } from '../types/Enum/BrandClementine';\nimport { BrandLegalstart } from '../types/Enum/BrandLegalstart';\nimport { BrandComptalib } from '../types/Enum/BrandComptalib';\nimport { BrandPourcentage } from '../types/Enum/BrandPourcentage';\nimport { BrandClems } from '../types/Enum/BrandClems';\nimport { BrandStatutsExpress } from '../types/Enum/BrandStatutsExpress';\n\ntype brand = {\n idTypeBrand: number,\n colors: {\n primary: string,\n },\n listMails: {\n bonjour: string,\n },\n listPhones: {\n contact: string,\n },\n name: string,\n urlApi1?: string,\n urlClient?: string,\n urlApp?: string,\n offices?: {\n LAXOU: {\n id : number,\n },\n HOME_OFFICE: {\n id : number,\n }\n },\n};\n\ntype getBrandConfigParams = {\n idTypeBrand?: number,\n objectWaited?: string,\n nodeEnv?: string\n};\n\nconst getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Clems' | 'StatutsExpress' => {\n const env = nodeEnv ?? process.env.NODE_ENV ?? process.env.API_HOST;\n if (env) {\n if (env.indexOf('legalstart') > -1 || env.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (env.indexOf('comptalib') > -1 || env.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (env.indexOf('pourcentage') > -1 || env.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n if (env.indexOf('clems') > -1 || env.indexOf('Clems') > -1) {\n return 'Clems';\n }\n if (env.indexOf('statuts') > -1 || env.indexOf('Statuts') > -1) {\n return 'StatutsExpress';\n }\n }\n return 'Clementine';\n};\n\nconst getAllBrandByNodeEnv = (nodeEnv?: string): Array<brand> => {\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems, BrandStatutsExpress,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n const brand = currentConfigFile;\n\n return brand;\n};\n\nconst getBrandConfig = (params: getBrandConfigParams): brand => {\n const {\n idTypeBrand = null, objectWaited = null, nodeEnv,\n } = params;\n let brand;\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n if (idTypeBrand) {\n // Récupération de la brand via idTypeBrand\n brand = currentConfigFile.find((b: brand) => b.idTypeBrand === idTypeBrand);\n }\n // else if (idSociety) {\n // Récupération de la brand via l'idSociety -> impossible directement depuis le core (pas d'accès au resources, ni au token pour l'appel via fetch)\n\n if (!brand) {\n // Si aucune brand trouvée, on passe par défaut la première brand de la liste\n [brand] = currentConfigFile.sort((a: brand, b: brand) => a.idTypeBrand - b.idTypeBrand);\n }\n\n if (objectWaited) {\n // Si on attend un attribut particulier de la brand, on le parcourt\n let objectToReturn = getLodash(brand, objectWaited);\n // Si aucun attribut trouvé, on renvoit celui de Clementine par défaut\n if (!objectToReturn) {\n const brandDefault = currentConfigFile.find((b: brand) => b.name === currentEnvName);\n objectToReturn = getLodash(brandDefault, objectWaited);\n }\n return objectToReturn;\n }\n\n return brand;\n};\n\nconst getBrandByEmail = (email: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Lecomptablefrancais' | null => {\n if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';\n if (email.indexOf('comptalib.com') > -1) return 'Comptalib';\n if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';\n if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('lecomptablefrancais.fr') > -1) return 'Lecomptablefrancais';\n return null;\n};\n\nexport {\n getBrandConfig, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail,\n};"]}
@@ -1 +1 @@
1
- {"version":3,"file":"century23.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/3310/century23.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAKhG,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAG/F,wBAAgB,4BAA4B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,GAAE,iBAAsB,GAAG,cAAc,CAoV1K;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAo7B9F;AAED,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAyLrD,CAAC"}
1
+ {"version":3,"file":"century23.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/3310/century23.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAKhG,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAG/F,wBAAgB,4BAA4B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,GAAE,iBAAsB,GAAG,cAAc,CAoV1K;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAi7B9F;AAED,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAyLrD,CAAC"}
@@ -51,7 +51,7 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
51
51
  const taxedIntracommunityAcquisitions = getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), [...intracommunityAccounts2, ...intracommunityServiceAccounts], 0, true);
52
52
  // Opérations non taxées
53
53
  const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
54
- const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['70, 71', '72', '73', '75', '77', '78', '790', '792', '793', '794', '795', '796', '797', '798', '799'], 0, true)); // 02/08/23 - ne plus prendre en compte les comptes 76,74,791 - Chloé R.
54
+ const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['70', '71', '72', '73', '75', '77', '78', '790', '792', '793', '794', '795', '796', '797', '798', '799'], 0, true)); // 02/08/23 - ne plus prendre en compte les comptes 76,74,791 - Chloé R.
55
55
  const untaxedImport = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0, true));
56
56
  const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true));
57
57
  const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
@@ -435,38 +435,35 @@ export function getCerfa3310Century23RegistrationFields(data) {
435
435
  fields: [
436
436
  {
437
437
  key: 'BA',
438
- tag: 'TexteLibre1',
439
- isMultiple: false,
440
- description: 'FTX Commentaires type 1, ligne 1 1ère zone de 512',
441
- value: textFormatting(comment, 512),
442
- },
443
- {
444
- key: 'BA',
445
- tag: 'TexteLibre2',
446
- isMultiple: false,
447
- description: 'FTX Commentaires type 1, ligne 2 2ème zone de 512',
448
- value: comment && ((_a = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _a !== void 0 ? _a : 0) > 512 ? textFormatting(comment.slice(512, 1024)) : null,
449
- },
450
- {
451
- key: 'BA',
452
- tag: 'TexteLibre3',
453
- isMultiple: false,
454
- description: 'FTX Commentaires type 1, ligne 3 3ème zone de 512',
455
- value: comment && ((_b = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _b !== void 0 ? _b : 0) > 1024 ? textFormatting(comment.slice(1024, 1536)) : null,
456
- },
457
- {
458
- key: 'BA',
459
- tag: 'TexteLibre4',
460
- isMultiple: false,
461
- description: 'FTX Commentaires type 1, ligne 4 4ème zone de 512',
462
- value: comment && ((_c = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _c !== void 0 ? _c : 0) > 1536 ? textFormatting(comment.slice(1536, 2048)) : null,
463
- },
464
- {
465
- key: 'BA',
466
- tag: 'TexteLibre5',
438
+ value: null,
467
439
  isMultiple: false,
468
- description: 'FTX Commentaires type 1, ligne 5 5ème zone de 512',
469
- value: comment && ((_d = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _d !== void 0 ? _d : 0) > 2048 ? textFormatting(comment.slice(2048, 2560)) : null,
440
+ tags: [
441
+ {
442
+ tag: 'TexteLibre1',
443
+ description: 'FTX Commentaires type 1, ligne 1 1ère zone de 512',
444
+ value: textFormatting(comment, 512),
445
+ },
446
+ {
447
+ tag: 'TexteLibre2',
448
+ description: 'FTX Commentaires type 1, ligne 2 2ème zone de 512',
449
+ value: comment && ((_a = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _a !== void 0 ? _a : 0) > 512 ? textFormatting(comment.slice(512, 1024)) : null,
450
+ },
451
+ {
452
+ tag: 'TexteLibre3',
453
+ description: 'FTX Commentaires type 1, ligne 3 3ème zone de 512',
454
+ value: comment && ((_b = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _b !== void 0 ? _b : 0) > 1024 ? textFormatting(comment.slice(1024, 1536)) : null,
455
+ },
456
+ {
457
+ tag: 'TexteLibre4',
458
+ description: 'FTX Commentaires type 1, ligne 4 4ème zone de 512',
459
+ value: comment && ((_c = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _c !== void 0 ? _c : 0) > 1536 ? textFormatting(comment.slice(1536, 2048)) : null,
460
+ },
461
+ {
462
+ tag: 'TexteLibre5',
463
+ description: 'FTX Commentaires type 1, ligne 5 5ème zone de 512',
464
+ value: comment && ((_d = comment === null || comment === void 0 ? void 0 : comment.length) !== null && _d !== void 0 ? _d : 0) > 2048 ? textFormatting(comment.slice(2048, 2560)) : null,
465
+ },
466
+ ],
470
467
  },
471
468
  {
472
469
  key: 'BB',