@silexpert/core 1.1.29 → 1.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"3310.js","names":[],"sources":["../../../../../ts/types/Interface/api/cerfa/3310.ts"],"sourcesContent":["import { ISociety } from '../../models/ISociety';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { ServiceOfTax } from '../tax/ReadTax';\n\ntype BaseAndTax = {\n base: number;\n tax: number;\n};\n\ntype Tic = {\n credit?: number;\n refund?: number;\n imputed?: number;\n tax?: number;\n};\n\nexport interface Cerfa3310_2023 {\n declaration: {\n recipient: {\n name: string | null;\n address: {\n full: string;\n }\n numbers: {\n SIE: string | null;\n folder: string | null;\n key: string | null;\n period: string | null;\n CM: string | null;\n OPT: string | null;\n service: string | null;\n system: string | null;\n }\n }\n period: {\n start: {\n day: string;\n month: string;\n year: string;\n },\n end: {\n day: string;\n month: string;\n year: string;\n }\n },\n service: {\n address: {\n full: string | null;\n }\n },\n siret: {\n first: string | null;\n second: string | null;\n },\n intracommunityVat: {\n first: string | null;\n second: string | null;\n third: string | null;\n },\n comment: string | null;\n payment: {\n date: string | null;\n phone: string | null;\n isPayment: boolean;\n byImputation: boolean;\n }\n },\n isNil: boolean;\n untaxedOperations: {\n exportationNotInEurope: number;\n other: number;\n distanceSelling: number;\n import: number;\n withdrawSuspensiveRegime: number;\n importInSuspensiveSystem: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery: number;\n oilProductsConsumption: number;\n importPetrolInSuspensiveSystem: number;\n purchaseInFranchise: number;\n saleOfServicesNotInFrance: number;\n regularizations: number;\n internalUniq: number;\n },\n taxedOperations: {\n services: number;\n other: number;\n purchaseOfIntracommunityServiceProvision: number;\n import: number;\n withdrawSuspensiveRegime: number;\n releaseFromConsumption: number;\n intracommunityAcquisitions: number;\n energyDelivery: number;\n purchaseOfServicesNotInFrance: number;\n regularizations: number;\n },\n vat: {\n carrieredOutInFrance: {\n normalRate20: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate10: BaseAndTax,\n },\n overseasDepartment: {\n reduceRate8Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax\n },\n oilProducts: {\n normalRate20: BaseAndTax,\n reduceRate13: BaseAndTax\n },\n importations: {\n normalRate20: BaseAndTax,\n reduceRate10: BaseAndTax,\n reduceRate8Dot5: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax,\n reduceRate1Dot05: BaseAndTax,\n },\n previouslyDeductedToBeReturned: {\n onOilProducts: number;\n otherThanOilProducts: number;\n total: number;\n },\n sumToAdd: number;\n grossDue: number;\n onIntracommunityAcquisition: number;\n toMonaco: number;\n deductible: {\n other: {\n oil: number;\n thanOilProducts: number;\n collected: number;\n total: number;\n }\n immobilizations: number;\n otherGoodsAndServices: number;\n report: number;\n toImpute: number;\n total: number;\n onImportOtherThanOilProducts: number;\n coefficient: number;\n onOilProducts: number;\n },\n otherRate: {\n oldRate: BaseAndTax,\n at1Dot75: BaseAndTax,\n at1Dot05: BaseAndTax,\n at10: BaseAndTax,\n atCorse2Dot1: BaseAndTax,\n atCorse0Dot9: BaseAndTax,\n at2Dot1: BaseAndTax,\n author: BaseAndTax,\n }\n },\n credit: {\n amount: number;\n refundAsked: number;\n transferedToSocietyHeadOfGroup: number;\n assimiledTaxes: number;\n toReport: number;\n ticRefund: number;\n ticTransfered: number;\n },\n toPay: {\n netDue: number;\n acquittedBySocietyHeadOfGroup: number;\n total: number;\n },\n isDGE: boolean;\n isUniq: boolean;\n tic?: {\n ticfe?: Tic,\n ticgn?: Tic,\n ticc?: Tic,\n total?: Tic,\n }\n}\n\nexport type PayloadCerfa3310_2023 = {\n isHolidayDeposit: boolean;\n startDate: string;\n endDate: string;\n society: ISociety;\n setting: ISocietyGescom | null;\n isNil: boolean;\n previousVatDeclaration: Cerfa3310_2023 | null;\n sie: ServiceOfTax | null;\n mx: {\n collected: number;\n deducted: number;\n };\n comment?: string;\n taxedOperations?: {\n withdrawSuspensiveRegime?: number;\n releaseFromConsumption?: number;\n energyDelivery?: number;\n purchaseOfServicesNotInFrance?: number;\n regularizations?: number;\n };\n untaxedOperations?: {\n distanceSelling?: number;\n withdrawSuspensiveRegime?: number;\n importInSuspensiveSystem?: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery?: number;\n oilProductsConsumption?: number;\n importPetrolInSuspensiveSystem?: number;\n purchaseInFranchise?: number;\n saleOfServicesNotInFrance?: number;\n regularizations?: number;\n internalUniq?: number;\n },\n vat?: {\n oilProducts?: {\n normalRate20?: { base?: number }\n reduceRate13?: { base?: number }\n },\n previouslyDeductedToBeReturned?: {\n onOilProducts?: number;\n otherThanOilProducts?: number;\n total?: number;\n },\n toMonaco?: number;\n deductible?: {\n other?: {\n oil?: number;\n },\n toImpute?: number;\n onOilProducts?: number;\n coefficient?: number;\n },\n otherRate?: {\n oldRate?: {\n tax?: number;\n base?: number;\n },\n },\n sumToAdd?: number;\n },\n credit?: {\n transferedToSocietyHeadOfGroup?: number;\n assimiledTaxes?: number;\n refundAsked?: number;\n },\n toPay?: {\n acquittedBySocietyHeadOfGroup?: number;\n },\n};"],"mappings":""}
1
+ {"version":3,"file":"3310.js","names":[],"sources":["../../../../../ts/types/Interface/api/cerfa/3310.ts"],"sourcesContent":["import { ISociety } from '../../models/ISociety';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { ServiceOfTax } from '../tax/ReadTax';\n\ntype BaseAndTax = {\n base: number;\n tax: number;\n};\n\ntype Tic = {\n credit?: number;\n refund?: number;\n imputed?: number;\n tax?: number;\n};\n\nexport interface Cerfa3310_2023 {\n declaration: {\n recipient: {\n name: string | null;\n address: {\n full: string;\n }\n numbers: {\n SIE: string | null;\n folder: string | null;\n key: string | null;\n period: string | null;\n CM: string | null;\n OPT: string | null;\n service: string | null;\n system: string | null;\n }\n }\n period: {\n start: {\n day: string;\n month: string;\n year: string;\n },\n end: {\n day: string;\n month: string;\n year: string;\n }\n },\n service: {\n address: {\n full: string | null;\n }\n },\n siret: {\n first: string | null;\n second: string | null;\n },\n intracommunityVat: {\n first: string | null;\n second: string | null;\n third: string | null;\n },\n comment: string | null;\n payment: {\n date: string | null;\n phone: string | null;\n isPayment: boolean;\n byImputation: boolean;\n }\n },\n isNil: boolean;\n untaxedOperations: {\n exportationNotInEurope: number;\n other: number;\n distanceSelling: number;\n import: number;\n withdrawSuspensiveRegime: number;\n importInSuspensiveSystem: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery: number;\n oilProductsConsumption: number;\n importPetrolInSuspensiveSystem: number;\n purchaseInFranchise: number;\n saleOfServicesNotInFrance: number;\n regularizations: number;\n internalUniq: number;\n },\n taxedOperations: {\n services: number;\n other: number;\n purchaseOfIntracommunityServiceProvision: number;\n import: number;\n withdrawSuspensiveRegime: number;\n releaseFromConsumption: number;\n intracommunityAcquisitions: number;\n energyDelivery: number;\n purchaseOfServicesNotInFrance: number;\n regularizations: number;\n },\n vat: {\n carrieredOutInFrance: {\n normalRate20: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate10: BaseAndTax,\n },\n overseasDepartment: {\n reduceRate8Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax\n },\n oilProducts: {\n normalRate20: BaseAndTax,\n reduceRate13: BaseAndTax\n },\n importations: {\n normalRate20: BaseAndTax,\n reduceRate10: BaseAndTax,\n reduceRate8Dot5: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax,\n reduceRate1Dot05: BaseAndTax,\n },\n previouslyDeductedToBeReturned: {\n onOilProducts: number;\n otherThanOilProducts: number;\n total: number;\n },\n sumToAdd: number;\n grossDue: number;\n onIntracommunityAcquisition: number;\n toMonaco: number;\n deductible: {\n other: {\n oil: number;\n thanOilProducts: number;\n collected: number;\n total: number;\n }\n immobilizations: number;\n otherGoodsAndServices: number;\n report: number;\n toImpute: number;\n total: number;\n onImportOtherThanOilProducts: number;\n coefficient: number;\n onOilProducts: number;\n },\n otherRate: {\n oldRate: BaseAndTax,\n at1Dot75: BaseAndTax,\n at1Dot05: BaseAndTax,\n at10: BaseAndTax,\n atCorse2Dot1: BaseAndTax,\n atCorse0Dot9: BaseAndTax,\n at2Dot1: BaseAndTax,\n author: BaseAndTax,\n }\n },\n credit: {\n amount: number;\n refundAsked: number;\n transferedToSocietyHeadOfGroup: number;\n assimiledTaxes: number;\n toReport: number;\n ticRefund: number;\n ticTransfered: number;\n },\n toPay: {\n netDue: number;\n acquittedBySocietyHeadOfGroup: number;\n total: number;\n },\n isDGE: boolean;\n isUniq: boolean;\n tic?: {\n ticfe?: Tic,\n ticgn?: Tic,\n ticc?: Tic,\n total?: Tic,\n },\n}\n\nexport type PayloadCerfa3310_2023 = {\n isHolidayDeposit: boolean;\n startDate: string;\n endDate: string;\n society: ISociety;\n setting: ISocietyGescom | null;\n isNil: boolean;\n previousVatDeclaration: Cerfa3310_2023 | null;\n sie: ServiceOfTax | null;\n comment?: string;\n taxedOperations?: {\n withdrawSuspensiveRegime?: number;\n releaseFromConsumption?: number;\n energyDelivery?: number;\n purchaseOfServicesNotInFrance?: number;\n regularizations?: number;\n };\n untaxedOperations?: {\n distanceSelling?: number;\n withdrawSuspensiveRegime?: number;\n importInSuspensiveSystem?: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery?: number;\n oilProductsConsumption?: number;\n importPetrolInSuspensiveSystem?: number;\n purchaseInFranchise?: number;\n saleOfServicesNotInFrance?: number;\n regularizations?: number;\n internalUniq?: number;\n },\n vat?: {\n oilProducts?: {\n normalRate20?: { base?: number }\n reduceRate13?: { base?: number }\n },\n previouslyDeductedToBeReturned?: {\n onOilProducts?: number;\n otherThanOilProducts?: number;\n total?: number;\n },\n toMonaco?: number;\n deductible?: {\n other?: {\n oil?: number;\n },\n toImpute?: number;\n onOilProducts?: number;\n coefficient?: number;\n },\n otherRate?: {\n oldRate?: {\n tax?: number;\n base?: number;\n },\n },\n sumToAdd?: number;\n },\n credit?: {\n transferedToSocietyHeadOfGroup?: number;\n assimiledTaxes?: number;\n refundAsked?: number;\n },\n toPay?: {\n acquittedBySocietyHeadOfGroup?: number;\n },\n};"],"mappings":""}
@@ -14,8 +14,8 @@ var _Vat = require("../../../types/Enum/Vat");
14
14
  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
