@silexpert/core 1.1.56 → 1.1.58

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 (57) hide show
  1. package/es/api/resources/TerminationList.d.ts +2 -1
  2. package/es/api/resources/TerminationList.d.ts.map +1 -1
  3. package/es/api/resources/TerminationList.js +3 -0
  4. package/es/api/resources/TerminationList.js.map +1 -1
  5. package/es/types/Enum/AdjustmentType.d.ts +1 -0
  6. package/es/types/Enum/AdjustmentType.d.ts.map +1 -1
  7. package/es/types/Enum/AdjustmentType.js +4 -0
  8. package/es/types/Enum/AdjustmentType.js.map +1 -1
  9. package/es/types/Interface/api/cerfa/3310.d.ts +1 -0
  10. package/es/types/Interface/api/cerfa/3310.d.ts.map +1 -1
  11. package/es/types/Interface/api/cerfa/3310.js.map +1 -1
  12. package/es/types/Interface/api/terminationList/CreateTerminationList.d.ts +14 -0
  13. package/es/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -0
  14. package/es/types/Interface/api/terminationList/CreateTerminationList.js +80 -0
  15. package/es/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -0
  16. package/es/types/Interface/models/ITerminationList.d.ts +11 -11
  17. package/es/types/Interface/models/ITerminationList.d.ts.map +1 -1
  18. package/es/types/Interface/models/ITerminationList.js.map +1 -1
  19. package/es/types/index.d.ts +1 -0
  20. package/es/types/index.d.ts.map +1 -1
  21. package/es/types/index.js +1 -0
  22. package/es/types/index.js.map +1 -1
  23. package/es/utils/vat/3310/century23.d.ts.map +1 -1
  24. package/es/utils/vat/3310/century23.js +61 -51
  25. package/es/utils/vat/3310/century23.js.map +1 -1
  26. package/es/utils/vat/3517/century23.js +1 -1
  27. package/es/utils/vat/3517/century23.js.map +1 -1
  28. package/es/utils/vat/registration.d.ts +1 -0
  29. package/es/utils/vat/registration.d.ts.map +1 -1
  30. package/es/utils/vat/registration.js +12 -12
  31. package/es/utils/vat/registration.js.map +1 -1
  32. package/js/api/resources/TerminationList.js +3 -0
  33. package/js/api/resources/TerminationList.js.map +1 -1
  34. package/js/types/Enum/AdjustmentType.js +7 -3
  35. package/js/types/Enum/AdjustmentType.js.map +1 -1
  36. package/js/types/Interface/api/cerfa/3310.js.map +1 -1
  37. package/js/types/Interface/api/terminationList/CreateTerminationList.js +32 -0
  38. package/js/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -0
  39. package/js/types/Interface/models/ITerminationList.js.map +1 -1
  40. package/js/types/index.js +10 -0
  41. package/js/types/index.js.map +1 -1
  42. package/js/utils/vat/3310/century23.js +57 -49
  43. package/js/utils/vat/3310/century23.js.map +1 -1
  44. package/js/utils/vat/3517/century23.js +1 -1
  45. package/js/utils/vat/3517/century23.js.map +1 -1
  46. package/js/utils/vat/registration.js +14 -12
  47. package/js/utils/vat/registration.js.map +1 -1
  48. package/package.json +1 -1
  49. package/ts/api/resources/TerminationList.ts +5 -1
  50. package/ts/types/Enum/AdjustmentType.ts +5 -1
  51. package/ts/types/Interface/api/cerfa/3310.ts +1 -0
  52. package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +63 -0
  53. package/ts/types/Interface/models/ITerminationList.ts +11 -11
  54. package/ts/types/index.ts +1 -0
  55. package/ts/utils/vat/3310/century23.ts +20 -11
  56. package/ts/utils/vat/3517/century23.ts +1 -1
  57. package/ts/utils/vat/registration.ts +3 -3
