mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 23:30:32 +00:00
fix: item category with item form.
This commit is contained in:
@@ -139,7 +139,7 @@ function ItemFormPrimarySection({
|
|||||||
categoriesList={categoriesList}
|
categoriesList={categoriesList}
|
||||||
selecetedCategoryId={values.category_id}
|
selecetedCategoryId={values.category_id}
|
||||||
onCategorySelected={(category) => {
|
onCategorySelected={(category) => {
|
||||||
setFieldValue('item_category_id', category.id);
|
setFieldValue('category_id', category.id);
|
||||||
}}
|
}}
|
||||||
popoverProps={{ minimal: true }}
|
popoverProps={{ minimal: true }}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default class ItemsCategoriesController extends BaseController {
|
|||||||
return [
|
return [
|
||||||
check('name').exists().trim().escape(),
|
check('name').exists().trim().escape(),
|
||||||
check('parent_category_id')
|
check('parent_category_id')
|
||||||
.optional({ nullable: true, checkFalsy: true })
|
.optional({ nullable: true })
|
||||||
.isNumeric()
|
.isNumeric()
|
||||||
.toInt(),
|
.toInt(),
|
||||||
check('description')
|
check('description')
|
||||||
@@ -88,15 +88,15 @@ export default class ItemsCategoriesController extends BaseController {
|
|||||||
.trim()
|
.trim()
|
||||||
.escape(),
|
.escape(),
|
||||||
check('sell_account_id')
|
check('sell_account_id')
|
||||||
.optional({ nullable: true, checkFalsy: true })
|
.optional({ nullable: true })
|
||||||
.isNumeric()
|
.isNumeric()
|
||||||
.toInt(),
|
.toInt(),
|
||||||
check('cost_account_id')
|
check('cost_account_id')
|
||||||
.optional()
|
.optional({ nullable: true })
|
||||||
.isNumeric()
|
.isNumeric()
|
||||||
.toInt(),
|
.toInt(),
|
||||||
check('inventory_account_id')
|
check('inventory_account_id')
|
||||||
.optional()
|
.optional({ nullable: true })
|
||||||
.isNumeric()
|
.isNumeric()
|
||||||
.toInt(),
|
.toInt(),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user