mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
wip
This commit is contained in:
@@ -29,9 +29,10 @@ export class DeleteBill {
|
||||
/**
|
||||
* Deletes the bill with associated entries.
|
||||
* @param {number} billId
|
||||
* @param {Knex.Transaction} trx - Database transaction instance.
|
||||
* @return {void}
|
||||
*/
|
||||
public async deleteBill(billId: number) {
|
||||
public async deleteBill(billId: number, trx?: Knex.Transaction) {
|
||||
// Retrieve the given bill or throw not found error.
|
||||
const oldBill = await this.billModel()
|
||||
.query()
|
||||
@@ -75,6 +76,6 @@ export class DeleteBill {
|
||||
oldBill,
|
||||
trx,
|
||||
} as IBIllEventDeletedPayload);
|
||||
});
|
||||
}, trx);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user