Merge pull request #122 from bigcapitalhq/BIG-434-delete-invoice-transaction-issue

fix(server): delete invoice transaction
This commit is contained in:
Ahmed Bouhuolia
2023-05-23 15:12:43 +02:00
committed by GitHub
3 changed files with 12 additions and 8 deletions

View File

@@ -23,8 +23,11 @@ export class ProjectBillableBillSubscriber {
events.saleInvoice.onCreated,
this.handleIncreaseBillableBill
);
bus.subscribe(events.saleInvoice.onEdited, this.handleDecreaseBillableBill);
bus.subscribe(events.saleInvoice.onDeleted, this.handleEditBillableBill);
bus.subscribe(events.saleInvoice.onEdited, this.handleEditBillableBill);
bus.subscribe(
events.saleInvoice.onDeleted,
this.handleDecreaseBillableBill
);
}
/**

View File

@@ -1,7 +1,11 @@
import { Knex } from 'knex';
import { Inject, Service } from 'typedi';
import async from 'async';
import { ISaleInvoice, ISaleInvoiceDTO, ProjectLinkRefType } from '@/interfaces';
import {
ISaleInvoice,
ISaleInvoiceDTO,
ProjectLinkRefType,
} from '@/interfaces';
import { ProjectBillableExpense } from './ProjectBillableExpense';
import { filterEntriesByRefType } from './_utils';

View File

@@ -21,13 +21,10 @@ export class ProjectBillableExpensesSubscriber {
events.saleInvoice.onCreated,
this.handleIncreaseBillableExpenses
);
bus.subscribe(
events.saleInvoice.onEdited,
this.handleDecreaseBillableExpenses
);
bus.subscribe(events.saleInvoice.onEdited, this.handleEditBillableExpenses);
bus.subscribe(
events.saleInvoice.onDeleted,
this.handleEditBillableExpenses
this.handleDecreaseBillableExpenses
);
}