@silexpert/core 1.1.56 → 1.1.57

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 (31) hide show
  1. package/es/types/Enum/AdjustmentType.d.ts +1 -0
  2. package/es/types/Enum/AdjustmentType.d.ts.map +1 -1
  3. package/es/types/Enum/AdjustmentType.js +4 -0
  4. package/es/types/Enum/AdjustmentType.js.map +1 -1
  5. package/es/types/Interface/api/cerfa/3310.d.ts +1 -0
  6. package/es/types/Interface/api/cerfa/3310.d.ts.map +1 -1
  7. package/es/types/Interface/api/cerfa/3310.js.map +1 -1
  8. package/es/utils/vat/3310/century23.d.ts.map +1 -1
  9. package/es/utils/vat/3310/century23.js +61 -51
  10. package/es/utils/vat/3310/century23.js.map +1 -1
  11. package/es/utils/vat/3517/century23.js +1 -1
  12. package/es/utils/vat/3517/century23.js.map +1 -1
  13. package/es/utils/vat/registration.d.ts +1 -0
  14. package/es/utils/vat/registration.d.ts.map +1 -1
  15. package/es/utils/vat/registration.js +12 -12
  16. package/es/utils/vat/registration.js.map +1 -1
  17. package/js/types/Enum/AdjustmentType.js +7 -3
  18. package/js/types/Enum/AdjustmentType.js.map +1 -1
  19. package/js/types/Interface/api/cerfa/3310.js.map +1 -1
  20. package/js/utils/vat/3310/century23.js +57 -49
  21. package/js/utils/vat/3310/century23.js.map +1 -1
  22. package/js/utils/vat/3517/century23.js +1 -1
  23. package/js/utils/vat/3517/century23.js.map +1 -1
  24. package/js/utils/vat/registration.js +14 -12
  25. package/js/utils/vat/registration.js.map +1 -1
  26. package/package.json +1 -1
  27. package/ts/types/Enum/AdjustmentType.ts +5 -1
  28. package/ts/types/Interface/api/cerfa/3310.ts +1 -0
  29. package/ts/utils/vat/3310/century23.ts +20 -11
  30. package/ts/utils/vat/3517/century23.ts +1 -1
  31. package/ts/utils/vat/registration.ts +3 -3
@@ -5,5 +5,6 @@ export declare function getTypeAndAmountFromRegistration(registration: IRegistra
5
5
  amount: number | null;
6
6
  collectable: number;
7
7
  deductible: number;
8
+ toReport?: number;
8
9
  };
9
10
  //# sourceMappingURL=registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,eAAe,EACf,aAAa,EAGb,gBAAgB,EAAE,oBAAoB,EACvC,MAAM,aAAa,CAAC;AAWrB,wBAAgB,QAAQ,CAAC,YAAY,EAAE,gBAAgB,GAAG,oBAAoB,EAAE,EAAE,CAqEjF;AAED,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;CAAE,CA6B/K"}
1
+ {"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,eAAe,EACf,aAAa,EAGb,gBAAgB,EAAE,oBAAoB,EACvC,MAAM,aAAa,CAAC;AAWrB,wBAAgB,QAAQ,CAAC,YAAY,EAAE,gBAAgB,GAAG,oBAAoB,EAAE,EAAE,CAqEjF;AAED,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAAE,CA6BlM"}
@@ -74,17 +74,17 @@ export function getTicks(registration) {
74
74
  return [];
75
75
  }
