From 7f817033b8ba1bf7301e108a69582914c2bf1f2f Mon Sep 17 00:00:00 2001 From: karthikalakshmi Date: Tue, 3 Mar 2026 10:05:13 +0530 Subject: [PATCH] Update src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx --- .../ComboSalesBillTable.jsx | 117 +++++++++--------- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx index 796158a..443c9b0 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx @@ -106,6 +106,11 @@ const ComboSalesBillTable = () => { setting?.SettingIdName?.toLowerCase() === 'decimal' && setting?.SettingValue === 'Y' ); + const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'imeidetails' && + setting?.SettingValue === 'Y' + ); const SessionData = useSelector(StoredSessionData); const BranchId = SessionData?.BranchId; const AppId = SessionData?.AppId; @@ -159,13 +164,13 @@ const ComboSalesBillTable = () => { OrderType === 'Hold' ? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway') : tableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId - ); + (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId + ); const OldtableDataTakeAway = OrderType != 'Hold' ? tableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId - ) + (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId + ) : []; const [EditQuantity, setEditQuantity] = useState(false); @@ -1233,9 +1238,9 @@ const ComboSalesBillTable = () => { )?.map((item, idx) => idx === 0 ? { - ...item, - FreeQty, - } + ...item, + FreeQty, + } : item ), }; @@ -2480,11 +2485,11 @@ const ComboSalesBillTable = () => { tableDataDinein?.length >= PreviousdataLength ? 'wheat' : BookingType !== 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + index === 0 && - tableDataDinein?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + triggerAnimation && + OldtableDataTakeAway?.length + index === 0 && + tableDataDinein?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', @@ -2492,9 +2497,9 @@ const ComboSalesBillTable = () => { row?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - row?.InwardDtlId + ' ' + row?.BookingTypeName - ) + GlobProdwisedata?.includes( + row?.InwardDtlId + ' ' + row?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + index) % 2 === 0 ? 'white' @@ -2537,45 +2542,45 @@ const ComboSalesBillTable = () => { {/* Product Name / Item */} {(item.OptionName === 'Item' || item.OptionName === 'Product Name') && ( - { dispatch(changeCombofocus(true)); row.FullProductIdentifierDtls?.length > 0 || row.ProductIdentifierDtls?.length > 0 - ? handleImeiDetails(row) + ? handleImeiDetails(row) : editField && handleEditQuantity(row); }} - > - {row?.Type !== 'OS' ? row.ProdName : row.ServiceName} - {row?.BrandName ? ` ${row.BrandName}` : ''} - {row?.Type !== 'C' && ( -

- {/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */} - ( - {!row?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {row?.ProdVariantName} } - {row?.Size} - {row?.SinglePc == 'Y' ? 'PCS' : row?.UomName}) -

- )} - {row?.Type === 'C' && - row.ProdDetail?.map((prod, idx) => ( -

- {prod.ProdName} - {prod.Size} {prod.UomName} + > + {row?.Type !== 'OS' ? row.ProdName : row.ServiceName} + {row?.BrandName ? ` ${row.BrandName}` : ''} + {row?.Type !== 'C' && ( +

+ {/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */} + ( + {!row?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {row?.ProdVariantName} } + {row?.Size} + {row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})

- ))} - - )} + )} + {row?.Type === 'C' && + row.ProdDetail?.map((prod, idx) => ( +

+ {prod.ProdName} - {prod.Size} {prod.UomName} +

+ ))} + + )} {/* Barcode */} {item.OptionName === 'Barcode' && ( @@ -2604,9 +2609,9 @@ const ComboSalesBillTable = () => { tabIndex={0} className={`${ EditQtyCombo && row?.localId === Index - ? 'EditQTYcomboTD' - : 'qtyTd' - } ${isActiveCell ? 'active-cell' : ''}`} + ? 'EditQTYcomboTD' + : 'qtyTd' + } ${isActiveCell ? 'active-cell' : ''}`} onClick={() => { dispatch(changeCombofocus(true)); editField && handleEditQuantityCombo(row); @@ -2670,9 +2675,9 @@ const ComboSalesBillTable = () => { > {row?.Offer > 0 ? `${( - (row.Offer / (row?.OrderQty * row?.OrderRate)) * - 100 - ).toFixed(2)}%` + (row.Offer / (row?.OrderQty * row?.OrderRate)) * + 100 + ).toFixed(2)}%` : '-'} )} @@ -2704,8 +2709,8 @@ const ComboSalesBillTable = () => { > {allowDecimal ? Number(row.TotalAmt - (row?.Offer || 0)).toFixed( - 2 - ) + 2 + ) : Number(row.TotalAmt - (row?.Offer || 0))} )} @@ -2748,7 +2753,7 @@ const ComboSalesBillTable = () => { removeFromCart(row)}