- function getCerfa3310Century23Payload(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;
17
+ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries = []) {
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;
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 vats = Object.values(_Vat.Vat);
21
21
  const frenchVat = vats.filter(v => !v.isVatImportation && !v.isVatIntracom).map(v => v.id);
@@ -24,6 +24,28 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
24
24
  const withoutTaxVat = vats.filter(v => v.value === 0).map(v => v.id);
25
25
  const importationVat = vats.filter(v => v.isVatImportation && !v.isVatIntracom).map(v => v.id);
26
26
  const vatEntries = accountingEntries.filter(ae => typeof ae.idVat === 'number');
27
+ const oldEntries = (0, _lodash.flatten)(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map(u => u.old));
28
+ const newEntries = (0, _lodash.flatten)(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map(u => u.new));
29
+ const collectedOldAmount = (0, _utils.getAmountByAccountNumber)(oldEntries, ['4457'], 0);
30
+ const collectedNewAmount = (0, _utils.getAmountByAccountNumber)(newEntries, ['4457'], 0);
31
+ const deductedOldAmount = (0, _utils.getAmountByAccountNumber)(oldEntries, ['4456'], 0);
32
+ const deductedNewAmount = (0, _utils.getAmountByAccountNumber)(newEntries, ['4456'], 0);
33
+ const mxCollected = collectedNewAmount - collectedOldAmount;
34
+ const mxDeducted = deductedNewAmount - deductedOldAmount;
35
+ let mxToAdd = 0;
36
+ let mxToSub = 0;
37
+ if (mxCollected > 0) {
38
+ mxToAdd += mxCollected;
39
+ }
40
+ if (mxDeducted < 0) {
41
+ mxToAdd += Math.abs(mxDeducted);
42
+ }
43
+ if (mxCollected < 0) {
44
+ mxToSub += Math.abs(mxCollected);
45
+ }
46
+ if (mxDeducted > 0) {
47
+ mxToSub += mxDeducted;
48
+ }
27
49
  // Opérations taxées
28
50
  const taxedServicesEntries = vatEntries.filter(ae => frenchVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
29
51
  const servicesAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
@@ -74,8 +96,8 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
74
96
  const coefficient = (0, _lodash.round)((_g = (_f = (_e = payload.vat) === null || _e === void 0 ? void 0 : _e.deductible) === null || _f === void 0 ? void 0 : _f.coefficient) !== null && _g !== void 0 ? _g : 100, 2);
75
97
  const isNil = payload.isNil === true;
76
98
  const isHolidayDeposit = payload.isHolidayDeposit === true;
77
- const sumToAdd = isNil ? 0 : isHolidayDeposit ? (0, _lodash.round)(((_k = (_j = (_h = payload.previousVatDeclaration) === null || _h === void 0 ? void 0 : _h.toPay) === null || _j === void 0 ? void 0 : _j.total) !== null && _k !== void 0 ? _k : 0) * 0.8, 2) : (0, _lodash.round)((_m = (_l = payload.vat) === null || _l === void 0 ? void 0 : _l.sumToAdd) !== null && _m !== void 0 ? _m : 0) + (0, _lodash.round)((_p = (_o = payload.mx) === null || _o === void 0 ? void 0 : _o.collected) !== null && _p !== void 0 ? _p : 0);
78
- const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_q = payload.comment) !== null && _q !== void 0 ? _q : ''}` : (_r = payload.comment) !== null && _r !== void 0 ? _r : null;
99
+ const sumToAdd = isNil ? 0 : isHolidayDeposit ? (0, _lodash.round)(((_k = (_j = (_h = payload.previousVatDeclaration) === null || _h === void 0 ? void 0 : _h.toPay) === null || _j === void 0 ? void 0 : _j.total) !== null && _k !== void 0 ? _k : 0) * 0.8, 2) : (0, _lodash.round)((_m = (_l = payload.vat) === null || _l === void 0 ? void 0 : _l.sumToAdd) !== null && _m !== void 0 ? _m : 0) + mxToAdd;
100
+ const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_o = payload.comment) !== null && _o !== void 0 ? _o : ''}` : (_p = payload.comment) !== null && _p !== void 0 ? _p : null;
79
101
  const initialPayload = {
80
102
  isNil,
81
103
  isDGE: false,
@@ -88,7 +110,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
88
110
  full: `${payload.society.address}\n${payload.society.zipCode} ${payload.society.city}`
89
111
  },