76
76
  export function getTypeAndAmountFromRegistration(registration) {
77
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
78
78
  if (registration.idCerfaType === CerfaType.CERFA_3310) {
79
79
  const payload = registration.payload.cerfa3310;
80
- const other = { collectable: payload.vat.grossDue, deductible: payload.vat.deductible.total };
80
+ const other = { collectable: payload.vat.grossDue, deductible: payload.vat.deductible.total, toReport: (_a = payload.credit.toReport) !== null && _a !== void 0 ? _a : 0 };
81
81
  if (payload === null || payload === void 0 ? void 0 : payload.isNil)
82
82
  return Object.assign({ type: CustomerVatType.VAT_TO_NIL, amount: 0 }, other);
83
- if (((_a = payload === null || payload === void 0 ? void 0 : payload.toPay) === null || _a === void 0 ? void 0 : _a.total) > 0)
83
+ if (((_b = payload === null || payload === void 0 ? void 0 : payload.toPay) === null || _b === void 0 ? void 0 : _b.total) > 0)
84
84
  return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total }, other);
85
- if (((_b = payload === null || payload === void 0 ? void 0 : payload.credit) === null || _b === void 0 ? void 0 : _b.refundAsked) > 0)
85
+ if (((_c = payload === null || payload === void 0 ? void 0 : payload.credit) === null || _c === void 0 ? void 0 : _c.refundAsked) > 0)
86
86
  return Object.assign({ type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked }, other);
87
- if (((_c = payload === null || payload === void 0 ? void 0 : payload.credit) === null || _c === void 0 ? void 0 : _c.toReport) > 0)
87
+ if (((_d = payload === null || payload === void 0 ? void 0 : payload.credit) === null || _d === void 0 ? void 0 : _d.toReport) > 0)
88
88
  return Object.assign({ type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport }, other);
89
89
  return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: 0 }, other);
90
90
  }
@@ -100,15 +100,15 @@ export function getTypeAndAmountFromRegistration(registration) {
100
100
  }
