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()

View File

@@ -107,6 +107,8 @@ export default {
draft: 'Draft',
published: 'Published',
new_item: 'New Item',
cost_price_: 'Cost price',
sell_price_: 'Sell price',
table_views: 'Table Views',
delete: 'Delete',
delete_count: 'Delete ({count})',