{Array.isArray(OrderCardDetail) &&
OrderCardDetail?.length >= 1 &&
(isMobile || screenwidth <= 768) && }
{tableOptions
.filter((item) => item.OptionName === 'AddCustomer')
.map((filteredItem) => (
))}
{paybtns?.length > 1 && (
0) &&
!unpaidFlow &&
OrderStatus
? 'none'
: 'auto',
opacity:
(BookingType === 'Dine In' ||
BookingTypeBoth ||
CheckOrderType?.length > 0) &&
!unpaidFlow &&
OrderStatus
? 0.5
: 1,
width: '2rem',
}}
>
{!OtherServicesglobal && (
{' '}
)}
)}
{tableOptions?.filter((item) => item.OptionName === 'AddCustomer')
.length === 1 || navCust === true ? (
{Object.keys(useOptions)?.length > 0 &&
useOptions?.some((flow) =>
flow.OptionDetails.some(
(option) =>
option.OptionName === 'Pay at the counter' &&
option.ModeDetails.some(
(mode) => mode.ModeName === 'Credit'
)
)
) &&
!OtherServicesglobal && (
{' '}
0 && 'not-allowed',
color:
OrderCardDetail?.length > 0 ||
(selOption?.value === undefined &&
GlobalAddCustomerDetails1?.length === 0 &&
GetCustId?.CustMobile === undefined)
? 'gray'
: 'rgb(18, 146, 238)',
fontSize: '28px',
}}
/>
)}
) : (
''
)}
{/* Customer Orders */}
{GetCustId && (
{' '}
{
if (
CheckBookingStatus !== 'Close' &&
!addnewAccess &&
!(OrderCardDetail?.length > 0)
) {
setCustomerPreviesOrders(true);
}
}}
style={{
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
color:
OrderCardDetail?.length > 0 ||
(OrderCardDetail?.length > 0 &&
GetCustId?.CustMobile === undefined)
? 'gray'
: 'rgb(18, 146, 238)',
fontSize: '25px',
display: 'flex',
alignItems: 'center',
height: '2.46rem',
width: '1.5rem',
}}
>
)}
{tabledata?.length > 0 && dinePreference && (
{tableOptions
.filter((item) => item.OptionName === 'UnpaidBill')
.map((filteredItem) => (
{!OtherServicesglobal && (
{' '}
{
(setUnpaidOpen(true), getUnpaiddatas());
}}
/>
)}
))}
)}
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
{' '}
)}
{dinePreference && (
{(BookingType === 'Dine In' ||
BookingTypeBoth ||
CheckOrderType?.length > 0) &&
!unpaidFlow &&
SelectedTableDetails?.length !== 0 && (
<>
{' '}
FirstPaymentclick === false && !addnewAccess
? changeOrderStatus()
: ''
}
/>
{FirstPaymentclick === false &&
!addnewAccess &&
!OrderStatus &&
}
>
)}
)}
{!OtherServicesglobal && (
{tableOptions?.map((item) => (
<>
{unpaidFlow == false
? item?.OptionName == 'Hold' &&
!BookingTypeBoth &&
BookingType !== 'Dine In' &&
OrderCardDetail?.length != 0 &&
CheckOrderType?.length === 0 &&
OrderType != 'Failed' &&
paybtns?.length > 0 &&
CheckBookingStatus != 'Close' &&
!addnewAccess && (
AddBookingDetails('Hold')}
style={{
color: 'default',
backgroundColor: '#eef3f3',
}}
>
HOLD ✋
✋
)
: ''}
{unpaidFlow === false &&
item?.OptionName === 'Hold' &&
!BookingTypeBoth &&
BookingType !== 'Dine In' &&
Holddata?.length > 0 &&
OrderCardDetail?.length === 0 &&
paybtns?.length > 0 &&
CheckBookingStatus != 'Close' &&
!addnewAccess && (
HandleholdModelOpen()}
style={{
color: Holddata ? '#000000' : 'default',
pointerEvents:
OrderType === 'Failed' ? 'none' : 'auto',
}}
>
Recall
✋
)}
>
))}
)}
0 &&
paybtnselected &&
CheckBookingStatus != 'Close'
? !OrderStatus
? salesBillEdit &&
currentOrderNetAmount < previousNetAmount
? 'BSBIllingTable5-paybtn-noitems'
: 'BSBIllingTable5-paybtn-noitems'
: 'BSBIllingTable5-paybtn-noitems Order'
: 'BSBIllingTable5-paybtn-noitems-disable'
}
// onClick={() => {
// (qrCode && SelectedUPIPayOption === "Default") ? UpiPayment() : OrderStatus ? AddBookingDetails("Dine-In") : AddBookingDetails(BookingType, true);
// }}
onClick={
// BranchFinancialStatus==='N'? financialYearError:
handleButtonClick
}
>
{!OrderStatus ? (
salesBillEdit &&
currentOrderNetAmount < previousNetAmount ? (
Refund: ₹
{(previousNetAmount || 0) -
(currentOrderNetAmount || 0)}
) : (
<>
{/* ₹ {Math.round(TotalAmount)} */}
{isMobile ? (
`₹ ${safeRound(
OrderType === 'Failed'
? FailedTotalAmt
: credit && overAllBal >= 0
? Math.max(0, TotalAmount - overAllBal)
: TotalAmount
)}`
) : (
₹{' '}
= 0
? Math.max(0, TotalAmount - overAllBal)
: TotalAmount
)}
/>
)}
>
)
) : (
ORDER
)}