From 244f43e2df988e1fa267ec0760360d356d48f38f Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Fri, 30 Apr 2021 10:32:48 +0530 Subject: now the gst changes with the item's default gst --- src/components/Form/AddNewItemForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/Form') diff --git a/src/components/Form/AddNewItemForm.js b/src/components/Form/AddNewItemForm.js index 9286ba7..d82771a 100644 --- a/src/components/Form/AddNewItemForm.js +++ b/src/components/Form/AddNewItemForm.js @@ -25,7 +25,7 @@ const AddNewItemForm = (props) => { // Extract the model names from savedItems let savedItemNames= []; - if (props.savedItems !== []) { + if (props.savedItems !== null) { for (let i = 0; i < props.savedItems.length; i++) { savedItemNames.push(props.savedItems[i].Model); } @@ -39,11 +39,13 @@ const AddNewItemForm = (props) => { const desc = props.savedItems[i].Description; const price = props.savedItems[i].Price; const hsn = props.savedItems[i].HSN; + const gst = props.savedItems[i].GST; if (mod === itemName) { setItemDescValue(desc); setItemPriceValue(price); setItemHSNValue(hsn); + setItemGSTValue(gst); break; } } -- cgit v1.2.3