+ }
+ onClick={() =>
+ (OverAllOrderCount || 0) > 0 && setIsModalOpen(true)
+ }
>
-
-
{isMobile ? 'TA' : 'Take Away'} :
-
{`₹ ${safeRound(totalTakeAway)}`}
+
+
+ {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount}
- )}
-
- {DineInAccess?.SettingValue === 'Y' &&
- dinePreference &&
- (DineInOrderCount || SelfDineInOrderCount) > 0 && (
-
-
-
{isMobile ? 'DI' : 'Dine In'} :
-
{`₹ ${safeRound(totalDineIn)}`}
-
-
- )}
-
-
-
netAmount > 0 && setIsNetAmtModalOpen(true)}
- style={{ cursor: 'pointer' }}
- >
-
-
- {isMobile ? 'NA' : 'Net Amount'} : ₹ {safeRound(netAmount)}
-
-
-
- {TableData?.length > 0 && !sportsAppPreference && AutoReceiveStock && (
-
- )}
- {preferenceshortcutkey && (
-
-
-
- )}
-
-
- {Customisebillno &&
}
- {SessionData?.FeatureAddonData?.FeatureDtls?.find(
- (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales'
- ) &&
- !sportsAppPreference && (
-
0 ? 'none' : 'auto',
- opacity: OrderStatus > 0 ? 0.5 : 1,
- }}
- >
- {!OtherServicesglobal && (
-
-
- openModalKiosk()}
- style={{ cursor: 'pointer', fontSize: '1.5rem' }}
- className="iconsize"
- />
-
-
- )}
-
- )}
- {Kioskopen && (
-
- )}
-
- {!OtherServicesglobal && !sportsAppPreference && (
-
- {' '}
-
-
- )}
-
- {!OtherServicesglobal && (
- <>
- {CheckBookingStatus == 'Open' ? (
-
-
- {' '}
-
-
-
- ) : (
-
-
- BookingOpenFun('Open')}
- >
-
-
-
-
-
-
- )}
- {!sportsAppPreference && (
-
-
- {''}
-
-
-
- )}
- >
- )}
-
- {BookingModalOpen && (
-
- )}
- {ListOfInvoices && (
-
- )}
-
-
- {/* Modal with table for multiple bookings */}
-
-
setIsModalOpen(false)}
- handleSubmit={() => setIsModalOpen(false)}
- width={700}
- footer={false}
- >
-
-
+ (OverAllOrderCount || 0) > 0 && setIsModalOpen(true)
+ }
+ >
+
+
+ {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount}
+
+
+ )}
+
+
+
+ {/* Rest of your component remains the same */}
+ {DineInAccess?.SettingValue === 'Y' &&
+ takeAwayPreference &&
+ (TakeAwayOrderCount || SelfTakeAwayOrderCount || PreOrderAmount) >
+ 0 && (
+
+
-
-
- |
- S.No
- |
-
- Order ID
- |
-
- Customer
- |
-
- Mobile
- |
- {/* Booked By | */}
-
- Payment Type
- |
-
- Amount (₹)
- |
-
-
+
{isMobile ? 'TA' : 'Take Away'} :
+
{`₹ ${safeRound(totalTakeAway)}`}
+
+
+ )}
-
- {currentData?.length > 0 ? (
- currentData?.map((item, index) => (
-
- (e.currentTarget.style.backgroundColor = '#d6e4ff')
- }
- onMouseLeave={(e) =>
+ {DineInAccess?.SettingValue === 'Y' &&
+ dinePreference &&
+ (DineInOrderCount || SelfDineInOrderCount) > 0 && (
+
+
+
{isMobile ? 'DI' : 'Dine In'} :
+
{`₹ ${safeRound(totalDineIn)}`}
+
+
+ )}
+
+
+
netAmount > 0 && setIsNetAmtModalOpen(true)}
+ style={{ cursor: 'pointer' }}
+ >
+
+
+ {isMobile ? 'NA' : 'Net Amount'} : ₹ {safeRound(netAmount)}
+
+
+
+ {TableData?.length > 0 && !sportsAppPreference && AutoReceiveStock && (
+
+ )}
+ {preferenceshortcutkey && (
+
+
+
+ )}
+
+
+ {Customisebillno &&
}
+ {SessionData?.FeatureAddonData?.FeatureDtls?.find(
+ (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales'
+ ) &&
+ !sportsAppPreference && (
+
0 ? 'none' : 'auto',
+ opacity: OrderStatus > 0 ? 0.5 : 1,
+ }}
+ >
+ {!OtherServicesglobal && (
+
+
+ openModalKiosk()}
+ style={{ cursor: 'pointer', fontSize: '1.5rem' }}
+ className="iconsize"
+ />
+
+
+ )}
+
+ )}
+ {Kioskopen && (
+
+ )}
+
+ {!OtherServicesglobal && !sportsAppPreference && (
+
+ {' '}
+
+
+ )}
+
+ {!OtherServicesglobal && (
+ <>
+ {CheckBookingStatus == 'Open' ? (
+
+
+ {' '}
+
+
+
+ ) : (
+
+
+ BookingOpenFun('Open')}
+ >
+
+
+
+
+
+
+ )}
+ {!sportsAppPreference && (
+
+
+ {''}
+
+
+
+ )}
+ >
+ )}
+
+ {BookingModalOpen && (
+
+ )}
+ {ListOfInvoices && (
+
+ )}
+
+
+ {/* Modal with table for multiple bookings */}
+
+ setIsModalOpen(false)}
+ handleSubmit={() => setIsModalOpen(false)}
+ width={700}
+ footer={false}
+ >
+
+
+
+
+ |
+ S.No
+ |
+
+ Order ID
+ |
+
+ Customer
+ |
+
+ Mobile
+ |
+ {/* Booked By | */}
+
+ Payment Type
+ |
+
+ Amount (₹)
+ |
+
+
+
+
+ {currentData?.length > 0 ? (
+ currentData?.map((item, index) => (
+
+ (e.currentTarget.style.backgroundColor = '#d6e4ff')
+ }
+ onMouseLeave={(e) =>
(e.currentTarget.style.backgroundColor =
index % 2 === 0 ? '#f7faff' : '#e9f1ff')
- }
- >
- |
- {startIndex + index + 1}
- |
-
- {extractLastNumberOrderId(item.OrderId)}
- |
-
- {item.CustName || '—'}
- |
-
- {item.CustMobile || '—'}
- |
- {/*
+ }
+ >
+ |
+ {startIndex + index + 1}
+ |
+
+ {extractLastNumberOrderId(item.OrderId)}
+ |
+
+ {item.CustName || '—'}
+ |
+
+ {item.CustMobile || '—'}
+ |
+ {/*
{item.BookedBy || "—"}
| */}
-
- {item.PaymentTypeName || '—'}
- |
-
- ₹{item.Amount?.toLocaleString()}
- |
-
- ))
- ) : (
-
+ |
+ {item.PaymentTypeName || '—'}
+ |
- No booking data available
+ ₹{item.Amount?.toLocaleString()}
|
- )}
-
-
-
- {/* Pagination */}
- {totalPages > 1 && (
-
- {currentPage == 1 ? (
- ''
- ) : (
-
+
+ {/* Pagination */}
+ {totalPages > 1 && (
+
+ {currentPage == 1 ? (
+ ''
+ ) : (
-
- )}
-
-
+ )}
- {/* Modal with table for multiple Net Amt */}
+
+ Page {currentPage} of {totalPages}
+
-
setIsNetAmtModalOpen(false)}
- handleSubmit={() => setIsNetAmtModalOpen(false)}
- width={800}
- footer={false}
- >
-
-
-
-
- |
- Cash
- |
-
- UPI
- |
-
- Card
- |
-
- Credit
- |
-
- Business UPI
- |
-
+ setCurrentPage((p) => Math.min(p + 1, totalPages))
+ }
+ disabled={currentPage === totalPages}
+ style={{
+ padding: '5px 10px',
+ backgroundColor: '#003366',
+ color: '#fff',
+ border: 'none',
+ borderRadius: '4px',
+ cursor:
+ currentPage === totalPages ? 'not-allowed' : 'pointer',
+ opacity: currentPage === totalPages ? 0.5 : 1,
+ }}
+ >
+ Next
+
+
+ )}
+
+
+
+ {/* Modal with table for multiple Net Amt */}
+
+ setIsNetAmtModalOpen(false)}
+ handleSubmit={() => setIsNetAmtModalOpen(false)}
+ width={800}
+ footer={false}
+ >
+
+
+
+
+ |
+ Cash
+ |
+
+ UPI
+ |
+
+ Card
+ |
+
+ Credit
+ |
+
+ Business UPI
+ |
+
+ Total
+ |
+
+
+ |
+ Count
+ |
+
+ Amt
+ |
+
+ Count
+ |
+
+ Amt
+ |
+
+ Count
+ |
+
+ Amt
+ |
+
+ Count
+ |
+
+ Amt
+ |
+
+ Count
+ |
+
+ Amt
+ |
+
+
+
+
+ {orderDetails?.map((item, index) => {
+ const total =
+ (item.CashAmount || 0) +
+ (item.UpiAmount || 0) +
+ (item.CardAmount || 0) +
+ (item.CreditAmount || 0);
+
+ return (
+
- Total
-
-
-
- |
- Count
- |
-
- Amt
- |
-
- Count
- |
-
- Amt
- |
-
- Count
- |
-
- Amt
- |
-
- Count
- |
-
- Amt
- |
-
- Count
- |
-
- Amt
- |
-
-
-
-
- {orderDetails?.map((item, index) => {
- const total =
- (item.CashAmount || 0) +
- (item.UpiAmount || 0) +
- (item.CardAmount || 0) +
- (item.CreditAmount || 0);
-
- return (
-
- (e.currentTarget.style.backgroundColor = '#e6f2ff')
- }
- onMouseLeave={(e) =>
+ onMouseEnter={(e) =>
+ (e.currentTarget.style.backgroundColor = '#e6f2ff')
+ }
+ onMouseLeave={(e) =>
(e.currentTarget.style.backgroundColor =
index % 2 === 0 ? '#f7faff' : '#ffffff')
- }
+ }
+ >
+ |
- |
- {item.CashCount}
- |
-
- {item.CashAmount}
- |
-
- {item.UpiCount}
- |
-
- {item.UpiAmount}
- |
-
- {item.CardCount}
- |
-
- {item.CardAmount}
- |
-
- {item.CreditCount}
- |
-
- {item.CreditAmount}
- |
-
- {item.BusinessUpiCount}
- |
-
- {item.BusinessUpiAmount}
- |
-
- {total}
- |
-
- );
- })}
-
-
-
-
+ {item.CashCount}
+
+ |
+ {item.CashAmount}
+ |
+
+ {item.UpiCount}
+ |
+
+ {item.UpiAmount}
+ |
+
+ {item.CardCount}
+ |
+
+ {item.CardAmount}
+ |
+
+ {item.CreditCount}
+ |
+
+ {item.CreditAmount}
+ |
+
+ {item.BusinessUpiCount}
+ |
+
+ {item.BusinessUpiAmount}
+ |
+
+ {total}
+ |
+
+ );
+ })}
+
+
+
+
-
{
- setIsReceivedModelOpen(false);
- }}
- columns={columns}
- tableData={TableData}
- handlePageChange={handlePageChange}
- customTable={false}
- />
+ {
+ setIsReceivedModelOpen(false);
+ }}
+ columns={columns}
+ tableData={TableData}
+ handlePageChange={handlePageChange}
+ customTable={false}
+ />
- setModalProductDetails(d)}
- onSubmit={handleModalSubmit}
- />
-