@@ -4,7 +4,7 @@ import { round as _round, flatten, uniqBy } from 'lodash';
4
4
  import { Vat } from '../../../types/Enum/Vat';
5
5
  import { getAmountByAccountNumber, getTaxAmountByAccountNumber, setZeroIfIsNegative, textFormatting, } from '../utils';
6
6
  export function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries = []) {
7
- 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;
7
+ 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;
8
8
  const shouldHaveVatCode = isDefined((_a = payload.setting) === null || _a === void 0 ? void 0 : _a.tvaCode) && isDefined(payload.society.siret);
9
9
  const vats = Object.values(Vat);
10
10
  const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
@@ -47,8 +47,9 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
47
47
  const taxedImportEntries = vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
48
48
  const taxedImportAccounts = ['6'];
49
49
  const taxedImport = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0, true));
50
- const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607'];
50
+ const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607', '651'];
51
51
  const taxedIntracommunityAcquisitions = getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), [...intracommunityAccounts2, ...intracommunityServiceAccounts], 0, true);
52
+ console.log('👀 ~ file: century23.ts:64 ~ taxedIntracommunityAcquisitions:', taxedIntracommunityAcquisitions);
52
53
  // Opérations non taxées
53
54
  const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
54
55
  const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true));
@@ -88,12 +89,12 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
88
89
  const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2']));
89
90
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']));
90
91
  const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']));
91
- const report = (_d = (_c = (_b = payload.previousVatDeclaration) === null || _b === void 0 ? void 0 : _b.credit) === null || _c === void 0 ? void 0 : _c.toReport) !== null && _d !== void 0 ? _d : 0;
92
- const coefficient = _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);
92
+ const report = ((_c = (_b = payload.vat) === null || _b === void 0 ? void 0 : _b.deductible) === null || _c === void 0 ? void 0 : _c.toReport) && ((_e = (_d = payload.vat) === null || _d === void 0 ? void 0 : _d.deductible) === null || _e === void 0 ? void 0 : _e.toReport) > 0 ? _round((_h = (_g = (_f = payload.vat) === null || _f === void 0 ? void 0 : _f.deductible) === null || _g === void 0 ? void 0 : _g.toReport) !== null && _h !== void 0 ? _h : 0) : (_l = (_k = (_j = payload.previousVatDeclaration) === null || _j === void 0 ? void 0 : _j.credit) === null || _k === void 0 ? void 0 : _k.toReport) !== null && _l !== void 0 ? _l : 0;
93
+ const coefficient = _round((_p = (_o = (_m = payload.vat) === null || _m === void 0 ? void 0 : _m.deductible) === null || _o === void 0 ? void 0 : _o.coefficient) !== null && _p !== void 0 ? _p : 100, 2);
93
94
  const isNil = payload.isNil === true;
94
95
  const isHolidayDeposit = payload.isHolidayDeposit === true;
95
- const sumToAdd = setZeroIfIsNegative(isNil ? 0 : isHolidayDeposit ? (_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)) : (_round((_m = (_l = payload.vat) === null || _l === void 0 ? void 0 : _l.sumToAdd) !== null && _m !== void 0 ? _m : 0) + mxToAdd));
96
- const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_o = payload.comment) !== null && _o !== void 0 ? _o : ''}` : ((_p = payload.comment) !== null && _p !== void 0 ? _p : null);
96
+ const sumToAdd = setZeroIfIsNegative(isNil ? 0 : isHolidayDeposit ? (_round(((_s = (_r = (_q = payload.previousVatDeclaration) === null || _q === void 0 ? void 0 : _q.toPay) === null || _r === void 0 ? void 0 : _r.total) !== null && _s !== void 0 ? _s : 0) * 0.8)) : (_round((_u = (_t = payload.vat) === null || _t === void 0 ? void 0 : _t.sumToAdd) !== null && _u !== void 0 ? _u : 0) + mxToAdd));
97
+ const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_v = payload.comment) !== null && _v !== void 0 ? _v : ''}` : ((_w = payload.comment) !== null && _w !== void 0 ? _w : null);
97
98
  const initialPayload = {
98
99
  isNil,
99
100
  isDGE: false,
@@ -106,7 +107,7 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
106
107
  full: `${payload.society.address}\n${payload.society.zipCode} ${payload.society.city}`,
107
108
  },
