Update src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx

This commit is contained in:
karthikalakshmi 2026-03-04 09:42:13 +05:30
parent 898804559f
commit f19ac0a651
1 changed files with 506 additions and 507 deletions

View File

@ -2101,7 +2101,6 @@ const BSItemCard = (props) => {
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
@ -2124,7 +2123,7 @@ const BSItemCard = (props) => {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
console.log('Final InwardDtlId Qty Map:', inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
@ -3727,7 +3726,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdName === ProdName
);
@ -3928,7 +3927,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -3964,7 +3963,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -4050,7 +4049,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -4089,7 +4088,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -4181,7 +4180,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -4224,7 +4223,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -4308,7 +4307,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -4355,7 +4354,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (