othersaddbugfixing
This commit is contained in:
parent
8124100aba
commit
8cf58532a3
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue