Fix: translate item form fields

This commit is contained in:
elforjani3
2020-11-14 14:02:04 +02:00
parent 6d4b3164a8
commit e1980d2698
2 changed files with 6 additions and 2 deletions

View File

@@ -89,12 +89,14 @@ function ItemForm({
sku: Yup.string().trim(),
cost_price: Yup.number().when(['purchasable'], {
is: true,
then: Yup.number().required(),
then: Yup.number().required()
.label(formatMessage({ id: 'cost_price_' })),
otherwise: Yup.number().nullable(true),
}),
sell_price: Yup.number().when(['sellable'], {
is: true,
then: Yup.number().required(),
then: Yup.number().required()
.label(formatMessage({ id: 'sell_price_' })),
otherwise: Yup.number().nullable(true),
}),
cost_account_id: Yup.number()