108
109
  numbers: {
109
- SIE: (_r = (_q = payload.sie) === null || _q === void 0 ? void 0 : _q.sages) !== null && _r !== void 0 ? _r : null,
110
+ SIE: (_y = (_x = payload.sie) === null || _x === void 0 ? void 0 : _x.sages) !== null && _y !== void 0 ? _y : null,
110
111
  folder: null,
111
112
  key: null,
112
113
  period: null,
@@ -118,7 +119,7 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
118
119
  },
119
120
  service: {
120
121
  address: {
121
- full: 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,
122
+ full: isDefined((_0 = (_z = payload.sie) === null || _z === void 0 ? void 0 : _z.address) === null || _0 === void 0 ? void 0 : _0.address1) ? `${(_1 = payload.sie) === null || _1 === void 0 ? void 0 : _1.address.address1}\n${(_2 = payload.sie) === null || _2 === void 0 ? void 0 : _2.address.address2}\n${(_3 = payload.sie) === null || _3 === void 0 ? void 0 : _3.address.address3}\n${(_4 = payload.sie) === null || _4 === void 0 ? void 0 : _4.address.address4}\n${(_5 = payload.sie) === null || _5 === void 0 ? void 0 : _5.address.address5}` : null,
122
123
  },
123
124
  },
124
125
  period: {
@@ -134,13 +135,13 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
134
135
  },
135
136
  },
136
137
  siret: {
137
- first: 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,
138
- second: 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,
138
+ first: isDefined(payload.society.siret) ? ((_7 = (_6 = payload.society.siret) === null || _6 === void 0 ? void 0 : _6.slice(0, 9)) !== null && _7 !== void 0 ? _7 : null) : null,
139
+ second: isDefined(payload.society.siret) ? ((_9 = (_8 = payload.society.siret) === null || _8 === void 0 ? void 0 : _8.slice(5)) !== null && _9 !== void 0 ? _9 : null) : null,
139
140
  },
140
141
  intracommunityVat: {
141
- 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,
142
- 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,
143
- third: shouldHaveVatCode ? ((_10 = (_9 = payload.society.siret) === null || _9 === void 0 ? void 0 : _9.slice(0, 9)) !== null && _10 !== void 0 ? _10 : null) : null,
142
+ first: shouldHaveVatCode ? ((_12 = (_11 = (_10 = payload.setting) === null || _10 === void 0 ? void 0 : _10.tvaCode) === null || _11 === void 0 ? void 0 : _11.slice(0, 2)) !== null && _12 !== void 0 ? _12 : null) : null,
143
+ second: shouldHaveVatCode ? ((_15 = (_14 = (_13 = payload.setting) === null || _13 === void 0 ? void 0 : _13.tvaCode) === null || _14 === void 0 ? void 0 : _14.slice(2, 4)) !== null && _15 !== void 0 ? _15 : null) : null,
144
+ third: shouldHaveVatCode ? ((_17 = (_16 = payload.society.siret) === null || _16 === void 0 ? void 0 : _16.slice(0, 9)) !== null && _17 !== void 0 ? _17 : null) : null,
144
145
  },