90
112
  numbers: {
91
- SIE: (_t = (_s = payload.sie) === null || _s === void 0 ? void 0 : _s.sages) !== null && _t !== void 0 ? _t : null,
113
+ SIE: (_r = (_q = payload.sie) === null || _q === void 0 ? void 0 : _q.sages) !== null && _r !== void 0 ? _r : null,
92
114
  folder: null,
93
115
  key: null,
94
116
  period: null,
@@ -100,7 +122,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
100
122
  },
101
123
  service: {
102
124
  address: {
103
- full: (0, _classValidator.isDefined)((_v = (_u = payload.sie) === null || _u === void 0 ? void 0 : _u.address) === null || _v === void 0 ? void 0 : _v.address1) ? `${(_w = payload.sie) === null || _w === void 0 ? void 0 : _w.address.address1}\n${(_x = payload.sie) === null || _x === void 0 ? void 0 : _x.address.address2}\n${(_y = payload.sie) === null || _y === void 0 ? void 0 : _y.address.address3}\n${(_z = payload.sie) === null || _z === void 0 ? void 0 : _z.address.address4}\n${(_0 = payload.sie) === null || _0 === void 0 ? void 0 : _0.address.address5}` : null
125
+ full: (0, _classValidator.isDefined)((_t = (_s = payload.sie) === null || _s === void 0 ? void 0 : _s.address) === null || _t === void 0 ? void 0 : _t.address1) ? `${(_u = payload.sie) === null || _u === void 0 ? void 0 : _u.address.address1}\n${(_v = payload.sie) === null || _v === void 0 ? void 0 : _v.address.address2}\n${(_w = payload.sie) === null || _w === void 0 ? void 0 : _w.address.address3}\n${(_x = payload.sie) === null || _x === void 0 ? void 0 : _x.address.address4}\n${(_y = payload.sie) === null || _y === void 0 ? void 0 : _y.address.address5}` : null
104
126
  }
105
127
  },
