aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-30 10:32:48 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-30 10:32:48 +0530
commit244f43e2df988e1fa267ec0760360d356d48f38f (patch)
tree2f9a9b67a3a3910774d3de422aaef150a2a20adc /src/components
parentd5566eca6444157cdf5c524523a5f26d99904f5d (diff)
now the gst changes with the item's default gst
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Form/AddNewItemForm.js4
1 files changed, 3 insertions, 1 deletions
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;
}
}