145
146
  payment: {
146
147
  date: dayjs().format('YYYY-MM-DD'),
@@ -154,29 +155,29 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
154
155
  other: isNil || isHolidayDeposit ? 0 : taxedOther,
155
156
  purchaseOfIntracommunityServiceProvision: isNil || isHolidayDeposit ? 0 : taxedPurchaseOfIntracommunityService,
156
157
  import: isNil || isHolidayDeposit ? 0 : taxedImport,
157
- withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : _round((_12 = (_11 = payload.taxedOperations) === null || _11 === void 0 ? void 0 : _11.withdrawSuspensiveRegime) !== null && _12 !== void 0 ? _12 : 0),
158
- releaseFromConsumption: isNil || isHolidayDeposit ? 0 : _round((_14 = (_13 = payload.taxedOperations) === null || _13 === void 0 ? void 0 : _13.releaseFromConsumption) !== null && _14 !== void 0 ? _14 : 0),
158
+ withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : _round((_19 = (_18 = payload.taxedOperations) === null || _18 === void 0 ? void 0 : _18.withdrawSuspensiveRegime) !== null && _19 !== void 0 ? _19 : 0),
159
+ releaseFromConsumption: isNil || isHolidayDeposit ? 0 : _round((_21 = (_20 = payload.taxedOperations) === null || _20 === void 0 ? void 0 : _20.releaseFromConsumption) !== null && _21 !== void 0 ? _21 : 0),
159
160
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : taxedIntracommunityAcquisitions,
160
- energyDelivery: isNil || isHolidayDeposit ? 0 : _round((_16 = (_15 = payload.taxedOperations) === null || _15 === void 0 ? void 0 : _15.energyDelivery) !== null && _16 !== void 0 ? _16 : 0),
161
- purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : _round((_18 = (_17 = payload.taxedOperations) === null || _17 === void 0 ? void 0 : _17.purchaseOfServicesNotInFrance) !== null && _18 !== void 0 ? _18 : 0),
162
- regularizations: isNil || isHolidayDeposit ? 0 : _round((_20 = (_19 = payload.taxedOperations) === null || _19 === void 0 ? void 0 : _19.regularizations) !== null && _20 !== void 0 ? _20 : 0),
161
+ energyDelivery: isNil || isHolidayDeposit ? 0 : _round((_23 = (_22 = payload.taxedOperations) === null || _22 === void 0 ? void 0 : _22.energyDelivery) !== null && _23 !== void 0 ? _23 : 0),
162
+ purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : _round((_25 = (_24 = payload.taxedOperations) === null || _24 === void 0 ? void 0 : _24.purchaseOfServicesNotInFrance) !== null && _25 !== void 0 ? _25 : 0),
163
+ regularizations: isNil || isHolidayDeposit ? 0 : _round((_27 = (_26 = payload.taxedOperations) === null || _26 === void 0 ? void 0 : _26.regularizations) !== null && _27 !== void 0 ? _27 : 0),
163
164
  },
