@silexpert/core 1.1.54 → 1.1.56

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 (61) hide show
  1. package/es/api/resources/TextMessage.d.ts +2 -1
  2. package/es/api/resources/TextMessage.d.ts.map +1 -1
  3. package/es/api/resources/TextMessage.js +3 -0
  4. package/es/api/resources/TextMessage.js.map +1 -1
  5. package/es/api/resources/prestation.d.ts +2 -1
  6. package/es/api/resources/prestation.d.ts.map +1 -1
  7. package/es/api/resources/prestation.js +3 -0
  8. package/es/api/resources/prestation.js.map +1 -1
  9. package/es/types/Enum/Comment.d.ts +2 -1
  10. package/es/types/Enum/Comment.d.ts.map +1 -1
  11. package/es/types/Enum/Comment.js +1 -0
  12. package/es/types/Enum/Comment.js.map +1 -1
  13. package/es/types/Interface/api/cerfa/3517.d.ts +7 -0
  14. package/es/types/Interface/api/cerfa/3517.d.ts.map +1 -1
  15. package/es/types/Interface/api/cerfa/3517.js.map +1 -1
  16. package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.d.ts +9 -0
  17. package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.d.ts.map +1 -0
  18. package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js +57 -0
  19. package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js.map +1 -0
  20. package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts +1 -0
  21. package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts.map +1 -1
  22. package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +6 -0
  23. package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -1
  24. package/es/types/Interface/api/textMessage/Create.d.ts +5 -0
  25. package/es/types/Interface/api/textMessage/Create.d.ts.map +1 -1
  26. package/es/types/Interface/api/textMessage/Create.js +17 -0
  27. package/es/types/Interface/api/textMessage/Create.js.map +1 -1
  28. package/es/types/index.d.ts +1 -0
  29. package/es/types/index.d.ts.map +1 -1
  30. package/es/types/index.js +1 -0
  31. package/es/types/index.js.map +1 -1
  32. package/es/utils/vat/3517/century23.d.ts.map +1 -1
  33. package/es/utils/vat/3517/century23.js +103 -94
  34. package/es/utils/vat/3517/century23.js.map +1 -1
  35. package/js/api/resources/TextMessage.js +3 -0
  36. package/js/api/resources/TextMessage.js.map +1 -1
  37. package/js/api/resources/prestation.js +5 -0
  38. package/js/api/resources/prestation.js.map +1 -1
  39. package/js/types/Enum/Comment.js +1 -0
  40. package/js/types/Enum/Comment.js.map +1 -1
  41. package/js/types/Interface/api/cerfa/3517.js.map +1 -1
  42. package/js/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js +41 -0
  43. package/js/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js.map +1 -0
  44. package/js/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +1 -0
  45. package/js/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -1
  46. package/js/types/Interface/api/textMessage/Create.js +6 -1
  47. package/js/types/Interface/api/textMessage/Create.js.map +1 -1
  48. package/js/types/index.js +10 -0
  49. package/js/types/index.js.map +1 -1
  50. package/js/utils/vat/3517/century23.js +115 -95
  51. package/js/utils/vat/3517/century23.js.map +1 -1
  52. package/package.json +1 -1
  53. package/ts/api/resources/TextMessage.ts +5 -0
  54. package/ts/api/resources/prestation.ts +6 -1
  55. package/ts/types/Enum/Comment.ts +1 -0
  56. package/ts/types/Interface/api/cerfa/3517.ts +7 -0
  57. package/ts/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.ts +40 -0
  58. package/ts/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.ts +5 -0
  59. package/ts/types/Interface/api/textMessage/Create.ts +14 -0
  60. package/ts/types/index.ts +1 -0
  61. package/ts/utils/vat/3517/century23.ts +17 -7
@@ -15,7 +15,7 @@ var _utils = require("../utils");
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  function getCerfa3517Century23Payload(accountingEntries, payload) {
18
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188;
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196;
19
19
  const shouldHaveVatCode = (0, _classValidator.isDefined)((_a = payload.setting) === null || _a === void 0 ? void 0 : _a.tvaCode) && (0, _classValidator.isDefined)(payload.society.siret);
20
20
  const shouldFillRefund = (0, _lodash.round)((_c = (_b = payload.refund) === null || _b === void 0 ? void 0 : _b.asked) !== null && _c !== void 0 ? _c : 0) > 0;
21
21
  const isNil = payload.isNil === true;
@@ -25,6 +25,10 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
25
25
  const intracomVat = vats.filter(v => v.isVatIntracom && !v.isVatImportation).map(v => v.id);
26
26
  const frenchVat = vats.filter(v => !v.isVatImportation && !v.isVatIntracom).map(v => v.id);
27
27
  const importationVat = vats.filter(v => v.isVatImportation && !v.isVatIntracom).map(v => v.id);
28
+ const untaxedOperationBuy = 0; // FIXME: "TOTAL COMPTE" sur CDC
29
+ const untaxedOperationExported = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withoutTaxVat.includes(ae.idVat) && importationVat.includes(ae.idVat)), ['701', '702', '703', '704', '705', '706', '707', '708'], 0, true));
30
+ const untaxedOperationOther = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withoutTaxVat.includes(ae.idVat) && !importationVat.includes(ae.idVat) && !intracomVat.includes(ae.idVat)), ['7'], 0, true));
31
+ const untaxedOperationIntracomunauty = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '702', '703', '704', '705', '706', '707'], 0, true));
28
32
  const taxedOperationsAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
29
33
  const vatNormalRate20 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_20.id), taxedOperationsAccounts, 0, true));
30
34
  const vatReducedRate5Dot5 = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => ae.idVat === _Vat.Vat.TX_5_5.id), taxedOperationsAccounts, 0, true));
@@ -91,23 +95,23 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
91
95
  isPayment: true
92
96
  },
93
97
  untaxedOperation: {
94
- buy: 0,
95
- exported: 0,
96
- other: 0,
97
- petrol: 0,
98
- intracomunauty: 0,
99
- salesGoodsOrServices: 0,
100
- delivery: 0 //
98
+ buy: untaxedOperationBuy,
99
+ exported: untaxedOperationExported,
100
+ other: untaxedOperationOther,
101
+ distance: (0, _lodash.round)((_3 = (_2 = payload === null || payload === void 0 ? void 0 : payload.untaxedOperation) === null || _2 === void 0 ? void 0 : _2.distance) !== null && _3 !== void 0 ? _3 : 0),
102
+ petrol: (0, _lodash.round)((_5 = (_4 = payload === null || payload === void 0 ? void 0 : payload.untaxedOperation) === null || _4 === void 0 ? void 0 : _4.petrol) !== null && _5 !== void 0 ? _5 : 0),
103
+ intracomunauty: untaxedOperationIntracomunauty,
104
+ salesGoodsOrServices: (0, _lodash.round)((_7 = (_6 = payload === null || payload === void 0 ? void 0 : payload.untaxedOperation) === null || _6 === void 0 ? void 0 : _6.salesGoodsOrServices) !== null && _7 !== void 0 ? _7 : 0),
105
+ delivery: (0, _lodash.round)((_9 = (_8 = payload === null || payload === void 0 ? void 0 : payload.untaxedOperation) === null || _8 === void 0 ? void 0 : _8.delivery) !== null && _9 !== void 0 ? _9 : 0)
101
106
  },
