fix issues in core
This commit is contained in:
@@ -149,8 +149,8 @@ export class GetSponsorBillingUseCase
|
||||
if (invoices.length === 0) return 0;
|
||||
|
||||
const sorted = [...invoices].sort((a, b) => a.date.localeCompare(b.date));
|
||||
const first = new Date(sorted[0].date);
|
||||
const last = new Date(sorted[sorted.length - 1].date);
|
||||
const first = new Date(sorted[0]!.date);
|
||||
const last = new Date(sorted[sorted.length - 1]!.date);
|
||||
|
||||
const months = this.monthDiff(first, last) || 1;
|
||||
const total = sorted.reduce((sum, inv) => sum + inv.totalAmount, 0);
|
||||
|
||||
13
core/payments/application/use-cases/index.ts
Normal file
13
core/payments/application/use-cases/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export * from './AwardPrizeUseCase';
|
||||
export * from './CreatePaymentUseCase';
|
||||
export * from './CreatePrizeUseCase';
|
||||
export * from './DeletePrizeUseCase';
|
||||
export * from './GetMembershipFeesUseCase';
|
||||
export * from './GetPaymentsUseCase';
|
||||
export * from './GetPrizesUseCase';
|
||||
export * from './GetSponsorBillingUseCase';
|
||||
export * from './GetWalletUseCase';
|
||||
export * from './ProcessWalletTransactionUseCase';
|
||||
export * from './UpdateMemberPaymentUseCase';
|
||||
export * from './UpdatePaymentStatusUseCase';
|
||||
export * from './UpsertMembershipFeeUseCase';
|
||||
Reference in New Issue
Block a user