refactor: split the services to multiple service classes (#202)

This commit is contained in:
Ahmed Bouhuolia
2023-08-10 20:29:39 +02:00
committed by GitHub
parent ffef627dc3
commit 26c6ca9e36
150 changed files with 7188 additions and 5007 deletions

View File

@@ -1,24 +1,24 @@
import { Service, Inject } from 'typedi';
import Knex from 'knex';
import { Knex } from 'knex';
import { IApplyCreditToInvoicesDeletedPayload } from '@/interfaces';
import { EventPublisher } from '@/lib/EventPublisher/EventPublisher';
import PaymentReceiveService from '@/services/Sales/PaymentReceives/PaymentsReceives';
import UnitOfWork from '@/services/UnitOfWork';
import events from '@/subscribers/events';
import BaseCreditNotes from './CreditNotes';
import { ServiceError } from '@/exceptions';
import { ERRORS } from './constants';
import HasTenancyService from '../Tenancy/TenancyService';
@Service()
export default class DeletreCreditNoteApplyToInvoices extends BaseCreditNotes {
@Inject('PaymentReceives')
paymentReceive: PaymentReceiveService;
@Inject()
private uow: UnitOfWork;
@Inject()
uow: UnitOfWork;
private eventPublisher: EventPublisher;
@Inject()
eventPublisher: EventPublisher;
private tenancy: HasTenancyService;
/**
* Apply credit note to the given invoices.