othersaddbugfixing

This commit is contained in:
unknown 2026-02-24 18:07:19 +05:30
parent 8124100aba
commit 8cf58532a3
1 changed files with 3 additions and 4 deletions

View File

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