@silexpert/core 1.1.18 → 1.1.19

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":"AdjustmentType.js","names":["AdjustmentTypeId","exports","undefined","AdjustmentTypeList","id","TOO_MUCH_COLLECTED","label","centuries","key","inputKey","NOT_ENOUGH_COLLECTED","TOO_MUCH_DEDUCTED","NOT_ENOUGH_DEDUCTED"],"sources":["../../../ts/types/Enum/AdjustmentType.ts"],"sourcesContent":["export enum AdjustmentTypeId {\n TOO_MUCH_COLLECTED = 1,\n NOT_ENOUGH_COLLECTED = 2,\n TOO_MUCH_DEDUCTED = 3,\n NOT_ENOUGH_DEDUCTED = 4,\n}\n\nexport const AdjustmentTypeList: Array<{ id:AdjustmentTypeId; label: string; centuries: number[], key: string; inputKey: string; }> = [\n {\n id: AdjustmentTypeId.TOO_MUCH_COLLECTED,\n label: 'TVA trop collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.tooMuchCollected',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_COLLECTED,\n label: 'TVA pas assez collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.notEnoughCollected',\n },\n {\n id: AdjustmentTypeId.TOO_MUCH_DEDUCTED,\n label: 'TVA trop déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.tooMuchDeducted',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_DEDUCTED,\n label: 'TVA pas assez déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.notEnoughDeducted',\n },\n];"],"mappings":";;;;;AAAA,IAAYA,gBAKX,GAAAC,OAAA,CALWD,gBAKX,GAAAE,SAAA;AALD,WAAYF,gBAAgB;EAC1BA,gBAAA,CAAAA,gBAAA,kDAAsB;EACtBA,gBAAA,CAAAA,gBAAA,sDAAwB;EACxBA,gBAAA,CAAAA,gBAAA,gDAAqB;EACrBA,gBAAA,CAAAA,gBAAA,oDAAuB;AACzB,CAAC,EALWA,gBAAgB,KAAAC,OAAA,CAAhBD,gBAKX,GALWA,gBAAgB;AAOrB,MAAMG,kBAAkB,GAAAF,OAAA,CAAlBE,kBAAkB,GAAuG,CACpI;EACEC,EAAE,EAAEJ,gBAAgB,CAACK,kBAAkB;EACvCC,KAAK,EAAE,oBAAoB;EAC3BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACU,oBAAoB;EACzCJ,KAAK,EAAE,yBAAyB;EAChCC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACW,iBAAiB;EACtCL,KAAK,EAAE,kBAAkB;EACzBC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACY,mBAAmB;EACxCN,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,CACF"}
1
+ {"version":3,"file":"AdjustmentType.js","names":["AdjustmentTypeId","exports","undefined","AdjustmentTypeList","id","TOO_MUCH_COLLECTED","label","centuries","key","inputKey","NOT_ENOUGH_COLLECTED","TOO_MUCH_DEDUCTED","NOT_ENOUGH_DEDUCTED"],"sources":["../../../ts/types/Enum/AdjustmentType.ts"],"sourcesContent":["export enum AdjustmentTypeId {\n TOO_MUCH_COLLECTED = 1,\n NOT_ENOUGH_COLLECTED = 2,\n TOO_MUCH_DEDUCTED = 3,\n NOT_ENOUGH_DEDUCTED = 4,\n}\n\nexport const AdjustmentTypeList: Array<{ id:AdjustmentTypeId; label: string; centuries: number[], key: string; inputKey: string; }> = [\n {\n id: AdjustmentTypeId.TOO_MUCH_COLLECTED,\n label: 'TVA trop collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.tooMuchCollected',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_COLLECTED,\n label: 'TVA pas assez collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.notEnoughCollected',\n },\n {\n id: AdjustmentTypeId.TOO_MUCH_DEDUCTED,\n label: 'TVA trop déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.tooMuchDeducted',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_DEDUCTED,\n label: 'TVA pas assez déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.notEnoughDeducted',\n },\n];"],"mappings":";;;;;AAAA,IAAYA,gBAKX,GAAAC,OAAA,CALWD,gBAKX,GAAAE,SAAA;AALD,WAAYF,gBAAgB;EAC1BA,gBAAA,CAAAA,gBAAA,kDAAsB;EACtBA,gBAAA,CAAAA,gBAAA,sDAAwB;EACxBA,gBAAA,CAAAA,gBAAA,gDAAqB;EACrBA,gBAAA,CAAAA,gBAAA,oDAAuB;AACzB,CAAC,EALWA,gBAAgB,KAAAC,OAAA,CAAhBD,gBAKX,GALWA,gBAAgB;AAOrB,MAAMG,kBAAkB,GAAAF,OAAA,CAAlBE,kBAAkB,GAAuG,CACpI;EACEC,EAAE,EAAEJ,gBAAgB,CAACK,kBAAkB;EACvCC,KAAK,EAAE,oBAAoB;EAC3BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACU,oBAAoB;EACzCJ,KAAK,EAAE,yBAAyB;EAChCC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACW,iBAAiB;EACtCL,KAAK,EAAE,kBAAkB;EACzBC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACY,mBAAmB;EACxCN,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,CACF"}
@@ -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 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, _101;
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);
@@ -74,8 +74,8 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
74
74
  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