164
165
  untaxedOperations: {
165
166
  exportationNotInEurope: isNil || isHolidayDeposit ? 0 : untaxedExportationNotInEurope,
166
167
  other: isNil || isHolidayDeposit ? 0 : untaxedOther,
167
- distanceSelling: isNil || isHolidayDeposit ? 0 : _round((_22 = (_21 = payload.untaxedOperations) === null || _21 === void 0 ? void 0 : _21.distanceSelling) !== null && _22 !== void 0 ? _22 : 0),
168
+ distanceSelling: isNil || isHolidayDeposit ? 0 : _round((_29 = (_28 = payload.untaxedOperations) === null || _28 === void 0 ? void 0 : _28.distanceSelling) !== null && _29 !== void 0 ? _29 : 0),
168
169
  import: isNil || isHolidayDeposit ? 0 : untaxedImport,
169
- withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : _round((_24 = (_23 = payload.untaxedOperations) === null || _23 === void 0 ? void 0 : _23.withdrawSuspensiveRegime) !== null && _24 !== void 0 ? _24 : 0),
170
- importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : _round((_26 = (_25 = payload.untaxedOperations) === null || _25 === void 0 ? void 0 : _25.importInSuspensiveSystem) !== null && _26 !== void 0 ? _26 : 0),
170
+ withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : _round((_31 = (_30 = payload.untaxedOperations) === null || _30 === void 0 ? void 0 : _30.withdrawSuspensiveRegime) !== null && _31 !== void 0 ? _31 : 0),
171
+ importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : _round((_33 = (_32 = payload.untaxedOperations) === null || _32 === void 0 ? void 0 : _32.importInSuspensiveSystem) !== null && _33 !== void 0 ? _33 : 0),
171
172
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : untaxedIntracomunity,
172
173
  intracommunityDelivery: isNil || isHolidayDeposit ? 0 : untaxedIntracommunityDelivery,
173
- energyDelivery: isNil || isHolidayDeposit ? 0 : _round((_28 = (_27 = payload.untaxedOperations) === null || _27 === void 0 ? void 0 : _27.energyDelivery) !== null && _28 !== void 0 ? _28 : 0),
174
- oilProductsConsumption: isNil || isHolidayDeposit ? 0 : _round((_30 = (_29 = payload.untaxedOperations) === null || _29 === void 0 ? void 0 : _29.oilProductsConsumption) !== null && _30 !== void 0 ? _30 : 0),
175
- importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : _round((_32 = (_31 = payload.untaxedOperations) === null || _31 === void 0 ? void 0 : _31.importPetrolInSuspensiveSystem) !== null && _32 !== void 0 ? _32 : 0),
176
- purchaseInFranchise: isNil || isHolidayDeposit ? 0 : _round((_34 = (_33 = payload.untaxedOperations) === null || _33 === void 0 ? void 0 : _33.purchaseInFranchise) !== null && _34 !== void 0 ? _34 : 0),
177
- saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : _round((_36 = (_35 = payload.untaxedOperations) === null || _35 === void 0 ? void 0 : _35.saleOfServicesNotInFrance) !== null && _36 !== void 0 ? _36 : 0),
178
- regularizations: isNil || isHolidayDeposit ? 0 : _round((_38 = (_37 = payload.untaxedOperations) === null || _37 === void 0 ? void 0 : _37.regularizations) !== null && _38 !== void 0 ? _38 : 0),
179
- internalUniq: isNil || isHolidayDeposit ? 0 : _round((_40 = (_39 = payload.untaxedOperations) === null || _39 === void 0 ? void 0 : _39.internalUniq) !== null && _40 !== void 0 ? _40 : 0),
174
+ energyDelivery: isNil || isHolidayDeposit ? 0 : _round((_35 = (_34 = payload.untaxedOperations) === null || _34 === void 0 ? void 0 : _34.energyDelivery) !== null && _35 !== void 0 ? _35 : 0),
175
+ oilProductsConsumption: isNil || isHolidayDeposit ? 0 : _round((_37 = (_36 = payload.untaxedOperations) === null || _36 === void 0 ? void 0 : _36.oilProductsConsumption) !== null && _37 !== void 0 ? _37 : 0),
176
+ importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : _round((_39 = (_38 = payload.untaxedOperations) === null || _38 === void 0 ? void 0 : _38.importPetrolInSuspensiveSystem) !== null && _39 !== void 0 ? _39 : 0),
177
+ purchaseInFranchise: isNil || isHolidayDeposit ? 0 : _round((_41 = (_40 = payload.untaxedOperations) === null || _40 === void 0 ? void 0 : _40.purchaseInFranchise) !== null && _41 !== void 0 ? _41 : 0),
178
+ saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : _round((_43 = (_42 = payload.untaxedOperations) === null || _42 === void 0 ? void 0 : _42.saleOfServicesNotInFrance) !== null && _43 !== void 0 ? _43 : 0),
179
+ regularizations: isNil || isHolidayDeposit ? 0 : _round((_45 = (_44 = payload.untaxedOperations) === null || _44 === void 0 ? void 0 : _44.regularizations) !== null && _45 !== void 0 ? _45 : 0),
180
+ internalUniq: isNil || isHolidayDeposit ? 0 : _round((_47 = (_46 = payload.untaxedOperations) === null || _46 === void 0 ? void 0 : _46.internalUniq) !== null && _47 !== void 0 ? _47 : 0),
180
181
  },