106
128
  period: {
@@ -116,13 +138,13 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
116
138
  }
117
139
  },
118
140
  siret: {
119
- first: (0, _classValidator.isDefined)(payload.society.siret) ? (_2 = (_1 = payload.society.siret) === null || _1 === void 0 ? void 0 : _1.slice(0, 9)) !== null && _2 !== void 0 ? _2 : null : null,
120
- second: (0, _classValidator.isDefined)(payload.society.siret) ? (_4 = (_3 = payload.society.siret) === null || _3 === void 0 ? void 0 : _3.slice(5)) !== null && _4 !== void 0 ? _4 : null : null
141
+ first: (0, _classValidator.isDefined)(payload.society.siret) ? (_0 = (_z = payload.society.siret) === null || _z === void 0 ? void 0 : _z.slice(0, 9)) !== null && _0 !== void 0 ? _0 : null : null,
142
+ second: (0, _classValidator.isDefined)(payload.society.siret) ? (_2 = (_1 = payload.society.siret) === null || _1 === void 0 ? void 0 : _1.slice(5)) !== null && _2 !== void 0 ? _2 : null : null
121
143
  },
122
144
  intracommunityVat: {
123
- first: shouldHaveVatCode ? (_7 = (_6 = (_5 = payload.setting) === null || _5 === void 0 ? void 0 : _5.tvaCode) === null || _6 === void 0 ? void 0 : _6.slice(0, 2)) !== null && _7 !== void 0 ? _7 : null : null,
124
- second: shouldHaveVatCode ? (_10 = (_9 = (_8 = payload.setting) === null || _8 === void 0 ? void 0 : _8.tvaCode) === null || _9 === void 0 ? void 0 : _9.slice(2, 4)) !== null && _10 !== void 0 ? _10 : null : null,
125
- third: shouldHaveVatCode ? (_12 = (_11 = payload.society.siret) === null || _11 === void 0 ? void 0 : _11.slice(0, 9)) !== null && _12 !== void 0 ? _12 : null : null
145
+ first: shouldHaveVatCode ? (_5 = (_4 = (_3 = payload.setting) === null || _3 === void 0 ? void 0 : _3.tvaCode) === null || _4 === void 0 ? void 0 : _4.slice(0, 2)) !== null && _5 !== void 0 ? _5 : null : null,
146
+ second: shouldHaveVatCode ? (_8 = (_7 = (_6 = payload.setting) === null || _6 === void 0 ? void 0 : _6.tvaCode) === null || _7 === void 0 ? void 0 : _7.slice(2, 4)) !== null && _8 !== void 0 ? _8 : null : null,
147
+ third: shouldHaveVatCode ? (_10 = (_9 = payload.society.siret) === null || _9 === void 0 ? void 0 : _9.slice(0, 9)) !== null && _10 !== void 0 ? _10 : null : null
126
148
  },