101
101
  if (registration.idCerfaType === CerfaType.CERFA_3517) {
102
102
  const payload = registration.payload.cerfa3517;
103
- const other = { collectable: payload.other.total, deductible: payload.deductible.total };
103
+ const other = { collectable: payload.other.total, deductible: payload.deductible.total, toReport: (_e = payload.net.balanceSurplus) !== null && _e !== void 0 ? _e : 0 };
104
104
  if (payload === null || payload === void 0 ? void 0 : payload.isNil)
105
105
  return Object.assign({ type: CustomerVatType.VAT_TO_NIL, amount: 0 }, other);
106
- if (((_d = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _d === void 0 ? void 0 : _d.toPay) > 0)
107
- return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: (_e = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _e === void 0 ? void 0 : _e.toPay }, other);
108
- if (((_f = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _f === void 0 ? void 0 : _f.refund) > 0)
109
- return Object.assign({ type: CustomerVatType.VAT_REFUND, amount: (_g = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _g === void 0 ? void 0 : _g.refund }, other);
110
- if (((_h = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _h === void 0 ? void 0 : _h.creditToReport) > 0 || ((_j = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _j === void 0 ? void 0 : _j.imputedCredit) > 0)
111
- return Object.assign({ type: CustomerVatType.VAT_REPORT, amount: (_l = (_k = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _k === void 0 ? void 0 : _k.creditToReport) !== null && _l !== void 0 ? _l : (_m = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _m === void 0 ? void 0 : _m.imputedCredit }, other);
106
+ if (((_f = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _f === void 0 ? void 0 : _f.toPay) > 0)
107
+ return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: (_g = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _g === void 0 ? void 0 : _g.toPay }, other);
108
+ if (((_h = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _h === void 0 ? void 0 : _h.refund) > 0)
109
+ return Object.assign({ type: CustomerVatType.VAT_REFUND, amount: (_j = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _j === void 0 ? void 0 : _j.refund }, other);
110
+ if (((_k = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _k === void 0 ? void 0 : _k.creditToReport) > 0 || ((_l = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _l === void 0 ? void 0 : _l.imputedCredit) > 0)
111
+ return Object.assign({ type: CustomerVatType.VAT_REPORT, amount: (_o = (_m = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _m === void 0 ? void 0 : _m.creditToReport) !== null && _o !== void 0 ? _o : (_p = payload === null || payload === void 0 ? void 0 : payload.recapitulation) === null || _p === void 0 ? void 0 : _p.imputedCredit }, other);
112
112
  return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: 0 }, other);
113
113
  }
114
114
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAGL,SAAS,EACT,eAAe,EAIyB,iBAAiB,EAAE,qBAAqB,GACjF,MAAM,aAAa,CAAC;AAGrB,MAAM,YAAY,GAAyB;IACzC,KAAK,EAAE,qBAAqB,CAAC,WAAW;IACxC,KAAK,EAAE,wBAAwB;IAC/B,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,YAA8B;;IACrD,MAAM,YAAY,GAA2B,MAAA,MAAA,YAAY,CAAC,QAAQ,0CAAE,YAAY,mCAAI,EAAE,CAAC;IAEvF,IAAI,YAAY,CAAC,KAAK,KAAK,iBAAiB,CAAC,WAAW,EAAE;QACxD,MAAM,IAAI,GAA6B,EAAE,CAAC;QAE1C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,OAAO,CAAE,cAAc,0CAAE,MAAM,IAAG,CAAC;YAAE,uBAAS,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,IAAK,KAAK,EAAG;QACxI,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,cAAc,IAAG,CAAC,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,aAAa,IAAG,CAAC;YAAE,uBAAS,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,cAAc,mCAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,aAAa,IAAK,KAAK,EAAG;QAChP,uBAAS,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,IAAK,KAAK,EAAG;KAClE;IAED,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse } from 'lodash';\nimport {\n Cerfa3310_2023,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration, ReadRegistrationTick, RegistrationState, RegistrationTickState,\n} from '../../types';\nimport { Cerfa3517_2023 } from '../../types/Interface/api/cerfa/3517';\n\nconst waitingState: ReadRegistrationTick = {\n state: RegistrationTickState.IN_PROGRESS,\n title: 'En cours de traitement',\n details: [],\n date: null,\n isPayment: false,\n};\n\nexport function getTicks(registration: ReadRegistration): ReadRegistrationTick[][] {\n const declarations: Array<ReadDeclaration> = registration.response?.declarations ?? [];\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach(() => {\n const result = [\n {\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n details: [],\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n isPayment: false,\n },\n waitingState,\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n result.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(result);\n });\n\n return data;\n } if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n ...reverse(declaration.states).map((d: InterchangeHistory) => ({\n state: d.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,\n title: d.label ?? null,\n details: d?.stateDetailsHistory,\n date: d.date ?? null,\n })),\n ];\n\n for (let index = declaration.states.length; index < 3; index += 1) {\n response.push({ ...waitingState, title: null });\n }\n\n if (isDefined(declaration.payment)) {\n response.push({\n state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,\n title: declaration.payment?.label ?? '',\n details: [],\n isPayment: true,\n date: declaration.payment.date ?? null,\n });\n }\n data.push(response);\n });\n\n return data;\n }\n\n return [];\n}\n\nexport function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; } {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as Cerfa3310_2023;\n const other = { collectable: payload.vat.grossDue, deductible: payload.vat.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };\n if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3514) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests) return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as Cerfa3517_2023;\n const other = { collectable: payload.other.total, deductible: payload.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n\n return {\n type: null, amount: null, collectable: 0, deductible: 0,\n };\n}"]}
1
+ {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAA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O,uBAAP,OAAO,CAAE,cAAc,0CAAE,cAAc,mCAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,aAAa,IAAK,KAAK,EAAG;QAChP,uBAAS,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,IAAK,KAAK,EAAG;KAClE;IAED,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse } from 'lodash';\nimport {\n Cerfa3310_2023,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration, ReadRegistrationTick, RegistrationState, RegistrationTickState,\n} from '../../types';\nimport { Cerfa3517_2023 } from '../../types/Interface/api/cerfa/3517';\n\nconst waitingState: ReadRegistrationTick = {\n state: RegistrationTickState.IN_PROGRESS,\n title: 'En cours de traitement',\n details: [],\n date: null,\n isPayment: false,\n};\n\nexport function getTicks(registration: ReadRegistration): ReadRegistrationTick[][] {\n const declarations: Array<ReadDeclaration> = registration.response?.declarations ?? [];\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach(() => {\n const result = [\n {\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n details: [],\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n isPayment: false,\n },\n waitingState,\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n result.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(result);\n });\n\n return data;\n } if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n ...reverse(declaration.states).map((d: InterchangeHistory) => ({\n state: d.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,\n title: d.label ?? null,\n details: d?.stateDetailsHistory,\n date: d.date ?? null,\n })),\n ];\n\n for (let index = declaration.states.length; index < 3; index += 1) {\n response.push({ ...waitingState, title: null });\n }\n\n if (isDefined(declaration.payment)) {\n response.push({\n state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,\n title: declaration.payment?.label ?? '',\n details: [],\n isPayment: true,\n date: declaration.payment.date ?? null,\n });\n }\n data.push(response);\n });\n\n return data;\n }\n\n return [];\n}\n\nexport function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; toReport?: number; } {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as Cerfa3310_2023;\n const other = { collectable: payload.vat.grossDue, deductible: payload.vat.deductible.total, toReport: payload.credit.toReport ?? 0 };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };\n if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3514) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests) return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as Cerfa3517_2023;\n const other = { collectable: payload.other.total, deductible: payload.deductible.total, toReport: payload.net.balanceSurplus ?? 0 };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n\n return {\n type: null, amount: null, collectable: 0, deductible: 0,\n };\n}"]}
@@ -15,24 +15,28 @@ const AdjustmentTypeList = exports.AdjustmentTypeList = [{
15
15
  label: 'TVA trop collectée',
16
16
  centuries: [2022, 2023, 2024, 2025],
17
17
  key: 'vat.deductible.toImpute',
18
- inputKey: 'adjustment.tooMuchCollected'
18
+ inputKey: 'adjustment.tooMuchCollected',
19
+ tooltip: '2C - Sommes à imputer, y compris acompte congés'
19
20
  }, {
20
21
  id: AdjustmentTypeId.NOT_ENOUGH_COLLECTED,
21
22
  label: 'TVA pas assez collectée',
22
23
  centuries: [2022, 2023, 2024, 2025],
23
24
  key: 'vat.sumToAdd',
24
- inputKey: 'adjustment.notEnoughCollected'
25
+ inputKey: 'adjustment.notEnoughCollected',
26
+ tooltip: '5B - Sommes à ajouter, y compris acompte congés'
25
27
  }, {
26
28
  id: AdjustmentTypeId.TOO_MUCH_DEDUCTED,
27
29
  label: 'TVA trop déduite',
28
30
  centuries: [2022, 2023, 2024, 2025],
29
31
  key: 'vat.sumToAdd',
30
- inputKey: 'adjustment.tooMuchDeducted'
32
+ inputKey: 'adjustment.tooMuchDeducted',
33
+ tooltip: '5B - Sommes à ajouter, y compris acompte congés'
31
34
  }, {
32
35
  id: AdjustmentTypeId.NOT_ENOUGH_DEDUCTED,
33
36
  label: 'TVA pas assez déduite',
34
37
  centuries: [2022, 2023, 2024, 2025],
35
38
  key: 'vat.deductible.toImpute',
39
+ tooltip: '2C - Sommes à imputer, y compris acompte congés',
36
40
  inputKey: 'adjustment.notEnoughDeducted'
37
41
  }];