181
182
  vat: {
182
183
  carrieredOutInFrance: {
@@ -205,12 +206,12 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
205
206
  },
206
207
  oilProducts: {
207
208
  normalRate20: {
208
- base: isNil || isHolidayDeposit ? 0 : _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),
209
- tax: isNil || isHolidayDeposit ? 0 : (_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),
209
+ base: isNil || isHolidayDeposit ? 0 : _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),
210
+ tax: isNil || isHolidayDeposit ? 0 : (_round((_55 = (_54 = (_53 = (_52 = payload.vat) === null || _52 === void 0 ? void 0 : _52.oilProducts) === null || _53 === void 0 ? void 0 : _53.normalRate20) === null || _54 === void 0 ? void 0 : _54.base) !== null && _55 !== void 0 ? _55 : 0) * 0.02),
210
211
  },
211
212
  reduceRate13: {
212
- base: isNil || isHolidayDeposit ? 0 : _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),
213
- tax: isNil || isHolidayDeposit ? 0 : (_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),
213
+ base: isNil || isHolidayDeposit ? 0 : _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),
214
+ tax: isNil || isHolidayDeposit ? 0 : (_round((_63 = (_62 = (_61 = (_60 = payload.vat) === null || _60 === void 0 ? void 0 : _60.oilProducts) === null || _61 === void 0 ? void 0 : _61.reduceRate13) === null || _62 === void 0 ? void 0 : _62.base) !== null && _63 !== void 0 ? _63 : 0) * 0.013),
214
215
  },
215
216
  },
216
217
  importations: {
@@ -240,34 +241,34 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
240
241
  },
241
242
  },
242
243
  previouslyDeductedToBeReturned: {
243
- onOilProducts: isNil || isHolidayDeposit ? 0 : _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),
244
- otherThanOilProducts: isNil || isHolidayDeposit ? 0 : _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),
245
- total: isNil || isHolidayDeposit ? 0 : _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),
244
+ onOilProducts: isNil || isHolidayDeposit ? 0 : _round((_66 = (_65 = (_64 = payload.vat) === null || _64 === void 0 ? void 0 : _64.previouslyDeductedToBeReturned) === null || _65 === void 0 ? void 0 : _65.onOilProducts) !== null && _66 !== void 0 ? _66 : 0),
245
+ otherThanOilProducts: isNil || isHolidayDeposit ? 0 : _round((_69 = (_68 = (_67 = payload.vat) === null || _67 === void 0 ? void 0 : _67.previouslyDeductedToBeReturned) === null || _68 === void 0 ? void 0 : _68.otherThanOilProducts) !== null && _69 !== void 0 ? _69 : 0),
246
+ total: isNil || isHolidayDeposit ? 0 : _round((_72 = (_71 = (_70 = payload.vat) === null || _70 === void 0 ? void 0 : _70.previouslyDeductedToBeReturned) === null || _71 === void 0 ? void 0 : _71.total) !== null && _72 !== void 0 ? _72 : 0),
246
247
  },
247
248
  sumToAdd,
248
249
  grossDue: 0,
249
250
  onIntracommunityAcquisition: isNil || isHolidayDeposit ? 0 : intracommunityTax,
