import { DefaultModal } from "../../../../Components/Modal/DefaultModal" import { extractLastNumberOrderId } from "../../../../Services/Others" import '../../../../Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss'; const SalesDetailsModal = ({ isModalOpen = false, setIsModalOpen = () => { }, currentData = [], currentPage, totalPages, setCurrentPage = () => { }, startIndex }) => { return ( setIsModalOpen(false)} handleSubmit={() => setIsModalOpen(false)} width={700} footer={false} >
{/* */} {currentData?.length > 0 ? ( currentData?.map((item, index) => ( (e.currentTarget.style.backgroundColor = '#d6e4ff') } onMouseLeave={(e) => (e.currentTarget.style.backgroundColor = index % 2 === 0 ? '#f7faff' : '#e9f1ff') } > {/* */} )) ) : ( )}
S.No Order ID Customer Mobile Booked By Payment Type Amount (₹)
{startIndex + index + 1} {extractLastNumberOrderId(item.OrderId)} {item.CustName || '—'} {item.CustMobile || '—'} {item.BookedBy || "—"} {item.PaymentTypeName || '—'} ₹{item.Amount?.toLocaleString()}
No booking data available
{/* Pagination */} {totalPages > 1 && (
{currentPage == 1 ? ( '' ) : ( )} Page {currentPage} of {totalPages}
)}
) } const SalesNetAmountModal = ({ isNetAmtModalOpen = false, setIsNetAmtModalOpen = () => { }, orderDetails = [], RefundAmt }) => { return ( setIsNetAmtModalOpen(false)} handleSubmit={() => setIsNetAmtModalOpen(false)} width={800} footer={false} >
{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) => (e.currentTarget.style.backgroundColor = index % 2 === 0 ? '#f7faff' : '#ffffff') } > ); })}
Cash UPI Card Credit Business UPI Refund Amt Total
Count Amt Count Amt Count Amt Count Amt Count Amt
{item.CashCount} {item.CashAmount} {item.UpiCount} {item.UpiAmount} {item.CardCount} {item.CardAmount} {item.CreditCount} {item.CreditAmount} {item.BusinessUpiCount} {item.BusinessUpiAmount} {RefundAmt} {total-RefundAmt}
) } export { SalesDetailsModal, SalesNetAmountModal };