102
-
103
107
  vat: {
104
108
  normalRate20: {
105
109
  base: isNil ? 0 : (0, _lodash.round)(vatNormalRate20),
106
110
  tax: isNil ? 0 : (0, _lodash.round)(vatNormalRate20 * 0.2)
107
111
  },
108
112
  normalRate20OnPetrol: {
109
- base: isNil ? 0 : (0, _lodash.round)((_3 = (_2 = payload.vat) === null || _2 === void 0 ? void 0 : _2.normalRate20OnPetrol) !== null && _3 !== void 0 ? _3 : 0),
110
- tax: isNil ? 0 : (0, _lodash.round)((_5 = (_4 = payload.vat) === null || _4 === void 0 ? void 0 : _4.normalRate20OnPetrol) !== null && _5 !== void 0 ? _5 : 0 * 0.2)
113
+ base: isNil ? 0 : (0, _lodash.round)((_11 = (_10 = payload.vat) === null || _10 === void 0 ? void 0 : _10.normalRate20OnPetrol) !== null && _11 !== void 0 ? _11 : 0),
114
+ tax: isNil ? 0 : (0, _lodash.round)((_13 = (_12 = payload.vat) === null || _12 === void 0 ? void 0 : _12.normalRate20OnPetrol) !== null && _13 !== void 0 ? _13 : 0 * 0.2)
111
115
  },
112
116
  reduceRate5Dot5: {
113
117
  base: isNil ? 0 : (0, _lodash.round)(vatReducedRate5Dot5),
@@ -126,24 +130,24 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
126
130
  tax: isNil ? 0 : (0, _lodash.round)(vatReducedRate2Dot1 * 0.021)
127
131
  },
128
132
  particularRate: {
129
- base: isNil ? 0 : (0, _lodash.round)((_8 = (_7 = (_6 = payload.vat) === null || _6 === void 0 ? void 0 : _6.particularRate) === null || _7 === void 0 ? void 0 : _7.base) !== null && _8 !== void 0 ? _8 : 0),
130
- tax: isNil ? 0 : (0, _lodash.round)((_11 = (_10 = (_9 = payload.vat) === null || _9 === void 0 ? void 0 : _9.particularRate) === null || _10 === void 0 ? void 0 : _10.tax) !== null && _11 !== void 0 ? _11 : 0)
133
+ base: isNil ? 0 : (0, _lodash.round)((_16 = (_15 = (_14 = payload.vat) === null || _14 === void 0 ? void 0 : _14.particularRate) === null || _15 === void 0 ? void 0 : _15.base) !== null && _16 !== void 0 ? _16 : 0),
134
+ tax: isNil ? 0 : (0, _lodash.round)((_19 = (_18 = (_17 = payload.vat) === null || _17 === void 0 ? void 0 : _17.particularRate) === null || _18 === void 0 ? void 0 : _18.tax) !== null && _19 !== void 0 ? _19 : 0)
131
135
  },
132
136
  reducedRateOnPetrol: {
133
- base: isNil ? 0 : (0, _lodash.round)((_13 = (_12 = payload.vat) === null || _12 === void 0 ? void 0 : _12.reducedRateOnPetrol) !== null && _13 !== void 0 ? _13 : 0),
134
- tax: isNil ? 0 : (0, _lodash.round)(((_15 = (_14 = payload.vat) === null || _14 === void 0 ? void 0 : _14.reducedRateOnPetrol) !== null && _15 !== void 0 ? _15 : 0) * 0.13)
137
+ base: isNil ? 0 : (0, _lodash.round)((_21 = (_20 = payload.vat) === null || _20 === void 0 ? void 0 : _20.reducedRateOnPetrol) !== null && _21 !== void 0 ? _21 : 0),
138
+ tax: isNil ? 0 : (0, _lodash.round)(((_23 = (_22 = payload.vat) === null || _22 === void 0 ? void 0 : _22.reducedRateOnPetrol) !== null && _23 !== void 0 ? _23 : 0) * 0.13)
135
139
  },
136
140
  oldRate: {
137
- base: isNil ? 0 : (0, _lodash.round)((_18 = (_17 = (_16 = payload.vat) === null || _16 === void 0 ? void 0 : _16.oldRate) === null || _17 === void 0 ? void 0 : _17.base) !== null && _18 !== void 0 ? _18 : 0),
138
- tax: isNil ? 0 : (0, _lodash.round)((_21 = (_20 = (_19 = payload.vat) === null || _19 === void 0 ? void 0 : _19.oldRate) === null || _20 === void 0 ? void 0 : _20.tax) !== null && _21 !== void 0 ? _21 : 0)
141
+ base: isNil ? 0 : (0, _lodash.round)((_26 = (_25 = (_24 = payload.vat) === null || _24 === void 0 ? void 0 : _24.oldRate) === null || _25 === void 0 ? void 0 : _25.base) !== null && _26 !== void 0 ? _26 : 0),
142
+ tax: isNil ? 0 : (0, _lodash.round)((_29 = (_28 = (_27 = payload.vat) === null || _27 === void 0 ? void 0 : _27.oldRate) === null || _28 === void 0 ? void 0 : _28.tax) !== null && _29 !== void 0 ? _29 : 0)
139
143
  },
140
144
  energyBought: {
141
- base: isNil ? 0 : (0, _lodash.round)((_24 = (_23 = (_22 = payload.vat) === null || _22 === void 0 ? void 0 : _22.energyBought) === null || _23 === void 0 ? void 0 : _23.base) !== null && _24 !== void 0 ? _24 : 0),
142
- tax: isNil ? 0 : (0, _lodash.round)((_27 = (_26 = (_25 = payload.vat) === null || _25 === void 0 ? void 0 : _25.energyBought) === null || _26 === void 0 ? void 0 : _26.tax) !== null && _27 !== void 0 ? _27 : 0)
145
+ base: isNil ? 0 : (0, _lodash.round)((_32 = (_31 = (_30 = payload.vat) === null || _30 === void 0 ? void 0 : _30.energyBought) === null || _31 === void 0 ? void 0 : _31.base) !== null && _32 !== void 0 ? _32 : 0),
146
+ tax: isNil ? 0 : (0, _lodash.round)((_35 = (_34 = (_33 = payload.vat) === null || _33 === void 0 ? void 0 : _33.energyBought) === null || _34 === void 0 ? void 0 : _34.tax) !== null && _35 !== void 0 ? _35 : 0)
143
147
  },
144
148
  prestation: {
145
- base: isNil ? 0 : (0, _lodash.round)((_30 = (_29 = (_28 = payload.vat) === null || _28 === void 0 ? void 0 : _28.prestation) === null || _29 === void 0 ? void 0 : _29.base) !== null && _30 !== void 0 ? _30 : 0),
146
- tax: isNil ? 0 : (0, _lodash.round)((_33 = (_32 = (_31 = payload.vat) === null || _31 === void 0 ? void 0 : _31.prestation) === null || _32 === void 0 ? void 0 : _32.tax) !== null && _33 !== void 0 ? _33 : 0)
149
+ base: isNil ? 0 : (0, _lodash.round)((_38 = (_37 = (_36 = payload.vat) === null || _36 === void 0 ? void 0 : _36.prestation) === null || _37 === void 0 ? void 0 : _37.base) !== null && _38 !== void 0 ? _38 : 0),
150
+ tax: isNil ? 0 : (0, _lodash.round)((_41 = (_40 = (_39 = payload.vat) === null || _39 === void 0 ? void 0 : _39.prestation) === null || _40 === void 0 ? void 0 : _40.tax) !== null && _41 !== void 0 ? _41 : 0)
147
151
  },
148
152
  prestation2: {
149
153
  base: isNil ? 0 : (0, _lodash.round)(prestation2Base),
@@ -167,34 +171,34 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
167
171
  },
168
172
 
169
173
  other: {
170
- refund: isNil ? 0 : (0, _lodash.round)((_35 = (_34 = payload.other) === null || _34 === void 0 ? void 0 : _34.refund) !== null && _35 !== void 0 ? _35 : 0),
171
- previousDeducted: isNil ? 0 : (0, _lodash.round)((_37 = (_36 = payload.other) === null || _36 === void 0 ? void 0 : _36.previousDeducted) !== null && _37 !== void 0 ? _37 : 0),
172
- sum: isNil ? 0 : (0, _lodash.round)((_39 = (_38 = payload.other) === null || _38 === void 0 ? void 0 : _38.sum) !== null && _39 !== void 0 ? _39 : 0),
174
+ refund: isNil ? 0 : (0, _lodash.round)((_43 = (_42 = payload.other) === null || _42 === void 0 ? void 0 : _42.refund) !== null && _43 !== void 0 ? _43 : 0),
175
+ previousDeducted: isNil ? 0 : (0, _lodash.round)((_45 = (_44 = payload.other) === null || _44 === void 0 ? void 0 : _44.previousDeducted) !== null && _45 !== void 0 ? _45 : 0),
176
+ sum: isNil ? 0 : (0, _lodash.round)((_47 = (_46 = payload.other) === null || _46 === void 0 ? void 0 : _46.sum) !== null && _47 !== void 0 ? _47 : 0),
173
177
  total: 0 // Calculé plus bas
174
178
  },
175
179
 
176
180
  deductible: {
177
181
  onInvoice: isNil ? 0 : (0, _lodash.round)(onInvoiceDeductible),
178
- onFlatRate: isNil ? 0 : (0, _lodash.round)((_41 = (_40 = payload.deductible) === null || _40 === void 0 ? void 0 : _40.onFlatRate) !== null && _41 !== void 0 ? _41 : 0),
182
+ onFlatRate: isNil ? 0 : (0, _lodash.round)((_49 = (_48 = payload.deductible) === null || _48 === void 0 ? void 0 : _48.onFlatRate) !== null && _49 !== void 0 ? _49 : 0),
179
183
  total1: 0,
180
- rate: isNil ? 0 : (0, _lodash.round)((_43 = (_42 = payload.deductible) === null || _42 === void 0 ? void 0 : _42.rate) !== null && _43 !== void 0 ? _43 : 100, 2),
184
+ rate: isNil ? 0 : (0, _lodash.round)((_51 = (_50 = payload.deductible) === null || _50 === void 0 ? void 0 : _50.rate) !== null && _51 !== void 0 ? _51 : 100, 2),
181
185
  onImmobilization: isNil ? 0 : (0, _lodash.round)(onImmobilizationDeductible),
182
- previousCredit: isNil ? 0 : (0, _lodash.round)((_45 = (_44 = payload.deductible) === null || _44 === void 0 ? void 0 : _44.previousCredit) !== null && _45 !== void 0 ? _45 : 0),
183
- forget: isNil ? 0 : (0, _lodash.round)((_47 = (_46 = payload.deductible) === null || _46 === void 0 ? void 0 : _46.forget) !== null && _47 !== void 0 ? _47 : 0),
184
- sumToImpute: isNil ? 0 : (0, _lodash.round)((_49 = (_48 = payload.deductible) === null || _48 === void 0 ? void 0 : _48.sumToImpute) !== null && _49 !== void 0 ? _49 : 0),
186
+ previousCredit: isNil ? 0 : (0, _lodash.round)((_53 = (_52 = payload.deductible) === null || _52 === void 0 ? void 0 : _52.previousCredit) !== null && _53 !== void 0 ? _53 : 0),
187
+ forget: isNil ? 0 : (0, _lodash.round)((_55 = (_54 = payload.deductible) === null || _54 === void 0 ? void 0 : _54.forget) !== null && _55 !== void 0 ? _55 : 0),
188
+ sumToImpute: isNil ? 0 : (0, _lodash.round)((_57 = (_56 = payload.deductible) === null || _56 === void 0 ? void 0 : _56.sumToImpute) !== null && _57 !== void 0 ? _57 : 0),
185
189
  total: 0,
186
- vatDeductible: isNil ? 0 : (0, _lodash.round)((_51 = (_50 = payload.deductible) === null || _50 === void 0 ? void 0 : _50.vatDeductible) !== null && _51 !== void 0 ? _51 : 0)
190
+ vatDeductible: isNil ? 0 : (0, _lodash.round)((_59 = (_58 = payload.deductible) === null || _58 === void 0 ? void 0 : _58.vatDeductible) !== null && _59 !== void 0 ? _59 : 0)
187
191
  },
188
192
  net: {
189
193
  due: 0,
190
194
  credit: 0,
191
195
  advance1: {
192
- paid: isNil ? 0 : (0, _lodash.round)((_52 = julyAdvancePayload === null || julyAdvancePayload === void 0 ? void 0 : julyAdvancePayload.amountWanted) !== null && _52 !== void 0 ? _52 : 0),
193
- toPay: isNil ? 0 : (0, _lodash.round)((_54 = (_53 = payload.advance1) === null || _53 === void 0 ? void 0 : _53.toPay) !== null && _54 !== void 0 ? _54 : 0)
196
+ paid: isNil ? 0 : (0, _lodash.round)((_60 = julyAdvancePayload === null || julyAdvancePayload === void 0 ? void 0 : julyAdvancePayload.amountWanted) !== null && _60 !== void 0 ? _60 : 0),
197
+ toPay: isNil ? 0 : (0, _lodash.round)((_62 = (_61 = payload.advance1) === null || _61 === void 0 ? void 0 : _61.toPay) !== null && _62 !== void 0 ? _62 : 0)
194
198
  },
195
199
  advance2: {
196
- paid: isNil ? 0 : (0, _lodash.round)((_55 = decemberAdvancePayload === null || decemberAdvancePayload === void 0 ? void 0 : decemberAdvancePayload.amountWanted) !== null && _55 !== void 0 ? _55 : 0),
197
- toPay: isNil ? 0 : (0, _lodash.round)((_57 = (_56 = payload.advance2) === null || _56 === void 0 ? void 0 : _56.toPay) !== null && _57 !== void 0 ? _57 : 0)
200
+ paid: isNil ? 0 : (0, _lodash.round)((_63 = decemberAdvancePayload === null || decemberAdvancePayload === void 0 ? void 0 : decemberAdvancePayload.amountWanted) !== null && _63 !== void 0 ? _63 : 0),
201
+ toPay: isNil ? 0 : (0, _lodash.round)((_65 = (_64 = payload.advance2) === null || _64 === void 0 ? void 0 : _64.toPay) !== null && _65 !== void 0 ? _65 : 0)
198
202
  },
199
203
  advance: {
200
204
  toPay: 0,
@@ -208,67 +212,67 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
208
212
  },
209
213
 
210
214
  tax: {
211
- onRetransmission: isNil ? 0 : (0, _lodash.round)((_59 = (_58 = payload.tax) === null || _58 === void 0 ? void 0 : _58.onRetransmission) !== null && _59 !== void 0 ? _59 : 0),
212
- onResultFarm: isNil ? 0 : (0, _lodash.round)((_61 = (_60 = payload.tax) === null || _60 === void 0 ? void 0 : _60.onResultFarm) !== null && _61 !== void 0 ? _61 : 0),
215
+ onRetransmission: isNil ? 0 : (0, _lodash.round)((_67 = (_66 = payload.tax) === null || _66 === void 0 ? void 0 : _66.onRetransmission) !== null && _67 !== void 0 ? _67 : 0),
216
+ onResultFarm: isNil ? 0 : (0, _lodash.round)((_69 = (_68 = payload.tax) === null || _68 === void 0 ? void 0 : _68.onResultFarm) !== null && _69 !== void 0 ? _69 : 0),
213
217
  payingVideo: {
214
- reduced: isNil ? 0 : (0, _lodash.round)((_64 = (_63 = (_62 = payload.tax) === null || _62 === void 0 ? void 0 : _62.payingVideo) === null || _63 === void 0 ? void 0 : _63.reduced) !== null && _64 !== void 0 ? _64 : 0),
215
- normal: isNil ? 0 : (0, _lodash.round)((_67 = (_66 = (_65 = payload.tax) === null || _65 === void 0 ? void 0 : _65.payingVideo) === null || _66 === void 0 ? void 0 : _66.normal) !== null && _67 !== void 0 ? _67 : 0)
218
+ reduced: isNil ? 0 : (0, _lodash.round)((_72 = (_71 = (_70 = payload.tax) === null || _70 === void 0 ? void 0 : _70.payingVideo) === null || _71 === void 0 ? void 0 : _71.reduced) !== null && _72 !== void 0 ? _72 : 0),
219
+ normal: isNil ? 0 : (0, _lodash.round)((_75 = (_74 = (_73 = payload.tax) === null || _73 === void 0 ? void 0 : _73.payingVideo) === null || _74 === void 0 ? void 0 : _74.normal) !== null && _75 !== void 0 ? _75 : 0)
216
220
  },
217
221
  freeVideo: {
218
- reduce: isNil ? 0 : (0, _lodash.round)((_70 = (_69 = (_68 = payload.tax) === null || _68 === void 0 ? void 0 : _68.freeVideo) === null || _69 === void 0 ? void 0 : _69.reduced) !== null && _70 !== void 0 ? _70 : 0),
219
- normal: isNil ? 0 : (0, _lodash.round)((_73 = (_72 = (_71 = payload.tax) === null || _71 === void 0 ? void 0 : _71.freeVideo) === null || _72 === void 0 ? void 0 : _72.normal) !== null && _73 !== void 0 ? _73 : 0)
222
+ reduce: isNil ? 0 : (0, _lodash.round)((_78 = (_77 = (_76 = payload.tax) === null || _76 === void 0 ? void 0 : _76.freeVideo) === null || _77 === void 0 ? void 0 : _77.reduced) !== null && _78 !== void 0 ? _78 : 0),
223
+ normal: isNil ? 0 : (0, _lodash.round)((_81 = (_80 = (_79 = payload.tax) === null || _79 === void 0 ? void 0 : _79.freeVideo) === null || _80 === void 0 ? void 0 : _80.normal) !== null && _81 !== void 0 ? _81 : 0)
220
224
  },
221
- bailiff: isNil ? 0 : (0, _lodash.round)((_75 = (_74 = payload.tax) === null || _74 === void 0 ? void 0 : _74.bailiff) !== null && _75 !== void 0 ? _75 : 0),
222
- contribution: isNil ? 0 : (0, _lodash.round)((_77 = (_76 = payload.tax) === null || _76 === void 0 ? void 0 : _76.contribution) !== null && _77 !== void 0 ? _77 : 0),
223
- ofEmployer: isNil ? 0 : (0, _lodash.round)((_79 = (_78 = payload.tax) === null || _78 === void 0 ? void 0 : _78.ofEmployer) !== null && _79 !== void 0 ? _79 : 0),
224
- onBoardingCorse: isNil ? 0 : (0, _lodash.round)((_81 = (_80 = payload.tax) === null || _80 === void 0 ? void 0 : _80.onBoardingCorse) !== null && _81 !== void 0 ? _81 : 0),
225
- onBoarding: isNil ? 0 : (0, _lodash.round)((_83 = (_82 = payload.tax) === null || _82 === void 0 ? void 0 : _82.onBoarding) !== null && _83 !== void 0 ? _83 : 0),
226
- development: isNil ? 0 : (0, _lodash.round)((_85 = (_84 = payload.tax) === null || _84 === void 0 ? void 0 : _84.development) !== null && _85 !== void 0 ? _85 : 0),
227
- publicity: isNil ? 0 : (0, _lodash.round)((_87 = (_86 = payload.tax) === null || _86 === void 0 ? void 0 : _86.publicity) !== null && _87 !== void 0 ? _87 : 0),
228
- onCompanySurplus: isNil ? 0 : (0, _lodash.round)((_89 = (_88 = payload.tax) === null || _88 === void 0 ? void 0 : _88.onCompanySurplus) !== null && _89 !== void 0 ? _89 : 0),
229
- onPublicElectricity: isNil ? 0 : (0, _lodash.round)((_91 = (_90 = payload.tax) === null || _90 === void 0 ? void 0 : _90.onPublicElectricity) !== null && _91 !== void 0 ? _91 : 0),
230
- onCanceledOrders: isNil ? 0 : (0, _lodash.round)((_93 = (_92 = payload.tax) === null || _92 === void 0 ? void 0 : _92.onCanceledOrders) !== null && _93 !== void 0 ? _93 : 0),
231
- specialDue: isNil ? 0 : (0, _lodash.round)((_95 = (_94 = payload.tax) === null || _94 === void 0 ? void 0 : _94.specialDue) !== null && _95 !== void 0 ? _95 : 0),
232
- slaughter: isNil ? 0 : (0, _lodash.round)((_97 = (_96 = payload.tax) === null || _96 === void 0 ? void 0 : _96.slaughter) !== null && _97 !== void 0 ? _97 : 0),
233
- cutting: isNil ? 0 : (0, _lodash.round)((_99 = (_98 = payload.tax) === null || _98 === void 0 ? void 0 : _98.cutting) !== null && _99 !== void 0 ? _99 : 0),
234
- substances: isNil ? 0 : (0, _lodash.round)((_101 = (_100 = payload.tax) === null || _100 === void 0 ? void 0 : _100.substances) !== null && _101 !== void 0 ? _101 : 0),
235
- fishing: isNil ? 0 : (0, _lodash.round)((_103 = (_102 = payload.tax) === null || _102 === void 0 ? void 0 : _102.fishing) !== null && _103 !== void 0 ? _103 : 0),
236
- fishingProduct: isNil ? 0 : (0, _lodash.round)((_105 = (_104 = payload.tax) === null || _104 === void 0 ? void 0 : _104.fishingProduct) !== null && _105 !== void 0 ? _105 : 0),
237
- agreement: isNil ? 0 : (0, _lodash.round)((_107 = (_106 = payload.tax) === null || _106 === void 0 ? void 0 : _106.agreement) !== null && _107 !== void 0 ? _107 : 0),
225
+ bailiff: isNil ? 0 : (0, _lodash.round)((_83 = (_82 = payload.tax) === null || _82 === void 0 ? void 0 : _82.bailiff) !== null && _83 !== void 0 ? _83 : 0),
226
+ contribution: isNil ? 0 : (0, _lodash.round)((_85 = (_84 = payload.tax) === null || _84 === void 0 ? void 0 : _84.contribution) !== null && _85 !== void 0 ? _85 : 0),
227
+ ofEmployer: isNil ? 0 : (0, _lodash.round)((_87 = (_86 = payload.tax) === null || _86 === void 0 ? void 0 : _86.ofEmployer) !== null && _87 !== void 0 ? _87 : 0),
228
+ onBoardingCorse: isNil ? 0 : (0, _lodash.round)((_89 = (_88 = payload.tax) === null || _88 === void 0 ? void 0 : _88.onBoardingCorse) !== null && _89 !== void 0 ? _89 : 0),
229
+ onBoarding: isNil ? 0 : (0, _lodash.round)((_91 = (_90 = payload.tax) === null || _90 === void 0 ? void 0 : _90.onBoarding) !== null && _91 !== void 0 ? _91 : 0),
230
+ development: isNil ? 0 : (0, _lodash.round)((_93 = (_92 = payload.tax) === null || _92 === void 0 ? void 0 : _92.development) !== null && _93 !== void 0 ? _93 : 0),
231
+ publicity: isNil ? 0 : (0, _lodash.round)((_95 = (_94 = payload.tax) === null || _94 === void 0 ? void 0 : _94.publicity) !== null && _95 !== void 0 ? _95 : 0),
232
+ onCompanySurplus: isNil ? 0 : (0, _lodash.round)((_97 = (_96 = payload.tax) === null || _96 === void 0 ? void 0 : _96.onCompanySurplus) !== null && _97 !== void 0 ? _97 : 0),
233
+ onPublicElectricity: isNil ? 0 : (0, _lodash.round)((_99 = (_98 = payload.tax) === null || _98 === void 0 ? void 0 : _98.onPublicElectricity) !== null && _99 !== void 0 ? _99 : 0),
234
+ onCanceledOrders: isNil ? 0 : (0, _lodash.round)((_101 = (_100 = payload.tax) === null || _100 === void 0 ? void 0 : _100.onCanceledOrders) !== null && _101 !== void 0 ? _101 : 0),
235
+ specialDue: isNil ? 0 : (0, _lodash.round)((_103 = (_102 = payload.tax) === null || _102 === void 0 ? void 0 : _102.specialDue) !== null && _103 !== void 0 ? _103 : 0),
236
+ slaughter: isNil ? 0 : (0, _lodash.round)((_105 = (_104 = payload.tax) === null || _104 === void 0 ? void 0 : _104.slaughter) !== null && _105 !== void 0 ? _105 : 0),
237
+ cutting: isNil ? 0 : (0, _lodash.round)((_107 = (_106 = payload.tax) === null || _106 === void 0 ? void 0 : _106.cutting) !== null && _107 !== void 0 ? _107 : 0),
238
+ substances: isNil ? 0 : (0, _lodash.round)((_109 = (_108 = payload.tax) === null || _108 === void 0 ? void 0 : _108.substances) !== null && _109 !== void 0 ? _109 : 0),
239
+ fishing: isNil ? 0 : (0, _lodash.round)((_111 = (_110 = payload.tax) === null || _110 === void 0 ? void 0 : _110.fishing) !== null && _111 !== void 0 ? _111 : 0),
240
+ fishingProduct: isNil ? 0 : (0, _lodash.round)((_113 = (_112 = payload.tax) === null || _112 === void 0 ? void 0 : _112.fishingProduct) !== null && _113 !== void 0 ? _113 : 0),
241
+ agreement: isNil ? 0 : (0, _lodash.round)((_115 = (_114 = payload.tax) === null || _114 === void 0 ? void 0 : _114.agreement) !== null && _115 !== void 0 ? _115 : 0),
238
242
  phyto: {
239
- onCirculation: isNil ? 0 : (0, _lodash.round)((_110 = (_109 = (_108 = payload.tax) === null || _108 === void 0 ? void 0 : _108.phyto) === null || _109 === void 0 ? void 0 : _109.onCirculation) !== null && _110 !== void 0 ? _110 : 0),
240
- onExportation: isNil ? 0 : (0, _lodash.round)((_113 = (_112 = (_111 = payload.tax) === null || _111 === void 0 ? void 0 : _111.phyto) === null || _112 === void 0 ? void 0 : _112.onExportation) !== null && _113 !== void 0 ? _113 : 0),
241
- total: isNil ? 0 : (0, _lodash.round)((_116 = (_115 = (_114 = payload.tax) === null || _114 === void 0 ? void 0 : _114.phyto) === null || _115 === void 0 ? void 0 : _115.total) !== null && _116 !== void 0 ? _116 : 0)
243
+ onCirculation: isNil ? 0 : (0, _lodash.round)((_118 = (_117 = (_116 = payload.tax) === null || _116 === void 0 ? void 0 : _116.phyto) === null || _117 === void 0 ? void 0 : _117.onCirculation) !== null && _118 !== void 0 ? _118 : 0),
244
+ onExportation: isNil ? 0 : (0, _lodash.round)((_121 = (_120 = (_119 = payload.tax) === null || _119 === void 0 ? void 0 : _119.phyto) === null || _120 === void 0 ? void 0 : _120.onExportation) !== null && _121 !== void 0 ? _121 : 0),
245
+ total: isNil ? 0 : (0, _lodash.round)((_124 = (_123 = (_122 = payload.tax) === null || _122 === void 0 ? void 0 : _122.phyto) === null || _123 === void 0 ? void 0 : _123.total) !== null && _124 !== void 0 ? _124 : 0)
242
246
  },
243
247
  onPreciousMetal: {
244
- normalRate: isNil ? 0 : (0, _lodash.round)((_119 = (_118 = (_117 = payload.tax) === null || _117 === void 0 ? void 0 : _117.onPreciousMetal) === null || _118 === void 0 ? void 0 : _118.normalRate) !== null && _119 !== void 0 ? _119 : 0),
245
- reduceRate: isNil ? 0 : (0, _lodash.round)((_122 = (_121 = (_120 = payload.tax) === null || _120 === void 0 ? void 0 : _120.onPreciousMetal) === null || _121 === void 0 ? void 0 : _121.reduceRate) !== null && _122 !== void 0 ? _122 : 0)
248
+ normalRate: isNil ? 0 : (0, _lodash.round)((_127 = (_126 = (_125 = payload.tax) === null || _125 === void 0 ? void 0 : _125.onPreciousMetal) === null || _126 === void 0 ? void 0 : _126.normalRate) !== null && _127 !== void 0 ? _127 : 0),
249
+ reduceRate: isNil ? 0 : (0, _lodash.round)((_130 = (_129 = (_128 = payload.tax) === null || _128 === void 0 ? void 0 : _128.onPreciousMetal) === null || _129 === void 0 ? void 0 : _129.reduceRate) !== null && _130 !== void 0 ? _130 : 0)
246
250
  },
247
- onContribution: isNil ? 0 : (0, _lodash.round)((_124 = (_123 = payload.tax) === null || _123 === void 0 ? void 0 : _123.onContribution) !== null && _124 !== void 0 ? _124 : 0),
248
- onSaleAntiquity: isNil ? 0 : (0, _lodash.round)((_126 = (_125 = payload.tax) === null || _125 === void 0 ? void 0 : _125.onSaleAntiquity) !== null && _126 !== void 0 ? _126 : 0),
249
- onYearly: isNil ? 0 : (0, _lodash.round)((_128 = (_127 = payload.tax) === null || _127 === void 0 ? void 0 : _127.onYearly) !== null && _128 !== void 0 ? _128 : 0),
250
- onCO2: isNil ? 0 : (0, _lodash.round)((_130 = (_129 = payload.tax) === null || _129 === void 0 ? void 0 : _129.onCO2) !== null && _130 !== void 0 ? _130 : 0),
251
- oldVehicle: isNil ? 0 : (0, _lodash.round)((_132 = (_131 = payload.tax) === null || _131 === void 0 ? void 0 : _131.oldVehicle) !== null && _132 !== void 0 ? _132 : 0),
252
- profit: isNil ? 0 : (0, _lodash.round)((_134 = (_133 = payload.tax) === null || _133 === void 0 ? void 0 : _133.profit) !== null && _134 !== void 0 ? _134 : 0),
253
- social: isNil ? 0 : (0, _lodash.round)((_136 = (_135 = payload.tax) === null || _135 === void 0 ? void 0 : _135.social) !== null && _136 !== void 0 ? _136 : 0),
254
- fromOtherCountry: isNil ? 0 : (0, _lodash.round)((_138 = (_137 = payload.tax) === null || _137 === void 0 ? void 0 : _137.fromOtherCountry) !== null && _138 !== void 0 ? _138 : 0),
255
- trottingRace: isNil ? 0 : (0, _lodash.round)((_140 = (_139 = payload.tax) === null || _139 === void 0 ? void 0 : _139.trottingRace) !== null && _140 !== void 0 ? _140 : 0),
256
- gallopRace: isNil ? 0 : (0, _lodash.round)((_142 = (_141 = payload.tax) === null || _141 === void 0 ? void 0 : _141.gallopRace) !== null && _142 !== void 0 ? _142 : 0),
257
- sportBetting: isNil ? 0 : (0, _lodash.round)((_144 = (_143 = payload.tax) === null || _143 === void 0 ? void 0 : _143.sportBetting) !== null && _144 !== void 0 ? _144 : 0),
258
- sportBettingSocial: isNil ? 0 : (0, _lodash.round)((_146 = (_145 = payload.tax) === null || _145 === void 0 ? void 0 : _145.sportBettingSocial) !== null && _146 !== void 0 ? _146 : 0),
259
- sportBettingSport: isNil ? 0 : (0, _lodash.round)((_148 = (_147 = payload.tax) === null || _147 === void 0 ? void 0 : _147.sportBettingSport) !== null && _148 !== void 0 ? _148 : 0),
260
- sportBettingCommercial: isNil ? 0 : (0, _lodash.round)((_150 = (_149 = payload.tax) === null || _149 === void 0 ? void 0 : _149.sportBettingCommercial) !== null && _150 !== void 0 ? _150 : 0),
261
- sportBettingCommercialSocial: isNil ? 0 : (0, _lodash.round)((_152 = (_151 = payload.tax) === null || _151 === void 0 ? void 0 : _151.sportBettingCommercialSocial) !== null && _152 !== void 0 ? _152 : 0),
262
- sportBettingCommercialSport: isNil ? 0 : (0, _lodash.round)((_154 = (_153 = payload.tax) === null || _153 === void 0 ? void 0 : _153.sportBettingCommercialSport) !== null && _154 !== void 0 ? _154 : 0),
263
- onlineGame: isNil ? 0 : (0, _lodash.round)((_156 = (_155 = payload.tax) === null || _155 === void 0 ? void 0 : _155.onlineGame) !== null && _156 !== void 0 ? _156 : 0),
264
- onlineGameSocial: isNil ? 0 : (0, _lodash.round)((_158 = (_157 = payload.tax) === null || _157 === void 0 ? void 0 : _157.onlineGameSocial) !== null && _158 !== void 0 ? _158 : 0),
265
- fuelExploration: isNil ? 0 : (0, _lodash.round)((_160 = (_159 = payload.tax) === null || _159 === void 0 ? void 0 : _159.fuelExploration) !== null && _160 !== void 0 ? _160 : 0),
266
- nonAlcool: isNil ? 0 : (0, _lodash.round)((_162 = (_161 = payload.tax) === null || _161 === void 0 ? void 0 : _161.nonAlcool) !== null && _162 !== void 0 ? _162 : 0),
267
- nonAlcoolWithSugar: isNil ? 0 : (0, _lodash.round)((_164 = (_163 = payload.tax) === null || _163 === void 0 ? void 0 : _163.nonAlcoolWithSugar) !== null && _164 !== void 0 ? _164 : 0),
268
- nonAlcoolWithEdul: isNil ? 0 : (0, _lodash.round)((_166 = (_165 = payload.tax) === null || _165 === void 0 ? void 0 : _165.nonAlcoolWithEdul) !== null && _166 !== void 0 ? _166 : 0),
269
- mineralWater: isNil ? 0 : (0, _lodash.round)((_168 = (_167 = payload.tax) === null || _167 === void 0 ? void 0 : _167.mineralWater) !== null && _168 !== void 0 ? _168 : 0),
270
- numericalService: isNil ? 0 : (0, _lodash.round)((_170 = (_169 = payload.tax) === null || _169 === void 0 ? void 0 : _169.numericalService) !== null && _170 !== void 0 ? _170 : 0),
271
- platform: isNil ? 0 : (0, _lodash.round)((_172 = (_171 = payload.tax) === null || _171 === void 0 ? void 0 : _171.platform) !== null && _172 !== void 0 ? _172 : 0),
251
+ onContribution: isNil ? 0 : (0, _lodash.round)((_132 = (_131 = payload.tax) === null || _131 === void 0 ? void 0 : _131.onContribution) !== null && _132 !== void 0 ? _132 : 0),
252
+ onSaleAntiquity: isNil ? 0 : (0, _lodash.round)((_134 = (_133 = payload.tax) === null || _133 === void 0 ? void 0 : _133.onSaleAntiquity) !== null && _134 !== void 0 ? _134 : 0),
253
+ onYearly: isNil ? 0 : (0, _lodash.round)((_136 = (_135 = payload.tax) === null || _135 === void 0 ? void 0 : _135.onYearly) !== null && _136 !== void 0 ? _136 : 0),
254
+ onCO2: isNil ? 0 : (0, _lodash.round)((_138 = (_137 = payload.tax) === null || _137 === void 0 ? void 0 : _137.onCO2) !== null && _138 !== void 0 ? _138 : 0),
255
+ oldVehicle: isNil ? 0 : (0, _lodash.round)((_140 = (_139 = payload.tax) === null || _139 === void 0 ? void 0 : _139.oldVehicle) !== null && _140 !== void 0 ? _140 : 0),
256
+ profit: isNil ? 0 : (0, _lodash.round)((_142 = (_141 = payload.tax) === null || _141 === void 0 ? void 0 : _141.profit) !== null && _142 !== void 0 ? _142 : 0),
257
+ social: isNil ? 0 : (0, _lodash.round)((_144 = (_143 = payload.tax) === null || _143 === void 0 ? void 0 : _143.social) !== null && _144 !== void 0 ? _144 : 0),
258
+ fromOtherCountry: isNil ? 0 : (0, _lodash.round)((_146 = (_145 = payload.tax) === null || _145 === void 0 ? void 0 : _145.fromOtherCountry) !== null && _146 !== void 0 ? _146 : 0),
259
+ trottingRace: isNil ? 0 : (0, _lodash.round)((_148 = (_147 = payload.tax) === null || _147 === void 0 ? void 0 : _147.trottingRace) !== null && _148 !== void 0 ? _148 : 0),
260
+ gallopRace: isNil ? 0 : (0, _lodash.round)((_150 = (_149 = payload.tax) === null || _149 === void 0 ? void 0 : _149.gallopRace) !== null && _150 !== void 0 ? _150 : 0),
261
+ sportBetting: isNil ? 0 : (0, _lodash.round)((_152 = (_151 = payload.tax) === null || _151 === void 0 ? void 0 : _151.sportBetting) !== null && _152 !== void 0 ? _152 : 0),
262
+ sportBettingSocial: isNil ? 0 : (0, _lodash.round)((_154 = (_153 = payload.tax) === null || _153 === void 0 ? void 0 : _153.sportBettingSocial) !== null && _154 !== void 0 ? _154 : 0),
263
+ sportBettingSport: isNil ? 0 : (0, _lodash.round)((_156 = (_155 = payload.tax) === null || _155 === void 0 ? void 0 : _155.sportBettingSport) !== null && _156 !== void 0 ? _156 : 0),
264
+ sportBettingCommercial: isNil ? 0 : (0, _lodash.round)((_158 = (_157 = payload.tax) === null || _157 === void 0 ? void 0 : _157.sportBettingCommercial) !== null && _158 !== void 0 ? _158 : 0),
265
+ sportBettingCommercialSocial: isNil ? 0 : (0, _lodash.round)((_160 = (_159 = payload.tax) === null || _159 === void 0 ? void 0 : _159.sportBettingCommercialSocial) !== null && _160 !== void 0 ? _160 : 0),
266
+ sportBettingCommercialSport: isNil ? 0 : (0, _lodash.round)((_162 = (_161 = payload.tax) === null || _161 === void 0 ? void 0 : _161.sportBettingCommercialSport) !== null && _162 !== void 0 ? _162 : 0),
267
+ onlineGame: isNil ? 0 : (0, _lodash.round)((_164 = (_163 = payload.tax) === null || _163 === void 0 ? void 0 : _163.onlineGame) !== null && _164 !== void 0 ? _164 : 0),
268
+ onlineGameSocial: isNil ? 0 : (0, _lodash.round)((_166 = (_165 = payload.tax) === null || _165 === void 0 ? void 0 : _165.onlineGameSocial) !== null && _166 !== void 0 ? _166 : 0),
269
+ fuelExploration: isNil ? 0 : (0, _lodash.round)((_168 = (_167 = payload.tax) === null || _167 === void 0 ? void 0 : _167.fuelExploration) !== null && _168 !== void 0 ? _168 : 0),
270
+ nonAlcool: isNil ? 0 : (0, _lodash.round)((_170 = (_169 = payload.tax) === null || _169 === void 0 ? void 0 : _169.nonAlcool) !== null && _170 !== void 0 ? _170 : 0),
271
+ nonAlcoolWithSugar: isNil ? 0 : (0, _lodash.round)((_172 = (_171 = payload.tax) === null || _171 === void 0 ? void 0 : _171.nonAlcoolWithSugar) !== null && _172 !== void 0 ? _172 : 0),
272
+ nonAlcoolWithEdul: isNil ? 0 : (0, _lodash.round)((_174 = (_173 = payload.tax) === null || _173 === void 0 ? void 0 : _173.nonAlcoolWithEdul) !== null && _174 !== void 0 ? _174 : 0),
273
+ mineralWater: isNil ? 0 : (0, _lodash.round)((_176 = (_175 = payload.tax) === null || _175 === void 0 ? void 0 : _175.mineralWater) !== null && _176 !== void 0 ? _176 : 0),
274
+ numericalService: isNil ? 0 : (0, _lodash.round)((_178 = (_177 = payload.tax) === null || _177 === void 0 ? void 0 : _177.numericalService) !== null && _178 !== void 0 ? _178 : 0),
275
+ platform: isNil ? 0 : (0, _lodash.round)((_180 = (_179 = payload.tax) === null || _179 === void 0 ? void 0 : _179.platform) !== null && _180 !== void 0 ? _180 : 0),
272
276
  total: 0 // Calculé plus bas
273
277
  },
274
278
 
@@ -300,9 +304,9 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
300
304
  },
301
305
  recapitulation: {
302
306
  balance: 0,
303
- refund: isNil ? 0 : (0, _lodash.round)((_174 = (_173 = payload.refund) === null || _173 === void 0 ? void 0 : _173.asked) !== null && _174 !== void 0 ? _174 : 0),
304
- creditToReport: isNil ? 0 : (0, _lodash.round)((_176 = (_175 = payload.deductible) === null || _175 === void 0 ? void 0 : _175.previousCredit) !== null && _176 !== void 0 ? _176 : 0),
305
- imputedCredit: isNil ? 0 : (0, _lodash.round)((_178 = (_177 = payload.recapitulation) === null || _177 === void 0 ? void 0 : _177.imputedCredit) !== null && _178 !== void 0 ? _178 : 0),
307
+ refund: isNil ? 0 : (0, _lodash.round)((_182 = (_181 = payload.refund) === null || _181 === void 0 ? void 0 : _181.asked) !== null && _182 !== void 0 ? _182 : 0),
308
+ creditToReport: isNil ? 0 : (0, _lodash.round)((_184 = (_183 = payload.deductible) === null || _183 === void 0 ? void 0 : _183.previousCredit) !== null && _184 !== void 0 ? _184 : 0),
309
+ imputedCredit: isNil ? 0 : (0, _lodash.round)((_186 = (_185 = payload.recapitulation) === null || _185 === void 0 ? void 0 : _185.imputedCredit) !== null && _186 !== void 0 ? _186 : 0),
306
310
  ticRefunded: 0,
307
311
  imputeOnVat: 0,
308
312
  vatNetDue: 0,
@@ -323,20 +327,20 @@ function getCerfa3517Century23Payload(accountingEntries, payload) {
323
327
  },
324
328
  total: 0,
325
329
  refund: {
326
- creditRefundable: shouldFillRefund ? isNil ? 0 : (0, _lodash.round)((_180 = (_179 = payload.refund) === null || _179 === void 0 ? void 0 : _179.creditRefundable) !== null && _180 !== void 0 ? _180 : 0) : 0,
330
+ creditRefundable: shouldFillRefund ? isNil ? 0 : (0, _lodash.round)((_188 = (_187 = payload.refund) === null || _187 === void 0 ? void 0 : _187.creditRefundable) !== null && _188 !== void 0 ? _188 : 0) : 0,
327
331
  surplus: 0,
328
332
  maximum: 0,
329
- asked: isNil ? 0 : (0, _lodash.round)((_182 = (_181 = payload.refund) === null || _181 === void 0 ? void 0 : _181.asked) !== null && _182 !== void 0 ? _182 : 0),
333
+ asked: isNil ? 0 : (0, _lodash.round)((_190 = (_189 = payload.refund) === null || _189 === void 0 ? void 0 : _189.asked) !== null && _190 !== void 0 ? _190 : 0),
330
334
  reportable: 0,
331
335
  place: shouldFillRefund ? payload.society.city : null,
332
336
  date: shouldFillRefund ? dayjs().format('YYYY-MM-DD') : null,
333
337
  shouldCredit: true,
334
338
  shouldImpute: false,
335
- name: shouldFillRefund ? `${(_183 = payload.owner) === null || _183 === void 0 ? void 0 : _183.firstname} ${(_184 = payload.owner) === null || _184 === void 0 ? void 0 : _184.lastname}` : null
339
+ name: shouldFillRefund ? `${(_191 = payload.owner) === null || _191 === void 0 ? void 0 : _191.firstname} ${(_192 = payload.owner) === null || _192 === void 0 ? void 0 : _192.lastname}` : null
336
340
  },
337
341
  bankAccount: {
338
- iban: (_186 = (_185 = payload.details) === null || _185 === void 0 ? void 0 : _185.iban) !== null && _186 !== void 0 ? _186 : null,
339
- bic: (_188 = (_187 = payload.details) === null || _187 === void 0 ? void 0 : _187.bic) !== null && _188 !== void 0 ? _188 : null
342
+ iban: (_194 = (_193 = payload.details) === null || _193 === void 0 ? void 0 : _193.iban) !== null && _194 !== void 0 ? _194 : null,
343
+ bic: (_196 = (_195 = payload.details) === null || _195 === void 0 ? void 0 : _195.bic) !== null && _196 !== void 0 ? _196 : null
340
344
  }
341
345
  };
342
346
  data.vat.total.tax = data.vat.normalRate20.tax + data.vat.normalRate20OnPetrol.tax + data.vat.reduceRate5Dot5.tax + data.vat.reduceRate10.tax + data.vat.reduceRate8Dot5.tax + data.vat.reduceRate2Dot1.tax + data.vat.particularRate.tax + data.vat.reducedRateOnPetrol.tax + data.vat.oldRate.tax + data.vat.energyBought.tax + data.vat.prestation.tax + data.vat.prestation2.tax + data.vat.saleOfImmobilization.tax + data.vat.ownDelivery.tax + data.vat.other.tax;
@@ -1492,6 +1496,22 @@ const cerfa3517Century23Fields = exports.cerfa3517Century23Fields = [{
1492
1496
  }, {
1493
1497
  sectionName: 'TVA brute',
1494
1498
  childrens: [{
1499
+ label: '3A - Ventes à distance taxables dans un autre État membre au profit de personnes non assujetties',
1500
+ key: 'untaxedOperation.distance',
1501
+ type: 'number'
1502
+ }, {
1503
+ label: '3B - Mises à la consommation de produits pétroliers',
1504
+ key: 'untaxedOperation.petrol',
1505
+ type: 'number'
1506
+ }, {
1507
+ label: '4B - Ventes de biens ou prestations de services réalisées par un assujetti non établi en France (article 283-1 du code général des impôts)',
1508
+ key: 'untaxedOperation.salesGoodsOrServices',
1509
+ type: 'number'
1510
+ }, {
1511
+ label: '4D - Livraisons d’électricité, de gaz naturel, de chaleur ou de froid non imposables en France',
1512
+ key: 'untaxedOperation.delivery',
1513
+ type: 'number'
1514
+ }, {
1495
1515
  label: '5B - Taux normal 20 % sur les produits pétroliers',
1496
1516
  key: 'vat.normalRate20OnPetrol',
1497
1517
  type: 'number'