@silexpert/core 1.3.136-1 → 1.3.137
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/Payment.d.ts +3 -2
- package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Payment.js +3 -0
- package/dist/cjs/api/resources/Payment.js.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Params.d.ts +3 -0
- package/dist/cjs/types/Interface/api/payment/Params.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Params.js +9 -1
- package/dist/cjs/types/Interface/api/payment/Params.js.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Util.d.ts +0 -2
- package/dist/cjs/types/Interface/api/payment/Util.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Util.js.map +1 -1
- package/dist/cjs/types/Interface/models/IPrestation.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IPrestation.js.map +1 -1
- package/dist/cjs/utils/payment.js +54 -50
- package/dist/cjs/utils/payment.js.map +1 -1
- package/dist/cjs/utils/prestation.d.ts +1 -0
- package/dist/cjs/utils/prestation.d.ts.map +1 -1
- package/dist/cjs/utils/prestation.js +1 -0
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/cjs/utils/tests/payment.spec.js +33 -33
- package/dist/cjs/utils/tests/payment.spec.js.map +1 -1
- package/dist/mjs/api/resources/Payment.d.ts +3 -2
- package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Payment.js +3 -0
- package/dist/mjs/api/resources/Payment.js.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Params.d.ts +3 -0
- package/dist/mjs/types/Interface/api/payment/Params.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Params.js +8 -0
- package/dist/mjs/types/Interface/api/payment/Params.js.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Util.d.ts +0 -2
- package/dist/mjs/types/Interface/api/payment/Util.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Util.js.map +1 -1
- package/dist/mjs/types/Interface/models/IPrestation.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IPrestation.js.map +1 -1
- package/dist/mjs/utils/payment.js +52 -48
- package/dist/mjs/utils/payment.js.map +1 -1
- package/dist/mjs/utils/prestation.d.ts +1 -0
- package/dist/mjs/utils/prestation.d.ts.map +1 -1
- package/dist/mjs/utils/prestation.js +1 -0
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/dist/mjs/utils/tests/payment.spec.js +34 -34
- package/dist/mjs/utils/tests/payment.spec.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Payment.ts +6 -1
- package/ts/types/Interface/api/payment/Params.ts +5 -0
- package/ts/types/Interface/api/payment/Util.ts +2 -2
- package/ts/types/Interface/models/IPrestation.ts +1 -0
- package/ts/utils/payment.ts +49 -49
- package/ts/utils/prestation.ts +1 -0
- package/ts/utils/tests/payment.spec.ts +34 -34
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { AskProcessPaymentRecovery, BasePaginate, CreateNotifyCustomer, CreatePaymentRecovery, CreatePaymentsAutoBilling, IPayment, QueryMonthlyPayment, QueryPayment, QueryPaymentCsv, QueryPayments, QueryPaymentInvoice, QueryPaymentRecoveryPaginated, QueryPaymentRecoveryStatistic, QuerySocietyUnpaid, ReadPaid, ReadPaymentInvoice, ReadPaymentRecovery, ReadPaymentRecoveryClaim, ReadPaymentRecoveryStatistic, ReadStatPrestation, ReadStatsSocietyUnpaid, UpdatePayment, QueryStripeSubscriptionId, UpdatePaymentMethod } from '../../types';
|
|
2
|
+
import { AskProcessPaymentRecovery, BasePaginate, CreateNotifyCustomer, CreatePaymentRecovery, CreatePaymentsAutoBilling, IPayment, QueryMonthlyPayment, QueryPayment, QueryPaymentCsv, QueryPayments, QueryPaymentInvoice, QueryPaymentRecoveryPaginated, QueryPaymentRecoveryStatistic, QuerySocietyUnpaid, ReadPaid, ReadPaymentInvoice, ReadPaymentRecovery, ReadPaymentRecoveryClaim, ReadPaymentRecoveryStatistic, ReadStatPrestation, ReadStatsSocietyUnpaid, UpdatePayment, QueryStripeSubscriptionId, UpdatePaymentMethod, CreatePaymentsRebilling } from '../../types';
|
|
3
3
|
import { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery';
|
|
4
4
|
import Stripe from 'stripe';
|
|
5
5
|
export declare class Payment extends Resource {
|
|
@@ -31,7 +31,8 @@ export declare class Payment extends Resource {
|
|
|
31
31
|
assetPaymentStats: ReadStatPrestation;
|
|
32
32
|
}>;
|
|
33
33
|
getStatsSocietyUnpaid(payload: QuerySocietyUnpaid): Promise<ReadStatsSocietyUnpaid[]>;
|
|
34
|
-
generateForAutoBilling(payload: CreatePaymentsAutoBilling): Promise<
|
|
34
|
+
generateForAutoBilling(payload: CreatePaymentsAutoBilling): Promise<number>;
|
|
35
|
+
generateForRebilling(payload: CreatePaymentsRebilling): Promise<number>;
|
|
35
36
|
getAllInvoices(idExercice: number, query: QueryPaymentInvoice): Promise<ReadPaymentInvoice[]>;
|
|
36
37
|
createRecovery(idFile: number, payload: CreatePaymentRecovery): Promise<IPaymentRecovery>;
|
|
37
38
|
getRecovery(idPaymentRecovery: number): Promise<ReadPaymentRecoveryClaim>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payment.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/Payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,6BAA6B,EAC7B,6BAA6B,EAC7B,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,mBAAm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C,4BAA4B,CAAC;IAIxC,UAAU,CAAC,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIpG,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAItE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI7D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGvC"}
|
|
@@ -82,6 +82,9 @@ class Payment extends Resource_1.Resource {
|
|
|
82
82
|
generateForAutoBilling(payload) {
|
|
83
83
|
return this.axios.$post('payment/auto-billing', payload);
|
|
84
84
|
}
|
|
85
|
+
generateForRebilling(payload) {
|
|
86
|
+
return this.axios.$post('payment/rebilling', payload);
|
|
87
|
+
}
|
|
85
88
|
getAllInvoices(idExercice, query) {
|
|
86
89
|
return this.axios.$get(`/exercices/${idExercice}/invoices`, { params: query });
|
|
87
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../../ts/api/resources/Payment.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;
|
|
1
|
+
{"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../../ts/api/resources/Payment.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AA+BvC,MAAa,OAAQ,SAAQ,mBAAQ;IACnC,aAAa,CAAC,KAA0B;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC3C,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,aAAa;YAC3B,OAAO,EAAE;gBACP,MAAM,EAAE,iBAAiB;aAC1B;SACF,CAAC,CAAC;IACL,C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CAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,qBAAqB,CACnB,KAAoC,EACpC,MAAmB;QAEnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,UAAU,CAAC,iBAAyB,EAAE,OAAkC;QACtE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,sBAAsB,iBAAiB,UAAU,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,CAAC,KAAoB,EAAE,MAAmB;QAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,OAAsB;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AAhJD,0BAgJC","sourcesContent":["import { Resource } from '../Resource';\nimport {\n AskProcessPaymentRecovery,\n BasePaginate,\n CreateNotifyCustomer,\n CreatePaymentRecovery,\n CreatePaymentsAutoBilling,\n IPayment,\n QueryMonthlyPayment,\n QueryPayment,\n QueryPaymentCsv,\n QueryPayments,\n QueryPaymentInvoice,\n QueryPaymentRecoveryPaginated,\n QueryPaymentRecoveryStatistic,\n QuerySocietyUnpaid,\n ReadPaid,\n ReadPaymentInvoice,\n ReadPaymentRecovery,\n ReadPaymentRecoveryClaim,\n ReadPaymentRecoveryStatistic,\n ReadStatPrestation,\n ReadStatsSocietyUnpaid,\n UpdatePayment,\n QueryStripeSubscriptionId,\n UpdatePaymentMethod,\n CreatePaymentsRebilling,\n} from '../../types';\nimport { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery';\nimport Stripe from 'stripe';\n\nexport class Payment extends Resource {\n getMonthlyCsv(query: QueryMonthlyPayment): Promise<void> {\n return this.axios.$get('payment/monthlyCsv', {\n params: query,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n getInternalPaymentCsv(query: QueryPaymentCsv): Promise<void> {\n return this.axios.$get('payment/internal-payment/csv', {\n params: query,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n notifyCustomers(payload: CreateNotifyCustomer): Promise<void> {\n return this.axios.$post('payment/notify-customers', payload);\n }\n\n notifyCustomersInvoice(payload: CreateNotifyCustomer): Promise<void> {\n return this.axios.$post('payment/notify-customers-invoice', payload);\n }\n\n getPaid(payload: QueryPayment): Promise<ReadPaid> {\n return this.axios.$get('payment/paid', {\n params: payload,\n });\n }\n\n getUnpaid(payload: QueryPayment): Promise<IPayment & { unpaid: number }[]> {\n return this.axios.$get('payment/unpaid', {\n params: payload,\n });\n }\n\n /**\n * Return list of payments which could be collectables\n * @param signal\n * @returns\n */\n getAutoCollectables(signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('payments/auto-collectables', {\n signal,\n });\n }\n\n /**\n * Return list of payments which are collectables\n * @param signal\n * @returns\n */\n getCollectables(signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('payments/collectables', {\n signal,\n });\n }\n setAsCollectable(listIdPayment: number[]): Promise<IPayment[]> {\n return this.axios.$patch('payments', {\n listIdPayment,\n isCollectable: true,\n });\n }\n\n getAllPaymentMethods(params: QueryStripeSubscriptionId): Promise<string> {\n return this.axios.$get('/stripe/payments/methods', { params });\n }\n\n updatePaymentMethod(params: UpdatePaymentMethod): Promise<Stripe.PaymentMethod> {\n return this.axios.$put('/stripe/payments/methods', params);\n }\n\n getStatsPaidByPrestation(\n payload: QueryPayment,\n ): Promise<{ invoicePaymentStats: ReadStatPrestation; assetPaymentStats: ReadStatPrestation }> {\n return this.axios.$get('payment/paid-by-prestations', {\n params: payload,\n });\n }\n\n getStatsSocietyUnpaid(payload: QuerySocietyUnpaid): Promise<ReadStatsSocietyUnpaid[]> {\n return this.axios.$get('payment/societies-unpaid', {\n params: payload,\n });\n }\n\n generateForAutoBilling(payload: CreatePaymentsAutoBilling): Promise<number> {\n return this.axios.$post('payment/auto-billing', payload);\n }\n\n generateForRebilling(payload: CreatePaymentsRebilling): Promise<number> {\n return this.axios.$post('payment/rebilling', payload);\n }\n\n getAllInvoices(idExercice: number, query: QueryPaymentInvoice): Promise<ReadPaymentInvoice[]> {\n return this.axios.$get(`/exercices/${idExercice}/invoices`, { params: query });\n }\n\n createRecovery(idFile: number, payload: CreatePaymentRecovery): Promise<IPaymentRecovery> {\n return this.axios.$post(`/invoices/${idFile}/payments-recovery`, payload);\n }\n\n getRecovery(idPaymentRecovery: number): Promise<ReadPaymentRecoveryClaim> {\n return this.axios.$get(`/payments-recovery/${idPaymentRecovery}`);\n }\n\n getPaginatedRecovery(\n query: QueryPaymentRecoveryPaginated,\n signal: AbortSignal,\n ): Promise<BasePaginate<ReadPaymentRecovery>> {\n return this.axios.$get('/payments-recovery', { params: query, signal });\n }\n\n getRecoveryStatistics(\n query: QueryPaymentRecoveryStatistic,\n signal: AbortSignal,\n ): Promise<ReadPaymentRecoveryStatistic> {\n return this.axios.$get('/payments-recovery/statistics', { params: query, signal });\n }\n\n askProcess(idPaymentRecovery: number, payload: AskProcessPaymentRecovery): Promise<IPaymentRecovery> {\n return this.axios.$post(`/payments-recovery/${idPaymentRecovery}/contact`, payload);\n }\n\n getAll(query: QueryPayments, signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('/payments', { params: query, signal });\n }\n\n update(id: number, payload: UpdatePayment): Promise<IPayment> {\n return this.axios.$patch(`/payments/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/payments/${id}`);\n }\n\n forceDelete(id: number): Promise<true> {\n return this.axios.$delete(`/payments/force/${id}`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Params.ts"],"names":[],"mappings":"AAIA,qBAAa,yBAAyB;IAIpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,iBAAiB;IAG5B,aAAa,EAAE,MAAM,EAAE,CAAC;IAMxB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,aAAa;IAIxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,eAAe,CAAC,EAAE,MAAM,CAAC;IAKzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAMtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAMlB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,UAAU,CAAC,EAAE,OAAO,CAAC;IAMrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAM3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAM5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAK1B,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,aAAa,CAAC,EAAE,MAAM,CAAC;IAKvB,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Params.ts"],"names":[],"mappings":"AAIA,qBAAa,yBAAyB;IAIpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,qBAAa,uBAAuB;IAGlC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,iBAAiB;IAG5B,aAAa,EAAE,MAAM,EAAE,CAAC;IAMxB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,aAAa;IAIxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,eAAe,CAAC,EAAE,MAAM,CAAC;IAKzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAMtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAMlB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,UAAU,CAAC,EAAE,OAAO,CAAC;IAMrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAM3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAM5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAK1B,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,aAAa,CAAC,EAAE,MAAM,CAAC;IAKvB,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB"}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UpdatePayment = exports.UpdateCollectable = exports.CreatePaymentsAutoBilling = void 0;
|
|
12
|
+
exports.UpdatePayment = exports.UpdateCollectable = exports.CreatePaymentsRebilling = exports.CreatePaymentsAutoBilling = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const utils_1 = require("../../../../utils");
|
|
15
15
|
const boolean_transform_1 = require("../../../../utils/transforms/boolean.transform");
|
|
@@ -22,6 +22,14 @@ __decorate([
|
|
|
22
22
|
(0, class_validator_1.IsInt)(),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], CreatePaymentsAutoBilling.prototype, "idSociety", void 0);
|
|
25
|
+
class CreatePaymentsRebilling {
|
|
26
|
+
}
|
|
27
|
+
exports.CreatePaymentsRebilling = CreatePaymentsRebilling;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, utils_1.ApiProperty)(),
|
|
30
|
+
(0, class_validator_1.IsInt)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], CreatePaymentsRebilling.prototype, "idSociety", void 0);
|
|
25
33
|
class UpdateCollectable {
|
|
26
34
|
}
|
|
27
35
|
exports.UpdateCollectable = UpdateCollectable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Params.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Params.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2F;AAC3F,6CAAqE;AACrE,sFAA2E;AAE3E,MAAa,yBAAyB;CAKrC;AALD,8DAKC;AADC;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;4DACW;
|
|
1
|
+
{"version":3,"file":"Params.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Params.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2F;AAC3F,6CAAqE;AACrE,sFAA2E;AAE3E,MAAa,yBAAyB;CAKrC;AALD,8DAKC;AADC;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;4DACW;AAErB,MAAa,uBAAuB;CAInC;AAJD,0DAIC;AADC;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,uBAAK,GAAE;;0DACU;AAGpB,MAAa,iBAAiB;CAU7B;AAVD,8CAUC;AAPC;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;wDACE;AAMxB;IAJC,IAAA,2BAAmB,GAAE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AAA,6BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;sDACc;AAK1B;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8CACM;AAKjB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACY;AAKvB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;8BACK,IAAI;kDAAC","sourcesContent":["import { IsBoolean, IsDate, IsInt, IsNumber, IsOptional, IsString } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\n\nexport class CreatePaymentsAutoBilling {\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idSociety?: number;\n}\nexport class CreatePaymentsRebilling {\n @ApiProperty()\n @IsInt()\n idSociety: number;\n}\n\nexport class UpdateCollectable {\n @ApiProperty()\n @IsInt({ each: true })\n listIdPayment: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCollectable: boolean;\n}\n\nexport class UpdatePayment {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n amount?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n amountPayed?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idExercice?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idPaymentMethod?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idPrestation?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @ToBoolean()\n @IsBoolean()\n isAsset?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @ToBoolean()\n @IsBoolean()\n isFree?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @ToBoolean()\n @IsBoolean()\n isOverpaid?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @ToBoolean()\n @IsBoolean()\n isHiddenCustomer?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @ToBoolean()\n @IsBoolean()\n noInternalInvoice?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @ToBoolean()\n @IsBoolean()\n isDebtSpreading?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n internComment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n datePayment?: Date;\n}\n"]}
|
|
@@ -9,8 +9,6 @@ export interface ParamsForPaymentsAuto {
|
|
|
9
9
|
idTypeBrand: number;
|
|
10
10
|
firstExerciceNonExpresssEndDate: Date;
|
|
11
11
|
idPrestation: number;
|
|
12
|
-
idLegalForm: number;
|
|
13
|
-
isWithApplicationFees: boolean;
|
|
14
12
|
idVat: number;
|
|
15
13
|
prestationList: IPrestationList;
|
|
16
14
|
yearlyAmountNonExpress: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,gCAAgC;IAC/C,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B,EAAE,IAAI,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,gCAAgC;IAC/C,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B,EAAE,IAAI,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IAGrB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,eAAe,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0BAA0B,EAAE,MAAM,CAAC;IACnC,oCAAoC,EAAE,gCAAgC,EAAE,CAAC;IACzE,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Util.ts"],"names":[],"mappings":"","sourcesContent":["import { IPrestationList, IRegulation } from '../../..';\n\nexport interface PartialExercicePrestationExpress {\n startDate: Date;\n endDate: Date;\n countExpressMonthlyPayment: number | null; // if null, non express | if not null, express\n totalAmount: number;\n}\nexport interface ParamsForPaymentsAuto {\n idTypeBrand: number;\n firstExerciceNonExpresssEndDate: Date;\n idPrestation: number;\n idLegalForm: number
|
|
1
|
+
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Util.ts"],"names":[],"mappings":"","sourcesContent":["import { IPrestationList, IRegulation } from '../../..';\n\nexport interface PartialExercicePrestationExpress {\n startDate: Date;\n endDate: Date;\n countExpressMonthlyPayment: number | null; // if null, non express | if not null, express\n totalAmount: number;\n}\nexport interface ParamsForPaymentsAuto {\n idTypeBrand: number;\n firstExerciceNonExpresssEndDate: Date;\n idPrestation: number;\n // idLegalForm: number; // Application fees are not charged anymore\n // isWithApplicationFees: boolean;\n idVat: number;\n prestationList: IPrestationList;\n yearlyAmountNonExpress: number;\n nextYearlyAmountNonExpress: number;\n listPartialExercicePrestationExpress: PartialExercicePrestationExpress[];\n listRegulations: IRegulation[];\n recoveryDate?: Date;\n}\n\nexport interface PaymentAuto {\n amount: number;\n isPaid?: boolean;\n datePayment: Date;\n idPrestation: number;\n idPaymentMethod: number;\n closingDate: Date;\n comment?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPrestation.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,GAAG,IAAI,CAA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C,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACzD,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,eAAe,CAAC,EAAE,gBAAgB,CAAC;IACnC,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPrestation.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IExercice } from './IExercice';\nimport { IPayment } from './IPayment';\nimport { IPrestationList } from './IPrestationList';\nimport { IPrestationComplementary } from './IPrestationComplementary';\nimport { ISociety } from './ISociety';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { ICustomerSignature } from './ICustomerSignature';\nimport { ITerminationList } from './ITerminationList';\nimport { IUser } from '../..';\n\n// prestations\nexport interface IPrestation {\n id?: number;\n numPrestation: string | null;\n statePrevi: number | null;\n archive: boolean;\n withStatuteDrafted: boolean | null;\n withCaptainContrat: boolean | null;\n withStatutesApportNature: boolean | null;\n withStatutesAutorisationTutelle: boolean | null;\n withStatutesFileAccre: boolean | null;\n paid: boolean | null;\n signed: boolean | null;\n toAdministratif: number | null;\n goToAdministratif: Date | null;\n administratifStatus: number;\n toConstitution: number;\n dateValidPrestation: Date | null;\n goToOnboarding: Date | null;\n dateLeavingOnboarding?: Date | null;\n goToClient: Date | null;\n goToFacturation?: Date | null;\n dateLeavingFacturation?: Date | null;\n scoring: number | null;\n isWithApplicationFees?: boolean;\n state: boolean;\n commentPdf: string | null;\n token: string | null;\n size: number | null;\n inProgress: number | null;\n idSociety: number;\n idPrestationList: number;\n idPrestationComplementary: number | null;\n gestionJuridique: boolean;\n idPrestationSocial: number | null;\n idPrestationJuridique: number | null;\n idPrestationCreation: number | null;\n idPrestationDeclarationIR: number | null;\n idPrestationControleFiscal: number | null;\n idOnBoarder: number | null;\n idStateAppointment: number | null;\n totalAmount?: number;\n discountAmount?: number;\n debitType?: string;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n exercices?: IExercice[];\n prestationsPayments?: IPayment[];\n prestationsList?: IPrestationList;\n prestationsComplementary?: IPrestationComplementary;\n prestationJuridique?: IPrestation;\n prestationSocial?: IPrestation;\n prestationCreation?: IPrestation;\n prestationControleFiscal?: IPrestation;\n societiesPrestations?: ISociety;\n prestationsDetailsBeforeExercice?: IExercicePrestation[];\n customersSignatures?: ICustomerSignature[];\n terminationList?: ITerminationList;\n onBoarder?: IUser;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IPrestation.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IExercice } from './IExercice';\nimport { IPayment } from './IPayment';\nimport { IPrestationList } from './IPrestationList';\nimport { IPrestationComplementary } from './IPrestationComplementary';\nimport { ISociety } from './ISociety';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { ICustomerSignature } from './ICustomerSignature';\nimport { ITerminationList } from './ITerminationList';\nimport { IUser } from '../..';\n\n// prestations\nexport interface IPrestation {\n id?: number;\n numPrestation: string | null;\n statePrevi: number | null;\n archive: boolean;\n withStatuteDrafted: boolean | null;\n withCaptainContrat: boolean | null;\n withStatutesApportNature: boolean | null;\n withStatutesAutorisationTutelle: boolean | null;\n withStatutesFileAccre: boolean | null;\n paid: boolean | null;\n signed: boolean | null;\n toAdministratif: number | null;\n goToAdministratif: Date | null;\n administratifStatus: number;\n toConstitution: number;\n dateValidPrestation: Date | null;\n goToOnboarding: Date | null;\n dateLeavingOnboarding?: Date | null;\n goToClient: Date | null;\n goToFacturation?: Date | null;\n dateLeavingFacturation?: Date | null;\n scoring: number | null;\n // @deprecated Application fees are not charged anymore\n isWithApplicationFees?: boolean;\n state: boolean;\n commentPdf: string | null;\n token: string | null;\n size: number | null;\n inProgress: number | null;\n idSociety: number;\n idPrestationList: number;\n idPrestationComplementary: number | null;\n gestionJuridique: boolean;\n idPrestationSocial: number | null;\n idPrestationJuridique: number | null;\n idPrestationCreation: number | null;\n idPrestationDeclarationIR: number | null;\n idPrestationControleFiscal: number | null;\n idOnBoarder: number | null;\n idStateAppointment: number | null;\n totalAmount?: number;\n discountAmount?: number;\n debitType?: string;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n exercices?: IExercice[];\n prestationsPayments?: IPayment[];\n prestationsList?: IPrestationList;\n prestationsComplementary?: IPrestationComplementary;\n prestationJuridique?: IPrestation;\n prestationSocial?: IPrestation;\n prestationCreation?: IPrestation;\n prestationControleFiscal?: IPrestation;\n societiesPrestations?: ISociety;\n prestationsDetailsBeforeExercice?: IExercicePrestation[];\n customersSignatures?: ICustomerSignature[];\n terminationList?: ITerminationList;\n onBoarder?: IUser;\n}\n"]}
|
|
@@ -45,21 +45,21 @@ const groupPaymentsByServiceType = (payments, types = [
|
|
|
45
45
|
return societyPayment;
|
|
46
46
|
};
|
|
47
47
|
exports.groupPaymentsByServiceType = groupPaymentsByServiceType;
|
|
48
|
-
const calculateFees = (amount, paymentDate) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
48
|
+
// const calculateFees = (amount: number, paymentDate: Date): number => {
|
|
49
|
+
// const yearlyPriceIncreasing = 1.0275;
|
|
50
|
+
// // Commenté car en fin d'année, pour appliquer le taux d'inflation annuel,
|
|
51
|
+
// // un script enlève les 2,75€ appliqués pour appliquer le bon taux
|
|
52
|
+
// // const oneYearLessIfIn3LastMonthsOfYear = dayjs(goToClient).month() >= 9 ? 1 : 0;
|
|
53
|
+
// if (dayjs(paymentDate).year() - dayjs().year() > 0) {
|
|
54
|
+
// const nbYearsMore = dayjs(paymentDate).year() - dayjs().year(); /* - oneYearLessIfIn3LastMonthsOfYear */
|
|
55
|
+
// // on applique X fois l'augmentation
|
|
56
|
+
// // ex. : si on lance l'appel en 2024, et qu'on génére un paiement pour 2026, on applique 2 fois l'augmentation
|
|
57
|
+
// // soit amount * yearlyPriceIncreasing * yearlyPriceIncreasing
|
|
58
|
+
// // soit amount * yearlyPriceIncreasing ^ nbYearsMore
|
|
59
|
+
// amount = amount * Math.pow(yearlyPriceIncreasing, nbYearsMore);
|
|
60
|
+
// }
|
|
61
|
+
// return amount;
|
|
62
|
+
// };
|
|
63
63
|
/**
|
|
64
64
|
// * @param {number} firstPaymentAmount - amount of the first payment (first regulation of the customer)
|
|
65
65
|
* @param {Date} firstExerciceNonExpresssEndDate - end date of the first exercice non express
|
|
@@ -76,8 +76,12 @@ const calculateFees = (amount, paymentDate) => {
|
|
|
76
76
|
* @returns { IPayment[] } list of payment to create for billing auto, after each presta go to onBoarding
|
|
77
77
|
*/
|
|
78
78
|
const calculatePaymentsAuto = (params) => {
|
|
79
|
-
var _a, _b, _c, _d
|
|
80
|
-
const { idTypeBrand,
|
|
79
|
+
var _a, _b, _c, _d;
|
|
80
|
+
const { idTypeBrand,
|
|
81
|
+
// isWithApplicationFees,
|
|
82
|
+
firstExerciceNonExpresssEndDate, idPrestation,
|
|
83
|
+
// idLegalForm,
|
|
84
|
+
prestationList, idVat, yearlyAmountNonExpress, nextYearlyAmountNonExpress, listPartialExercicePrestationExpress, listRegulations, recoveryDate, } = params;
|
|
81
85
|
if (!yearlyAmountNonExpress)
|
|
82
86
|
throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');
|
|
83
87
|
// Si on est dans les 3 derniers jours du mois actuel,
|
|
@@ -99,18 +103,19 @@ const calculatePaymentsAuto = (params) => {
|
|
|
99
103
|
const priceGrid = (0, prestation_1.getPriceGrid)(idTypeBrand, prestationList.id);
|
|
100
104
|
if (!priceGrid)
|
|
101
105
|
throw new Error('Impossible de trouver la grille tarifaire correspondante');
|
|
102
|
-
const { applicationCost, priceWithTaxesIncluded } = priceGrid;
|
|
103
|
-
const applicationCostTotalTTC =
|
|
104
|
-
|
|
106
|
+
const { /* applicationCost, */ priceWithTaxesIncluded } = priceGrid;
|
|
107
|
+
// const applicationCostTotalTTC =
|
|
108
|
+
// (priceWithTaxesIncluded ? applicationCost : getTaxesIncludedAmount(applicationCost, idVat)) * 12;
|
|
109
|
+
// const applicationFeesAmountTTC = getApplicationFeesAmount(idLegalForm, idVat);
|
|
105
110
|
if ((prestationList === null || prestationList === void 0 ? void 0 : prestationList.isCatalog) || !(prestationList === null || prestationList === void 0 ? void 0 : prestationList.isComptable))
|
|
106
111
|
throw new Error('Ce type de prestation ne correspond pas aux conditions attendues.');
|
|
107
112
|
if (listPartialExercicePrestationExpress.length &&
|
|
108
113
|
(listPartialExercicePrestationExpress === null || listPartialExercicePrestationExpress === void 0 ? void 0 : listPartialExercicePrestationExpress.some((ep) => !(ep === null || ep === void 0 ? void 0 : ep.startDate))))
|
|
109
114
|
throw new Error('Start date of some exercice are missing');
|
|
110
|
-
let yearlyAmountNonExpressClone = yearlyAmountNonExpress;
|
|
111
|
-
if (isWithApplicationFees) {
|
|
112
|
-
|
|
113
|
-
}
|
|
115
|
+
// let yearlyAmountNonExpressClone = yearlyAmountNonExpress;
|
|
116
|
+
// if (isWithApplicationFees) {
|
|
117
|
+
// yearlyAmountNonExpressClone -= getApplicationFeesAmount(idLegalForm); //HT
|
|
118
|
+
// }
|
|
114
119
|
const nbExoExpress = listPartialExercicePrestationExpress.length;
|
|
115
120
|
const listPayments = [];
|
|
116
121
|
// on récupère le/les premiers réglements effectués, non alloués
|
|
@@ -144,20 +149,20 @@ const calculatePaymentsAuto = (params) => {
|
|
|
144
149
|
return dayjs(aStartDate).diff(bStartDate);
|
|
145
150
|
});
|
|
146
151
|
// Si les frais de dossiers sont facturés, on ajoute un paiement sur le mois en cours
|
|
147
|
-
if (isWithApplicationFees) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
152
|
+
// if (isWithApplicationFees) {
|
|
153
|
+
// listPayments.push({
|
|
154
|
+
// amount: applicationFeesAmountTTC, //TTC
|
|
155
|
+
// isPaid: true,
|
|
156
|
+
// datePayment: dayjs().toDate(),
|
|
157
|
+
// idPrestation,
|
|
158
|
+
// idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,
|
|
159
|
+
// closingDate: listPartialExercicePrestationExpress?.length
|
|
160
|
+
// ? listPartialExercicePrestationExpress[0].endDate
|
|
161
|
+
// : firstExerciceNonExpresssEndDate,
|
|
162
|
+
// comment: 'Frais de dossier',
|
|
163
|
+
// });
|
|
164
|
+
// remainingAmount += applicationFeesAmountTTC;
|
|
165
|
+
// }
|
|
161
166
|
// =========================
|
|
162
167
|
// EXPRESS
|
|
163
168
|
// =========================
|
|
@@ -245,7 +250,7 @@ const calculatePaymentsAuto = (params) => {
|
|
|
245
250
|
paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
|
|
246
251
|
continue;
|
|
247
252
|
}
|
|
248
|
-
const exoAmount = isFirstNonExpress ?
|
|
253
|
+
const exoAmount = isFirstNonExpress ? yearlyAmountNonExpress : nextYearlyAmountNonExpress;
|
|
249
254
|
const remainingBeforeThisExo = remainingAmount;
|
|
250
255
|
remainingAmount += priceWithTaxesIncluded ? exoAmount : (0, types_1.getTaxesIncludedAmount)(exoAmount, idVat);
|
|
251
256
|
// Si le premier règlement couvre le coût de cet exercicePrestation,
|
|
@@ -256,7 +261,7 @@ const calculatePaymentsAuto = (params) => {
|
|
|
256
261
|
isPaid: true,
|
|
257
262
|
datePayment: dayjs().toDate(),
|
|
258
263
|
idPrestation,
|
|
259
|
-
idPaymentMethod: (
|
|
264
|
+
idPaymentMethod: (_b = (_a = listRegulations[0]) === null || _a === void 0 ? void 0 : _a.idPaymentMethod) !== null && _b !== void 0 ? _b : types_1.PaymentMethod.DIRECT_DEBIT.id,
|
|
260
265
|
closingDate: exerciceEndDate,
|
|
261
266
|
});
|
|
262
267
|
exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();
|
|
@@ -269,21 +274,20 @@ const calculatePaymentsAuto = (params) => {
|
|
|
269
274
|
isPaid: true,
|
|
270
275
|
datePayment: dayjs().toDate(),
|
|
271
276
|
idPrestation,
|
|
272
|
-
idPaymentMethod: (
|
|
277
|
+
idPaymentMethod: (_d = (_c = listRegulations[0]) === null || _c === void 0 ? void 0 : _c.idPaymentMethod) !== null && _d !== void 0 ? _d : types_1.PaymentMethod.DIRECT_DEBIT.id,
|
|
273
278
|
closingDate: exerciceEndDate,
|
|
274
279
|
});
|
|
275
280
|
}
|
|
276
281
|
let remainingAmountByExercicePrestation = remainingAmount;
|
|
277
282
|
// - frais d'application dès les second exo non express
|
|
278
|
-
if (!isFirstNonExpress)
|
|
279
|
-
remainingAmountByExercicePrestation += applicationCostTotalTTC;
|
|
283
|
+
// if (!isFirstNonExpress) remainingAmountByExercicePrestation += applicationCostTotalTTC;
|
|
280
284
|
const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC
|
|
281
285
|
if (monthlyAmount > 0) {
|
|
282
286
|
for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {
|
|
283
|
-
|
|
287
|
+
const amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;
|
|
284
288
|
// Si besoin, on applique les frais nécessaires :
|
|
285
289
|
// - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)
|
|
286
|
-
amount = calculateFees(amount, paymentDate);
|
|
290
|
+
// amount = calculateFees(amount, paymentDate);
|
|
287
291
|
listPayments.push({
|
|
288
292
|
amount: Math.round(100 * amount) / 100,
|
|
289
293
|
datePayment: paymentDate,
|
|
@@ -310,25 +314,25 @@ const calculatePaymentsAuto = (params) => {
|
|
|
310
314
|
remainingAmount += priceWithTaxesIncluded
|
|
311
315
|
? nextYearlyAmountNonExpress
|
|
312
316
|
: (0, types_1.getTaxesIncludedAmount)(nextYearlyAmountNonExpress, idVat);
|
|
313
|
-
|
|
317
|
+
const remainingAmountByExercicePrestation = remainingAmount;
|
|
314
318
|
//On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice
|
|
315
319
|
let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
|
|
316
320
|
if (countMonthsBeforeExerciceEnd < 3)
|
|
317
321
|
countMonthsBeforeExerciceEnd = 3;
|
|
318
322
|
// - frais d'application dès les second exo non express
|
|
319
|
-
remainingAmountByExercicePrestation += applicationCostTotalTTC;
|
|
323
|
+
// remainingAmountByExercicePrestation += applicationCostTotalTTC;
|
|
320
324
|
const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;
|
|
321
325
|
// Si aucun paiement généré, on stoppe là
|
|
322
326
|
if (!listPayments.length)
|
|
323
327
|
return [];
|
|
324
328
|
while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11) {
|
|
325
|
-
|
|
329
|
+
// const amount = monthlyAmount;
|
|
326
330
|
// Si besoin, on applique les frais nécessaires :
|
|
327
331
|
// - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)
|
|
328
332
|
// - frais d'application dès les second exo non express
|
|
329
|
-
amount = calculateFees(amount, paymentDate);
|
|
333
|
+
// amount = calculateFees(amount, paymentDate);
|
|
330
334
|
listPayments.push({
|
|
331
|
-
amount: Math.round(100 *
|
|
335
|
+
amount: Math.round(100 * monthlyAmount) / 100,
|
|
332
336
|
datePayment: paymentDate,
|
|
333
337
|
idPrestation,
|
|
334
338
|
idPaymentMethod: types_1.PaymentMethod.DIRECT_DEBIT.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.js","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CAAC;IAE/D,MAAM,aAAa,GAAG,mCAAmC,GAAG,4BAA4B,CAAC;IAEzF,yCAAyC;IACzC,IAAI,CAAC,YAAY,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEpC,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;QACjE,IAAI,MAAM,GAAG,aAAa,CAAC;QAE3B,iDAAiD;QACjD,yGAAyG;QACzG,uDAAuD;QACvD,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAE5C,YAAY,CAAC,IAAI,CAAC;YAChB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG;YACtC,WAAW,EAAE,WAAW;YACxB,YAAY;YACZ,eAAe,EAAE,qBAAa,CAAC,YAAY,CAAC,EAAE;YAC9C,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;QACH,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7E,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEmC,sDAAqB","sourcesContent":["'use strict';\n\nimport {\n IPayment,\n IRegulation,\n ParamsForPaymentsAuto,\n PaymentMethod,\n PaymentAuto,\n getTaxesIncludedAmount,\n} from '../types';\nimport * as dayjs from 'dayjs';\nimport { PartialExercicePrestationExpress } from '../types/Interface/api/payment/Util';\nimport { getApplicationFeesAmount, getPriceGrid } from './prestation';\n\nexport interface PaymentsWithList extends IPayment {\n type?: 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther';\n listPayments: IPayment[];\n isYearly?: boolean;\n}\n\n/**\n * A partir d'une liste de payment (avec include jusqu'à prestationList,\n * avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')\n * permet de récupérer uniquement le premier paiement de chaque type\n * et les autres payments dans listPayments\n * avec possibilité de filtrer avec le tableau de filtres\n * @param payments\n * @param types\n * @returns\n */\nconst groupPaymentsByServiceType = (\n payments: IPayment[],\n types: ('isComptable' | 'isJuridique' | 'isSocial' | 'isOther')[] = [\n 'isComptable',\n 'isJuridique',\n 'isSocial',\n 'isOther',\n ],\n): PaymentsWithList[] => {\n const prestaComptable = payments.filter((el) => el?.paymentsPrestations?.prestationsList?.isComptable ?? false);\n const prestaSocial = payments.filter(\n (el) =>\n !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isSocial,\n );\n const prestaJuridique = payments.filter(\n (el) =>\n !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isJuridique,\n );\n const prestaOther = payments.filter(\n (el) =>\n !el?.paymentsPrestations?.prestationsList?.isComptable &&\n !el?.paymentsPrestations?.prestationsList?.isJuridique &&\n !el?.paymentsPrestations?.prestationsList?.isSocial,\n );\n\n const societyPayment: PaymentsWithList[] = [];\n if (prestaComptable.length && types.includes('isComptable')) {\n societyPayment.push({\n ...prestaComptable[0], // Données de base\n type: 'isComptable',\n listPayments: prestaComptable,\n });\n }\n if (prestaSocial.length && types.includes('isSocial')) {\n societyPayment.push({\n ...prestaSocial[0], // Données de base\n type: 'isSocial',\n listPayments: prestaSocial,\n });\n }\n if (prestaJuridique.length && types.includes('isJuridique')) {\n societyPayment.push({\n ...prestaJuridique[0], // Données de base\n type: 'isJuridique',\n listPayments: prestaJuridique,\n });\n }\n if (prestaOther.length && types.includes('isOther')) {\n societyPayment.push({\n ...prestaOther[0], // Données de base\n type: 'isOther',\n listPayments: prestaOther,\n });\n }\n return societyPayment;\n};\n\nconst calculateFees = (amount: number, paymentDate: Date): number => {\n const yearlyPriceIncreasing = 1.0275;\n\n // Commenté car en fin d'année, pour appliquer le taux d'inflation annuel,\n // un script enlève les 2,75€ appliqués pour appliquer le bon taux\n // const oneYearLessIfIn3LastMonthsOfYear = dayjs(goToClient).month() >= 9 ? 1 : 0;\n\n if (dayjs(paymentDate).year() - dayjs().year() > 0) {\n const nbYearsMore = dayjs(paymentDate).year() - dayjs().year(); /* - oneYearLessIfIn3LastMonthsOfYear */\n // on applique X fois l'augmentation\n // ex. : si on lance l'appel en 2024, et qu'on génére un paiement pour 2026, on applique 2 fois l'augmentation\n // soit amount * yearlyPriceIncreasing * yearlyPriceIncreasing\n // soit amount * yearlyPriceIncreasing ^ nbYearsMore\n amount = amount * Math.pow(yearlyPriceIncreasing, nbYearsMore);\n }\n return amount;\n};\n\n/**\n// * @param {number} firstPaymentAmount - amount of the first payment (first regulation of the customer)\n * @param {Date} firstExerciceNonExpresssEndDate - end date of the first exercice non express\n * @param {number} idPrestation - prestation id\n * @param {number} idLegalForm - legal form id of the society\n * @param {boolean} isWithApplicationFees - if the prestation has application fees to paid\n * @param {IPrestationList} prestationList - type of prestation (hidden: 0, isCatalog: 1, isComptable: 1)\n * @param {number} idVat - vat id of society linked\n * @param {number} yearlyAmountNonExpress - yearly amount of non express prestation (HT)\n * @param {number} nextYearlyAmountNonExpress - yearly amount of non express prestation for next years (HT)\n * @param {PartialExercicePrestationExpress[]} listPartialExercicePrestationExpress - list of exercicePrestation linked to idPrestation -> used to get express\n * @param {IRegulation[]} listRegulations - list of regulations linked to idPrestation (TTC)\n * @param {Date} recoveryDate - date of recovery of the society\n * @returns { IPayment[] } list of payment to create for billing auto, after each presta go to onBoarding\n */\nconst calculatePaymentsAuto = (params: ParamsForPaymentsAuto): PaymentAuto[] => {\n const {\n idTypeBrand,\n isWithApplicationFees,\n firstExerciceNonExpresssEndDate,\n idPrestation,\n idLegalForm,\n prestationList,\n idVat,\n yearlyAmountNonExpress,\n nextYearlyAmountNonExpress,\n listPartialExercicePrestationExpress,\n listRegulations,\n recoveryDate,\n } = params;\n\n if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');\n\n // Si on est dans les 3 derniers jours du mois actuel,\n // on ne le compte pas et on facture à partir du début de mois suivant\n let initializedPaymentDate =\n dayjs().endOf('month').diff(dayjs(), 'day') < 3 /* || dayjs().date() >= 14 */\n ? dayjs().add(2, 'month').startOf('month').toDate()\n : dayjs().add(1, 'month').startOf('month').toDate();\n\n //Si date de reprise, alors on initialise à cette date\n if (recoveryDate && dayjs(recoveryDate).isAfter(dayjs(), 'month')) {\n initializedPaymentDate = dayjs(recoveryDate).startOf('month').toDate();\n\n //Si jour de la date de reprise >= 14, alors on débute la facturation 1 mois plus tard\n if (dayjs(initializedPaymentDate).date() >= 14)\n initializedPaymentDate = dayjs(initializedPaymentDate).add(1, 'month').startOf('month').toDate();\n }\n\n // On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC\n // et pour connaitre le montant du coût de l'app\n if (!prestationList.id) throw new Error('idPrestationList manquant');\n const priceGrid = getPriceGrid(idTypeBrand, prestationList.id);\n if (!priceGrid) throw new Error('Impossible de trouver la grille tarifaire correspondante');\n const { applicationCost, priceWithTaxesIncluded } = priceGrid;\n const applicationCostTotalTTC =\n (priceWithTaxesIncluded ? applicationCost : getTaxesIncludedAmount(applicationCost, idVat)) * 12;\n const applicationFeesAmountTTC = getApplicationFeesAmount(idLegalForm, idVat);\n\n if (prestationList?.isCatalog || !prestationList?.isComptable)\n throw new Error('Ce type de prestation ne correspond pas aux conditions attendues.');\n if (\n listPartialExercicePrestationExpress.length &&\n listPartialExercicePrestationExpress?.some((ep: PartialExercicePrestationExpress) => !ep?.startDate)\n )\n throw new Error('Start date of some exercice are missing');\n\n let yearlyAmountNonExpressClone = yearlyAmountNonExpress;\n if (isWithApplicationFees) {\n yearlyAmountNonExpressClone -= getApplicationFeesAmount(idLegalForm); //HT\n }\n\n const nbExoExpress = listPartialExercicePrestationExpress.length;\n const listPayments: PaymentAuto[] = [];\n\n // on récupère le/les premiers réglements effectués, non alloués\n // const isApplicationFeesAlreadyPaid = false;\n const sumRegulations = listRegulations.reduce((acc: number, r: IRegulation) => {\n //Si la regulation est rattachée à un paymentExpectation, on récupère le détail\n // et on ne prend que les frais de dossier (applicationFee) + le montant de la compta (accountingFee)\n\n // Commenté temporairement :\n // Pour l'instant, on ne prend plus en compte les paymentExpectation :\n // On part du principe que si isWithApplicationFees = true, alors les regulations contiennent les frais de dossier\n // sinon, ils sont offerts et n'apparaissent pas\n /* if (r.paymentsExpectation?.payload) {\n const payload = JSON.parse(r.paymentsExpectation?.payload);\n if (+payload?.applicationFee > 0) {\n isApplicationFeesAlreadyPaid = true;\n acc += +payload?.applicationFee;\n }\n if (+payload?.accountingFee > 0) acc += +payload?.accountingFee;\n return acc;\n } else {\n return acc + r.amount - r.amountUsed;\n } */\n return acc + r.amount - r.amountUsed;\n }, 0);\n let remainingAmount = -sumRegulations; //TTC\n let paymentDate = initializedPaymentDate;\n\n //On order les exercicePrestation par startDate ASC et id ASC\n listPartialExercicePrestationExpress.sort((a, b) => {\n const aStartDate = a?.startDate;\n const bStartDate = b?.startDate;\n return dayjs(aStartDate).diff(bStartDate);\n });\n\n // Si les frais de dossiers sont facturés, on ajoute un paiement sur le mois en cours\n if (isWithApplicationFees) {\n listPayments.push({\n amount: applicationFeesAmountTTC, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: listPartialExercicePrestationExpress?.length\n ? listPartialExercicePrestationExpress[0].endDate\n : firstExerciceNonExpresssEndDate,\n comment: 'Frais de dossier',\n });\n remainingAmount += applicationFeesAmountTTC;\n }\n\n // =========================\n // EXPRESS\n // =========================\n listPartialExercicePrestationExpress.forEach(\n (exercicePrestation: PartialExercicePrestationExpress, indexEP: number) => {\n const remainingBeforeThisExo = remainingAmount;\n\n remainingAmount += !priceWithTaxesIncluded\n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat)\n : exercicePrestation.totalAmount; //TTC\n\n // Si le premier règlement couvre le coût de cet exercicePrestation,\n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount:\n Math.round(\n 100 *\n (!priceWithTaxesIncluded\n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat)\n : exercicePrestation.totalAmount),\n ) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n return;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo\n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n }\n\n //express : on étale en countExpressMonthlyPayment (nb de mensualités)\n let remainingAmountByExercicePrestation = remainingAmount; //TTC\n let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 1; //TTC\n //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)\n if (indexEP === 0 && sumRegulations > 0) countExpressMonthlyPayment -= 1;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countExpressMonthlyPayment; //TTC\n for (let index = 1; index <= countExpressMonthlyPayment; index++) {\n // On arrondis les 11 premières mensualités, mais on récupère le reste pour la dernière mensualité, pour éviter les centimes perdus en arrondis\n // et on applique le taux de tva de la société\n const amount = index < countExpressMonthlyPayment ? monthlyAmount : remainingAmountByExercicePrestation; //TTC\n\n // On évite les paiements de moins d'0,01 € (pour les paymentsExpectations ayant une différence de 1 cents)\n if (amount >= 0.005)\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount;\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n remainingAmount = 0;\n },\n );\n\n // =========================\n // NON EXPRESS\n // =========================\n // on lisse sur le nb de mois restants (avec au minimum 3 mensualités)\n // Si un seul exo express, alors on met les paiements de l'exo actuel en parallèle\n // sinon, ils sont à la suite des express\n if (nbExoExpress <= 1) paymentDate = initializedPaymentDate;\n let exerciceEndDate = dayjs(firstExerciceNonExpresssEndDate).toDate();\n\n let hasGeneratedWholeYear = false;\n let isFirstNonExpress = true;\n let countNonExpressGenerated = 0;\n\n // On génère des paiements jusqu'à ce qu'un exercice soit entier (12 mois), non express\n // et qu'au moins 13 mois de paiements ont été générés depuis la date de reprise\n while (!hasGeneratedWholeYear || countNonExpressGenerated < 2) {\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // Si un client signe un Express dans les 3 derniers mois de l'année (par exemple en décembre 2024)\n // on ne doit pas générer l'année 2025 sur 13 mois à partir du 12/24\n // mais on doit attendre le début de l'exercice concerné (ici, 01/25)\n if (countMonthsBeforeExerciceEnd > 12) {\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n continue;\n }\n\n const exoAmount = isFirstNonExpress ? yearlyAmountNonExpressClone : nextYearlyAmountNonExpress;\n const remainingBeforeThisExo = remainingAmount;\n remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);\n\n // Si le premier règlement couvre le coût de cet exercicePrestation,\n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount: Math.round(100 * (priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat))) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n continue;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo\n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n }\n\n let remainingAmountByExercicePrestation = remainingAmount;\n\n // - frais d'application dès les second exo non express\n if (!isFirstNonExpress) remainingAmountByExercicePrestation += applicationCostTotalTTC;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC\n\n if (monthlyAmount > 0) {\n for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {\n let amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;\n\n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n amount = calculateFees(amount, paymentDate);\n\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount;\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n }\n remainingAmount = 0;\n if (countMonthsBeforeExerciceEnd === 12) hasGeneratedWholeYear = true;\n isFirstNonExpress = false;\n countNonExpressGenerated += 1;\n }\n\n remainingAmount = 0;\n\n // =========================\n // JUSQU'EN DECEMBRE\n // =========================\n // On applique le taux de tva de la société, si besoin, selon la grille tarifaire\n remainingAmount += priceWithTaxesIncluded\n ? nextYearlyAmountNonExpress\n : getTaxesIncludedAmount(nextYearlyAmountNonExpress, idVat);\n\n let remainingAmountByExercicePrestation = remainingAmount;\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // - frais d'application dès les second exo non express\n remainingAmountByExercicePrestation += applicationCostTotalTTC;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;\n\n // Si aucun paiement généré, on stoppe là\n if (!listPayments.length) return [];\n\n while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11) {\n let amount = monthlyAmount;\n\n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n // - frais d'application dès les second exo non express\n amount = calculateFees(amount, paymentDate);\n\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n\n return listPayments;\n};\n\nexport { groupPaymentsByServiceType, calculatePaymentsAuto };\n"]}
|
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../ts/utils/payment.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,oCAOkB;AAClB,+BAA+B;AAE/B,6CAA6E;AAQ7E;;;;;;;;;GASG;AACH,MAAM,0BAA0B,GAAG,CAC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,mCAAmC,GAAG,4BAA4B,CAAC;IAEzF,yCAAyC;IACzC,IAAI,CAAC,YAAY,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEpC,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;QACjE,gCAAgC;QAEhC,iDAAiD;QACjD,yGAAyG;QACzG,uDAAuD;QACvD,+CAA+C;QAE/C,YAAY,CAAC,IAAI,CAAC;YAChB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,aAAa,CAAC,GAAG,GAAG;YAC7C,WAAW,EAAE,WAAW;YACxB,YAAY;YACZ,eAAe,EAAE,qBAAa,CAAC,YAAY,CAAC,EAAE;YAC9C,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;QACH,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7E,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEmC,sDAAqB","sourcesContent":["'use strict';\n\nimport {\n IPayment,\n IRegulation,\n ParamsForPaymentsAuto,\n PaymentMethod,\n PaymentAuto,\n getTaxesIncludedAmount,\n} from '../types';\nimport * as dayjs from 'dayjs';\nimport { PartialExercicePrestationExpress } from '../types/Interface/api/payment/Util';\nimport { /* getApplicationFeesAmount, */ getPriceGrid } from './prestation';\n\nexport interface PaymentsWithList extends IPayment {\n type?: 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther';\n listPayments: IPayment[];\n isYearly?: boolean;\n}\n\n/**\n * A partir d'une liste de payment (avec include jusqu'à prestationList,\n * avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')\n * permet de récupérer uniquement le premier paiement de chaque type\n * et les autres payments dans listPayments\n * avec possibilité de filtrer avec le tableau de filtres\n * @param payments\n * @param types\n * @returns\n */\nconst groupPaymentsByServiceType = (\n payments: IPayment[],\n types: ('isComptable' | 'isJuridique' | 'isSocial' | 'isOther')[] = [\n 'isComptable',\n 'isJuridique',\n 'isSocial',\n 'isOther',\n ],\n): PaymentsWithList[] => {\n const prestaComptable = payments.filter((el) => el?.paymentsPrestations?.prestationsList?.isComptable ?? false);\n const prestaSocial = payments.filter(\n (el) =>\n !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isSocial,\n );\n const prestaJuridique = payments.filter(\n (el) =>\n !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isJuridique,\n );\n const prestaOther = payments.filter(\n (el) =>\n !el?.paymentsPrestations?.prestationsList?.isComptable &&\n !el?.paymentsPrestations?.prestationsList?.isJuridique &&\n !el?.paymentsPrestations?.prestationsList?.isSocial,\n );\n\n const societyPayment: PaymentsWithList[] = [];\n if (prestaComptable.length && types.includes('isComptable')) {\n societyPayment.push({\n ...prestaComptable[0], // Données de base\n type: 'isComptable',\n listPayments: prestaComptable,\n });\n }\n if (prestaSocial.length && types.includes('isSocial')) {\n societyPayment.push({\n ...prestaSocial[0], // Données de base\n type: 'isSocial',\n listPayments: prestaSocial,\n });\n }\n if (prestaJuridique.length && types.includes('isJuridique')) {\n societyPayment.push({\n ...prestaJuridique[0], // Données de base\n type: 'isJuridique',\n listPayments: prestaJuridique,\n });\n }\n if (prestaOther.length && types.includes('isOther')) {\n societyPayment.push({\n ...prestaOther[0], // Données de base\n type: 'isOther',\n listPayments: prestaOther,\n });\n }\n return societyPayment;\n};\n\n// const calculateFees = (amount: number, paymentDate: Date): number => {\n// const yearlyPriceIncreasing = 1.0275;\n\n// // Commenté car en fin d'année, pour appliquer le taux d'inflation annuel,\n// // un script enlève les 2,75€ appliqués pour appliquer le bon taux\n// // const oneYearLessIfIn3LastMonthsOfYear = dayjs(goToClient).month() >= 9 ? 1 : 0;\n\n// if (dayjs(paymentDate).year() - dayjs().year() > 0) {\n// const nbYearsMore = dayjs(paymentDate).year() - dayjs().year(); /* - oneYearLessIfIn3LastMonthsOfYear */\n// // on applique X fois l'augmentation\n// // ex. : si on lance l'appel en 2024, et qu'on génére un paiement pour 2026, on applique 2 fois l'augmentation\n// // soit amount * yearlyPriceIncreasing * yearlyPriceIncreasing\n// // soit amount * yearlyPriceIncreasing ^ nbYearsMore\n// amount = amount * Math.pow(yearlyPriceIncreasing, nbYearsMore);\n// }\n// return amount;\n// };\n\n/**\n// * @param {number} firstPaymentAmount - amount of the first payment (first regulation of the customer)\n * @param {Date} firstExerciceNonExpresssEndDate - end date of the first exercice non express\n * @param {number} idPrestation - prestation id\n * @param {number} idLegalForm - legal form id of the society\n * @param {boolean} isWithApplicationFees - if the prestation has application fees to paid\n * @param {IPrestationList} prestationList - type of prestation (hidden: 0, isCatalog: 1, isComptable: 1)\n * @param {number} idVat - vat id of society linked\n * @param {number} yearlyAmountNonExpress - yearly amount of non express prestation (HT)\n * @param {number} nextYearlyAmountNonExpress - yearly amount of non express prestation for next years (HT)\n * @param {PartialExercicePrestationExpress[]} listPartialExercicePrestationExpress - list of exercicePrestation linked to idPrestation -> used to get express\n * @param {IRegulation[]} listRegulations - list of regulations linked to idPrestation (TTC)\n * @param {Date} recoveryDate - date of recovery of the society\n * @returns { IPayment[] } list of payment to create for billing auto, after each presta go to onBoarding\n */\nconst calculatePaymentsAuto = (params: ParamsForPaymentsAuto): PaymentAuto[] => {\n const {\n idTypeBrand,\n // isWithApplicationFees,\n firstExerciceNonExpresssEndDate,\n idPrestation,\n // idLegalForm,\n prestationList,\n idVat,\n yearlyAmountNonExpress,\n nextYearlyAmountNonExpress,\n listPartialExercicePrestationExpress,\n listRegulations,\n recoveryDate,\n } = params;\n\n if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');\n\n // Si on est dans les 3 derniers jours du mois actuel,\n // on ne le compte pas et on facture à partir du début de mois suivant\n let initializedPaymentDate =\n dayjs().endOf('month').diff(dayjs(), 'day') < 3 /* || dayjs().date() >= 14 */\n ? dayjs().add(2, 'month').startOf('month').toDate()\n : dayjs().add(1, 'month').startOf('month').toDate();\n\n //Si date de reprise, alors on initialise à cette date\n if (recoveryDate && dayjs(recoveryDate).isAfter(dayjs(), 'month')) {\n initializedPaymentDate = dayjs(recoveryDate).startOf('month').toDate();\n\n //Si jour de la date de reprise >= 14, alors on débute la facturation 1 mois plus tard\n if (dayjs(initializedPaymentDate).date() >= 14)\n initializedPaymentDate = dayjs(initializedPaymentDate).add(1, 'month').startOf('month').toDate();\n }\n\n // On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC\n // et pour connaitre le montant du coût de l'app\n if (!prestationList.id) throw new Error('idPrestationList manquant');\n const priceGrid = getPriceGrid(idTypeBrand, prestationList.id);\n if (!priceGrid) throw new Error('Impossible de trouver la grille tarifaire correspondante');\n const { /* applicationCost, */ priceWithTaxesIncluded } = priceGrid;\n // const applicationCostTotalTTC =\n // (priceWithTaxesIncluded ? applicationCost : getTaxesIncludedAmount(applicationCost, idVat)) * 12;\n // const applicationFeesAmountTTC = getApplicationFeesAmount(idLegalForm, idVat);\n\n if (prestationList?.isCatalog || !prestationList?.isComptable)\n throw new Error('Ce type de prestation ne correspond pas aux conditions attendues.');\n if (\n listPartialExercicePrestationExpress.length &&\n listPartialExercicePrestationExpress?.some((ep: PartialExercicePrestationExpress) => !ep?.startDate)\n )\n throw new Error('Start date of some exercice are missing');\n\n // let yearlyAmountNonExpressClone = yearlyAmountNonExpress;\n // if (isWithApplicationFees) {\n // yearlyAmountNonExpressClone -= getApplicationFeesAmount(idLegalForm); //HT\n // }\n\n const nbExoExpress = listPartialExercicePrestationExpress.length;\n const listPayments: PaymentAuto[] = [];\n\n // on récupère le/les premiers réglements effectués, non alloués\n // const isApplicationFeesAlreadyPaid = false;\n const sumRegulations = listRegulations.reduce((acc: number, r: IRegulation) => {\n //Si la regulation est rattachée à un paymentExpectation, on récupère le détail\n // et on ne prend que les frais de dossier (applicationFee) + le montant de la compta (accountingFee)\n\n // Commenté temporairement :\n // Pour l'instant, on ne prend plus en compte les paymentExpectation :\n // On part du principe que si isWithApplicationFees = true, alors les regulations contiennent les frais de dossier\n // sinon, ils sont offerts et n'apparaissent pas\n /* if (r.paymentsExpectation?.payload) {\n const payload = JSON.parse(r.paymentsExpectation?.payload);\n if (+payload?.applicationFee > 0) {\n isApplicationFeesAlreadyPaid = true;\n acc += +payload?.applicationFee;\n }\n if (+payload?.accountingFee > 0) acc += +payload?.accountingFee;\n return acc;\n } else {\n return acc + r.amount - r.amountUsed;\n } */\n return acc + r.amount - r.amountUsed;\n }, 0);\n let remainingAmount = -sumRegulations; //TTC\n let paymentDate = initializedPaymentDate;\n\n //On order les exercicePrestation par startDate ASC et id ASC\n listPartialExercicePrestationExpress.sort((a, b) => {\n const aStartDate = a?.startDate;\n const bStartDate = b?.startDate;\n return dayjs(aStartDate).diff(bStartDate);\n });\n\n // Si les frais de dossiers sont facturés, on ajoute un paiement sur le mois en cours\n // if (isWithApplicationFees) {\n // listPayments.push({\n // amount: applicationFeesAmountTTC, //TTC\n // isPaid: true,\n // datePayment: dayjs().toDate(),\n // idPrestation,\n // idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n // closingDate: listPartialExercicePrestationExpress?.length\n // ? listPartialExercicePrestationExpress[0].endDate\n // : firstExerciceNonExpresssEndDate,\n // comment: 'Frais de dossier',\n // });\n // remainingAmount += applicationFeesAmountTTC;\n // }\n\n // =========================\n // EXPRESS\n // =========================\n listPartialExercicePrestationExpress.forEach(\n (exercicePrestation: PartialExercicePrestationExpress, indexEP: number) => {\n const remainingBeforeThisExo = remainingAmount;\n\n remainingAmount += !priceWithTaxesIncluded\n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat)\n : exercicePrestation.totalAmount; //TTC\n\n // Si le premier règlement couvre le coût de cet exercicePrestation,\n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount:\n Math.round(\n 100 *\n (!priceWithTaxesIncluded\n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat)\n : exercicePrestation.totalAmount),\n ) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n return;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo\n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n }\n\n //express : on étale en countExpressMonthlyPayment (nb de mensualités)\n let remainingAmountByExercicePrestation = remainingAmount; //TTC\n let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 1; //TTC\n //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)\n if (indexEP === 0 && sumRegulations > 0) countExpressMonthlyPayment -= 1;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countExpressMonthlyPayment; //TTC\n for (let index = 1; index <= countExpressMonthlyPayment; index++) {\n // On arrondis les 11 premières mensualités, mais on récupère le reste pour la dernière mensualité, pour éviter les centimes perdus en arrondis\n // et on applique le taux de tva de la société\n const amount = index < countExpressMonthlyPayment ? monthlyAmount : remainingAmountByExercicePrestation; //TTC\n\n // On évite les paiements de moins d'0,01 € (pour les paymentsExpectations ayant une différence de 1 cents)\n if (amount >= 0.005)\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount;\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n remainingAmount = 0;\n },\n );\n\n // =========================\n // NON EXPRESS\n // =========================\n // on lisse sur le nb de mois restants (avec au minimum 3 mensualités)\n // Si un seul exo express, alors on met les paiements de l'exo actuel en parallèle\n // sinon, ils sont à la suite des express\n if (nbExoExpress <= 1) paymentDate = initializedPaymentDate;\n let exerciceEndDate = dayjs(firstExerciceNonExpresssEndDate).toDate();\n\n let hasGeneratedWholeYear = false;\n let isFirstNonExpress = true;\n let countNonExpressGenerated = 0;\n\n // On génère des paiements jusqu'à ce qu'un exercice soit entier (12 mois), non express\n // et qu'au moins 13 mois de paiements ont été générés depuis la date de reprise\n while (!hasGeneratedWholeYear || countNonExpressGenerated < 2) {\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // Si un client signe un Express dans les 3 derniers mois de l'année (par exemple en décembre 2024)\n // on ne doit pas générer l'année 2025 sur 13 mois à partir du 12/24\n // mais on doit attendre le début de l'exercice concerné (ici, 01/25)\n if (countMonthsBeforeExerciceEnd > 12) {\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n continue;\n }\n\n const exoAmount = isFirstNonExpress ? yearlyAmountNonExpress : nextYearlyAmountNonExpress;\n const remainingBeforeThisExo = remainingAmount;\n remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);\n\n // Si le premier règlement couvre le coût de cet exercicePrestation,\n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount: Math.round(100 * (priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat))) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n continue;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo\n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n }\n\n let remainingAmountByExercicePrestation = remainingAmount;\n\n // - frais d'application dès les second exo non express\n // if (!isFirstNonExpress) remainingAmountByExercicePrestation += applicationCostTotalTTC;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC\n\n if (monthlyAmount > 0) {\n for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {\n const amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;\n\n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n // amount = calculateFees(amount, paymentDate);\n\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount;\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n }\n remainingAmount = 0;\n if (countMonthsBeforeExerciceEnd === 12) hasGeneratedWholeYear = true;\n isFirstNonExpress = false;\n countNonExpressGenerated += 1;\n }\n\n remainingAmount = 0;\n\n // =========================\n // JUSQU'EN DECEMBRE\n // =========================\n // On applique le taux de tva de la société, si besoin, selon la grille tarifaire\n remainingAmount += priceWithTaxesIncluded\n ? nextYearlyAmountNonExpress\n : getTaxesIncludedAmount(nextYearlyAmountNonExpress, idVat);\n\n const remainingAmountByExercicePrestation = remainingAmount;\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // - frais d'application dès les second exo non express\n // remainingAmountByExercicePrestation += applicationCostTotalTTC;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;\n\n // Si aucun paiement généré, on stoppe là\n if (!listPayments.length) return [];\n\n while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11) {\n // const amount = monthlyAmount;\n\n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n // - frais d'application dès les second exo non express\n // amount = calculateFees(amount, paymentDate);\n\n listPayments.push({\n amount: Math.round(100 * monthlyAmount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n\n return listPayments;\n};\n\nexport { groupPaymentsByServiceType, calculatePaymentsAuto };\n"]}
|
|
@@ -93,6 +93,7 @@ declare const calculatePrestationPriceWithPriceGrid: (idPrestationList: number,
|
|
|
93
93
|
* @param idLegalForm
|
|
94
94
|
* @param idVat
|
|
95
95
|
* @returns amount of application fees, without taxes included
|
|
96
|
+
* @deprecated Application fees are not charged anymore
|
|
96
97
|
*/
|
|
97
98
|
declare const getApplicationFeesAmount: (idLegalForm: number, idVat?: number) => number;
|
|
98
99
|
declare const calculatePrestationPrice: (idPrestationList: number, prestationList: IPrestationList, endDate: string, NbrMonth: number, turnover: number, rentsNumber: number, employeesNumber: number, associatesNumber: number, idTypeBrand: number, idVatRegime: number, pastBalanceSheet: boolean, optionsList: number[], totalPercentage: number, totalAmount: number, totalMonth: number, isWithApplicationFees: boolean, idTaxSystem: number, idLegalForm: number, isYearly?: boolean, isSubPrestation?: boolean, balanceSheetOffered?: number, exerciceList?: IExercice[]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prestation.d.ts","sourceRoot":"","sources":["../../../ts/utils/prestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAInE,OAAO,EAGL,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,gCAAgC,CAAC;AAexF,KAAK,SAAS,GAAG;IACf,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjC,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,SAAS,CAAC,E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