diff --git a/client/src/containers/Items/ItemForm.js b/client/src/containers/Items/ItemForm.js index 420f1f31a..91e74a14d 100644 --- a/client/src/containers/Items/ItemForm.js +++ b/client/src/containers/Items/ItemForm.js @@ -107,6 +107,14 @@ function ItemForm({ if (errors.find((e) => e.type === 'ITEM.NAME.ALREADY.EXISTS')) { fields.name = formatMessage({ id: 'the_name_used_before' }); } + if (errors.find((e) => e.type === 'INVENTORY_ACCOUNT_CANNOT_MODIFIED')) { + AppToaster.show({ + message: formatMessage({ + id: 'cannot_change_item_inventory_account', + }), + intent: Intent.DANGER, + }); + } return fields; }; diff --git a/client/src/lang/en/index.js b/client/src/lang/en/index.js index 16ff6167e..f6ba635b3 100644 --- a/client/src/lang/en/index.js +++ b/client/src/lang/en/index.js @@ -1034,6 +1034,7 @@ export default { 'This customer cannot be deleted as it is associated with transactions.', this_vendor_cannot_be_deleted_as_it_is_associated_with_transactions: 'This vendor cannot be deleted as it is associated with transactions.', - currency_sign: 'Currency sign', + cannot_change_item_inventory_account: + 'Cannot change item inventory account while the item has transactions.', };