diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx index 210ccaa..eec4a2c 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx @@ -636,7 +636,7 @@ const BSItemCard = (props) => { WithoutTaxRate: availableFreeQty * item.OrderRate - (availableFreeQty * item.OrderRate * item.TaxPercentage) / - 100, + 100, Offer: availableFreeQty * item.OrderRate, }; @@ -685,7 +685,7 @@ const BSItemCard = (props) => { ((existingPaidItem.OrderQty + excessQty) * item.OrderRate * item.TaxPercentage) / - 100, + 100, }; ModifiedData.push(mergedPaidItem); @@ -720,7 +720,7 @@ const BSItemCard = (props) => { data?.InwardDtlId === item?.InwardDtlId && data?.ProdId === item?.ProdId && data?.OfferMessage?.[0]?.OfferId === - item?.OfferMessage?.[0]?.OfferId + item?.OfferMessage?.[0]?.OfferId ); if (isAlreadyExists !== -1) { @@ -740,11 +740,11 @@ const BSItemCard = (props) => { ).toFixed(2), WithoutTaxRate: (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * - item.OrderRate - + item.OrderRate - ((ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * item.OrderRate * item.TaxPercentage) / - 100, + 100, Offer: (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * item.OrderRate, @@ -770,10 +770,10 @@ const BSItemCard = (props) => { const appliedOfferAlreadyExists = AppliedOffers.findIndex( (offer) => offer?.FreeProductsList?.FreeProdId === - matchingFreeProduct?.FreeProdId && + matchingFreeProduct?.FreeProdId && offer?.TableName === matchingFreeProduct?.TableName && offer?.TableUniqueName === - matchingFreeProduct?.TableUniqueName && + matchingFreeProduct?.TableUniqueName && offer?.OfferId === matchingFreeProduct?.OfferId && offer?.OfferMode === matchingFreeProduct?.OfferMode && offer?.FreeProductsList?.ProdVariantDetails?.[0] @@ -1019,7 +1019,7 @@ const BSItemCard = (props) => { ? [] : SelectedDatas : ItemCard?.length == 0 || - (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) + (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) ? noSubcatCardData : ItemCard : ''; @@ -1124,14 +1124,14 @@ const BSItemCard = (props) => { ProdSubCat: ProdSubCat, ...(AvailableDate && selectedDate ? { - date: Array.isArray(selectedDate) - ? selectedDate - .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) - .join(',') - : selectedDate?.format - ? selectedDate.format('YYYY-MM-DD') - : selectedDate, - } + date: Array.isArray(selectedDate) + ? selectedDate + .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) + .join(',') + : selectedDate?.format + ? selectedDate.format('YYYY-MM-DD') + : selectedDate, + } : {}), }; //mohan @@ -1178,14 +1178,14 @@ const BSItemCard = (props) => { prodCat: ProdCat, ...(AvailableDate && selectedDate ? { - date: Array.isArray(selectedDate) - ? selectedDate - .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) - .join(',') - : selectedDate?.format - ? selectedDate.format('YYYY-MM-DD') - : selectedDate, - } + date: Array.isArray(selectedDate) + ? selectedDate + .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) + .join(',') + : selectedDate?.format + ? selectedDate.format('YYYY-MM-DD') + : selectedDate, + } : {}), }; @@ -1391,13 +1391,13 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1406,9 +1406,9 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1450,11 +1450,11 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] + ?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[0]?.SellPrice && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] + ?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1463,9 +1463,9 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1546,13 +1546,13 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1560,11 +1560,11 @@ const BSItemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1632,13 +1632,13 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1647,9 +1647,9 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1817,15 +1817,15 @@ const BSItemCard = (props) => { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1833,11 +1833,11 @@ const BSItemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1916,15 +1916,15 @@ const BSItemCard = (props) => { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1932,11 +1932,11 @@ const BSItemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2195,15 +2195,15 @@ const BSItemCard = (props) => { const isExistsInFreeProdList = hasOffer ? FreeProdList?.filter( - (f) => - f?.FreeProdId === item?.ProdId && - f?.ProdVariantDetails?.some((variant) => - variant?.StockDetails?.some( - (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId - ) - ) && - f?.RemainingQty > 0 - ) + (f) => + f?.FreeProdId === item?.ProdId && + f?.ProdVariantDetails?.some((variant) => + variant?.StockDetails?.some( + (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId + ) + ) && + f?.RemainingQty > 0 + ) : []; const calculateTaxAmounts = (qty, rate, taxPercentage) => { @@ -2270,10 +2270,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ); @@ -2284,10 +2284,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ); @@ -2301,10 +2301,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ) @@ -2317,10 +2317,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ) @@ -2341,8 +2341,8 @@ const BSItemCard = (props) => { isItemInCart, item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' ? ( - (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) - )?.toFixed(3) + (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) + )?.toFixed(3) : null ); const updatedData = addFirst @@ -2368,8 +2368,8 @@ const BSItemCard = (props) => { isItemInCartHold, item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' ? ( - (item?.OrderQty || 0) + parseFloat(isItemInCartHold?.OrderQty) - )?.toFixed(3) + (item?.OrderQty || 0) + parseFloat(isItemInCartHold?.OrderQty) + )?.toFixed(3) : null ); const updatedData = addFirst @@ -2596,14 +2596,14 @@ const BSItemCard = (props) => { updatedCartData = cartData.map((item, idx) => idx === indexToCheck ? { - ...item, - Offer: null, - OfferMessage: undefined, - OfferMode: undefined, - OfferModeType: false, - OfferType: undefined, - OfferValue: null, - } + ...item, + Offer: null, + OfferMessage: undefined, + OfferMode: undefined, + OfferModeType: false, + OfferType: undefined, + OfferValue: null, + } : item ); } @@ -2654,8 +2654,8 @@ const BSItemCard = (props) => { ...item, Offer: sameProduct || - bestOffer?.OfferMode === 'I' || - bestOffer?.OfferMode === 'Q' + bestOffer?.OfferMode === 'I' || + bestOffer?.OfferMode === 'Q' ? bestOffer?.OfferAmount || item.Offer : item.Offer || bestOffer?.OfferAmount, OfferType: item?.OfferType || bestOffer?.OfferType, @@ -2672,10 +2672,10 @@ const BSItemCard = (props) => { ((c?.OfferModeType && c?.OfferMode === 'B' ? true : c?.OfferMode !== 'B') && - c?.OfferMode !== 'P' && - c?.OfferMode !== 'C' && - c?.OfferMode !== 'O' && - c?.OfferMode !== 'L' + c?.OfferMode !== 'P' && + c?.OfferMode !== 'C' && + c?.OfferMode !== 'O' && + c?.OfferMode !== 'L' ? true : c?.Offer === 0); @@ -3062,10 +3062,10 @@ const BSItemCard = (props) => { return FreeProdList.map((f, i) => i === index ? { - ...existing, - ...newFreeProd, - ProdVariantDetails: existing.ProdVariantDetails, - } + ...existing, + ...newFreeProd, + ProdVariantDetails: existing.ProdVariantDetails, + } : f ); } else { @@ -3135,7 +3135,7 @@ const BSItemCard = (props) => { const cycleSize = buyQty + getQty; const fullCycles = Math.floor( freeCartItem?.reduce((acc, fc) => acc + (fc?.OrderQty || 0), 0) / - cycleSize + cycleSize ); const totalFreeQty = fullCycles * getQty; @@ -3693,7 +3693,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) {} + } catch (_) { } let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdName === ProdName ); @@ -3894,7 +3894,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 ( @@ -3930,7 +3930,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -4016,7 +4016,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 ( @@ -4055,7 +4055,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -4147,7 +4147,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) {} + } catch (_) { } let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId ); @@ -4190,7 +4190,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -4274,7 +4274,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) {} + } catch (_) { } let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId ); @@ -4321,7 +4321,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -4499,7 +4499,7 @@ const BSItemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -4529,7 +4529,7 @@ const BSItemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -4559,7 +4559,7 @@ const BSItemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -4734,17 +4734,17 @@ const BSItemCard = (props) => { qtydata?.ProductDetail?.[QtyIndex]?.StockAvailable === 'Y' ? onePeiceFlow ? returnVariantStock( - qtydata?.ProductDetail?.[QtyIndex]?.ProdId, - item?.OverAllPcs, - CartOrderDetails, - item?.ProdVariantName - ) + qtydata?.ProductDetail?.[QtyIndex]?.ProdId, + item?.OverAllPcs, + CartOrderDetails, + item?.ProdVariantName + ) : returnVariantStock( - qtydata?.ProductDetail?.[QtyIndex]?.ProdId, - item?.OverAllQty, - CartOrderDetails, - item?.ProdVariantName - ) + qtydata?.ProductDetail?.[QtyIndex]?.ProdId, + item?.OverAllQty, + CartOrderDetails, + item?.ProdVariantName + ) : 'Stock Not Maintained', VariantAvailableFrom: item?.AvailableFrom, VariantAvailableTo: item?.AvailableTo, @@ -4766,20 +4766,20 @@ const BSItemCard = (props) => { 'Batch No': item?.BatchRef, StockCount: onePeiceFlow ? returnCountStock( - item?.ProdId, - item?.OverAllPcs, - CartOrderDetails, - item?.InwardDtlId, - 'Y' - ) + item?.ProdId, + item?.OverAllPcs, + CartOrderDetails, + item?.InwardDtlId, + 'Y' + ) : returnCountStock( - item?.ProdId, - item?.BalanceQty, - CartOrderDetails, - item?.InwardDtlId, - 'N', - item?.OverAllPcs - ), + item?.ProdId, + item?.BalanceQty, + CartOrderDetails, + item?.InwardDtlId, + 'N', + item?.OverAllPcs + ), 'Stock Date': ExtractDateFormate(item?.InwardDate), Price: onePeiceFlow ? item?.OnePcsPrice : item?.SellPrice, ExpDate: @@ -5203,7 +5203,33 @@ const BSItemCard = (props) => { return null; // or any other value you want to return } }; + const ItemMRP = (item) => { + // const variantWithDetails = item?.ProductDetail?.find((variant) => variant?.ProdVariantDetails?.length > 0); + if (preferenceSingleSales && item.OnePcsAvailable === 'Y') { + return ( + item?.ProductDetail?.[0]?.ProdVariantDetails?.[0]?.StockDetails?.[0] + ?.OnePcsPrice || null + ); + // OnePcsPrice + } + + const variantWithDetails = item?.ProductDetail?.find( + (variant) => + variant?.ProdVariantDetails?.length > 0 && + variant?.ProdVariantDetails?.[0]?.StockDetails?.[0]?.MRP + ); + if (variantWithDetails) { + // Access the details of the first variant with ProdVariantDetails + const firstVariantDetails = + variantWithDetails?.ProdVariantDetails?.[0]?.StockDetails?.[0] + ?.MRP; + return firstVariantDetails; + } else { + // Handle the case where no variant satisfies the condition + return null; // or any other value you want to return + } + }; const ItemSize = (item) => { if (preferenceSingleSales && item?.OnePcsAvailable === 'Y') { return 1; @@ -5929,9 +5955,9 @@ const BSItemCard = (props) => { allProducts.forEach((product) => { const brandName = product.BrandName && - product.BrandName !== 'null' && - product.BrandName !== 'undefined' && - product.BrandName.trim() !== '' + product.BrandName !== 'null' && + product.BrandName !== 'undefined' && + product.BrandName.trim() !== '' ? product.BrandName : 'Others'; @@ -5965,13 +5991,13 @@ const BSItemCard = (props) => { const result = prodname ? (cardData || [])?.filter( - (item) => - normalize(item.ProdName).includes(normalize(prodname)) || - normalize(item.ProdCatName).includes(normalize(prodname)) || - item.ProductDetail?.some((detail) => - normalize(detail.ProdName).includes(normalize(prodname)) - ) - ) + (item) => + normalize(item.ProdName).includes(normalize(prodname)) || + normalize(item.ProdCatName).includes(normalize(prodname)) || + item.ProductDetail?.some((detail) => + normalize(detail.ProdName).includes(normalize(prodname)) + ) + ) : cardData; console.log(prodQty, 'cardDatacardData', result, prodname); @@ -5991,8 +6017,8 @@ const BSItemCard = (props) => { CardOnclick( result?.[0], result?.[0]?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); // AddOrderDetails2(result?.[0]) } else if (item?.OverAllQty < prodQty) { @@ -6051,8 +6077,8 @@ const BSItemCard = (props) => { zIndex: '12', top: templateData?.BookingLayout?.[0] === 'Layout5' || - templateData?.BookingLayout?.[0] === 'Layout4' || - templateData?.BookingLayout?.[0] === 'Layout6' + templateData?.BookingLayout?.[0] === 'Layout4' || + templateData?.BookingLayout?.[0] === 'Layout6' ? '2.5rem' : '', }} @@ -6132,21 +6158,21 @@ const BSItemCard = (props) => { }} className={ (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item?.OverAllPcs - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item?.OverAllPcs + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => item?.StockAvailable !== 'Y' - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + ) ? 'BkPrdCardActive' : 'BkPrdCardDeActive' } @@ -6184,39 +6210,39 @@ const BSItemCard = (props) => { cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), padding: !cardFunction?.ImageUp && - !cardFunction?.ImageDown + !cardFunction?.ImageDown ? cardFunction?.SmallImage && - '5px 9px' + '5px 9px' : '8px 2px', flexDirection: cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' ? cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' : cardFunction?.ImageUp && 'column' ? cardFunction?.ImageUp && - 'column' + 'column' : cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' ? cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' : cardFunction?.ImageLeft && - 'row', + 'row', borderRadius: cardFunction?.EdgeCurve && '6px', width: !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - !cardFunction?.BigImage && - !cardFunction?.ImageRight && - cardFunction?.SmallImage && - (cardFunction?.ImageUp || - cardFunction?.ImageDown) + !cardFunction?.ImageDown && + !cardFunction?.BigImage && + !cardFunction?.ImageRight && + cardFunction?.SmallImage && + (cardFunction?.ImageUp || + cardFunction?.ImageDown) ? '6rem' : cardFunction?.BigImage && '9rem', height: @@ -6249,19 +6275,19 @@ const BSItemCard = (props) => { if ( !( (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' @@ -6273,8 +6299,8 @@ const BSItemCard = (props) => { CardOnclick( item, item?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); } }} @@ -6283,39 +6309,39 @@ const BSItemCard = (props) => { > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + : defaultimage + } + alt="" + /> + )}
{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -6349,7 +6375,7 @@ const BSItemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '5.5rem', + '5.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -6372,11 +6398,11 @@ const BSItemCard = (props) => { 'uppercase', width: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '120px' + '120px' : cardFunction?.SmallImage && - !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - '85px', + !cardFunction?.ImageUp && + !cardFunction?.ImageDown && + '85px', // Width: cardFunction?.BigImage && "70px", fontSize: !cardFunction?.BigImage && @@ -6398,24 +6424,24 @@ const BSItemCard = (props) => { > {item?.ProdName}{' '} {(item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => - item?.StockAvailable !== 'Y' - ) ? ( + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => + item?.StockAvailable !== 'Y' + ) ? ( '' ) : (

{

)}

+ {cardFunction?.MRP && + ((item?.OverAllQty !== undefined && + (!preferenceSingleSales + ? item?.OverAllQty !== 0 + : item?.OverAllPcs !== 0) && + item?.OverAllQty !== null) || + item?.ProductDetail?.some( + (item) => + item?.StockAvailable !== 'Y' + )) && ( +

+ MRP: ₹ {ItemMRP(item)}  + +

+ )} {cardFunction?.Price && ((item?.OverAllQty !== undefined && (!preferenceSingleSales @@ -6445,7 +6505,7 @@ const BSItemCard = (props) => { fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -6454,8 +6514,8 @@ const BSItemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -6503,19 +6563,19 @@ const BSItemCard = (props) => { count={ !preferenceSingleSales ? returnCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) } overflowCount={10000} > @@ -6567,14 +6627,14 @@ const BSItemCard = (props) => { item?.OverAllPcs, CartOrderDetails ) > 0 || - item?.ProductDetail?.some( - (product) => - product?.StockAvailable !== - 'Y' - ) + item?.ProductDetail?.some( + (product) => + product?.StockAvailable !== + 'Y' + ) ? cardFunction?.Background ? SelectedCardColor?.BackgroundColor || - '#000000' + '#000000' : '#fff' : '#ff4d4f', }} @@ -6616,39 +6676,39 @@ const BSItemCard = (props) => { cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), padding: !cardFunction?.ImageUp && - !cardFunction?.ImageDown + !cardFunction?.ImageDown ? cardFunction?.SmallImage && - '5px 9px' + '5px 9px' : '8px 2px', flexDirection: cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' ? cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' : cardFunction?.ImageUp && 'column' ? cardFunction?.ImageUp && - 'column' + 'column' : cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' ? cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' : cardFunction?.ImageLeft && - 'row', + 'row', borderRadius: cardFunction?.EdgeCurve && '6px', width: !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - !cardFunction?.BigImage && - !cardFunction?.ImageRight && - cardFunction?.SmallImage && - (cardFunction?.ImageUp || - cardFunction?.ImageDown) + !cardFunction?.ImageDown && + !cardFunction?.BigImage && + !cardFunction?.ImageRight && + cardFunction?.SmallImage && + (cardFunction?.ImageUp || + cardFunction?.ImageDown) ? '6rem' : cardFunction?.BigImage && '9rem', height: @@ -6666,19 +6726,19 @@ const BSItemCard = (props) => { if ( !( (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' @@ -6690,48 +6750,48 @@ const BSItemCard = (props) => { CardOnclick( item, item?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); } }} - // data-aos="zoom-in" data-aos-duration="600" + // data-aos="zoom-in" data-aos-duration="600" > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + : defaultimage + } + alt="" + /> + )}
{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -6765,7 +6825,7 @@ const BSItemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '4.5rem', + '4.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -6785,11 +6845,11 @@ const BSItemCard = (props) => { 'uppercase', width: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '120px' + '120px' : cardFunction?.SmallImage && - !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - '85px', + !cardFunction?.ImageUp && + !cardFunction?.ImageDown && + '85px', // Width: cardFunction?.BigImage && "70px", fontSize: !cardFunction?.BigImage && @@ -6811,24 +6871,24 @@ const BSItemCard = (props) => { > {item?.ProdName}{' '} {(item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => - item?.StockAvailable !== 'Y' - ) ? ( + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => + item?.StockAvailable !== 'Y' + ) ? ( '' ) : (

{

)}

+ {cardFunction?.MRP && + ((item?.OverAllQty !== undefined && + (!preferenceSingleSales + ? item?.OverAllQty !== 0 + : item?.OverAllPcs !== 0) && + item?.OverAllQty !== null) || + item?.ProductDetail?.some( + (item) => + item?.StockAvailable !== 'Y' + )) && ( +

+ MRP: ₹ {ItemMRP(item)}  + +

+ )} {cardFunction?.Price && ((item?.OverAllQty !== undefined && (!preferenceSingleSales @@ -6858,7 +6952,7 @@ const BSItemCard = (props) => { fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -6867,8 +6961,8 @@ const BSItemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -6913,19 +7007,19 @@ const BSItemCard = (props) => { count={ !preferenceSingleSales ? returnCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) } overflowCount={10000} > @@ -6976,14 +7070,14 @@ const BSItemCard = (props) => { item?.OverAllPcs, CartOrderDetails ) > 0 || - item?.ProductDetail?.some( - (product) => - product?.StockAvailable !== - 'Y' - ) + item?.ProductDetail?.some( + (product) => + product?.StockAvailable !== + 'Y' + ) ? cardFunction?.Background ? SelectedCardColor?.BackgroundColor || - '#000000' + '#000000' : '#fff' : '#ff4d4f', }} @@ -6998,21 +7092,21 @@ const BSItemCard = (props) => {
0) || - item?.ProductDetail?.some( - (item) => item?.StockAvailable !== 'Y' - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + ) ? 'card4Main card4Main-active' : 'card4Main card4Main-deactive' } @@ -7035,17 +7129,17 @@ const BSItemCard = (props) => { if ( !( (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' ) @@ -7060,8 +7154,8 @@ const BSItemCard = (props) => { CardOnclick( item, item?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); // This will trigger if you're clicking outside the "One Piece" button } @@ -7103,7 +7197,7 @@ const BSItemCard = (props) => { height={60} src={ item?.ProductDetail?.[0]?.ProdLogo === - '' + '' ? defaultimage : item?.ProductDetail?.[0]?.ProdLogo ? item?.ProductDetail?.[0]?.ProdLogo @@ -7118,21 +7212,21 @@ const BSItemCard = (props) => {
{item?.ProdName} {(item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => item?.StockAvailable !== 'Y' - ) ? ( + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + ) ? ( '' ) : (

{

)}
- {((item?.OverAllQty !== undefined && - !preferenceSingleSales + {cardFunction?.MRP && ((item?.OverAllQty !== undefined && + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' )) && ( -
-
- ₹ {ItemSellingPrice(item)} +
+
+ MRP: ₹ {ItemMRP(item)} +
+ )} + { ((item?.OverAllQty !== undefined && + !preferenceSingleSales + ? returnCount( + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) + : returnOnepcCount( + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + )) && ( +
+
+ ₹ {ItemSellingPrice(item)} +
-
- <> - ({ItemSize(item)} {ItemUomName(item)}) - +
+ <> + ({ItemSize(item)} {ItemUomName(item)}) + +
-
- )} + )}
{/* Stock Count Badge */} @@ -7198,17 +7314,17 @@ const BSItemCard = (props) => { count={ !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) } overflowCount={10000} > @@ -7257,13 +7373,13 @@ const BSItemCard = (props) => { item?.OverAllPcs, CartOrderDetails ) > 0 || - item?.ProductDetail?.some( - (product) => - product?.StockAvailable !== 'Y' - ) + item?.ProductDetail?.some( + (product) => + product?.StockAvailable !== 'Y' + ) ? cardFunction?.Background ? SelectedCardColor?.BackgroundColor || - '#000000' + '#000000' : '#fff' : '#ff4d4f', }} @@ -7645,16 +7761,16 @@ const BSItemCard = (props) => { ]?.ProdVariantName?.toLowerCase()?.includes( 'variant' ) && ( - - ( - { - qtydata?.ProductDetail?.[QtyIndex] - ?.ProdVariantDetails?.[VarientIndex] - ?.ProdVariantName - } - ){' '} - - )} + + ( + { + qtydata?.ProductDetail?.[QtyIndex] + ?.ProdVariantDetails?.[VarientIndex] + ?.ProdVariantName + } + ){' '} + + )}

diff --git a/src/Pages/BookingScreen/Template/DynamicComponentProps.js b/src/Pages/BookingScreen/Template/DynamicComponentProps.js index 9d56a19..180b5d5 100644 --- a/src/Pages/BookingScreen/Template/DynamicComponentProps.js +++ b/src/Pages/BookingScreen/Template/DynamicComponentProps.js @@ -27,6 +27,8 @@ function dynamicComponentProps(sessionName, data, componentName) { ImageUp: false, ImageDown: false, BigImage: false, + MRP: false, + }; let output = {}; diff --git a/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss b/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss index 0bbeb80..005b440 100644 --- a/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss +++ b/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss @@ -975,6 +975,17 @@ font-size: 1rem; } } + .card4MRP { + font-size: 0.80rem; + line-height: 0.80rem; + font-weight: 600; + color: #059669; + -webkit-text-stroke-width: 0.3px; + + @media (max-width: 500px) { + font-size: 0.50rem; + } + } .card4Uom { background-color: #f3f4f6;