@silexpert/core 1.1.57 → 1.1.59
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.
- package/es/api/resources/TerminationList.d.ts +2 -1
- package/es/api/resources/TerminationList.d.ts.map +1 -1
- package/es/api/resources/TerminationList.js +3 -0
- package/es/api/resources/TerminationList.js.map +1 -1
- package/es/types/Enum/Tax.d.ts +2 -1
- package/es/types/Enum/Tax.d.ts.map +1 -1
- package/es/types/Enum/Tax.js +1 -0
- package/es/types/Enum/Tax.js.map +1 -1
- package/es/types/Interface/api/terminationList/CreateTerminationList.d.ts +14 -0
- package/es/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -0
- package/es/types/Interface/api/terminationList/CreateTerminationList.js +80 -0
- package/es/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -0
- package/es/types/Interface/models/ITerminationList.d.ts +11 -11
- package/es/types/Interface/models/ITerminationList.d.ts.map +1 -1
- package/es/types/Interface/models/ITerminationList.js.map +1 -1
- package/es/types/index.d.ts +1 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +1 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/vat/3310/century23.d.ts.map +1 -1
- package/es/utils/vat/3310/century23.js +1 -2
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/es/utils/vat/registration.d.ts +0 -1
- package/es/utils/vat/registration.d.ts.map +1 -1
- package/es/utils/vat/registration.js +12 -12
- package/es/utils/vat/registration.js.map +1 -1
- package/js/api/resources/TerminationList.js +3 -0
- package/js/api/resources/TerminationList.js.map +1 -1
- package/js/types/Enum/Tax.js +1 -0
- package/js/types/Enum/Tax.js.map +1 -1
- package/js/types/Interface/api/terminationList/CreateTerminationList.js +32 -0
- package/js/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -0
- package/js/types/Interface/models/ITerminationList.js.map +1 -1
- package/js/types/index.js +10 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/vat/3310/century23.js +1 -2
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/js/utils/vat/registration.js +12 -14
- package/js/utils/vat/registration.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/TerminationList.ts +5 -1
- package/ts/types/Enum/Tax.ts +1 -0
- package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +63 -0
- package/ts/types/Interface/models/ITerminationList.ts +11 -11
- package/ts/types/index.ts +1 -0
- package/ts/utils/vat/3310/century23.ts +1 -2
- package/ts/utils/vat/registration.ts +3 -3
|
@@ -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;
|
|
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 };
|
|
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 (((
|
|
83
|
+
if (((_a = payload === null || payload === void 0 ? void 0 : payload.toPay) === null || _a === void 0 ? void 0 : _a.total) > 0)
|
|
84
84
|
return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total }, other);
|
|
85
|
-
if (((
|
|
85
|
+
if (((_b = payload === null || payload === void 0 ? void 0 : payload.credit) === null || _b === void 0 ? void 0 : _b.refundAsked) > 0)
|
|
86
86
|
return Object.assign({ type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked }, other);
|
|
87
|
-
if (((
|
|
87
|
+
if (((_c = payload === null || payload === void 0 ? void 0 : payload.credit) === null || _c === void 0 ? void 0 : _c.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 };
|
|
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 (((
|
|
107
|
-
return Object.assign({ type: CustomerVatType.VAT_TO_PAY, amount: (
|
|
108
|
-
if (((
|
|
109
|
-
return Object.assign({ type: CustomerVatType.VAT_REFUND, amount: (
|
|
110
|
-
if (((
|
|
111
|
-
return Object.assign({ type: CustomerVatType.VAT_REPORT, amount: (
|
|
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);
|
|
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,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE;YACxB,MAAM,MAAM,GAAG;gBACb;oBACE,KAAK,EAAE,q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G;QACtI,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,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; 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}"]}
|
|
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,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE;YACxB,MAAM,MAAM,GAAG;gBACb;oBACE,KAAK,EAAE,qBAAqB,CAAC,QAAQ;oBACrC,KAAK,EAAE,qBAAqB;oBAC5B,OAAO,EAAE,EAAE;oBACX,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI;oBAC3E,SAAS,EAAE,KAAK;iBACjB;gBACD,YAAY;gBACZ,YAAY;gBACZ,YAAY;aACb,CAAC;YAEF,IAAI,YAAY,CAAC,WAAW,IAAI,YAAY,CAAC,WAAW,GAAG,CAAC,EAAE;gBAC5D,MAAM,CAAC,IAAI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E,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerminationList.js","names":["_Resource","require","TerminationList","Resource","get","params","axios","$get","delete","$delete","exports"],"sources":["../../../ts/api/resources/TerminationList.ts"],"sourcesContent":["import { DestroyTerminationList, QueryTerminationList } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class TerminationList extends Resource {\n public get(params: QueryTerminationList): Promise<TerminationList> {\n return this.axios.$get('/termination-lists', { params });\n }\n\n public delete(params: DestroyTerminationList): Promise<number> {\n return this.axios.$delete('/termination-lists', { params });\n }\n}"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEM,MAAOC,eAAgB,SAAQC,kBAAQ;EACpCC,GAAGA,CAACC,MAA4B;IACrC,OAAO,IAAI,CAACC,KAAK,CAACC,IAAI,CAAC,oBAAoB,EAAE;MAAEF;IAAM,CAAE,CAAC;EAC1D;EAEOG,MAAMA,CAACH,MAA8B;IAC1C,OAAO,IAAI,CAACC,KAAK,
|
|
1
|
+
{"version":3,"file":"TerminationList.js","names":["_Resource","require","TerminationList","Resource","get","params","axios","$get","create","$post","delete","$delete","exports"],"sources":["../../../ts/api/resources/TerminationList.ts"],"sourcesContent":["import { CreateTerminationList, DestroyTerminationList, QueryTerminationList } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class TerminationList extends Resource {\n public get(params: QueryTerminationList): Promise<TerminationList> {\n return this.axios.$get('/termination-lists', { params });\n }\n\n public create(params: CreateTerminationList): Promise<TerminationList> {\n return this.axios.$post('/termination-lists', params);\n }\n\n public delete(params: DestroyTerminationList): Promise<number> {\n return this.axios.$delete('/termination-lists', { params });\n }\n}"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEM,MAAOC,eAAgB,SAAQC,kBAAQ;EACpCC,GAAGA,CAACC,MAA4B;IACrC,OAAO,IAAI,CAACC,KAAK,CAACC,IAAI,CAAC,oBAAoB,EAAE;MAAEF;IAAM,CAAE,CAAC;EAC1D;EAEOG,MAAMA,CAACH,MAA6B;IACzC,OAAO,IAAI,CAACC,KAAK,CAACG,KAAK,CAAC,oBAAoB,EAAEJ,MAAM,CAAC;EACvD;EAEOK,MAAMA,CAACL,MAA8B;IAC1C,OAAO,IAAI,CAACC,KAAK,CAACK,OAAO,CAAC,oBAAoB,EAAE;MAAEN;IAAM,CAAE,CAAC;EAC7D;;AACDO,OAAA,CAZYV,eAAgB,GAAhBA,eAAgB"}
|
package/js/types/Enum/Tax.js
CHANGED
|
@@ -41,5 +41,6 @@ var VatDeadlineType = exports.VatDeadlineType = undefined;
|
|
|
41
41
|
VatDeadlineType[VatDeadlineType["DEFAULT"] = 0] = "DEFAULT";
|
|
42
42
|
VatDeadlineType[VatDeadlineType["EXCEDEED"] = 1] = "EXCEDEED";
|
|
43
43
|
VatDeadlineType[VatDeadlineType["IMPORT"] = 2] = "IMPORT";
|
|
44
|
+
VatDeadlineType[VatDeadlineType["PAY"] = 3] = "PAY";
|
|
44
45
|
})(VatDeadlineType || (exports.VatDeadlineType = VatDeadlineType = {}));
|
|
45
46
|
//# sourceMappingURL=Tax.js.map
|
package/js/types/Enum/Tax.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tax.js","names":["TaxType","exports","undefined","TaxState","TaxCredit","VatDeadlineType"],"sources":["../../../ts/types/Enum/Tax.ts"],"sourcesContent":["export enum TaxType {\n DEFAULT = 0,\n TO_PAY = 1,\n REPORTABLE = 2,\n REFUND = 3,\n}\n\nexport enum TaxState {\n WAITING = 0,\n WAITING_CLIENT = 14,\n TO_DO = 13,\n CLIENT_PROBLEM = 3,\n SENDED_TO_CLIENT = 6,\n ACCEPTED_BY_CLIENT = 11,\n REFUSED_BY_CLIENT = 12,\n SENDED_TO_SIE = 2,\n ACCEPTED_BY_SIE = 1,\n SIE_PROBLEM = 10,\n DONE_BY_CLIENT = 4,\n UNPAID = 9,\n NA = 5,\n}\n\nexport enum TaxCredit {\n NOTHING = 0,\n CICE = 1,\n CIR = 2,\n PATRONAGE = 3,\n TRAINING = 4,\n LEARNING_CREDIT = 5,\n OTHER = 6,\n}\n\nexport enum VatDeadlineType {\n DEFAULT = 0,\n EXCEDEED = 1,\n IMPORT = 2,\n}"],"mappings":";;;;;AAAA,IAAYA,OAKX,GAAAC,OAAA,CALWD,OAKX,GAAAE,SAAA;AALD,WAAYF,OAAO;EACjBA,OAAA,CAAAA,OAAA,4BAAW;EACXA,OAAA,CAAAA,OAAA,0BAAU;EACVA,OAAA,CAAAA,OAAA,kCAAc;EACdA,OAAA,CAAAA,OAAA,0BAAU;AACZ,CAAC,EALWA,OAAO,KAAAC,OAAA,CAAPD,OAKX,GALWA,OAAO;AAOnB,IAAYG,QAcX,GAAAF,OAAA,CAdWE,QAcX,GAAAD,SAAA;AAdD,WAAYC,QAAQ;EAClBA,QAAA,CAAAA,QAAA,4BAAW;EACXA,QAAA,CAAAA,QAAA,2CAAmB;EACnBA,QAAA,CAAAA,QAAA,yBAAU;EACVA,QAAA,CAAAA,QAAA,0CAAkB;EAClBA,QAAA,CAAAA,QAAA,8CAAoB;EACpBA,QAAA,CAAAA,QAAA,mDAAuB;EACvBA,QAAA,CAAAA,QAAA,iDAAsB;EACtBA,QAAA,CAAAA,QAAA,wCAAiB;EACjBA,QAAA,CAAAA,QAAA,4CAAmB;EACnBA,QAAA,CAAAA,QAAA,qCAAgB;EAChBA,QAAA,CAAAA,QAAA,0CAAkB;EAClBA,QAAA,CAAAA,QAAA,0BAAU;EACVA,QAAA,CAAAA,QAAA,kBAAM;AACR,CAAC,EAdWA,QAAQ,KAAAF,OAAA,CAARE,QAcX,GAdWA,QAAQ;AAgBpB,IAAYC,SAQX,GAAAH,OAAA,CARWG,SAQX,GAAAF,SAAA;AARD,WAAYE,SAAS;EACnBA,SAAA,CAAAA,SAAA,4BAAW;EACXA,SAAA,CAAAA,SAAA,sBAAQ;EACRA,SAAA,CAAAA,SAAA,oBAAO;EACPA,SAAA,CAAAA,SAAA,gCAAa;EACbA,SAAA,CAAAA,SAAA,8BAAY;EACZA,SAAA,CAAAA,SAAA,4CAAmB;EACnBA,SAAA,CAAAA,SAAA,wBAAS;AACX,CAAC,EARWA,SAAS,KAAAH,OAAA,CAATG,SAQX,GARWA,SAAS;AAUrB,IAAYC,
|
|
1
|
+
{"version":3,"file":"Tax.js","names":["TaxType","exports","undefined","TaxState","TaxCredit","VatDeadlineType"],"sources":["../../../ts/types/Enum/Tax.ts"],"sourcesContent":["export enum TaxType {\n DEFAULT = 0,\n TO_PAY = 1,\n REPORTABLE = 2,\n REFUND = 3,\n}\n\nexport enum TaxState {\n WAITING = 0,\n WAITING_CLIENT = 14,\n TO_DO = 13,\n CLIENT_PROBLEM = 3,\n SENDED_TO_CLIENT = 6,\n ACCEPTED_BY_CLIENT = 11,\n REFUSED_BY_CLIENT = 12,\n SENDED_TO_SIE = 2,\n ACCEPTED_BY_SIE = 1,\n SIE_PROBLEM = 10,\n DONE_BY_CLIENT = 4,\n UNPAID = 9,\n NA = 5,\n}\n\nexport enum TaxCredit {\n NOTHING = 0,\n CICE = 1,\n CIR = 2,\n PATRONAGE = 3,\n TRAINING = 4,\n LEARNING_CREDIT = 5,\n OTHER = 6,\n}\n\nexport enum VatDeadlineType {\n DEFAULT = 0,\n EXCEDEED = 1,\n IMPORT = 2,\n PAY = 3,\n}"],"mappings":";;;;;AAAA,IAAYA,OAKX,GAAAC,OAAA,CALWD,OAKX,GAAAE,SAAA;AALD,WAAYF,OAAO;EACjBA,OAAA,CAAAA,OAAA,4BAAW;EACXA,OAAA,CAAAA,OAAA,0BAAU;EACVA,OAAA,CAAAA,OAAA,kCAAc;EACdA,OAAA,CAAAA,OAAA,0BAAU;AACZ,CAAC,EALWA,OAAO,KAAAC,OAAA,CAAPD,OAKX,GALWA,OAAO;AAOnB,IAAYG,QAcX,GAAAF,OAAA,CAdWE,QAcX,GAAAD,SAAA;AAdD,WAAYC,QAAQ;EAClBA,QAAA,CAAAA,QAAA,4BAAW;EACXA,QAAA,CAAAA,QAAA,2CAAmB;EACnBA,QAAA,CAAAA,QAAA,yBAAU;EACVA,QAAA,CAAAA,QAAA,0CAAkB;EAClBA,QAAA,CAAAA,QAAA,8CAAoB;EACpBA,QAAA,CAAAA,QAAA,mDAAuB;EACvBA,QAAA,CAAAA,QAAA,iDAAsB;EACtBA,QAAA,CAAAA,QAAA,wCAAiB;EACjBA,QAAA,CAAAA,QAAA,4CAAmB;EACnBA,QAAA,CAAAA,QAAA,qCAAgB;EAChBA,QAAA,CAAAA,QAAA,0CAAkB;EAClBA,QAAA,CAAAA,QAAA,0BAAU;EACVA,QAAA,CAAAA,QAAA,kBAAM;AACR,CAAC,EAdWA,QAAQ,KAAAF,OAAA,CAARE,QAcX,GAdWA,QAAQ;AAgBpB,IAAYC,SAQX,GAAAH,OAAA,CARWG,SAQX,GAAAF,SAAA;AARD,WAAYE,SAAS;EACnBA,SAAA,CAAAA,SAAA,4BAAW;EACXA,SAAA,CAAAA,SAAA,sBAAQ;EACRA,SAAA,CAAAA,SAAA,oBAAO;EACPA,SAAA,CAAAA,SAAA,gCAAa;EACbA,SAAA,CAAAA,SAAA,8BAAY;EACZA,SAAA,CAAAA,SAAA,4CAAmB;EACnBA,SAAA,CAAAA,SAAA,wBAAS;AACX,CAAC,EARWA,SAAS,KAAAH,OAAA,CAATG,SAQX,GARWA,SAAS;AAUrB,IAAYC,eAKX,GAAAJ,OAAA,CALWI,eAKX,GAAAH,SAAA;AALD,WAAYG,eAAe;EACzBA,eAAA,CAAAA,eAAA,4BAAW;EACXA,eAAA,CAAAA,eAAA,8BAAY;EACZA,eAAA,CAAAA,eAAA,0BAAU;EACVA,eAAA,CAAAA,eAAA,oBAAO;AACT,CAAC,EALWA,eAAe,KAAAJ,OAAA,CAAfI,eAKX,GALWA,eAAe"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CreateTerminationList = undefined;
|
|
7
|
+
var _classValidator = require("class-validator");
|
|
8
|
+
var _utils = require("../../../../utils");
|
|
9
|
+
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
10
|
+
var c = arguments.length,
|
|
11
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
12
|
+
d;
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
var __metadata = undefined && undefined.__metadata || function (k, v) {
|
|
17
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
18
|
+
};
|
|
19
|
+
class CreateTerminationList {}
|
|
20
|
+
exports.CreateTerminationList = CreateTerminationList;
|
|
21
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsString)(), __metadata("design:type", String)], CreateTerminationList.prototype, "comment", void 0);
|
|
22
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsDate)(), __metadata("design:type", Date)], CreateTerminationList.prototype, "recalledCustomer", void 0);
|
|
23
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsDate)(), __metadata("design:type", Date)], CreateTerminationList.prototype, "recalledCustomerBySupervisor", void 0);
|
|
24
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsDate)(), __metadata("design:type", Date)], CreateTerminationList.prototype, "effectiveDate", void 0);
|
|
25
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsInt)(), __metadata("design:type", Number)], CreateTerminationList.prototype, "idExercice", void 0);
|
|
26
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsDate)(), __metadata("design:type", Date)], CreateTerminationList.prototype, "endContractDate", void 0);
|
|
27
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsBoolean)(), __metadata("design:type", Boolean)], CreateTerminationList.prototype, "refund", void 0);
|
|
28
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsInt)(), __metadata("design:type", Number)], CreateTerminationList.prototype, "idReasonTermination", void 0);
|
|
29
|
+
__decorate([(0, _utils.ApiProperty)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsInt)(), __metadata("design:type", Number)], CreateTerminationList.prototype, "idSociety", void 0);
|
|
30
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsInt)(), __metadata("design:type", Number)], CreateTerminationList.prototype, "idPrestation", void 0);
|
|
31
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), (0, _classValidator.IsInt)(), __metadata("design:type", Number)], CreateTerminationList.prototype, "idCollaborateur", void 0);
|
|
32
|
+
//# sourceMappingURL=CreateTerminationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateTerminationList.js","names":["_classValidator","require","_utils","CreateTerminationList","exports","__decorate","ApiPropertyOptional","IsOptional","IsString","IsDate","Date","IsInt","IsBoolean","ApiProperty"],"sources":["../../../../../ts/types/Interface/api/terminationList/CreateTerminationList.ts"],"sourcesContent":["import {\n IsBoolean,\n IsDate,\n IsInt, IsOptional, IsString,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\n\nexport class CreateTerminationList {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n recalledCustomer?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n recalledCustomerBySupervisor?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n effectiveDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idExercice?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n endContractDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n refund?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idReasonTermination?: number;\n\n @ApiProperty()\n @IsOptional()\n @IsInt()\n idSociety?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idPrestation?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @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,IAAAC,0BAAU,GAAE,EACZ,IAAAI,qBAAK,GAAE,E,4FACc;AAEtBN,UAAA,EAAC,IAAAC,0BAAmB,GAAE,EACrB,IAAAC,0BAAU,GAAE,EACZ,IAAAI,qBAAK,GAAE,E,+FACiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITerminationList.js","names":[],"sources":["../../../../ts/types/Interface/models/ITerminationList.ts"],"sourcesContent":["import { IReasonTermination } from './IReasonTermination';\nimport { ISociety } from './ISociety';\nimport { IExercice } from './IExercice';\nimport { IUser } from './IUser';\nimport { IPrestation } from './IPrestation';\n\n// terminitionsList\nexport interface ITerminationList {\n id?: number;\n comment
|
|
1
|
+
{"version":3,"file":"ITerminationList.js","names":[],"sources":["../../../../ts/types/Interface/models/ITerminationList.ts"],"sourcesContent":["import { IReasonTermination } from './IReasonTermination';\nimport { ISociety } from './ISociety';\nimport { IExercice } from './IExercice';\nimport { IUser } from './IUser';\nimport { IPrestation } from './IPrestation';\n\n// terminitionsList\nexport interface ITerminationList {\n id?: number;\n comment?: string | null;\n recalledCustomer?: Date | null;\n recalledCustomerBySupervisor?: Date | null;\n effectiveDate?: Date | null;\n idExercice?: number | null;\n endContractDate?: Date | null;\n refund?: boolean;\n idReasonTermination?: number | null;\n idSociety?: number | null;\n idPrestation?: number | null;\n idCollaborateur?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n reasonTermination?: IReasonTermination;\n societiesTerminations?: ISociety;\n exercice?: IExercice;\n user?: IUser;\n prestation?: IPrestation;\n}\n"],"mappings":""}
|
package/js/types/index.js
CHANGED
|
@@ -8863,6 +8863,16 @@ Object.keys(_DestroyTerminationList).forEach(function (key) {
|
|
|
8863
8863
|
}
|
|
8864
8864
|
});
|
|
8865
8865
|
});
|
|
8866
|
+
var _CreateTerminationList = require("./Interface/api/terminationList/CreateTerminationList");
|
|
8867
|
+
Object.keys(_CreateTerminationList).forEach(function (key) {
|
|
8868
|
+
if (key === "default" || key === "__esModule") return;
|
|
8869
|
+
Object.defineProperty(exports, key, {
|
|
8870
|
+
enumerable: true,
|
|
8871
|
+
get: function () {
|
|
8872
|
+
return _CreateTerminationList[key];
|
|
8873
|
+
}
|
|
8874
|
+
});
|
|
8875
|
+
});
|
|
8866
8876
|
var _ReadPdfizer = require("./Interface/api/pdf/ReadPdfizer");
|
|
8867
8877
|
Object.keys(_ReadPdfizer).forEach(function (key) {
|
|
8868
8878
|
if (key === "default" || key === "__esModule") return;
|