127
149
  payment: {
128
150
  date: dayjs().format('YYYY-MM-DD'),
@@ -136,29 +158,29 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
136
158
  other: isNil || isHolidayDeposit ? 0 : taxedOther,
137
159
  purchaseOfIntracommunityServiceProvision: isNil || isHolidayDeposit ? 0 : taxedPurchaseOfIntracommunityService,
138
160
  import: isNil || isHolidayDeposit ? 0 : taxedImport,
139
- withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_14 = (_13 = payload.taxedOperations) === null || _13 === void 0 ? void 0 : _13.withdrawSuspensiveRegime) !== null && _14 !== void 0 ? _14 : 0),
140
- releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_16 = (_15 = payload.taxedOperations) === null || _15 === void 0 ? void 0 : _15.releaseFromConsumption) !== null && _16 !== void 0 ? _16 : 0),
161
+ withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_12 = (_11 = payload.taxedOperations) === null || _11 === void 0 ? void 0 : _11.withdrawSuspensiveRegime) !== null && _12 !== void 0 ? _12 : 0),
162
+ releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_14 = (_13 = payload.taxedOperations) === null || _13 === void 0 ? void 0 : _13.releaseFromConsumption) !== null && _14 !== void 0 ? _14 : 0),
141
163
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : taxedIntracommunityAcquisitions,
142
- energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_18 = (_17 = payload.taxedOperations) === null || _17 === void 0 ? void 0 : _17.energyDelivery) !== null && _18 !== void 0 ? _18 : 0),
143
- purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_20 = (_19 = payload.taxedOperations) === null || _19 === void 0 ? void 0 : _19.purchaseOfServicesNotInFrance) !== null && _20 !== void 0 ? _20 : 0),
144
- regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_22 = (_21 = payload.taxedOperations) === null || _21 === void 0 ? void 0 : _21.regularizations) !== null && _22 !== void 0 ? _22 : 0)
164
+ energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_16 = (_15 = payload.taxedOperations) === null || _15 === void 0 ? void 0 : _15.energyDelivery) !== null && _16 !== void 0 ? _16 : 0),
165
+ purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_18 = (_17 = payload.taxedOperations) === null || _17 === void 0 ? void 0 : _17.purchaseOfServicesNotInFrance) !== null && _18 !== void 0 ? _18 : 0),
166
+ regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_20 = (_19 = payload.taxedOperations) === null || _19 === void 0 ? void 0 : _19.regularizations) !== null && _20 !== void 0 ? _20 : 0)
145
167
  },
146
168
  untaxedOperations: {
147
169
  exportationNotInEurope: isNil || isHolidayDeposit ? 0 : untaxedExportationNotInEurope,
148
170
  other: isNil || isHolidayDeposit ? 0 : untaxedOther,
149
- distanceSelling: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_24 = (_23 = payload.untaxedOperations) === null || _23 === void 0 ? void 0 : _23.distanceSelling) !== null && _24 !== void 0 ? _24 : 0),
171
+ distanceSelling: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_22 = (_21 = payload.untaxedOperations) === null || _21 === void 0 ? void 0 : _21.distanceSelling) !== null && _22 !== void 0 ? _22 : 0),
150
172
  import: isNil || isHolidayDeposit ? 0 : untaxedImport,
151
- withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_26 = (_25 = payload.untaxedOperations) === null || _25 === void 0 ? void 0 : _25.withdrawSuspensiveRegime) !== null && _26 !== void 0 ? _26 : 0),
152
- importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_28 = (_27 = payload.untaxedOperations) === null || _27 === void 0 ? void 0 : _27.importInSuspensiveSystem) !== null && _28 !== void 0 ? _28 : 0),
173
+ withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_24 = (_23 = payload.untaxedOperations) === null || _23 === void 0 ? void 0 : _23.withdrawSuspensiveRegime) !== null && _24 !== void 0 ? _24 : 0),
174
+ importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_26 = (_25 = payload.untaxedOperations) === null || _25 === void 0 ? void 0 : _25.importInSuspensiveSystem) !== null && _26 !== void 0 ? _26 : 0),
153
175
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : untaxedIntracomunity,
154
176
  intracommunityDelivery: isNil || isHolidayDeposit ? 0 : untaxedIntracommunityDelivery,
