mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix(Item): delete item with associated items entries.
This commit is contained in:
@@ -581,8 +581,7 @@ export default class ItemsService implements IItemsService {
|
||||
|
||||
const ids = Array.isArray(itemId) ? itemId : [itemId];
|
||||
const foundItemEntries = await ItemEntry.query()
|
||||
.whereIn('item_id', ids)
|
||||
.whereIn('reference_type', ['SaleInvoice', 'Bill']);
|
||||
.whereIn('item_id', ids);
|
||||
|
||||
if (foundItemEntries.length > 0) {
|
||||
throw new ServiceError(
|
||||
|
||||
Reference in New Issue
Block a user