75
  const isNil = payload.isNil === true;
76
76
  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)((_q = (_p = (_o = payload.vat) === null || _o === void 0 ? void 0 : _o.deductible) === null || _p === void 0 ? void 0 : _p.toImpute) !== null && _q !== void 0 ? _q : 0);
78
- const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_r = payload.comment) !== null && _r !== void 0 ? _r : ''}` : (_s = payload.comment) !== null && _s !== void 0 ? _s : null;
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);
78
+ const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_o = payload.comment) !== null && _o !== void 0 ? _o : ''}` : (_p = payload.comment) !== null && _p !== void 0 ? _p : null;
79
79
  const initialPayload = {
80
80
  isNil,
81
81
  isDGE: false,
@@ -88,7 +88,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
88
88
  full: `${payload.society.address}\n${payload.society.zipCode} ${payload.society.city}`
89
89
  },
90
90
  numbers: {
91
- SIE: (_u = (_t = payload.sie) === null || _t === void 0 ? void 0 : _t.sages) !== null && _u !== void 0 ? _u : null,
91
+ SIE: (_r = (_q = payload.sie) === null || _q === void 0 ? void 0 : _q.sages) !== null && _r !== void 0 ? _r : null,
92
92
  folder: null,
93
93
  key: null,
94
94
  period: null,
@@ -100,7 +100,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
100
100
  },
101
101
  service: {
102
102
  address: {
103
- full: (0, _classValidator.isDefined)((_w = (_v = payload.sie) === null || _v === void 0 ? void 0 : _v.address) === null || _w === void 0 ? void 0 : _w.address1) ? `${(_x = payload.sie) === null || _x === void 0 ? void 0 : _x.address.address1}\n${(_y = payload.sie) === null || _y === void 0 ? void 0 : _y.address.address2}\n${(_z = payload.sie) === null || _z === void 0 ? void 0 : _z.address.address3}\n${(_0 = payload.sie) === null || _0 === void 0 ? void 0 : _0.address.address4}\n${(_1 = payload.sie) === null || _1 === void 0 ? void 0 : _1.address.address5}` : null
103
+ 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
104
  }
105
105
  },
106
106
  period: {
@@ -116,13 +116,13 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
116
116
  }
117
117
  },
118
118
  siret: {
119
- first: (0, _classValidator.isDefined)(payload.society.siret) ? (_3 = (_2 = payload.society.siret) === null || _2 === void 0 ? void 0 : _2.slice(0, 9)) !== null && _3 !== void 0 ? _3 : null : null,
120
- second: (0, _classValidator.isDefined)(payload.society.siret) ? (_5 = (_4 = payload.society.siret) === null || _4 === void 0 ? void 0 : _4.slice(5)) !== null && _5 !== void 0 ? _5 : null : null
119
+ 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,
120
+ 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
121
  },
122
122
  intracommunityVat: {
123
- first: shouldHaveVatCode ? (_8 = (_7 = (_6 = payload.setting) === null || _6 === void 0 ? void 0 : _6.tvaCode) === null || _7 === void 0 ? void 0 : _7.slice(0, 2)) !== null && _8 !== void 0 ? _8 : null : null,
124
- second: shouldHaveVatCode ? (_11 = (_10 = (_9 = payload.setting) === null || _9 === void 0 ? void 0 : _9.tvaCode) === null || _10 === void 0 ? void 0 : _10.slice(2, 4)) !== null && _11 !== void 0 ? _11 : null : null,
125
- third: shouldHaveVatCode ? (_13 = (_12 = payload.society.siret) === null || _12 === void 0 ? void 0 : _12.slice(0, 9)) !== null && _13 !== void 0 ? _13 : null : null
123
+ 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,
124
+ 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,
125
+ 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
126
  },
127
127
  payment: {
128
128
  date: dayjs().format('YYYY-MM-DD'),
@@ -136,29 +136,29 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
136
136
  other: isNil || isHolidayDeposit ? 0 : taxedOther,
137
137
  purchaseOfIntracommunityServiceProvision: isNil || isHolidayDeposit ? 0 : taxedPurchaseOfIntracommunityService,
138
138
  import: isNil || isHolidayDeposit ? 0 : taxedImport,
139
- withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_15 = (_14 = payload.taxedOperations) === null || _14 === void 0 ? void 0 : _14.withdrawSuspensiveRegime) !== null && _15 !== void 0 ? _15 : 0),
140
- releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_17 = (_16 = payload.taxedOperations) === null || _16 === void 0 ? void 0 : _16.releaseFromConsumption) !== null && _17 !== void 0 ? _17 : 0),
139
+ 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),
140
+ 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
141
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : taxedIntracommunityAcquisitions,
142
- energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_19 = (_18 = payload.taxedOperations) === null || _18 === void 0 ? void 0 : _18.energyDelivery) !== null && _19 !== void 0 ? _19 : 0),
143
- purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_21 = (_20 = payload.taxedOperations) === null || _20 === void 0 ? void 0 : _20.purchaseOfServicesNotInFrance) !== null && _21 !== void 0 ? _21 : 0),
144
- regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_23 = (_22 = payload.taxedOperations) === null || _22 === void 0 ? void 0 : _22.regularizations) !== null && _23 !== void 0 ? _23 : 0)
142
+ 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),
143
+ 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),
144
+ 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
145
  },
146
146
  untaxedOperations: {
147
147
  exportationNotInEurope: isNil || isHolidayDeposit ? 0 : untaxedExportationNotInEurope,
148
148
  other: isNil || isHolidayDeposit ? 0 : untaxedOther,
149
- distanceSelling: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_25 = (_24 = payload.untaxedOperations) === null || _24 === void 0 ? void 0 : _24.distanceSelling) !== null && _25 !== void 0 ? _25 : 0),
149
+ 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
150
  import: isNil || isHolidayDeposit ? 0 : untaxedImport,
151
- withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_27 = (_26 = payload.untaxedOperations) === null || _26 === void 0 ? void 0 : _26.withdrawSuspensiveRegime) !== null && _27 !== void 0 ? _27 : 0),
152
- importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_29 = (_28 = payload.untaxedOperations) === null || _28 === void 0 ? void 0 : _28.importInSuspensiveSystem) !== null && _29 !== void 0 ? _29 : 0),
151
+ 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),
152
+ 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
153
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : untaxedIntracomunity,
154
154
  intracommunityDelivery: isNil || isHolidayDeposit ? 0 : untaxedIntracommunityDelivery,
155
- energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_31 = (_30 = payload.untaxedOperations) === null || _30 === void 0 ? void 0 : _30.energyDelivery) !== null && _31 !== void 0 ? _31 : 0),
156
- oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_33 = (_32 = payload.untaxedOperations) === null || _32 === void 0 ? void 0 : _32.oilProductsConsumption) !== null && _33 !== void 0 ? _33 : 0),
157
- importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_35 = (_34 = payload.untaxedOperations) === null || _34 === void 0 ? void 0 : _34.importPetrolInSuspensiveSystem) !== null && _35 !== void 0 ? _35 : 0),
158
- purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_37 = (_36 = payload.untaxedOperations) === null || _36 === void 0 ? void 0 : _36.purchaseInFranchise) !== null && _37 !== void 0 ? _37 : 0),
159
- saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_39 = (_38 = payload.untaxedOperations) === null || _38 === void 0 ? void 0 : _38.saleOfServicesNotInFrance) !== null && _39 !== void 0 ? _39 : 0),
160
- regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_41 = (_40 = payload.untaxedOperations) === null || _40 === void 0 ? void 0 : _40.regularizations) !== null && _41 !== void 0 ? _41 : 0),
161
- internalUniq: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_43 = (_42 = payload.untaxedOperations) === null || _42 === void 0 ? void 0 : _42.internalUniq) !== null && _43 !== void 0 ? _43 : 0)
155
+ 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),
156
+ 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),
157
+ 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),
158
+ 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),
159
+ 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),
160
+ 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),
161
+ 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
162
  },