38
42
  //# sourceMappingURL=AdjustmentType.js.map
@@ -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.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"}
1
+ {"version":3,"file":"AdjustmentType.js","names":["AdjustmentTypeId","exports","undefined","AdjustmentTypeList","id","TOO_MUCH_COLLECTED","label","centuries","key","inputKey","tooltip","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; tooltip: 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 tooltip: '2C - Sommes à imputer, y compris acompte congés',\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 tooltip: '5B - Sommes à ajouter, y compris acompte congés',\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 tooltip: '5B - Sommes à ajouter, y compris acompte congés',\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 tooltip: '2C - Sommes à imputer, y compris acompte congés',\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,GAAwH,CACrJ;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,6BAA6B;EACvCC,OAAO,EAAE;CACV,EACD;EACEN,EAAE,EAAEJ,gBAAgB,CAACW,oBAAoB;EACzCL,KAAK,EAAE,yBAAyB;EAChCC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE,+BAA+B;EACzCC,OAAO,EAAE;CACV,EACD;EACEN,EAAE,EAAEJ,gBAAgB,CAACY,iBAAiB;EACtCN,KAAK,EAAE,kBAAkB;EACzBC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE,4BAA4B;EACtCC,OAAO,EAAE;CACV,EACD;EACEN,EAAE,EAAEJ,gBAAgB,CAACa,mBAAmB;EACxCP,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BE,OAAO,EAAE,iDAAiD;EAC1DD,QAAQ,EAAE;CACX,CACF"}
@@ -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 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 toReport?: 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":""}
@@ -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, 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;
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103;
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);
@@ -58,8 +58,9 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
58
58
  const taxedImportEntries = vatEntries.filter(ae => importationVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
59
59
  const taxedImportAccounts = ['6'];
60
60
  const taxedImport = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(taxedImportEntries, taxedImportAccounts, 0, true));