155
- energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_30 = (_29 = payload.untaxedOperations) === null || _29 === void 0 ? void 0 : _29.energyDelivery) !== null && _30 !== void 0 ? _30 : 0),
156
- oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_32 = (_31 = payload.untaxedOperations) === null || _31 === void 0 ? void 0 : _31.oilProductsConsumption) !== null && _32 !== void 0 ? _32 : 0),
157
- importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_34 = (_33 = payload.untaxedOperations) === null || _33 === void 0 ? void 0 : _33.importPetrolInSuspensiveSystem) !== null && _34 !== void 0 ? _34 : 0),
158
- purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_36 = (_35 = payload.untaxedOperations) === null || _35 === void 0 ? void 0 : _35.purchaseInFranchise) !== null && _36 !== void 0 ? _36 : 0),
159
- saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_38 = (_37 = payload.untaxedOperations) === null || _37 === void 0 ? void 0 : _37.saleOfServicesNotInFrance) !== null && _38 !== void 0 ? _38 : 0),
160
- regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_40 = (_39 = payload.untaxedOperations) === null || _39 === void 0 ? void 0 : _39.regularizations) !== null && _40 !== void 0 ? _40 : 0),
161
- internalUniq: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_42 = (_41 = payload.untaxedOperations) === null || _41 === void 0 ? void 0 : _41.internalUniq) !== null && _42 !== void 0 ? _42 : 0)
177
+ energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_28 = (_27 = payload.untaxedOperations) === null || _27 === void 0 ? void 0 : _27.energyDelivery) !== null && _28 !== void 0 ? _28 : 0),
178
+ oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_30 = (_29 = payload.untaxedOperations) === null || _29 === void 0 ? void 0 : _29.oilProductsConsumption) !== null && _30 !== void 0 ? _30 : 0),
179
+ importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_32 = (_31 = payload.untaxedOperations) === null || _31 === void 0 ? void 0 : _31.importPetrolInSuspensiveSystem) !== null && _32 !== void 0 ? _32 : 0),
180
+ purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_34 = (_33 = payload.untaxedOperations) === null || _33 === void 0 ? void 0 : _33.purchaseInFranchise) !== null && _34 !== void 0 ? _34 : 0),
181
+ saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_36 = (_35 = payload.untaxedOperations) === null || _35 === void 0 ? void 0 : _35.saleOfServicesNotInFrance) !== null && _36 !== void 0 ? _36 : 0),
182
+ regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_38 = (_37 = payload.untaxedOperations) === null || _37 === void 0 ? void 0 : _37.regularizations) !== null && _38 !== void 0 ? _38 : 0),
183
+ internalUniq: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_40 = (_39 = payload.untaxedOperations) === null || _39 === void 0 ? void 0 : _39.internalUniq) !== null && _40 !== void 0 ? _40 : 0)
162
184
  },
163
185
  vat: {
164
186
  carrieredOutInFrance: {
@@ -187,12 +209,12 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
187
209
  },
188
210
  oilProducts: {
189
211
  normalRate20: {
190
- base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_46 = (_45 = (_44 = (_43 = payload.vat) === null || _43 === void 0 ? void 0 : _43.oilProducts) === null || _44 === void 0 ? void 0 : _44.normalRate20) === null || _45 === void 0 ? void 0 : _45.base) !== null && _46 !== void 0 ? _46 : 0),
191
- tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_50 = (_49 = (_48 = (_47 = payload.vat) === null || _47 === void 0 ? void 0 : _47.oilProducts) === null || _48 === void 0 ? void 0 : _48.normalRate20) === null || _49 === void 0 ? void 0 : _49.base) !== null && _50 !== void 0 ? _50 : 0) * 0.02
212
+ base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_44 = (_43 = (_42 = (_41 = payload.vat) === null || _41 === void 0 ? void 0 : _41.oilProducts) === null || _42 === void 0 ? void 0 : _42.normalRate20) === null || _43 === void 0 ? void 0 : _43.base) !== null && _44 !== void 0 ? _44 : 0),
213
+ tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_48 = (_47 = (_46 = (_45 = payload.vat) === null || _45 === void 0 ? void 0 : _45.oilProducts) === null || _46 === void 0 ? void 0 : _46.normalRate20) === null || _47 === void 0 ? void 0 : _47.base) !== null && _48 !== void 0 ? _48 : 0) * 0.02
192
214
  },
193
215
  reduceRate13: {
194
- base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_54 = (_53 = (_52 = (_51 = payload.vat) === null || _51 === void 0 ? void 0 : _51.oilProducts) === null || _52 === void 0 ? void 0 : _52.reduceRate13) === null || _53 === void 0 ? void 0 : _53.base) !== null && _54 !== void 0 ? _54 : 0),
195
- tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_58 = (_57 = (_56 = (_55 = payload.vat) === null || _55 === void 0 ? void 0 : _55.oilProducts) === null || _56 === void 0 ? void 0 : _56.reduceRate13) === null || _57 === void 0 ? void 0 : _57.base) !== null && _58 !== void 0 ? _58 : 0) * 0.013
216
+ base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_52 = (_51 = (_50 = (_49 = payload.vat) === null || _49 === void 0 ? void 0 : _49.oilProducts) === null || _50 === void 0 ? void 0 : _50.reduceRate13) === null || _51 === void 0 ? void 0 : _51.base) !== null && _52 !== void 0 ? _52 : 0),
217
+ tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_56 = (_55 = (_54 = (_53 = payload.vat) === null || _53 === void 0 ? void 0 : _53.oilProducts) === null || _54 === void 0 ? void 0 : _54.reduceRate13) === null || _55 === void 0 ? void 0 : _55.base) !== null && _56 !== void 0 ? _56 : 0) * 0.013
196
218
  }