250
- toMonaco: isNil || isHolidayDeposit ? 0 : _round((_67 = (_66 = payload.vat) === null || _66 === void 0 ? void 0 : _66.toMonaco) !== null && _67 !== void 0 ? _67 : 0),
251
+ toMonaco: isNil || isHolidayDeposit ? 0 : _round((_74 = (_73 = payload.vat) === null || _73 === void 0 ? void 0 : _73.toMonaco) !== null && _74 !== void 0 ? _74 : 0),
251
252
  deductible: {
252
253
  immobilizations: isNil || isHolidayDeposit ? 0 : (immobilizationTax !== null && immobilizationTax !== void 0 ? immobilizationTax : 0),
253
254
  otherGoodsAndServices: isNil || isHolidayDeposit ? 0 : (otherGoodsAndServices !== null && otherGoodsAndServices !== void 0 ? otherGoodsAndServices : 0),
254
255
  other: {
255
- oil: isNil || isHolidayDeposit ? 0 : _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),
256
+ oil: isNil || isHolidayDeposit ? 0 : _round((_78 = (_77 = (_76 = (_75 = payload.vat) === null || _75 === void 0 ? void 0 : _75.deductible) === null || _76 === void 0 ? void 0 : _76.other) === null || _77 === void 0 ? void 0 : _77.oil) !== null && _78 !== void 0 ? _78 : 0),
256
257
  thanOilProducts: 0,
257
258
  collected: 0,
258
259
  total: isNil || isHolidayDeposit ? 0 : otherDeductibles,
259
260
  },
260
261
  report,
261
- toImpute: isNil || isHolidayDeposit ? 0 : (_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),
262
+ toImpute: isNil || isHolidayDeposit ? 0 : (_round((_81 = (_80 = (_79 = payload.vat) === null || _79 === void 0 ? void 0 : _79.deductible) === null || _80 === void 0 ? void 0 : _80.toImpute) !== null && _81 !== void 0 ? _81 : 0) + mxToSub),
262
263
  total: 0,
263
264
  onImportOtherThanOilProducts: isNil || isHolidayDeposit ? 0 : otherDeductibles,
264
265
  coefficient: isNil || isHolidayDeposit ? 100 : coefficient,
265
- onOilProducts: isNil || isHolidayDeposit ? 0 : _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),
266
+ onOilProducts: isNil || isHolidayDeposit ? 0 : _round((_84 = (_83 = (_82 = payload.vat) === null || _82 === void 0 ? void 0 : _82.deductible) === null || _83 === void 0 ? void 0 : _83.onOilProducts) !== null && _84 !== void 0 ? _84 : 0),
266
267
  },
267
268
  otherRate: {
268
269
  oldRate: {
269
- base: isNil || isHolidayDeposit ? 0 : _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),
270
- tax: isNil || isHolidayDeposit ? 0 : _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),
270
+ base: isNil || isHolidayDeposit ? 0 : _round((_88 = (_87 = (_86 = (_85 = payload.vat) === null || _85 === void 0 ? void 0 : _85.otherRate) === null || _86 === void 0 ? void 0 : _86.oldRate) === null || _87 === void 0 ? void 0 : _87.base) !== null && _88 !== void 0 ? _88 : 0),
271
+ tax: isNil || isHolidayDeposit ? 0 : _round((_92 = (_91 = (_90 = (_89 = payload.vat) === null || _89 === void 0 ? void 0 : _89.otherRate) === null || _90 === void 0 ? void 0 : _90.oldRate) === null || _91 === void 0 ? void 0 : _91.tax) !== null && _92 !== void 0 ? _92 : 0),
271
272
  },
272
273
  at1Dot75: {
273
274
  base: 0,
@@ -301,16 +302,16 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
301
302
  },