61
- const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607'];
61
+ const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607', '651'];
62
62
  const taxedIntracommunityAcquisitions = (0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), [...intracommunityAccounts2, ...intracommunityServiceAccounts], 0, true);
63
+ console.log('👀 ~ file: century23.ts:64 ~ taxedIntracommunityAcquisitions:', taxedIntracommunityAcquisitions);
63
64
  // Opérations non taxées
64
65
  const untaxedExportationNotInEurope = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
65
66
  const untaxedOther = (0, _utils.setZeroIfIsNegative)((0, _utils.getAmountByAccountNumber)(vatEntries.filter(ae => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true));
@@ -94,12 +95,12 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
94
95
  const immobilizationTax = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries, ['2']));
95
96
  const otherGoodsAndServices = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(e => vats.filter(v => !v.isVatImportation).map(v => v.id).includes(e.idVat)), ['6']));
96
97
  const otherDeductibles = (0, _utils.setZeroIfIsNegative)((0, _utils.getTaxAmountByAccountNumber)(vatEntries.filter(e => vats.filter(v => v.isVatImportation).map(v => v.id).includes(e.idVat)), ['6']));
97
- 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;
98
- 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);
98
+ 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 ? (0, _lodash.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;
99
+ const coefficient = (0, _lodash.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);
99
100
  const isNil = payload.isNil === true;
100
101
  const isHolidayDeposit = payload.isHolidayDeposit === true;
101
- const sumToAdd = (0, _utils.setZeroIfIsNegative)(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) : (0, _lodash.round)((_m = (_l = payload.vat) === null || _l === void 0 ? void 0 : _l.sumToAdd) !== null && _m !== void 0 ? _m : 0) + mxToAdd);
102
- const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_o = payload.comment) !== null && _o !== void 0 ? _o : ''}` : (_p = payload.comment) !== null && _p !== void 0 ? _p : null;
102
+ const sumToAdd = (0, _utils.setZeroIfIsNegative)(isNil ? 0 : isHolidayDeposit ? (0, _lodash.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) : (0, _lodash.round)((_u = (_t = payload.vat) === null || _t === void 0 ? void 0 : _t.sumToAdd) !== null && _u !== void 0 ? _u : 0) + mxToAdd);
103
+ const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_v = payload.comment) !== null && _v !== void 0 ? _v : ''}` : (_w = payload.comment) !== null && _w !== void 0 ? _w : null;
103
104
  const initialPayload = {
104
105
  isNil,
105
106
  isDGE: false,
@@ -112,7 +113,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
112
113
  full: `${payload.society.address}\n${payload.society.zipCode} ${payload.society.city}`
113
114
  },