197
219
  },
198
220
  importations: {
@@ -222,34 +244,34 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
222
244
  }
223
245
  },
224
246
  previouslyDeductedToBeReturned: {
225
- onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_61 = (_60 = (_59 = payload.vat) === null || _59 === void 0 ? void 0 : _59.previouslyDeductedToBeReturned) === null || _60 === void 0 ? void 0 : _60.onOilProducts) !== null && _61 !== void 0 ? _61 : 0),
226
- otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_64 = (_63 = (_62 = payload.vat) === null || _62 === void 0 ? void 0 : _62.previouslyDeductedToBeReturned) === null || _63 === void 0 ? void 0 : _63.otherThanOilProducts) !== null && _64 !== void 0 ? _64 : 0),
227
- total: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_67 = (_66 = (_65 = payload.vat) === null || _65 === void 0 ? void 0 : _65.previouslyDeductedToBeReturned) === null || _66 === void 0 ? void 0 : _66.total) !== null && _67 !== void 0 ? _67 : 0)
247
+ onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_59 = (_58 = (_57 = payload.vat) === null || _57 === void 0 ? void 0 : _57.previouslyDeductedToBeReturned) === null || _58 === void 0 ? void 0 : _58.onOilProducts) !== null && _59 !== void 0 ? _59 : 0),
248
+ otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_62 = (_61 = (_60 = payload.vat) === null || _60 === void 0 ? void 0 : _60.previouslyDeductedToBeReturned) === null || _61 === void 0 ? void 0 : _61.otherThanOilProducts) !== null && _62 !== void 0 ? _62 : 0),
249
+ total: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_65 = (_64 = (_63 = payload.vat) === null || _63 === void 0 ? void 0 : _63.previouslyDeductedToBeReturned) === null || _64 === void 0 ? void 0 : _64.total) !== null && _65 !== void 0 ? _65 : 0)
228
250
  },
229
251
  sumToAdd,
230
252
  grossDue: 0,
231
253
  onIntracommunityAcquisition: isNil || isHolidayDeposit ? 0 : intracommunityTax,
232
- toMonaco: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_69 = (_68 = payload.vat) === null || _68 === void 0 ? void 0 : _68.toMonaco) !== null && _69 !== void 0 ? _69 : 0),
254
+ toMonaco: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_67 = (_66 = payload.vat) === null || _66 === void 0 ? void 0 : _66.toMonaco) !== null && _67 !== void 0 ? _67 : 0),
233
255
  deductible: {
234
256
  immobilizations: isNil || isHolidayDeposit ? 0 : immobilizationTax !== null && immobilizationTax !== void 0 ? immobilizationTax : 0,
235
257
  otherGoodsAndServices: isNil || isHolidayDeposit ? 0 : otherGoodsAndServices !== null && otherGoodsAndServices !== void 0 ? otherGoodsAndServices : 0,
236
258
  other: {
237
- oil: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_73 = (_72 = (_71 = (_70 = payload.vat) === null || _70 === void 0 ? void 0 : _70.deductible) === null || _71 === void 0 ? void 0 : _71.other) === null || _72 === void 0 ? void 0 : _72.oil) !== null && _73 !== void 0 ? _73 : 0),
259
+ oil: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_71 = (_70 = (_69 = (_68 = payload.vat) === null || _68 === void 0 ? void 0 : _68.deductible) === null || _69 === void 0 ? void 0 : _69.other) === null || _70 === void 0 ? void 0 : _70.oil) !== null && _71 !== void 0 ? _71 : 0),
238
260
  thanOilProducts: 0,
239
261
  collected: 0,
240
262
  total: isNil || isHolidayDeposit ? 0 : otherDeductibles
241
263
  },
242
264
  report,
243
- toImpute: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_76 = (_75 = (_74 = payload.vat) === null || _74 === void 0 ? void 0 : _74.deductible) === null || _75 === void 0 ? void 0 : _75.toImpute) !== null && _76 !== void 0 ? _76 : 0) + (0, _lodash.round)((_78 = (_77 = payload.mx) === null || _77 === void 0 ? void 0 : _77.deducted) !== null && _78 !== void 0 ? _78 : 0),
265
+ toImpute: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_74 = (_73 = (_72 = payload.vat) === null || _72 === void 0 ? void 0 : _72.deductible) === null || _73 === void 0 ? void 0 : _73.toImpute) !== null && _74 !== void 0 ? _74 : 0) + mxToSub,
244
266
  total: 0,
245
267
  onImportOtherThanOilProducts: isNil || isHolidayDeposit ? 0 : otherDeductibles,
246
268
  coefficient: isNil || isHolidayDeposit ? 100 : coefficient,
