diff --git a/src/App.jsx b/src/App.jsx index a53f14e..6a8cd59 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,4 +1,4 @@ -import { useEffect, lazy, Suspense, useRef, useState } from 'react'; +import { useEffect, lazy, Suspense, useRef, useState } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { App as CapacitorApp } from '@capacitor/app'; import { Routes, Route } from 'react-router-dom'; @@ -20,7 +20,6 @@ const IndividualBooking = lazy( const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL; const subDirectory = import.meta.env.ENV_BASE_URL; import '../ownLib/my-ui-lib.css'; -import CardSkeleton from './Components/Skeleton/CardSkeleton.jsx'; import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx'; import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx'; import useSubscriptionManager from './useSubscriptionManager.js'; @@ -52,7 +51,7 @@ const AppRoutes = () => { } = useSubscriptionManager(sessionData, logout); const location = useLocation(); const navigate = useNavigate(); - const [devToolsOpen, setDevToolsOpen] = useState(false); + const [devToolsOpen, setDevToolsOpen] = useState(false); // ✅ Flag to prevent stack push when back button navigates const isBackNav = useRef(false); @@ -189,47 +188,46 @@ const AppRoutes = () => { } catch (err) {} }; }, [navigate, location.pathname, location.search]); -// mohan - useEffect(() => { - if (isMobile || isIOS) { - console.log("📱 Mobile/iOS device → skipping DevTools detection"); - return; + // mohan + useEffect(() => { + if (isMobile || isIOS) { + console.log('📱 Mobile/iOS device → skipping DevTools detection'); + return; + } + const checkDevTools = setInterval(() => { + if (devtools.isOpen && !devToolsOpen) { + setDevToolsOpen(true); + document.body.innerHTML = + "
|
- {!isMobile ? (
- {''}
- )}
- |
- )}
- {item.OptionName == 'Sl.No' && (
-
- {!isMobile ? (
- Sl.No
- )}
- |
- )}
- {item.OptionName == 'Item' && (
-
- {!isMobile ? (
- Item
- )}
- |
- )}
- {item.OptionName == 'MRP' && (
-
- {!isMobile ? (
- MRP
- )}
- |
- )}
- {item.OptionName == 'Discount' && (
-
- {!isMobile ? (
- ₹/%
- )}
- |
- )}
- {item.OptionName == 'Quantity' && (
- {
- if (tableData?.length > 0) {
- OpenEditTotalAmount();
- }
- }}
+ <>
+
+
+
removeFromCart(item)}
+ >
+ |
+ )}
+ >
+ ))}
+ |
|---|
UPI
} */} - -UPI
} */} + +|
- {!isMobile ? (
- {''}
- )}
- |
- )}
- {item.OptionName == 'Sl.No' && (
-
- {!isMobile ? (
- Sl.No
- )}
- |
- )}
- {item.OptionName == 'Item' && (
-
- {!isMobile ? (
- Item
- )}
- |
- )}
- {item.OptionName == 'MRP' && (
-
- {!isMobile ? (
- MRP
- )}
- |
- )}
- {item.OptionName == 'Discount' && (
-
- {!isMobile ? (
- ₹/%
- )}
- |
- )}
- {item.OptionName == 'Quantity' && (
- {
- if (tableData?.length > 0) {
- OpenEditTotalAmount();
- }
- }}
+
+
-
+
|
|---|
UPI
} */} - -| - Items : - | -- {TotalItems}{' '} - | -
| - Qty : - | -- {Qty} - | -
UPI
} */} + +| + Items : + | ++ {TotalItems}{' '} + | +
| + Qty : + | ++ {Qty} + | +
Recall
- ✋ -Recall
+ ✋ +|
- {!isMobile ? (
- {''}
- )}
- |
- )}
- {item.OptionName == 'Sl.No' && (
-
- {!isMobile ? (
- Sl.No
- )}
- |
- )}
- {item.OptionName == 'Item' && (
-
- {!isMobile ? (
- Item
- )}
- |
- )}
- {item.OptionName == 'MRP' && (
-
- {!isMobile ? (
- MRP
- )}
- |
- )}
- {item.OptionName == 'Discount' && (
-
- {!isMobile ? (
- ₹/%
- )}
- |
- )}
- {item.OptionName == 'Quantity' && (
- 0 ? OpenEditTotalAmount : ""}
- onClick={() => {
- if (tableData?.length > 0) {
- OpenEditTotalAmount();
- }
- }}
- >
- {!isMobile ? (
- Qty
- )}
- |
- )}
- {item.OptionName == 'Rate' && (
-
- {!isMobile ? (
- Rt
- )}
- |
- )}
- {item.OptionName == 'Amount' && (
-
- {!isMobile ? (
- Amt
- )}
- |
- )}
+
|---|
|
+ {!isMobile ? (
+ {''}
+ )}
+ |
+ )}
+ {item.OptionName == 'Sl.No' && (
+
+ {!isMobile ? (
+ Sl.No
+ )}
+ |
+ )}
+ {item.OptionName == 'Item' && (
+
+ {!isMobile ? (
+ Item
+ )}
+ |
+ )}
+ {item.OptionName == 'MRP' && (
+
+ {!isMobile ? (
+ MRP
+ )}
+ |
+ )}
+ {item.OptionName == 'Discount' && (
+
+ {!isMobile ? (
+ ₹/%
+ )}
+ |
+ )}
+ {item.OptionName == 'Quantity' && (
+ 0 ? OpenEditTotalAmount : ""}
+ onClick={() => {
+ if (tableData?.length > 0) {
+ OpenEditTotalAmount();
+ }
+ }}
+ >
+ {!isMobile ? (
+ Qty
+ )}
+ |
+ )}
+ {item.OptionName == 'Rate' && (
+
+ {!isMobile ? (
+ Rt
+ )}
+ |
+ )}
+ {item.OptionName == 'Amount' && (
+
+ {!isMobile ? (
+ Amt
+ )}
+ |
+ )}
- {item.OptionName == 'Delete' && (
-
- {tableData?.length > 0 ? (
-
- {' '}
- {!isMobile ? (
-
-
- {' '}
-
- )}{' '}
- |
+ {tableData?.length > 0 ? (
+
+ {' '}
{!isMobile ? (
-
- )}
-
{' '}
- )}
+ )}{' '}
|
- )}
- >
- ))}
- ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ ? '#b2d1f7'
+ : index % 2 === 0
+ ? 'white'
+ : SelectedBillColor?.['OverallBackgroundColor']
+ ? SelectedBillColor?.['OverallBackgroundColor']
+ : '#d6d6d6',
+ animation:
+ BillOrderPre === 'Y' && !BookingTypeBoth
+ ? triggerAnimation &&
+ index === 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
{
- if (editField) {
- handleEditQuantity(item);
- }
- }}
+ rowspan={tableData.length}
+ style={{ backgroundColor: '#CFB59D' }}
>
- {index + 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
- - (item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 || imeiModal) - ? handleImeiDetails(item) - : editField && handleEditQuantity(item) + + {tableitem.OptionName == 'Sl.No' && ( + | {
+ if (editField) {
+ handleEditQuantity(item);
}
- >
- {item.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+ {index + 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+
+ item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 ||
+ imeiModal
+ ? handleImeiDetails(item)
+ : editField && handleEditQuantity(item)
+ }
+ >
+ {item.ProdName}
+ {item?.BrandName !== null ? item?.BrandName : ''}
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- {
- if (editField) {
- handleEditQuantity(item);
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
}
- }}
- >
- {item?.MRP}
- |
- )}
- {tableitem.OptionName == 'Discount' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {item.TotalAmt} - | - )} + + )} + + )} + {tableitem.OptionName == 'MRP' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {item.TotalAmt} + | + )} - {tableitem.OptionName == 'Delete' && ( - removeFromCart(item)}
- >
- |
- )}
- >
- ))}
-
|
- |
- )}
- {tableitem.OptionName == 'Sl.No' && (
+ ? '#b2d1f7'
+ : (OldtableDataTakeAway?.length + index) % 2 === 0
+ ? 'white'
+ : SelectedBillColor?.['OverallBackgroundColor']
+ ? SelectedBillColor?.['OverallBackgroundColor']
+ : '#d6d6d6',
+ animation:
+ BillOrderPre === 'Y' && !BookingTypeBoth
+ ? triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
{
- if (editField) {
- handleEditQuantity(item);
- }
- }}
+ rowspan={tableData.length}
+ style={{ backgroundColor: '#A2C3CD' }}
>
- {OldtableDataTakeAway?.length + index + 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
- {
- if (editField) {
- handleEditQuantity(item);
- }
- }}
- >
- {item.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( - {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {OldtableDataTakeAway?.length + index + 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+ {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {item.ProdName}
+ {item?.BrandName !== null ? item?.BrandName : ''}
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- {
- if (editField) {
- handleEditQuantity(item);
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
}
- }}
- >
- {item?.MRP}
- |
- )}
- {tableitem.OptionName == 'Discount' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {item.TotalAmt} - | - )} + + )} + + )} + {tableitem.OptionName == 'MRP' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {item.TotalAmt} + | + )} - {tableitem.OptionName == 'Delete' && ( - removeFromCart(item)}
- >
- |
- )}
- >
- ))}
- |
|
- |
- )}
- {tableitem.OptionName == 'Sl.No' && (
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
{
- if (editField) {
- handleEditQuantity(item);
- }
- }}
+ rowspan={tableData.length}
+ style={{ backgroundColor: '#CFB59D' }}
>
- {OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index +
- 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
- - (item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 || imeiModal) - ? handleImeiDetails(item) - : editField && handleEditQuantity(item) + {tableitem.OptionName == 'Sl.No' && ( + | {
+ if (editField) {
+ handleEditQuantity(item);
}
- >
- {item.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- - {item?.Type !== 'OS' && ( - <> - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.UomName} - > - )} - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+ {OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index +
+ 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+
+ item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 ||
+ imeiModal
+ ? handleImeiDetails(item)
+ : editField && handleEditQuantity(item)
+ }
+ >
+ {item.ProdName}
+ {item?.BrandName !== null ? item?.BrandName : ''}
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + {item?.Type !== 'OS' && ( + <> + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.UomName} + > + )} + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- {
- if (editField) {
- handleEditQuantity(item);
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
}
- }}
- >
- {item?.MRP}
- |
- )}
- {tableitem.OptionName == 'Discount' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {item.TotalAmt} - | - )} - {tableitem.OptionName == 'Delete' && ( - removeFromCart(item)}
- >
- |
- )}
- >
- ))}
- |||||
| { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {item.TotalAmt} + | + )} + {tableitem.OptionName == 'Delete' && ( + removeFromCart(item)}
+ >
+ |
+ )}
+ >
+ ))}
+ ||||||||||
|
- |
- )}
- {tableitem.OptionName == 'Sl.No' && (
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
{
- if (editField) {
- handleEditQuantity(item);
- }
- }}
+ rowspan={tableData.length}
+ style={{ backgroundColor: '#A2C3CD' }}
>
- {OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index +
- 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
- {
- if (editField) {
- handleEditQuantity(item);
- }
- }}
- >
- {item.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( - {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index +
+ 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+ {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {item.ProdName}
+ {item?.BrandName !== null ? item?.BrandName : ''}
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- {
- if (editField) {
- handleEditQuantity(item);
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
}
- }}
- >
- {item?.MRP}
- |
- )}
- {tableitem.OptionName == 'Discount' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > + + )} + | + )} + {tableitem.OptionName == 'MRP' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {item.TotalAmt} + | + )} - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {item.TotalAmt} - | - )} - - {tableitem.OptionName == 'Delete' && ( - removeFromCart(item)}
- >
- |
- )}
- >
- ))}
-
UPI
} */} + +UPI
} */} + +UPI
} */} - -UPI
} */} - -| - Items: - | -- {TotalItems} - | -
| - Qty: - | -- {Qty} - | -
| + Items: + | ++ {TotalItems} + | +
| + Qty: + | ++ {Qty} + | +
Refund: ₹{(previousNetAmount || 0) - (currentOrderNetAmount || 0)}
: ( - <> -+ Refund: ₹ + {(previousNetAmount || 0) - + (currentOrderNetAmount || 0)} +
+ ) : ( + <> +|
- {!isMobile ? (
- {''}
- )}
- |
- )}
- {item.OptionName == 'Sl.No' && (
-
- {!isMobile ? (
- Sl.No
- )}
- |
- )}
+
|---|
|
+ {!isMobile ? (
+ {''}
+ )}
+ |
+ )}
+ {item.OptionName == 'Sl.No' && (
+
+ {!isMobile ? (
+ Sl.No
+ )}
+ |
+ )}
- {item.OptionName == 'Item' && (
-
- {!isMobile ? (
- Item
- )}
- |
- )}
- {item.OptionName == 'MRP' && (
-
- {!isMobile ? (
- MRP
- )}
- |
- )}
- {item.OptionName == 'Discount' && (
-
- {!isMobile ? (
- ₹/%
- )}
- |
- )}
- {item.OptionName == 'Quantity' && (
- 0? OpenEditTotalAmount :""}
- onClick={() => {
- if (tableData?.length > 0) {
- OpenEditTotalAmount();
- }
- }}
- >
- {!isMobile ? (
- Qty
- )}
- |
- )}
- {item.OptionName == 'Rate' && (
-
- {!isMobile ? (
- Rt
- )}
- |
- )}
- {item.OptionName == 'Amount' && (
-
- {!isMobile ? (
- Amt
- )}
- |
- )}
- >
- ))}
- |||
|---|---|---|---|---|---|---|---|---|---|---|
|
+ {!isMobile ? (
+ MRP
+ )}
+ |
+ )}
+ {item.OptionName == 'Discount' && (
+
+ {!isMobile ? (
+ ₹/%
+ )}
+ |
+ )}
+ {item.OptionName == 'Quantity' && (
+ 0? OpenEditTotalAmount :""}
+ onClick={() => {
+ if (tableData?.length > 0) {
+ OpenEditTotalAmount();
+ }
+ }}
+ >
+ {!isMobile ? (
+ Qty
+ )}
+ |
+ )}
+ {item.OptionName == 'Rate' && (
+
+ {!isMobile ? (
+ Rt
+ )}
+ |
+ )}
+ {item.OptionName == 'Amount' && (
+
+ {!isMobile ? (
+ Amt
+ )}
+ |
+ )}
+ >
+ ))}
+ ||||||
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
- {index + 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
-
- (item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0) &&
- handleImeiDetails(item)
- }
- >
- {item?.ProdName}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.UomName} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+ {index + 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0) &&
+ handleImeiDetails(item)
+ }
+ >
+ {item?.ProdName}
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -
- {item?.Type != 'C'
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( ++ {item?.Type != 'C' ? item.Offer && item.Offer > 0 ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' + : item.DiscountAmt + ? item.DiscountAmt + : '-' : item?.OfferPrice && item?.OfferPrice > 0 ? item?.OfferType === 'F' ? `₹${safeRound(item.OfferPrice)}` : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -- {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -- {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - e.stopPropagation(); - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - style={{ fontFamily: 'Poppins' }} - > - {safeRound(item?.TotalAmt)} - | - )} - > - ))} -
| + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( ++ {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + e.stopPropagation(); + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + style={{ fontFamily: 'Poppins' }} + > + {safeRound(item?.TotalAmt)} + | + )} + > + ))} +||||||||
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
- {OldtableDataTakeAway?.length + index + 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
-
- {item?.ProdName}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.UomName} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+ {OldtableDataTakeAway?.length + index + 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+
+ {item?.ProdName}
+
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -
- {item?.Type != 'C'
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( ++ {item?.Type != 'C' ? item.Offer && item.Offer > 0 ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' + : item.DiscountAmt + ? item.DiscountAmt + : '-' : item?.OfferPrice && item?.OfferPrice > 0 ? item?.OfferType === 'F' ? `₹${safeRound(item.OfferPrice)}` : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -- {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -- {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - e.stopPropagation(); - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - style={{ fontFamily: 'Poppins' }} - > - {safeRound(item?.TotalAmt)} - | - )} - > - ))} -
| + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( ++ {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + e.stopPropagation(); + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + style={{ fontFamily: 'Poppins' }} + > + {safeRound(item?.TotalAmt)} + | + )} + > + ))} +||||||||
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
- {OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index +
- 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
-
- (item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
- handleImeiDetails(item)
- }
- >
- {item?.Type !== 'OS'
- ? item.ProdName
- : item.ServiceName}
- {item?.Type != 'C' && (
- <>
- - {' '} - {item?.Type !== 'OS' && ( - <> - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - {item?.ProdVariantName} - )} - {item?.Size} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.UomName} - > - )} - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+ {OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index +
+ 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 ||
+ imeiModal) &&
+ handleImeiDetails(item)
+ }
+ >
+ {item?.Type !== 'OS'
+ ? item.ProdName
+ : item.ServiceName}
+
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + {' '} + {item?.Type !== 'OS' && ( + <> + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.UomName} + > + )} + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -
- {item?.Type != 'C'
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( ++ {item?.Type != 'C' ? item.Offer && item.Offer > 0 ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' + : item.DiscountAmt + ? item.DiscountAmt + : '-' : item?.OfferPrice && item?.OfferPrice > 0 ? item?.OfferType === 'F' ? `₹${safeRound(item.OfferPrice)}` : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -- {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -- {safeRound(item?.OrderRate)} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - e.stopPropagation(); - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - style={{ fontFamily: 'Poppins' }} - > - {item?.TotalAmt} - | - )} - > - ))} -
| + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( ++ {safeRound(item?.OrderRate)} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + e.stopPropagation(); + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + style={{ fontFamily: 'Poppins' }} + > + {item?.TotalAmt} + | + )} + > + ))} +||||||||
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
- {OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index +
- 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
-
- {item?.ProdName}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {item?.Size} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.UomName} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+ {OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index +
+ 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+
+ {item?.ProdName}
+
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size} {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {item?.Size} + {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName}) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- )}
- {tableitem.OptionName == 'MRP' && (
- - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -
- {item?.Type != 'C'
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size} {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( ++ {item?.Type != 'C' ? item.Offer && item.Offer > 0 ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' + : item.DiscountAmt + ? item.DiscountAmt + : '-' : item?.OfferPrice && item?.OfferPrice > 0 ? item?.OfferType === 'F' ? `₹${safeRound(item.OfferPrice)}` : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -- {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -- {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - e.stopPropagation(); - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - style={{ fontFamily: 'Poppins' }} - > - {safeRound(item?.TotalAmt)} - | - )} - > - ))} -
{OrderCardDetail?.length} items
-{OrderCardDetail?.length} items
+|
- {!isMobile ? (
- {''}
- )}
- |
- )}
- {item.OptionName == 'Sl.No' && (
-
- {!isMobile ? (
-
- Sl.No
-
- )}
- |
- )}
- {item.OptionName == 'Item' && (
-
- {!isMobile ? (
- Item
- )}
- |
- )}
- {item.OptionName == 'MRP' && (
-
- {!isMobile ? (
- MRP
- )}
- |
- )}
- {item.OptionName == 'Discount' && (
-
- {!isMobile ? (
- ₹/%
- )}
- |
- )}
- {item.OptionName == 'Quantity' && (
- 0 ? OpenEditTotalAmount : ""}
- onClick={() => {
- if (OrderCardDetail?.length > 0) {
- OpenEditTotalAmount();
- }
- }}
- >
- {!isMobile ? (
- Qty
- )}
- |
- )}
- {item.OptionName == 'Rate' && (
-
- {!isMobile ? (
- Rt
- )}
- |
- )}
- {item.OptionName == 'Amount' && (
-
- {!isMobile ? (
- Amt
- )}
- |
- )}
+
|---|
|
+ {!isMobile ? (
+ {''}
+ )}
+ |
+ )}
+ {item.OptionName == 'Sl.No' && (
+
+ {!isMobile ? (
+
+ Sl.No
+
+ )}
+ |
+ )}
+ {item.OptionName == 'Item' && (
+
+ {!isMobile ? (
+ Item
+ )}
+ |
+ )}
+ {item.OptionName == 'MRP' && (
+
+ {!isMobile ? (
+ MRP
+ )}
+ |
+ )}
+ {item.OptionName == 'Discount' && (
+
+ {!isMobile ? (
+ ₹/%
+ )}
+ |
+ )}
+ {item.OptionName == 'Quantity' && (
+ 0 ? OpenEditTotalAmount : ""}
+ onClick={() => {
+ if (OrderCardDetail?.length > 0) {
+ OpenEditTotalAmount();
+ }
+ }}
+ >
+ {!isMobile ? (
+ Qty
+ )}
+ |
+ )}
+ {item.OptionName == 'Rate' && (
+
+ {!isMobile ? (
+ Rt
+ )}
+ |
+ )}
+ {item.OptionName == 'Amount' && (
+
+ {!isMobile ? (
+ Amt
+ )}
+ |
+ )}
- {item.OptionName == 'Delete' && (
-
- {OrderCardDetail?.length > 0 ? (
-
- {' '}
- {!isMobile ? (
-
-
- {' '}
-
- )}
- |
+ {OrderCardDetail?.length > 0 ? (
+
+ {' '}
{!isMobile ? (
-
- )}
-
@@ -2373,432 +2357,459 @@ const StandardTable = () => {
)}
|
- )}
- >
- ))}
- ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ ? '#b2d1f7'
+ : index % 2 === 0
+ ? 'white'
+ : SelectedBillColor?.['OverallBackgroundColor']
+ ? SelectedBillColor?.['OverallBackgroundColor']
+ : '#d6d6d6',
+ animation:
+ BillOrderPre === 'Y' && !BookingTypeBoth
+ ? triggerAnimation &&
+ index === 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
{
- if (editField) {
- handleEditQuantity(item);
- }
- }}
+ rowSpan={OrderCardDetail.length}
+ style={{ backgroundColor: '#CFB59D' }}
>
- {index + 1}
+ |
)}
- {tableitem.OptionName == 'Item' && (
- <>
-
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
- ? handleImeiDetails(item)
- : editField && handleEditQuantity(item)
- }
- >
- {item?.ProdName}
- {' '}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - {item?.ProdVariantName} - )} - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom || item?.AvailableFrom)} - ${to12Hour(item?.VariantAvailableTo || item?.AvailableTo)}`} - ) - {item?.SinglePc == 'Y' && 'Single'} - > - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - > - )} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( - {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {index + 1}
+ |
+ )}
+ {tableitem.OptionName == 'Item' && (
+ <>
+
+ item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0
+ ? handleImeiDetails(item)
+ : editField && handleEditQuantity(item)
+ }
+ >
+ {item?.ProdName}
+ {' '}
+ {item?.BrandName !== null ? item?.BrandName : ''}
+ {item?.Type != 'C' && (
+ <>
+ - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom || item?.AvailableFrom)} - ${to12Hour(item?.VariantAvailableTo || item?.AvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + ) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} - - )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- >
- )}
- {tableitem.OptionName == 'MRP' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( - {
- // if (editField) {
- // handleEditQuantity(item);
- // }
- if (GetCustId) {
- handleCustomerProductPriceHistory(item);
- }
- }}
- >
- {safeRound(
- item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
)}
|
- )}
- {tableitem.OptionName == 'Delete' && (
-
- |
- )}
- >
- ))}
- { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + | + )} + {tableitem.OptionName == 'Delete' && ( +
+ |
+ )}
+ >
+ ))}
+
+ ))}
- {!sportsAppPreference &&
- EditQuantity &&
- OldtableDataTakeAway?.length > 0 && (
-
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ ? '#b2d1f7'
+ : (OldtableDataTakeAway?.length + index) % 2 === 0
+ ? 'white'
+ : SelectedBillColor?.['OverallBackgroundColor']
+ ? SelectedBillColor?.['OverallBackgroundColor']
+ : '#d6d6d6',
+ animation:
+ BillOrderPre === 'Y' && !BookingTypeBoth
+ ? triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
+ |
+ )}
+
+ {tableitem.OptionName == 'Sl.No' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataTakeAway?.length + index + 1} + | + )} + {tableitem.OptionName == 'Item' && ( + <> +{ } }} > - {OldtableDataTakeAway?.length + index + 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> - {
- if (editField) {
- handleEditQuantity(item);
- }
- }}
- >
- {item?.ProdName}
- {' '}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - {item?.ProdVariantName} - )} - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - ) - {item?.SinglePc == 'Y' && 'Single'} - > - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - > - )} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + ) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- >
- )}
- {tableitem.OptionName == 'MRP' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( - {
- // if (editField) {
- // handleEditQuantity(item);
- // }
- if (GetCustId) {
- handleCustomerProductPriceHistory(item);
- }
- }}
- >
- {safeRound(
- item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
)}
|
- )}
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + | + )} - {tableitem.OptionName == 'Delete' && ( -
- |
- )}
- >
- ))}
-
+ |
+ )}
+ >
+ ))}
+
+ ))}
- {!sportsAppPreference &&
- OldtableDataDinein?.length > 0 &&
- EditQuantity && (
-
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
+ |
+ )}
+
+ {tableitem.OptionName == 'Sl.No' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataDinein?.length + + OldtableDataTakeAway?.length + + index + + 1} + | + )} + {tableitem.OptionName == 'Item' && ( + <> +{ - if (editField) { - handleEditQuantity(item); - } - }} + onClick={() => + item.FullProductIdentifierDtls?.length > 0 || + item.ProductIdentifierDtls?.length > 0 || + imeiModal + ? handleImeiDetails(item) + : editField && handleEditQuantity(item) + } > - {OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index + - 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> -
- (item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0 || imeiModal)
- ? handleImeiDetails(item)
- : editField && handleEditQuantity(item)
- }
- >
- {item?.Type !== 'OS'
- ? item.ProdName
- : item.ServiceName}
- {' '}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
- {item?.Type != 'C' && (
- <>
- - {item?.Type !== 'OS' && ( - <> - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - - {item?.ProdVariantName}{' '} - - )} - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - ) - {item?.SinglePc == 'Y' && - 'Single'} - > - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - > - )} - > - )} - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} + {item?.Type !== 'OS' && ( + <> + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + > + )} + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- >
- )}
- {tableitem.OptionName == 'MRP' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( - {
- // if (editField) {
- // handleEditQuantity(item);
- // }
- if (GetCustId) {
- handleCustomerProductPriceHistory(item);
- }
- }}
- >
- {safeRound(
- item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
)}
|
- )}
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} - {tableitem.OptionName == 'Delete' && ( -
- |
- )}
- >
- ))}
- { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + | + )} - {!sportsAppPreference && - tableDataTakeAway?.length > 0 && - EditQuantity && ( -
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
+ |
+ )}
+
+ {tableitem.OptionName == 'Sl.No' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index + + 1} + | + )} + {tableitem.OptionName == 'Item' && ( + <> +{ } }} > - {OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index + - 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> - {
- if (editField) {
- handleEditQuantity(item);
- }
- }}
- >
- {item?.ProdName}
- {' '}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - {item?.ProdVariantName} - )} - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - ) - {item?.SinglePc == 'Y' && 'Single'} - > - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - > - )} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
+
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {item.ProdDetail?.map((prod, index) => ( - - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && {item?.ProdVariantName} } + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + ) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- >
- )}
- {tableitem.OptionName == 'MRP' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : item.DiscountAmt ? item.DiscountAmt : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : item.DiscountAmt ? item.DiscountAmt : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( - {
- // if (editField) {
- // handleEditQuantity(item);
- // }
- if (GetCustId) {
- handleCustomerProductPriceHistory(item);
- }
- }}
- >
- {safeRound(
- item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
+ >
+ )}
+ {item?.Type === 'C' && (
+
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
)}
|
- )}
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : item.DiscountAmt + ? item.DiscountAmt + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : item.DiscountAmt + ? item.DiscountAmt + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + | + )} - {tableitem.OptionName == 'Delete' && ( -
- |
- )}
- >
- ))}
-
+ |
+ )}
+ >
+ ))}
+
+ ))}
- {!sportsAppPreference &&
- tableDataDinein?.length > 0 &&
- EditQuantity && (
-
| Gross Total: | -- - | -
| Total CGST: | -- {TotalCgst?.toFixed(2)} - | -
| Total SGST: | -- {TotalSgst?.toFixed(2)} - | -
| Total IGST: | -- {TotalIgst?.toFixed(2)} - | -
| - Total Amount(Round Off): - | -- {Math.round(TotalAmount)?.toFixed(2)} - | -