163
163
  vat: {
164
164
  carrieredOutInFrance: {
@@ -187,12 +187,12 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
187
187
  },
188
188
  oilProducts: {
189
189
  normalRate20: {
190
- base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_47 = (_46 = (_45 = (_44 = payload.vat) === null || _44 === void 0 ? void 0 : _44.oilProducts) === null || _45 === void 0 ? void 0 : _45.normalRate20) === null || _46 === void 0 ? void 0 : _46.base) !== null && _47 !== void 0 ? _47 : 0),
191
- tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_51 = (_50 = (_49 = (_48 = payload.vat) === null || _48 === void 0 ? void 0 : _48.oilProducts) === null || _49 === void 0 ? void 0 : _49.normalRate20) === null || _50 === void 0 ? void 0 : _50.base) !== null && _51 !== void 0 ? _51 : 0) * 0.02
190
+ 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),
191
+ 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
192
  },
193
193
  reduceRate13: {
194
- base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_55 = (_54 = (_53 = (_52 = payload.vat) === null || _52 === void 0 ? void 0 : _52.oilProducts) === null || _53 === void 0 ? void 0 : _53.reduceRate13) === null || _54 === void 0 ? void 0 : _54.base) !== null && _55 !== void 0 ? _55 : 0),
195
- tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_59 = (_58 = (_57 = (_56 = payload.vat) === null || _56 === void 0 ? void 0 : _56.oilProducts) === null || _57 === void 0 ? void 0 : _57.reduceRate13) === null || _58 === void 0 ? void 0 : _58.base) !== null && _59 !== void 0 ? _59 : 0) * 0.013
194
+ 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),
195
+ 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
196
  }
197
197
  },
198
198
  importations: {
@@ -222,34 +222,34 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
222
222
  }
223
223
  },
224
224
  previouslyDeductedToBeReturned: {
225
- onOilProducts: 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.onOilProducts) !== null && _62 !== void 0 ? _62 : 0),
226
- otherThanOilProducts: 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.otherThanOilProducts) !== null && _65 !== void 0 ? _65 : 0),
227
- total: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_68 = (_67 = (_66 = payload.vat) === null || _66 === void 0 ? void 0 : _66.previouslyDeductedToBeReturned) === null || _67 === void 0 ? void 0 : _67.total) !== null && _68 !== void 0 ? _68 : 0)
225
+ 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),
226
+ 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),
227
+ 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
228
  },
229
229
  sumToAdd,
230
230
  grossDue: 0,
231
231
  onIntracommunityAcquisition: isNil || isHolidayDeposit ? 0 : intracommunityTax,
232
- toMonaco: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_70 = (_69 = payload.vat) === null || _69 === void 0 ? void 0 : _69.toMonaco) !== null && _70 !== void 0 ? _70 : 0),
232
+ 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
233
  deductible: {
234
234
  immobilizations: isNil || isHolidayDeposit ? 0 : immobilizationTax !== null && immobilizationTax !== void 0 ? immobilizationTax : 0,
235
235
  otherGoodsAndServices: isNil || isHolidayDeposit ? 0 : otherGoodsAndServices !== null && otherGoodsAndServices !== void 0 ? otherGoodsAndServices : 0,
236
236
  other: {
237
- oil: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_74 = (_73 = (_72 = (_71 = payload.vat) === null || _71 === void 0 ? void 0 : _71.deductible) === null || _72 === void 0 ? void 0 : _72.other) === null || _73 === void 0 ? void 0 : _73.oil) !== null && _74 !== void 0 ? _74 : 0),
237
+ 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
238
  thanOilProducts: 0,
239
239
  collected: 0,
240
240
  total: isNil || isHolidayDeposit ? 0 : otherDeductibles
241
241
  },
242
242
  report,