247
- onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_81 = (_80 = (_79 = payload.vat) === null || _79 === void 0 ? void 0 : _79.deductible) === null || _80 === void 0 ? void 0 : _80.onOilProducts) !== null && _81 !== void 0 ? _81 : 0)
269
+ onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_77 = (_76 = (_75 = payload.vat) === null || _75 === void 0 ? void 0 : _75.deductible) === null || _76 === void 0 ? void 0 : _76.onOilProducts) !== null && _77 !== void 0 ? _77 : 0)
248
270
  },
249
271
  otherRate: {
250
272
  oldRate: {
251
- base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_85 = (_84 = (_83 = (_82 = payload.vat) === null || _82 === void 0 ? void 0 : _82.otherRate) === null || _83 === void 0 ? void 0 : _83.oldRate) === null || _84 === void 0 ? void 0 : _84.base) !== null && _85 !== void 0 ? _85 : 0),
252
- tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_89 = (_88 = (_87 = (_86 = payload.vat) === null || _86 === void 0 ? void 0 : _86.otherRate) === null || _87 === void 0 ? void 0 : _87.oldRate) === null || _88 === void 0 ? void 0 : _88.tax) !== null && _89 !== void 0 ? _89 : 0)
273
+ base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_81 = (_80 = (_79 = (_78 = payload.vat) === null || _78 === void 0 ? void 0 : _78.otherRate) === null || _79 === void 0 ? void 0 : _79.oldRate) === null || _80 === void 0 ? void 0 : _80.base) !== null && _81 !== void 0 ? _81 : 0),
274
+ tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_85 = (_84 = (_83 = (_82 = payload.vat) === null || _82 === void 0 ? void 0 : _82.otherRate) === null || _83 === void 0 ? void 0 : _83.oldRate) === null || _84 === void 0 ? void 0 : _84.tax) !== null && _85 !== void 0 ? _85 : 0)
253
275
  },
254
276
  at1Dot75: {
255
277
  base: 0,
@@ -283,16 +305,16 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
283
305
  },
284
306
  credit: {
285
307
  amount: 0,
286
- refundAsked: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_91 = (_90 = payload.credit) === null || _90 === void 0 ? void 0 : _90.refundAsked) !== null && _91 !== void 0 ? _91 : 0),
287
- transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_93 = (_92 = payload.credit) === null || _92 === void 0 ? void 0 : _92.transferedToSocietyHeadOfGroup) !== null && _93 !== void 0 ? _93 : 0),
288
- assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_95 = (_94 = payload.credit) === null || _94 === void 0 ? void 0 : _94.assimiledTaxes) !== null && _95 !== void 0 ? _95 : 0),
308
+ refundAsked: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_87 = (_86 = payload.credit) === null || _86 === void 0 ? void 0 : _86.refundAsked) !== null && _87 !== void 0 ? _87 : 0),
309
+ transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_89 = (_88 = payload.credit) === null || _88 === void 0 ? void 0 : _88.transferedToSocietyHeadOfGroup) !== null && _89 !== void 0 ? _89 : 0),
310
+ assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_91 = (_90 = payload.credit) === null || _90 === void 0 ? void 0 : _90.assimiledTaxes) !== null && _91 !== void 0 ? _91 : 0),
289
311
  toReport: 0,
290
312
  ticRefund: 0,
291
313
  ticTransfered: 0
292
314
  },
293
315
  toPay: {
294
316
  netDue: 0,
295
- acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_97 = (_96 = payload.toPay) === null || _96 === void 0 ? void 0 : _96.acquittedBySocietyHeadOfGroup) !== null && _97 !== void 0 ? _97 : 0),
317
+ acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_93 = (_92 = payload.toPay) === null || _92 === void 0 ? void 0 : _92.acquittedBySocietyHeadOfGroup) !== null && _93 !== void 0 ? _93 : 0),
296
318
  total: 0
297
319
  },
298
320
  tic: {
@@ -306,7 +328,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
306
328
  initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
307
329
  initialPayload.toPay.netDue = initialPayload.vat.grossDue - initialPayload.vat.deductible.total > 0 ? initialPayload.vat.grossDue - initialPayload.vat.deductible.total : 0;
308
330
  initialPayload.credit.toReport = initialPayload.credit.amount - initialPayload.credit.refundAsked - initialPayload.credit.transferedToSocietyHeadOfGroup;
309
- initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((_100 = (_99 = (_98 = initialPayload.tic) === null || _98 === void 0 ? void 0 : _98.total) === null || _99 === void 0 ? void 0 : _99.tax) !== null && _100 !== void 0 ? _100 : 0) - initialPayload.toPay.acquittedBySocietyHeadOfGroup;
331
+ initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((_96 = (_95 = (_94 = initialPayload.tic) === null || _94 === void 0 ? void 0 : _94.total) === null || _95 === void 0 ? void 0 : _95.tax) !== null && _96 !== void 0 ? _96 : 0) - initialPayload.toPay.acquittedBySocietyHeadOfGroup;
310
332
  return initialPayload;
311
333
  }
312
334
  function getCerfa3310Century23RegistrationFields(data) {