diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-06-26 03:18:55 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-06-26 03:18:55 +0530 |
commit | ce832a0bddc02a21d9c382f46b81dd6c114f35f9 (patch) | |
tree | 96d22a4307573b9f4f82abae5486c8baa8678332 /src | |
parent | e59c4dee0ab213c2e1f93b494a09fcd3810d7f10 (diff) |
Storing HSN as string now
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Form/Items/AddNewItemForm.tsx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/components/Form/Items/AddNewItemForm.tsx b/src/components/Form/Items/AddNewItemForm.tsx index 48ca4b2..2c4669d 100644 --- a/src/components/Form/Items/AddNewItemForm.tsx +++ b/src/components/Form/Items/AddNewItemForm.tsx @@ -25,7 +25,7 @@ const AddNewItemForm: React.FC<props> = (props) => { const [itemDiscountPercentage, setItemDiscountPercentage] = useState<number>(0.00); const [itemGSTPercentage, setItemGSTValue] = useState<number>(props.defGSTValue); const [itemQTYValue, setItemQTYValue] = useState<number>(1); - const [itemHSNValue, setItemHSNValue] = useState<number>(0); + const [itemHSNValue, setItemHSNValue] = useState<string>(""); // to be handled by DocumentInfo // check if client is in same state @@ -57,7 +57,7 @@ const AddNewItemForm: React.FC<props> = (props) => { setItemQTYValue(1); setItemPriceValue(1); setItemDiscountPercentage(0); - setItemHSNValue(0); + setItemHSNValue(""); setItemGSTValue(props.defGSTValue); } @@ -157,10 +157,7 @@ const AddNewItemForm: React.FC<props> = (props) => { <label> HSN: <input className={"smallInputBox"} type="number" min="0" value={itemHSNValue} - onInput={ - (event: React.FormEvent<HTMLInputElement>) => - setItemHSNValue(parseInt(event.currentTarget.value)) - } + onChange={(event) => setItemHSNValue(event.target.value)} required /> </label> |