diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx index 17c4dfd..256816a 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx @@ -1299,7 +1299,7 @@ const BSItemCard = (props) => { SinglePc: otherscarddata?.SinglePc, CounterName: '', //sri }; - AddOrderDetails(data); + AddOrderDetails(data,otherscarddata?.Quantity); } // data["OrderRate"] = otherscarddata?.SellPrice }, [otherscarddata]); @@ -2080,12 +2080,11 @@ const BSItemCard = (props) => { return dateVal; }; - const AddOrderDetails = async (item) => { - + const AddOrderDetails = async (item,Qty=1) => { if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if (overAllLimitPreferenece) { const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails); - if ((calculatedOverAllQty + 1) > maxQtyLimit) { + if ((calculatedOverAllQty + Qty) > maxQtyLimit) { setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); setMessageType('warning'); return;