From 097a393b2bf170d69ba1cef16c5e70f204e2fe65 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 13 Oct 2022 14:28:29 +0530 Subject: added an invoice summary component --- src/components/editors/item-editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/editors/item-editor.js') diff --git a/src/components/editors/item-editor.js b/src/components/editors/item-editor.js index eb6e8c1..d72cff3 100644 --- a/src/components/editors/item-editor.js +++ b/src/components/editors/item-editor.js @@ -28,7 +28,7 @@ const ItemEditor = (props) => { const [unit, setUnit] = useState(props.item.UnitOfMeasure); const [unitPrice, setUnitPrice] = useState(props.item.UnitPrice); const [gstP, setGSTP] = useState(props.item.GSTPercentage); - const [minQty, setMinQty] = useState(props.item.MinQuantity); + const [minQty, setMinQty] = useState(props.item.MinQuantity > 0 ? props.item.MinQuantity : 1); const [maxQty, setMaxQty] = useState(props.item.MaxQuantity); const [brand, setBrand] = useState(props.item.Brand); const [savedBrands, setSavedBrands] = useState([]); @@ -163,7 +163,7 @@ const ItemEditor = (props) => { Minimum Quantity: setMinQty(e.target.value)} /> @@ -172,7 +172,7 @@ const ItemEditor = (props) => { Maximum Quantity: setMaxQty(e.target.value)} /> -- cgit v1.2.3