114
115
  numbers: {
115
- SIE: (_r = (_q = payload.sie) === null || _q === void 0 ? void 0 : _q.sages) !== null && _r !== void 0 ? _r : null,
116
+ SIE: (_y = (_x = payload.sie) === null || _x === void 0 ? void 0 : _x.sages) !== null && _y !== void 0 ? _y : null,
116
117
  folder: null,
117
118
  key: null,
118
119
  period: null,
@@ -124,7 +125,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
124
125
  },
125
126
  service: {
126
127
  address: {
127
- 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
128
+ full: (0, _classValidator.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
128
129
  }
129
130
  },
130
131
  period: {
@@ -140,13 +141,13 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
140
141
  }
141
142
  },
142
143
  siret: {
143
- 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,
144
- 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
144
+ first: (0, _classValidator.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,
145
+ second: (0, _classValidator.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
145
146
  },
146
147
  intracommunityVat: {
147
- 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,
148
- 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,
149
- third: shouldHaveVatCode ? (_10 = (_9 = payload.society.siret) === null || _9 === void 0 ? void 0 : _9.slice(0, 9)) !== null && _10 !== void 0 ? _10 : null : null
148
+ 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,
149
+ 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,
150
+ third: shouldHaveVatCode ? (_17 = (_16 = payload.society.siret) === null || _16 === void 0 ? void 0 : _16.slice(0, 9)) !== null && _17 !== void 0 ? _17 : null : null
150
151
  },
151
152
  payment: {
152
153
  date: dayjs().format('YYYY-MM-DD'),
@@ -160,29 +161,29 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
160
161
  other: isNil || isHolidayDeposit ? 0 : taxedOther,
161
162
  purchaseOfIntracommunityServiceProvision: isNil || isHolidayDeposit ? 0 : taxedPurchaseOfIntracommunityService,
162
163
  import: isNil || isHolidayDeposit ? 0 : taxedImport,
163
- 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),
164
- 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),
164
+ withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_19 = (_18 = payload.taxedOperations) === null || _18 === void 0 ? void 0 : _18.withdrawSuspensiveRegime) !== null && _19 !== void 0 ? _19 : 0),
165
+ releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_21 = (_20 = payload.taxedOperations) === null || _20 === void 0 ? void 0 : _20.releaseFromConsumption) !== null && _21 !== void 0 ? _21 : 0),
165
166
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : taxedIntracommunityAcquisitions,
166
- 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),
167
- 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),
168
- 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)
167
+ energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_23 = (_22 = payload.taxedOperations) === null || _22 === void 0 ? void 0 : _22.energyDelivery) !== null && _23 !== void 0 ? _23 : 0),
168
+ purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_25 = (_24 = payload.taxedOperations) === null || _24 === void 0 ? void 0 : _24.purchaseOfServicesNotInFrance) !== null && _25 !== void 0 ? _25 : 0),
169
+ regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_27 = (_26 = payload.taxedOperations) === null || _26 === void 0 ? void 0 : _26.regularizations) !== null && _27 !== void 0 ? _27 : 0)
169
170
  },
170
171
  untaxedOperations: {
171
172
  exportationNotInEurope: isNil || isHolidayDeposit ? 0 : untaxedExportationNotInEurope,
172
173
  other: isNil || isHolidayDeposit ? 0 : untaxedOther,
173
- 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),
174
+ distanceSelling: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_29 = (_28 = payload.untaxedOperations) === null || _28 === void 0 ? void 0 : _28.distanceSelling) !== null && _29 !== void 0 ? _29 : 0),
174
175
  import: isNil || isHolidayDeposit ? 0 : untaxedImport,
