diff --git a/app/components/app/item/entry-form.vue b/app/components/app/item/entry-form.vue index 5e2ab11a..e40f1f66 100644 --- a/app/components/app/item/entry-form.vue +++ b/app/components/app/item/entry-form.vue @@ -41,6 +41,8 @@ const { defineField, errors, meta } = useForm({ uom_code: '', infra_code: '', stock: 0, + buyingPrice: 0, + sellingPrice: 0, } as Partial, }) @@ -50,6 +52,8 @@ const [itemGroup_code, itemGroup_codeAttrs] = defineField('itemGroup_code') const [uom, uomAttrs] = defineField('uom_code') const [infra_code, infra_codeAttrs] = defineField('infra_code') const [stock, stockAttrs] = defineField('stock') +const [buyingPrice, buyingPriceAttrs] = defineField('buyingPrice') +const [sellingPrice, sellingPriceAttrs] = defineField('sellingPrice') if (props.values) { if (props.values.code !== undefined) code.value = props.values.code @@ -58,6 +62,8 @@ if (props.values) { if (props.values.uom_code !== undefined) uom.value = props.values.uom_code if (props.values.infra_code !== undefined) infra_code.value = props.values.infra_code if (props.values.stock !== undefined) stock.value = props.values.stock + if (props.values.buyingPrice !== undefined) buyingPrice.value = props.values.buyingPrice + if (props.values.sellingPrice !== undefined) sellingPrice.value = props.values.sellingPrice } const resetForm = () => { @@ -67,6 +73,8 @@ const resetForm = () => { uom.value = '' infra_code.value = '' stock.value = 0 + buyingPrice.value = 0 + sellingPrice.value = 0 } function onSubmitForm() { @@ -77,6 +85,8 @@ function onSubmitForm() { uom_code: uom.value || '', infra_code: infra_code.value || '', stock: Number(stock.value) || 0, + buyingPrice: Number(buyingPrice.value) || 0, + sellingPrice: Number(sellingPrice.value) || 0, } emit('submit', formData, resetForm) } @@ -169,6 +179,30 @@ function onCancelForm() { /> + + + + + + + + + + + +