243
- toImpute: 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.toImpute) !== null && _77 !== void 0 ? _77 : 0) + (0, _lodash.round)((_79 = (_78 = payload.vat) === null || _78 === void 0 ? void 0 : _78.sumToAdd) !== null && _79 !== void 0 ? _79 : 0),
243
+ 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),
244
244
  total: 0,
245
245
  onImportOtherThanOilProducts: isNil || isHolidayDeposit ? 0 : otherDeductibles,
246
246
  coefficient: isNil || isHolidayDeposit ? 100 : coefficient,
247
- onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_82 = (_81 = (_80 = payload.vat) === null || _80 === void 0 ? void 0 : _80.deductible) === null || _81 === void 0 ? void 0 : _81.onOilProducts) !== null && _82 !== void 0 ? _82 : 0)
247
+ 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
248
  },
249
249
  otherRate: {
250
250
  oldRate: {
251
- base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_86 = (_85 = (_84 = (_83 = payload.vat) === null || _83 === void 0 ? void 0 : _83.otherRate) === null || _84 === void 0 ? void 0 : _84.oldRate) === null || _85 === void 0 ? void 0 : _85.base) !== null && _86 !== void 0 ? _86 : 0),
252
- tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_90 = (_89 = (_88 = (_87 = payload.vat) === null || _87 === void 0 ? void 0 : _87.otherRate) === null || _88 === void 0 ? void 0 : _88.oldRate) === null || _89 === void 0 ? void 0 : _89.tax) !== null && _90 !== void 0 ? _90 : 0)
251
+ 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),
252
+ 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
253
  },
254
254
  at1Dot75: {
255
255
  base: 0,
@@ -283,16 +283,16 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
283
283
  },
284
284
  credit: {
285
285
  amount: 0,
286
- refundAsked: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_92 = (_91 = payload.credit) === null || _91 === void 0 ? void 0 : _91.refundAsked) !== null && _92 !== void 0 ? _92 : 0),
287
- transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_94 = (_93 = payload.credit) === null || _93 === void 0 ? void 0 : _93.transferedToSocietyHeadOfGroup) !== null && _94 !== void 0 ? _94 : 0),
288
- assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_96 = (_95 = payload.credit) === null || _95 === void 0 ? void 0 : _95.assimiledTaxes) !== null && _96 !== void 0 ? _96 : 0),
286
+ 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),
287
+ 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),
288
+ 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
289
  toReport: 0,
290
290
  ticRefund: 0,
291
291
  ticTransfered: 0
292
292
  },
293
293
  toPay: {
294
294
  netDue: 0,
295
- acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_98 = (_97 = payload.toPay) === null || _97 === void 0 ? void 0 : _97.acquittedBySocietyHeadOfGroup) !== null && _98 !== void 0 ? _98 : 0),
295
+ 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
296
  total: 0
297
297
  },
298
298
  tic: {
@@ -306,7 +306,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
306
306
  initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
307
307
  initialPayload.toPay.netDue = initialPayload.vat.grossDue - initialPayload.vat.deductible.total > 0 ? initialPayload.vat.grossDue - initialPayload.vat.deductible.total : 0;
308
308
  initialPayload.credit.toReport = initialPayload.credit.amount - initialPayload.credit.refundAsked - initialPayload.credit.transferedToSocietyHeadOfGroup;
309
- initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((_101 = (_100 = (_99 = initialPayload.tic) === null || _99 === void 0 ? void 0 : _99.total) === null || _100 === void 0 ? void 0 : _100.tax) !== null && _101 !== void 0 ? _101 : 0) - initialPayload.toPay.acquittedBySocietyHeadOfGroup;
309
+ 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
310
  return initialPayload;
311
311
  }
312
312
  function getCerfa3310Century23RegistrationFields(data) {
@@ -1219,6 +1219,7 @@ const cerfa3310Century23Fields = exports.cerfa3310Century23Fields = [{
1219
1219
  childrens: [{
1220
1220
  label: '26 - Remboursement de crédit de TVA demandé sur formulaire n° 3519',
1221
1221
  key: 'credit.refundAsked',
1222
+ visibleIf: 'credit.amount',
1222
1223
  type: 'number'
1223
1224
  }, {
1224
1225
  label: 'AA - Crédit de TVA transféré à la société tête de groupe',