302
303
  credit: {
303
304
  amount: 0,
304
- refundAsked: isNil || isHolidayDeposit ? 0 : _round((_87 = (_86 = payload.credit) === null || _86 === void 0 ? void 0 : _86.refundAsked) !== null && _87 !== void 0 ? _87 : 0),
305
- transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : _round((_89 = (_88 = payload.credit) === null || _88 === void 0 ? void 0 : _88.transferedToSocietyHeadOfGroup) !== null && _89 !== void 0 ? _89 : 0),
306
- assimiledTaxes: isNil || isHolidayDeposit ? 0 : _round((_91 = (_90 = payload.credit) === null || _90 === void 0 ? void 0 : _90.assimiledTaxes) !== null && _91 !== void 0 ? _91 : 0),
305
+ refundAsked: isNil || isHolidayDeposit ? 0 : _round((_94 = (_93 = payload.credit) === null || _93 === void 0 ? void 0 : _93.refundAsked) !== null && _94 !== void 0 ? _94 : 0),
306
+ transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : _round((_96 = (_95 = payload.credit) === null || _95 === void 0 ? void 0 : _95.transferedToSocietyHeadOfGroup) !== null && _96 !== void 0 ? _96 : 0),
307
+ assimiledTaxes: isNil || isHolidayDeposit ? 0 : _round((_98 = (_97 = payload.credit) === null || _97 === void 0 ? void 0 : _97.assimiledTaxes) !== null && _98 !== void 0 ? _98 : 0),
307
308
  toReport: 0,
308
309
  ticRefund: 0,
309
310
  ticTransfered: 0,
310
311
  },
311
312
  toPay: {
312
313
  netDue: 0,
313
- acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : _round((_93 = (_92 = payload.toPay) === null || _92 === void 0 ? void 0 : _92.acquittedBySocietyHeadOfGroup) !== null && _93 !== void 0 ? _93 : 0),
314
+ acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : _round((_100 = (_99 = payload.toPay) === null || _99 === void 0 ? void 0 : _99.acquittedBySocietyHeadOfGroup) !== null && _100 !== void 0 ? _100 : 0),
314
315
  total: 0,
315
316
  },
316
317
  tic: {
@@ -324,7 +325,7 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
324
325
  initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
325
326
  initialPayload.toPay.netDue = initialPayload.vat.grossDue - initialPayload.vat.deductible.total > 0 ? initialPayload.vat.grossDue - initialPayload.vat.deductible.total : 0;
326
327
  initialPayload.credit.toReport = initialPayload.credit.amount - initialPayload.credit.refundAsked - initialPayload.credit.transferedToSocietyHeadOfGroup;
327
- 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;
328
+ initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((_103 = (_102 = (_101 = initialPayload.tic) === null || _101 === void 0 ? void 0 : _101.total) === null || _102 === void 0 ? void 0 : _102.tax) !== null && _103 !== void 0 ? _103 : 0) - initialPayload.toPay.acquittedBySocietyHeadOfGroup;
328
329
  return initialPayload;
329
330
  }
330
331
  export function getCerfa3310Century23RegistrationFields(data) {
@@ -1407,15 +1408,24 @@ export const cerfa3310Century23Fields = [{
1407
1408
  ],
1408
1409
  }, {
1409
1410
  sectionName: 'TVA déductible',
1410
- childrens: [{
1411
- label: '2C - Sommes à imputer, y compris acompte congés',
1412
- key: 'deductible.toImpute',
1411
+ childrens: [
1412
+ {
1413
+ label: '22 - Report du crédit apparaissant ligne 27 de la précédente déclaration',
1414
+ key: 'vat.deductible.toReport',
1413
1415
  type: 'number',
1414
- }, {
1416
+ },
1417
+ /* {
1418
+ GERE DANS LES REGULARISATIONS
1419
+ label: '2C - Sommes à imputer, y compris acompte congés',
1420
+ key: 'vat.deductible.toImpute',
1421
+ type: 'number',
1422
+ }, */
1423
+ {
1415
1424
  label: '22A - Coefficient de taxation unique applicable pour la période si différent de 100%',
1416
1425
  key: 'vat.deductible.coefficient',
1417
1426
  type: 'number',
1418
- }],
1427
+ }
1428
+ ],
1419
1429
  }, {
1420
1430
  sectionName: 'Détermination du montant à payer',
1421
1431
  childrens: [