mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat(items): item type can not changing in inventory type.
This commit is contained in:
@@ -538,6 +538,15 @@ export default class ItemsController extends BaseController {
|
||||
],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'ITEM_CANNOT_CHANGE_INVENTORY_TYPE') {
|
||||
return res.status(400).send({
|
||||
errors: [{
|
||||
type: 'ITEM_CANNOT_CHANGE_INVENTORY_TYPE',
|
||||
message: 'Cannot change inventory item type',
|
||||
code: 340,
|
||||
}],
|
||||
});
|
||||
}
|
||||
}
|
||||
next(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user