@silexpert/core 1.3.74-3 → 1.3.74
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/dist/cjs/api/resources/Refund.d.ts +1 -29
- package/dist/cjs/api/resources/Refund.d.ts.map +1 -1
- package/dist/cjs/api/resources/Refund.js +0 -12
- package/dist/cjs/api/resources/Refund.js.map +1 -1
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js.map +1 -1
- package/dist/cjs/api/resources/Vat.d.ts +3 -2
- package/dist/cjs/api/resources/Vat.d.ts.map +1 -1
- package/dist/cjs/api/resources/Vat.js +5 -2
- package/dist/cjs/api/resources/Vat.js.map +1 -1
- package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts +6 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js +28 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js.map +1 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts +11 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.js +3 -0
- package/dist/cjs/types/Interface/api/vatDeclaration/ResultDataNote.js.map +1 -0
- package/dist/cjs/types/Interface/models/IRefund.d.ts +1 -9
- package/dist/cjs/types/Interface/models/IRefund.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IRefund.js.map +1 -1
- package/dist/cjs/types/Interface/models/IRegistration.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IRegistration.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IRegistration.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +2 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/vat/registration.d.ts +3 -0
- package/dist/cjs/utils/vat/registration.d.ts.map +1 -1
- package/dist/cjs/utils/vat/registration.js +24 -18
- package/dist/cjs/utils/vat/registration.js.map +1 -1
- package/dist/mjs/api/resources/Refund.d.ts +1 -29
- package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
- package/dist/mjs/api/resources/Refund.js +0 -12
- package/dist/mjs/api/resources/Refund.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js.map +1 -1
- package/dist/mjs/api/resources/Vat.d.ts +3 -2
- package/dist/mjs/api/resources/Vat.d.ts.map +1 -1
- package/dist/mjs/api/resources/Vat.js +5 -2
- package/dist/mjs/api/resources/Vat.js.map +1 -1
- package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts +6 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js +26 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/CreateVatDeclaration.js.map +1 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts +11 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.js +2 -0
- package/dist/mjs/types/Interface/api/vatDeclaration/ResultDataNote.js.map +1 -0
- package/dist/mjs/types/Interface/models/IRefund.d.ts +1 -9
- package/dist/mjs/types/Interface/models/IRefund.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IRefund.js.map +1 -1
- package/dist/mjs/types/Interface/models/IRegistration.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IRegistration.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IRegistration.js.map +1 -1
- package/dist/mjs/types/index.d.ts +2 -1
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +2 -1
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/vat/registration.d.ts +3 -0
- package/dist/mjs/utils/vat/registration.d.ts.map +1 -1
- package/dist/mjs/utils/vat/registration.js +7 -1
- package/dist/mjs/utils/vat/registration.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Refund.ts +1 -17
- package/ts/api/resources/Society.ts +0 -3
- package/ts/api/resources/Vat.ts +7 -1
- package/ts/types/Interface/api/vatDeclaration/CreateVatDeclaration.ts +13 -0
- package/ts/types/Interface/api/vatDeclaration/ResultDataNote.ts +11 -0
- package/ts/types/Interface/models/IRefund.ts +1 -13
- package/ts/types/Interface/models/IRegistration.ts +2 -0
- package/ts/types/index.ts +2 -1
- package/ts/utils/vat/registration.ts +10 -1
- package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +0 -13
- package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js +0 -60
- package/dist/cjs/types/Interface/api/refund/QueryRefundPaginated.js.map +0 -1
- package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts +0 -13
- package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js +0 -64
- package/dist/mjs/types/Interface/api/refund/QueryRefundPaginated.js.map +0 -1
- package/ts/types/Interface/api/refund/QueryRefundPaginated.ts +0 -39
|
@@ -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,KAAK,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAKL,SAAS,EACT,eAAe,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CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9D,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,SAA2B,CAAC;QAClE,OAAO;YACL,IAAI,EAAE,eAAe,CAAC,UAAU;YAChC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;YAC5D,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,CAAC;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC;KACd,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse, sumBy } from 'lodash';\nimport {\n AnyCerfa3310_Century,\n Cerfa2571_2023,\n Cerfa2573_2024,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration,\n ReadRegistrationTick,\n RegistrationState,\n RegistrationTickState,\n TaxType,\n} from '../../types';\nimport { AnyCerfa3517Century } 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 const history: InterchangeHistory[] = registration.response?.history;\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach((declaration) => {\n const result = [\n {\n type:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : null,\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 }\n if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n\n if (!declarations.length) {\n const response: ReadRegistrationTick[] = [\n {\n type: null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n {\n state: RegistrationTickState.FAILED,\n title: history?.find((h) => h.isError)?.label ?? '',\n details: history?.find((h) => h.isError)?.stateDetailsHistory ?? [],\n date: history?.find((h) => h.isError)?.date ?? null,\n },\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n response.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(response);\n }\n\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n type:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : null,\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\n ? RegistrationTickState.FAILED\n : declaration.payment.isError === null\n ? RegistrationTickState.IN_PROGRESS\n : 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): {\n type: CustomerVatType | null;\n amount: number | null;\n collectable: number;\n deductible: number;\n amountBase?: number;\n} {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as AnyCerfa3310_Century;\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)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0)\n return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3514) {\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as AnyCerfa3517Century;\n const other = {\n collectable: payload.other.total,\n deductible: payload.deductible.total,\n amountBase: payload?.total,\n };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0)\n return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0)\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit,\n ...other,\n };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (\n [\n CerfaType.CERFA_2571_2023_A,\n CerfaType.CERFA_2571_2023_B,\n CerfaType.CERFA_2571_2023_C,\n CerfaType.CERFA_2571_2023_D,\n ].includes(registration.idCerfaType)\n ) {\n const payload = registration.payload.cerfa2571 as Cerfa2571_2023;\n\n if (registration.customerIsRegime?.type === TaxType.TO_PAY) {\n return {\n type: CustomerVatType.VAT_TO_PAY,\n amount: payload.companyTax.toPay.total,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REFUND) {\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REPORTABLE) {\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n }\n\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n }\n if ([CerfaType.CERFA_2573].includes(registration.idCerfaType)) {\n const payload = registration.payload?.cerfa2573 as Cerfa2573_2024;\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: sumBy(payload?.refunds ?? [], (r) => r?.amount ?? 0),\n collectable: 0,\n deductible: 0,\n };\n }\n\n return {\n type: null,\n amount: null,\n collectable: 0,\n deductible: 0,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM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AAM,EAAE,YAAY,CAAC,gBAAgB,EAAE,MAAM;gBAC7C,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,CAAC;aACd,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IACrH,CAAC;IACD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9D,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,SAA2B,CAAC;QAClE,OAAO;YACL,IAAI,EAAE,eAAe,CAAC,UAAU;YAChC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;YAC5D,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,CAAC;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC;KACd,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse, sumBy } from 'lodash';\nimport {\n AnyCerfa3310_Century,\n Cerfa2571_2023,\n Cerfa2573_2024,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration,\n ReadRegistrationTick,\n RegistrationState,\n RegistrationTickState,\n TaxType,\n} from '../../types';\nimport { AnyCerfa3517Century } 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 const history: InterchangeHistory[] = registration.response?.history;\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach((declaration) => {\n const result = [\n {\n type:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : null,\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 }\n if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n\n if (!declarations.length) {\n const response: ReadRegistrationTick[] = [\n {\n type: null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n {\n state: RegistrationTickState.FAILED,\n title: history?.find((h) => h.isError)?.label ?? '',\n details: history?.find((h) => h.isError)?.stateDetailsHistory ?? [],\n date: history?.find((h) => h.isError)?.date ?? null,\n },\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n response.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(response);\n }\n\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n type:\n isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label)\n ? `${declaration?.type} - ${declaration?.declarationType?.label}`\n : null,\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\n ? RegistrationTickState.FAILED\n : declaration.payment.isError === null\n ? RegistrationTickState.IN_PROGRESS\n : 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): {\n type: CustomerVatType | null;\n amount: number | null;\n collectable: number;\n deductible: number;\n amountBase?: number;\n regulationAdd?: number;\n regulationDeduct?: number;\n reportFromPrevious?: number;\n} {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as AnyCerfa3310_Century;\n const other = {\n collectable: payload.vat?.grossDue,\n deductible: payload.vat?.deductible.total,\n regulationAdd: payload.vat?.sumToAdd,\n regulationDeduct: payload.vat?.deductible?.toImpute,\n reportFromPrevious: payload.vat?.deductible?.report,\n };\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)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0)\n return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3514) {\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests)\n return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as AnyCerfa3517Century;\n const other = {\n collectable: payload.other.total,\n deductible: payload.deductible.total,\n amountBase: payload?.total,\n };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0)\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0)\n return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0)\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit,\n ...other,\n };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n if (\n [\n CerfaType.CERFA_2571_2023_A,\n CerfaType.CERFA_2571_2023_B,\n CerfaType.CERFA_2571_2023_C,\n CerfaType.CERFA_2571_2023_D,\n ].includes(registration.idCerfaType)\n ) {\n const payload = registration.payload.cerfa2571 as Cerfa2571_2023;\n\n if (registration.customerIsRegime?.type === TaxType.TO_PAY) {\n return {\n type: CustomerVatType.VAT_TO_PAY,\n amount: payload.companyTax.toPay.total,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REFUND) {\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n } else if (registration.customerIsRegime?.type === TaxType.REPORTABLE) {\n return {\n type: CustomerVatType.VAT_REPORT,\n amount: registration.customerIsRegime?.amount,\n collectable: 0,\n deductible: 0,\n };\n }\n\n return { type: CustomerVatType.VAT_TO_PAY, amount: payload.companyTax.toPay.total, collectable: 0, deductible: 0 };\n }\n if ([CerfaType.CERFA_2573].includes(registration.idCerfaType)) {\n const payload = registration.payload?.cerfa2573 as Cerfa2573_2024;\n return {\n type: CustomerVatType.VAT_REFUND,\n amount: sumBy(payload?.refunds ?? [], (r) => r?.amount ?? 0),\n collectable: 0,\n deductible: 0,\n };\n }\n\n return {\n type: null,\n amount: null,\n collectable: 0,\n deductible: 0,\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.74
|
|
3
|
+
"version": "1.3.74",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { IRefund
|
|
2
|
+
import { IRefund } from '../../types';
|
|
3
3
|
|
|
4
4
|
export class Refund extends Resource {
|
|
5
5
|
public create(payload: IRefund): Promise<IRefund> {
|
|
@@ -8,20 +8,4 @@ export class Refund extends Resource {
|
|
|
8
8
|
public update(id: number, params: Partial<IRefund>): Promise<boolean> {
|
|
9
9
|
return this.axios.$patch(`/refunds/${id}`, { ...params });
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
public getAll(query: QueryRefundPaginated) {
|
|
13
|
-
return this.axios.$get('/refunds', { params: query });
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public getOneById(id: number) {
|
|
17
|
-
return this.axios.$get(`/refunds/${id}`);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public validate(id: number, params: Partial<IRefund>) {
|
|
21
|
-
return this.axios.$put(`/refunds/${id}`, { ...params });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public delete(id: number) {
|
|
25
|
-
return this.axios.$delete(`/refunds/${id}`);
|
|
26
|
-
}
|
|
27
11
|
}
|
|
@@ -29,10 +29,8 @@ import {
|
|
|
29
29
|
ReadSocietyUnpaidStats,
|
|
30
30
|
DataCustomersCsv,
|
|
31
31
|
ReadCurrentPrestations,
|
|
32
|
-
IComment,
|
|
33
32
|
} from '../../types';
|
|
34
33
|
import { CancelToken } from 'axios';
|
|
35
|
-
import { User } from './User';
|
|
36
34
|
|
|
37
35
|
export class Society extends Resource {
|
|
38
36
|
public get(params: QuerySociety): Promise<ISociety> {
|
|
@@ -105,7 +103,6 @@ export class Society extends Resource {
|
|
|
105
103
|
getAccountant(): Promise<IUser | null> {
|
|
106
104
|
return this.axios.$get('/society/accountant');
|
|
107
105
|
}
|
|
108
|
-
|
|
109
106
|
deleteUser(idSociety: number, idUser: number): Promise<true> {
|
|
110
107
|
return this.axios.$delete(`/society/${idSociety}/user/${idUser}`);
|
|
111
108
|
}
|
package/ts/api/resources/Vat.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
QueryPreviousVatDeclaration,
|
|
10
10
|
QueryVatEntry,
|
|
11
11
|
QueryVatMigrationEntry,
|
|
12
|
+
CreateVatNote,
|
|
12
13
|
ReadFormattedAccountingTransaction,
|
|
13
14
|
ReadRegistration,
|
|
14
15
|
ReadVatDeclarationUpdatedEntry,
|
|
@@ -33,8 +34,9 @@ export class Vat extends Resource {
|
|
|
33
34
|
idSociety: number,
|
|
34
35
|
payload: UpdateOrCreateVatRegistration,
|
|
35
36
|
details: CreateRegistrationDetail,
|
|
37
|
+
base64Note?: string | null,
|
|
36
38
|
): Promise<ReadRegistration> {
|
|
37
|
-
const result = await this.axios.$post(`/societies/${idSociety}/vat`, payload);
|
|
39
|
+
const result = await this.axios.$post(`/societies/${idSociety}/vat`, { ...payload, base64Note });
|
|
38
40
|
// @ts-ignore
|
|
39
41
|
const data = result as ReadRegistration;
|
|
40
42
|
await this.axios.$post(`/societies/${idSociety}/registrations/${data.id}/details`, details);
|
|
@@ -101,4 +103,8 @@ export class Vat extends Resource {
|
|
|
101
103
|
sendByMail(idCustomerVat: number, payload: CreateAndSendVatMail): Promise<ICustomerVat> {
|
|
102
104
|
return this.axios.$post(`/vat/advances/${idCustomerVat}/mails`, payload);
|
|
103
105
|
}
|
|
106
|
+
|
|
107
|
+
getNote(idSociety: number, payload: CreateVatNote): Promise<string> {
|
|
108
|
+
return this.axios.$post(`/societies/${idSociety}/vat/notes`, payload);
|
|
109
|
+
}
|
|
104
110
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IsNumber, IsObject } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils/decorators';
|
|
3
|
+
import { IRegistration } from '../../models/IRegistration';
|
|
4
|
+
|
|
5
|
+
export class CreateVatNote {
|
|
6
|
+
@ApiProperty()
|
|
7
|
+
@IsNumber()
|
|
8
|
+
totalTaxEcluded: number;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsObject()
|
|
12
|
+
registration: IRegistration;
|
|
13
|
+
}
|
|
@@ -4,26 +4,16 @@ import { IUser } from './IUser';
|
|
|
4
4
|
|
|
5
5
|
// refunds
|
|
6
6
|
export interface IRefund {
|
|
7
|
-
|
|
7
|
+
id?: number;
|
|
8
8
|
amount: number | null;
|
|
9
9
|
comment: string | null;
|
|
10
10
|
refundDate: Date | null;
|
|
11
|
-
refundAt?: Date | null;
|
|
12
11
|
processed: boolean;
|
|
13
|
-
|
|
14
12
|
isAmountChecked?: boolean;
|
|
15
|
-
|
|
16
13
|
idRefundMotif: number;
|
|
17
14
|
idSociety: number;
|
|
18
15
|
idUserDemand: number;
|
|
19
|
-
refundBy?: number | null;
|
|
20
16
|
idFile?: number | null; //non obligatoire désormais, utilisé avant pour rattacher le RIB
|
|
21
|
-
idUserAgreement?: number | null;
|
|
22
|
-
dateAgreement?: Date | null;
|
|
23
|
-
|
|
24
|
-
exceptionalAgreement?: boolean | null;
|
|
25
|
-
agreement?: number | null;
|
|
26
|
-
|
|
27
17
|
createdAt?: Date | null;
|
|
28
18
|
updatedAt?: Date | null;
|
|
29
19
|
|
|
@@ -31,6 +21,4 @@ export interface IRefund {
|
|
|
31
21
|
society?: ISociety;
|
|
32
22
|
file?: IFile;
|
|
33
23
|
userDemand?: IUser;
|
|
34
|
-
refundByUser?: IUser;
|
|
35
|
-
agreementUser?: IUser;
|
|
36
24
|
}
|
|
@@ -21,6 +21,7 @@ export interface IRegistration {
|
|
|
21
21
|
idDeposit: string | null;
|
|
22
22
|
idExercice: number;
|
|
23
23
|
idFile?: number | null;
|
|
24
|
+
idNoteFile?: number | null;
|
|
24
25
|
idCustomerIsRegime?: number | null;
|
|
25
26
|
idCustomerVat?: number | null;
|
|
26
27
|
idUser?: number | null;
|
|
@@ -36,6 +37,7 @@ export interface IRegistration {
|
|
|
36
37
|
user?: IUser | null;
|
|
37
38
|
society?: ISociety;
|
|
38
39
|
file?: IFile;
|
|
40
|
+
noteFile?: IFile | null;
|
|
39
41
|
certificates?: IRegistrationCertificate[];
|
|
40
42
|
customerVat?: ICustomerVat | null;
|
|
41
43
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -718,8 +718,10 @@ export * from './Interface/api/revision/RevisionObject';
|
|
|
718
718
|
export * from './Interface/api/revision/Revision';
|
|
719
719
|
export * from './Interface/api/revision/Create';
|
|
720
720
|
export * from './Interface/api/vatDeclaration/QueryVatDeclaration';
|
|
721
|
+
export * from './Interface/api/vatDeclaration/CreateVatDeclaration';
|
|
721
722
|
export * from './Interface/api/vatDeclaration/ReadVatVariousOperations';
|
|
722
723
|
export * from './Interface/api/vatDeclaration/ResultFormatToEntries';
|
|
724
|
+
export * from './Interface/api/vatDeclaration/ResultDataNote';
|
|
723
725
|
export * from './Interface/api/SocietyTransaction/Query';
|
|
724
726
|
export * from './Interface/api/SocietyTransaction/QuerySocietyTransactionCount';
|
|
725
727
|
export * from './Interface/api/SocietyTransaction/Read';
|
|
@@ -1165,4 +1167,3 @@ export * from './Interface/api/regulation/Read';
|
|
|
1165
1167
|
export * from './Interface/api/regulation/Create';
|
|
1166
1168
|
export * from './Interface/api/marketing/NewLeadSheet';
|
|
1167
1169
|
export * from './Interface/api/ai/AskQuestionCollaborator';
|
|
1168
|
-
export * from './Interface/api/refund/QueryRefundPaginated';
|
|
@@ -148,10 +148,19 @@ export function getTypeAndAmountFromRegistration(registration: IRegistration): {
|
|
|
148
148
|
collectable: number;
|
|
149
149
|
deductible: number;
|
|
150
150
|
amountBase?: number;
|
|
151
|
+
regulationAdd?: number;
|
|
152
|
+
regulationDeduct?: number;
|
|
153
|
+
reportFromPrevious?: number;
|
|
151
154
|
} {
|
|
152
155
|
if (registration.idCerfaType === CerfaType.CERFA_3310) {
|
|
153
156
|
const payload = registration.payload.cerfa3310 as AnyCerfa3310_Century;
|
|
154
|
-
const other = {
|
|
157
|
+
const other = {
|
|
158
|
+
collectable: payload.vat?.grossDue,
|
|
159
|
+
deductible: payload.vat?.deductible.total,
|
|
160
|
+
regulationAdd: payload.vat?.sumToAdd,
|
|
161
|
+
regulationDeduct: payload.vat?.deductible?.toImpute,
|
|
162
|
+
reportFromPrevious: payload.vat?.deductible?.report,
|
|
163
|
+
};
|
|
155
164
|
if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };
|
|
156
165
|
if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };
|
|
157
166
|
if (payload?.credit?.refundAsked > 0)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
2
|
-
import { Order } from '../BaseRequest';
|
|
3
|
-
export declare class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
|
|
4
|
-
search?: string;
|
|
5
|
-
year: number;
|
|
6
|
-
month?: number;
|
|
7
|
-
motif?: number;
|
|
8
|
-
startDate?: Date;
|
|
9
|
-
endDate?: Date;
|
|
10
|
-
orderBy?: string;
|
|
11
|
-
descending?: boolean;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=QueryRefundPaginated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryRefundPaginated.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,qBAAa,oBAAqB,SAAQ,qBAAsB,YAAW,KAAK;IAE9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,IAAI,EAAE,MAAM,CAAC;IAKb,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,IAAI,CAAC;IAIjB,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.QueryRefundPaginated = void 0;
|
|
13
|
-
const utils_1 = require("../../../../utils");
|
|
14
|
-
const BasePaginate_1 = require("../BasePaginate");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
class QueryRefundPaginated extends BasePaginate_1.RequiredQueryPaginate {
|
|
17
|
-
}
|
|
18
|
-
exports.QueryRefundPaginated = QueryRefundPaginated;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], QueryRefundPaginated.prototype, "search", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, utils_1.ApiProperty)(),
|
|
25
|
-
(0, class_validator_1.IsInt)(),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], QueryRefundPaginated.prototype, "year", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
30
|
-
(0, class_validator_1.IsInt)(),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
__metadata("design:type", Number)
|
|
33
|
-
], QueryRefundPaginated.prototype, "month", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
36
|
-
(0, class_validator_1.IsInt)(),
|
|
37
|
-
(0, class_validator_1.IsOptional)(),
|
|
38
|
-
__metadata("design:type", Number)
|
|
39
|
-
], QueryRefundPaginated.prototype, "motif", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
__metadata("design:type", Date)
|
|
44
|
-
], QueryRefundPaginated.prototype, "startDate", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
__metadata("design:type", Date)
|
|
49
|
-
], QueryRefundPaginated.prototype, "endDate", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], QueryRefundPaginated.prototype, "orderBy", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
56
|
-
(0, class_validator_1.IsBoolean)(),
|
|
57
|
-
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
__metadata("design:type", Boolean)
|
|
59
|
-
], QueryRefundPaginated.prototype, "descending", void 0);
|
|
60
|
-
//# sourceMappingURL=QueryRefundPaginated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryRefundPaginated.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAqE;AACrE,kDAAwD;AAExD,qDAAuE;AAEvE,MAAa,oBAAqB,SAAQ,oCAAqB;CAiC9D;AAjCD,oDAiCC;AA/BC;IADC,IAAA,2BAAmB,GAAE;;oDACN;AAIhB;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,uBAAK,GAAE;;kDACK;AAKb;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;mDACE;AAKf;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;mDACE;AAIf;IAFC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;8BACD,IAAI;uDAAC;AAIjB;IAFC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;8BACH,IAAI;qDAAC;AAGf;IADC,IAAA,2BAAmB,GAAE;;qDACL;AAKjB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;wDACQ","sourcesContent":["import { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { RequiredQueryPaginate } from '../BasePaginate';\nimport { Order } from '../BaseRequest';\nimport { IsBoolean, IsDate, IsInt, IsOptional } from 'class-validator';\n\nexport class QueryRefundPaginated extends RequiredQueryPaginate implements Order {\n @ApiPropertyOptional()\n search?: string;\n\n @ApiProperty()\n @IsInt()\n year: number;\n\n @ApiPropertyOptional()\n @IsInt()\n @IsOptional()\n month?: number;\n\n @ApiPropertyOptional()\n @IsInt()\n @IsOptional()\n motif?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n startDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n endDate?: Date;\n\n @ApiPropertyOptional()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @IsOptional()\n descending?: boolean;\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
2
|
-
import { Order } from '../BaseRequest';
|
|
3
|
-
export declare class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
|
|
4
|
-
search?: string;
|
|
5
|
-
year: number;
|
|
6
|
-
month?: number;
|
|
7
|
-
motif?: number;
|
|
8
|
-
startDate?: Date;
|
|
9
|
-
endDate?: Date;
|
|
10
|
-
orderBy?: string;
|
|
11
|
-
descending?: boolean;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=QueryRefundPaginated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryRefundPaginated.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,qBAAa,oBAAqB,SAAQ,qBAAsB,YAAW,KAAK;IAE9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,IAAI,EAAE,MAAM,CAAC;IAKb,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,IAAI,CAAC;IAIjB,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
11
|
-
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
12
|
-
import { IsBoolean, IsInt, IsOptional } from 'class-validator';
|
|
13
|
-
export class QueryRefundPaginated extends RequiredQueryPaginate {
|
|
14
|
-
search;
|
|
15
|
-
year;
|
|
16
|
-
month;
|
|
17
|
-
motif;
|
|
18
|
-
startDate;
|
|
19
|
-
endDate;
|
|
20
|
-
orderBy;
|
|
21
|
-
descending;
|
|
22
|
-
}
|
|
23
|
-
__decorate([
|
|
24
|
-
ApiPropertyOptional(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], QueryRefundPaginated.prototype, "search", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
ApiProperty(),
|
|
29
|
-
IsInt(),
|
|
30
|
-
__metadata("design:type", Number)
|
|
31
|
-
], QueryRefundPaginated.prototype, "year", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
ApiPropertyOptional(),
|
|
34
|
-
IsInt(),
|
|
35
|
-
IsOptional(),
|
|
36
|
-
__metadata("design:type", Number)
|
|
37
|
-
], QueryRefundPaginated.prototype, "month", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
ApiPropertyOptional(),
|
|
40
|
-
IsInt(),
|
|
41
|
-
IsOptional(),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], QueryRefundPaginated.prototype, "motif", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
ApiPropertyOptional(),
|
|
46
|
-
IsOptional(),
|
|
47
|
-
__metadata("design:type", Date)
|
|
48
|
-
], QueryRefundPaginated.prototype, "startDate", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
ApiPropertyOptional(),
|
|
51
|
-
IsOptional(),
|
|
52
|
-
__metadata("design:type", Date)
|
|
53
|
-
], QueryRefundPaginated.prototype, "endDate", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
ApiPropertyOptional(),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], QueryRefundPaginated.prototype, "orderBy", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
ApiPropertyOptional(),
|
|
60
|
-
IsBoolean(),
|
|
61
|
-
IsOptional(),
|
|
62
|
-
__metadata("design:type", Boolean)
|
|
63
|
-
], QueryRefundPaginated.prototype, "descending", void 0);
|
|
64
|
-
//# sourceMappingURL=QueryRefundPaginated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryRefundPaginated.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/refund/QueryRefundPaginated.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAU,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,OAAO,oBAAqB,SAAQ,qBAAqB;IAE7D,MAAM,CAAU;IAIhB,IAAI,CAAS;IAKb,KAAK,CAAU;IAKf,KAAK,CAAU;IAIf,SAAS,CAAQ;IAIjB,OAAO,CAAQ;IAGf,OAAO,CAAU;IAKjB,UAAU,CAAW;CACtB;AA/BC;IADC,mBAAmB,EAAE;;oDACN;AAIhB;IAFC,WAAW,EAAE;IACb,KAAK,EAAE;;kDACK;AAKb;IAHC,mBAAmB,EAAE;IACrB,KAAK,EAAE;IACP,UAAU,EAAE;;mDACE;AAKf;IAHC,mBAAmB,EAAE;IACrB,KAAK,EAAE;IACP,UAAU,EAAE;;mDACE;AAIf;IAFC,mBAAmB,EAAE;IACrB,UAAU,EAAE;8BACD,IAAI;uDAAC;AAIjB;IAFC,mBAAmB,EAAE;IACrB,UAAU,EAAE;8BACH,IAAI;qDAAC;AAGf;IADC,mBAAmB,EAAE;;qDACL;AAKjB;IAHC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,UAAU,EAAE;;wDACQ","sourcesContent":["import { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { RequiredQueryPaginate } from '../BasePaginate';\nimport { Order } from '../BaseRequest';\nimport { IsBoolean, IsDate, IsInt, IsOptional } from 'class-validator';\n\nexport class QueryRefundPaginated extends RequiredQueryPaginate implements Order {\n @ApiPropertyOptional()\n search?: string;\n\n @ApiProperty()\n @IsInt()\n year: number;\n\n @ApiPropertyOptional()\n @IsInt()\n @IsOptional()\n month?: number;\n\n @ApiPropertyOptional()\n @IsInt()\n @IsOptional()\n motif?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n startDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n endDate?: Date;\n\n @ApiPropertyOptional()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @IsOptional()\n descending?: boolean;\n}\n"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
|
-
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
3
|
-
import { Order } from '../BaseRequest';
|
|
4
|
-
import { IsBoolean, IsDate, IsInt, IsOptional } from 'class-validator';
|
|
5
|
-
|
|
6
|
-
export class QueryRefundPaginated extends RequiredQueryPaginate implements Order {
|
|
7
|
-
@ApiPropertyOptional()
|
|
8
|
-
search?: string;
|
|
9
|
-
|
|
10
|
-
@ApiProperty()
|
|
11
|
-
@IsInt()
|
|
12
|
-
year: number;
|
|
13
|
-
|
|
14
|
-
@ApiPropertyOptional()
|
|
15
|
-
@IsInt()
|
|
16
|
-
@IsOptional()
|
|
17
|
-
month?: number;
|
|
18
|
-
|
|
19
|
-
@ApiPropertyOptional()
|
|
20
|
-
@IsInt()
|
|
21
|
-
@IsOptional()
|
|
22
|
-
motif?: number;
|
|
23
|
-
|
|
24
|
-
@ApiPropertyOptional()
|
|
25
|
-
@IsOptional()
|
|
26
|
-
startDate?: Date;
|
|
27
|
-
|
|
28
|
-
@ApiPropertyOptional()
|
|
29
|
-
@IsOptional()
|
|
30
|
-
endDate?: Date;
|
|
31
|
-
|
|
32
|
-
@ApiPropertyOptional()
|
|
33
|
-
orderBy?: string;
|
|
34
|
-
|
|
35
|
-
@ApiPropertyOptional()
|
|
36
|
-
@IsBoolean()
|
|
37
|
-
@IsOptional()
|
|
38
|
-
descending?: boolean;
|
|
39
|
-
}
|