fix(server): Revert the paid amount to bill transaction after editing bill payment amount

This commit is contained in:
Ahmed Bouhuolia
2024-02-05 18:50:34 +02:00
parent ba3ea93a2d
commit 7b5287ee80
6 changed files with 15 additions and 44 deletions

View File

@@ -10,7 +10,6 @@ import {
import TenancyService from '@/services/Tenancy/TenancyService';
import { ServiceError } from '@/exceptions';
import { ACCOUNT_TYPE } from '@/data/AccountTypes';
import { BillPayment } from '@/models';
import { ERRORS } from './constants';
@Service()
@@ -18,19 +17,6 @@ export class BillPaymentValidators {
@Inject()
private tenancy: TenancyService;
/**
* Validates the payment existance.
* @param {BillPayment | undefined | null} payment
* @throws {ServiceError(ERRORS.PAYMENT_MADE_NOT_FOUND)}
*/
public async validateBillPaymentExistance(
payment: BillPayment | undefined | null
) {
if (!payment) {
throw new ServiceError(ERRORS.PAYMENT_MADE_NOT_FOUND);
}
}
/**
* Validates the bill payment existance.
* @param {Request} req