mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: journal entries with expenses operations.
This commit is contained in:
@@ -400,7 +400,11 @@ export default class ItemsService implements IItemsService {
|
||||
const { Item } = this.tenancy.models(tenantId);
|
||||
|
||||
this.logger.info('[items] trying to delete item.', { tenantId, itemId });
|
||||
|
||||
// Retreive the given item or throw not found service error.
|
||||
await this.getItemOrThrowError(tenantId, itemId);
|
||||
|
||||
// Validate the item has no associated invoices or bills.
|
||||
await this.validateHasNoInvoicesOrBills(tenantId, itemId);
|
||||
|
||||
await Item.query().findById(itemId).delete();
|
||||
|
||||
Reference in New Issue
Block a user