{/* {Array.isArray(OrderCardDetail) && OrderCardDetail?.length >= 1 && (
0) &&
!unpaidFlow &&
OrderStatus
? 'none'
: 'auto',
opacity:
(BookingType === 'Dine In' ||
BookingTypeBoth ||
CheckOrderType?.length > 0) &&
!unpaidFlow &&
OrderStatus
? 0.5
: 1,
}}
>
{paybtns?.length > 0 &&
currentOrderNetAmount >= previousNetAmount ? (
paybtns?.map((payment) => (
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
? handleUPIButtonClick(
payment.ModeId,
payment.ModeName
)
: handlePaymentMode(
payment.ModeId,
payment.ModeName
)
}
>
{payment.ModeName}
{payment?.ModeName?.toLowerCase() === 'card' && (
)}
{payment?.ModeName?.toLowerCase() === 'upi' && (
)}
))
) : currentOrderNetAmount < previousNetAmount &&
salesBillEdit &&
refundPayBtns.length > 0 ? (
refundPayBtns.map((payment) => (
handleRefundPaymentMode(
payment?.ConfigId,
payment?.ConfigName
)
}
>
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && UPI
} */}
{payment.ConfigName}
))
) : (
Please Set Payment Options
)}
{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 && (
{tableOptions
?.filter((item) => item.OptionName === 'UnpaidBill')
.map((filteredItem) => (
{!OtherServicesglobal && (
{' '}
{
(setUnpaidOpen(true), getUnpaiddatas());
}}
/>
)}
))}
)}
{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' &&
BookingType !== 'Dine In' &&
!BookingTypeBoth &&
OrderCardDetail?.length != 0 &&
!OrderStatus &&
OrderType != 'Failed' &&
paybtns?.length > 0 &&
CheckBookingStatus != 'Close' &&
!addnewAccess && (
<>
AddBookingDetails('Hold')}
className={
FirstPaymentclick === false
? 'hold-btn'
: 'hold-btn-disable'
}
>
Hold
>
)
: ''}
{unpaidFlow == false
? item?.OptionName == 'Hold' &&
BookingType !== 'Dine In' &&
!BookingTypeBoth &&
Holddata?.length > 0 &&
OrderCardDetail?.length == 0 &&
CheckBookingStatus != 'Close' &&
paybtns?.length > 0 &&
!addnewAccess && (
{' '}
HandleholdModelOpen()}
style={{
fontSize: '28px',
cursor: 'pointer',
color: Holddata ? '#52c41a' : 'default',
pointerEvents:
OrderType === 'Failed' ? 'none' : 'auto',
}}
/>
)
: ''}
>
))}
)}