175
- 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),
176
- 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),
176
+ withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_31 = (_30 = payload.untaxedOperations) === null || _30 === void 0 ? void 0 : _30.withdrawSuspensiveRegime) !== null && _31 !== void 0 ? _31 : 0),
177
+ importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_33 = (_32 = payload.untaxedOperations) === null || _32 === void 0 ? void 0 : _32.importInSuspensiveSystem) !== null && _33 !== void 0 ? _33 : 0),
177
178
  intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : untaxedIntracomunity,
178
179
  intracommunityDelivery: isNil || isHolidayDeposit ? 0 : untaxedIntracommunityDelivery,
179
- 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),
180
- 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),
181
- 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),
182
- 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),
183
- 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),
184
- 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),
185
- 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)
180
+ energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_35 = (_34 = payload.untaxedOperations) === null || _34 === void 0 ? void 0 : _34.energyDelivery) !== null && _35 !== void 0 ? _35 : 0),
181
+ oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_37 = (_36 = payload.untaxedOperations) === null || _36 === void 0 ? void 0 : _36.oilProductsConsumption) !== null && _37 !== void 0 ? _37 : 0),
182
+ importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_39 = (_38 = payload.untaxedOperations) === null || _38 === void 0 ? void 0 : _38.importPetrolInSuspensiveSystem) !== null && _39 !== void 0 ? _39 : 0),
183
+ purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_41 = (_40 = payload.untaxedOperations) === null || _40 === void 0 ? void 0 : _40.purchaseInFranchise) !== null && _41 !== void 0 ? _41 : 0),
184
+ saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_43 = (_42 = payload.untaxedOperations) === null || _42 === void 0 ? void 0 : _42.saleOfServicesNotInFrance) !== null && _43 !== void 0 ? _43 : 0),
185
+ regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_45 = (_44 = payload.untaxedOperations) === null || _44 === void 0 ? void 0 : _44.regularizations) !== null && _45 !== void 0 ? _45 : 0),
186
+ internalUniq: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_47 = (_46 = payload.untaxedOperations) === null || _46 === void 0 ? void 0 : _46.internalUniq) !== null && _47 !== void 0 ? _47 : 0)
186
187
  },
187
188
  vat: {
188
189
  carrieredOutInFrance: {
@@ -211,12 +212,12 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
211
212
  },
212
213
  oilProducts: {
213
214
  normalRate20: {
214
- 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),
215
- 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
215
+ base: 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),
216
+ tax: 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.normalRate20) === null || _54 === void 0 ? void 0 : _54.base) !== null && _55 !== void 0 ? _55 : 0) * 0.02
216
217
  },
217
218
  reduceRate13: {
218
- 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),
219
- 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
219
+ base: 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),
220
+ tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.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
220
221
  }
221
222
  },
222
223
  importations: {
@@ -246,34 +247,34 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
246
247
  }
247
248
  },
248
249
  previouslyDeductedToBeReturned: {
249
- 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),
250
- 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),
251
- 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)
250
+ onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.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),
251
+ otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.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),
252
+ total: isNil || isHolidayDeposit ? 0 : (0, _lodash.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)
252
253
  },
253
254
  sumToAdd,
254
255
  grossDue: 0,
255
256
  onIntracommunityAcquisition: isNil || isHolidayDeposit ? 0 : intracommunityTax,
256
- 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),
257
+ toMonaco: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_74 = (_73 = payload.vat) === null || _73 === void 0 ? void 0 : _73.toMonaco) !== null && _74 !== void 0 ? _74 : 0),
257
258
  deductible: {
258
259
  immobilizations: isNil || isHolidayDeposit ? 0 : immobilizationTax !== null && immobilizationTax !== void 0 ? immobilizationTax : 0,
259
260
  otherGoodsAndServices: isNil || isHolidayDeposit ? 0 : otherGoodsAndServices !== null && otherGoodsAndServices !== void 0 ? otherGoodsAndServices : 0,
260
261
  other: {
261
- 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),
262
+ oil: isNil || isHolidayDeposit ? 0 : (0, _lodash.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),
262
263
  thanOilProducts: 0,
263
264
  collected: 0,
264
265
  total: isNil || isHolidayDeposit ? 0 : otherDeductibles
265
266
  },
