This commit is contained in:
Ahmed Bouhuolia
2025-11-17 17:04:25 +02:00
parent 2383091b6e
commit 2c64e1b8ab
41 changed files with 709 additions and 87 deletions

View File

@@ -18,6 +18,8 @@ import {
} from './dtos/PaymentReceived.dto';
import { PaymentsReceivedPagesService } from './queries/PaymentsReceivedPages.service';
import { GetPaymentReceivedMailState } from './queries/GetPaymentReceivedMailState.service';
import { BulkDeletePaymentReceivedService } from './BulkDeletePaymentReceived.service';
import { ValidateBulkDeletePaymentReceivedService } from './ValidateBulkDeletePaymentReceived.service';
@Injectable()
export class PaymentReceivesApplication {
@@ -33,7 +35,9 @@ export class PaymentReceivesApplication {
private getPaymentReceivePdfService: GetPaymentReceivedPdfService,
private getPaymentReceivedStateService: GetPaymentReceivedStateService,
private paymentsReceivedPagesService: PaymentsReceivedPagesService,
) {}
private bulkDeletePaymentReceivedService: BulkDeletePaymentReceivedService,
private validateBulkDeletePaymentReceivedService: ValidateBulkDeletePaymentReceivedService,
) { }
/**
* Creates a new payment receive.
@@ -73,6 +77,25 @@ export class PaymentReceivesApplication {
);
}
/**
* Deletes multiple payment receives.
* @param {number[]} paymentReceiveIds
*/
public bulkDeletePaymentReceives(paymentReceiveIds: number[]) {
return this.bulkDeletePaymentReceivedService.bulkDeletePaymentReceived(
paymentReceiveIds,
);
}
/**
* Validates which payment receives can be deleted.
* @param {number[]} paymentReceiveIds
*/
public validateBulkDeletePaymentReceives(paymentReceiveIds: number[]) {
return this.validateBulkDeletePaymentReceivedService
.validateBulkDeletePaymentReceived(paymentReceiveIds);
}
/**
* Retrieve payment receives paginated and filterable.
* @param {number} tenantId