aboutsummaryrefslogtreecommitdiff
path: root/src/components/Form/Items/AddNewItemForm.tsx
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-26 03:18:55 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-26 03:18:55 +0530
commitce832a0bddc02a21d9c382f46b81dd6c114f35f9 (patch)
tree96d22a4307573b9f4f82abae5486c8baa8678332 /src/components/Form/Items/AddNewItemForm.tsx
parente59c4dee0ab213c2e1f93b494a09fcd3810d7f10 (diff)
Storing HSN as string now
Diffstat (limited to 'src/components/Form/Items/AddNewItemForm.tsx')
-rw-r--r--src/components/Form/Items/AddNewItemForm.tsx9
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>