266
267
  report,
267
- 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,
268
+ toImpute: 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.toImpute) !== null && _81 !== void 0 ? _81 : 0) + mxToSub,
268
269
  total: 0,
269
270
  onImportOtherThanOilProducts: isNil || isHolidayDeposit ? 0 : otherDeductibles,
270
271
  coefficient: isNil || isHolidayDeposit ? 100 : coefficient,
271
- 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)
272
+ onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.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)
272
273
  },
273
274
  otherRate: {
274
275
  oldRate: {
275
- 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),
276
- 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)
276
+ base: isNil || isHolidayDeposit ? 0 : (0, _lodash.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),
277
+ tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.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)
277
278
  },
278
279
  at1Dot75: {
279
280
  base: 0,
@@ -307,16 +308,16 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
307
308
  },
308
309
  credit: {
309
310
  amount: 0,
310
- 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),
311
- 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),
312
- 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),
311
+ refundAsked: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_94 = (_93 = payload.credit) === null || _93 === void 0 ? void 0 : _93.refundAsked) !== null && _94 !== void 0 ? _94 : 0),
312
+ transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_96 = (_95 = payload.credit) === null || _95 === void 0 ? void 0 : _95.transferedToSocietyHeadOfGroup) !== null && _96 !== void 0 ? _96 : 0),
313
+ assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_98 = (_97 = payload.credit) === null || _97 === void 0 ? void 0 : _97.assimiledTaxes) !== null && _98 !== void 0 ? _98 : 0),
313
314
  toReport: 0,
314
315
  ticRefund: 0,
315
316
  ticTransfered: 0
316
317
  },
317
318
  toPay: {
318
319
  netDue: 0,
319
- 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),
320
+ acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_100 = (_99 = payload.toPay) === null || _99 === void 0 ? void 0 : _99.acquittedBySocietyHeadOfGroup) !== null && _100 !== void 0 ? _100 : 0),
320
321
  total: 0
321
322
  },
322
323
  tic: {
@@ -330,7 +331,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
330
331
  initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
331
332
  initialPayload.toPay.netDue = initialPayload.vat.grossDue - initialPayload.vat.deductible.total > 0 ? initialPayload.vat.grossDue - initialPayload.vat.deductible.total : 0;
332
333
  initialPayload.credit.toReport = initialPayload.credit.amount - initialPayload.credit.refundAsked - initialPayload.credit.transferedToSocietyHeadOfGroup;
333
- 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;
334
+ 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;
334
335
  return initialPayload;
335
336
  }
336
337
  function getCerfa3310Century23RegistrationFields(data) {
@@ -1266,10 +1267,17 @@ const cerfa3310Century23Fields = exports.cerfa3310Century23Fields = [{
1266
1267
  }, {
1267
1268
  sectionName: 'TVA déductible',
1268
1269
  childrens: [{
1269
- label: '2C - Sommes à imputer, y compris acompte congés',
1270
- key: 'deductible.toImpute',
1270
+ label: '22 - Report du crédit apparaissant ligne 27 de la précédente déclaration',
1271
+ key: 'vat.deductible.toReport',
1271
1272
  type: 'number'
1272
- }, {
1273
+ },
1274
+ /* {
1275
+ GERE DANS LES REGULARISATIONS
1276
+ label: '2C - Sommes à imputer, y compris acompte congés',
1277
+ key: 'vat.deductible.toImpute',
1278
+ type: 'number',
1279
+ }, */
1280
+ {
1273
1281
  label: '22A - Coefficient de taxation unique applicable pour la période si différent de 100%',
1274
1282
  key: 'vat.deductible.coefficient',
1275
1283
  type: 'number'