Merge pull request 'priceoveride' (#233) from priceoverride into main
Reviewed-on: Pozomind/pozo-retail-app#233
This commit is contained in:
commit
18121bc48b
File diff suppressed because it is too large
Load Diff
|
|
@ -2599,7 +2599,7 @@ const BSBillingTable3 = () => {
|
|||
{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)}`
|
||||
|
|
@ -2876,7 +2876,7 @@ const BSBillingTable3 = () => {
|
|||
{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)}`
|
||||
|
|
@ -3201,7 +3201,7 @@ const BSBillingTable3 = () => {
|
|||
{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)}`
|
||||
|
|
@ -3511,7 +3511,7 @@ const BSBillingTable3 = () => {
|
|||
{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)}`
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ const BSBillingTable3Pay = () => {
|
|||
const ProdSubCat = useSelector(GlobalProductSubCategorie);
|
||||
const BSLayoutData = useSelector(getTemplateData);
|
||||
const Combodata = useSelector(GlobalCombocarddata, shallowEqual);
|
||||
|
||||
console.log(PaymentOptions, "PaymentOptions")
|
||||
const Custdisable = useSelector(GlobalSelectedCustDisable);
|
||||
const SettingDataSelector = useSelector(PreferenceData);
|
||||
|
||||
|
|
@ -394,7 +394,6 @@ const BSBillingTable3Pay = () => {
|
|||
);
|
||||
|
||||
console.log(OrderCardDetail, 'OrderCardDetail');
|
||||
//Total calculation
|
||||
const TotalItems = OrderCardDetail?.length;
|
||||
const [formattedDate, setFormattedDate] = useState('');
|
||||
const [UpiOptionOpen, setUpiOptionOpen] = useState(false);
|
||||
|
|
@ -437,6 +436,7 @@ const BSBillingTable3Pay = () => {
|
|||
const [PaymentgatewayUPI, setPaymentgatewayUPI] = useState([]);
|
||||
const [PaymentDeviceUPI, setPaymentDeviceUPI] = useState([]);
|
||||
const [UpiPayOption, setUpiPayOption] = useState([]);
|
||||
console.log(UpiPayOption, "UpiPayOption")
|
||||
const [BusinessPayOption, setBusinessPayoption] = useState([]);
|
||||
const [CardPayOption, setCardPayOption] = useState([]);
|
||||
const [Splitpayment, setSplitpayment] = useState(false);
|
||||
|
|
@ -483,6 +483,7 @@ const BSBillingTable3Pay = () => {
|
|||
|
||||
const [OrderStatus, setOrderStatus] = useState(true);
|
||||
const GlobaluseOptions = useSelector(GlobalCommonPaymentOptions);
|
||||
console.log(GlobaluseOptions, "GlobaluseOptions")
|
||||
const [useOptions, setuseOptions] = useState([]);
|
||||
const paymentloader = useSelector(GlobalPayementloader);
|
||||
const [UnpaidConfirmation, setUnpaidConfirmation] = useState(false);
|
||||
|
|
@ -1011,7 +1012,7 @@ const BSBillingTable3Pay = () => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -1091,8 +1092,8 @@ const BSBillingTable3Pay = () => {
|
|||
}
|
||||
};
|
||||
// if (salesBillEdit) {
|
||||
setDefaultPaymentOption();
|
||||
// }
|
||||
setDefaultPaymentOption();
|
||||
// }
|
||||
}, [defaultPaymentTrigger, salesBillEdit]);
|
||||
|
||||
const TokenPrint = async (index) => {
|
||||
|
|
@ -1632,6 +1633,7 @@ const BSBillingTable3Pay = () => {
|
|||
//dhana
|
||||
|
||||
const getPaymentOptionFeature = async () => {
|
||||
|
||||
const FiltersalesPayment = GlobaluseOptions?.filter(
|
||||
(item) => item.FlowName?.toLowerCase() === 'sales'
|
||||
);
|
||||
|
|
@ -1666,6 +1668,7 @@ const BSBillingTable3Pay = () => {
|
|||
filterpaymentdevice?.[0]?.ModeDetails?.filter((item) =>
|
||||
item?.ModeName?.toLowerCase()?.includes('upi')
|
||||
) || [];
|
||||
|
||||
setPaymentOptions(filterpaycounter?.[0]?.ModeDetails);
|
||||
setPaymentUpiOptions(
|
||||
FiltersalesPayment?.[0]?.PaymentDetails?.Payatthecounter
|
||||
|
|
@ -2207,6 +2210,7 @@ const BSBillingTable3Pay = () => {
|
|||
};
|
||||
|
||||
const Booking = async (value, pay) => {
|
||||
|
||||
const TakAwayId = ConfigDataList?.find(
|
||||
(a) => a?.ConfigName === 'TakeAway'
|
||||
)?.ConfigId;
|
||||
|
|
@ -2232,15 +2236,15 @@ const BSBillingTable3Pay = () => {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -2257,6 +2261,10 @@ const BSBillingTable3Pay = () => {
|
|||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -2332,7 +2340,7 @@ const BSBillingTable3Pay = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -2349,9 +2357,9 @@ const BSBillingTable3Pay = () => {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
SalesPaymentType: 'normal',
|
||||
PaymentDetail: [
|
||||
|
|
@ -2366,8 +2374,8 @@ const BSBillingTable3Pay = () => {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -2380,15 +2388,15 @@ const BSBillingTable3Pay = () => {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -2408,29 +2416,29 @@ const BSBillingTable3Pay = () => {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -2441,13 +2449,13 @@ const BSBillingTable3Pay = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -2525,14 +2533,14 @@ const BSBillingTable3Pay = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2692,14 +2700,14 @@ const BSBillingTable3Pay = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2802,14 +2810,14 @@ const BSBillingTable3Pay = () => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2986,14 +2994,14 @@ const BSBillingTable3Pay = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -3012,7 +3020,7 @@ const BSBillingTable3Pay = () => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -3731,9 +3739,9 @@ const BSBillingTable3Pay = () => {
|
|||
'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -3755,16 +3763,16 @@ const BSBillingTable3Pay = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
width: '2rem',
|
||||
|
|
@ -3787,14 +3795,14 @@ const BSBillingTable3Pay = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3811,38 +3819,38 @@ const BSBillingTable3Pay = () => {
|
|||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
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',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
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',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{tabledata?.length > 0 && (
|
||||
<>
|
||||
{tableOptions
|
||||
|
|
@ -3916,65 +3924,65 @@ const BSBillingTable3Pay = () => {
|
|||
<>
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Hold (Alt+W)'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold', false)}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Hold (Alt+W)'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold', false)}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
|
||||
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
paybtns?.length > 0 &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Recall (Alt+W)'}
|
||||
isMobile={isMobile}
|
||||
paybtns?.length > 0 &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Recall (Alt+W)'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
</>
|
||||
))}
|
||||
|
|
@ -4020,14 +4028,14 @@ const BSBillingTable3Pay = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -4089,31 +4097,31 @@ const BSBillingTable3Pay = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
{paybtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
paybtns?.map((payment) => (
|
||||
<div className="Table3-cash">
|
||||
<button
|
||||
className={
|
||||
paybtnselected === payment.ModeId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: paybtnselected === payment.ModeId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4127,13 +4135,13 @@ const BSBillingTable3Pay = () => {
|
|||
onClick={() =>
|
||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||
? handleUPIButtonClick(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
: handlePaymentMode(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
}
|
||||
>
|
||||
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||
|
|
@ -4193,10 +4201,10 @@ const BSBillingTable3Pay = () => {
|
|||
<button
|
||||
className={
|
||||
refundPaySelected === payment.ConfigId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: refundPaySelected === payment.ConfigId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4468,9 +4476,9 @@ const BSBillingTable3Pay = () => {
|
|||
addnewAccess
|
||||
? 'BSBillingTable3-paybtn-deactive'
|
||||
: FirstPaymentclick === false &&
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
? !OrderStatus
|
||||
? salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount
|
||||
|
|
@ -4488,7 +4496,7 @@ const BSBillingTable3Pay = () => {
|
|||
// financialYearError:
|
||||
handleButtonClick
|
||||
}
|
||||
//dhana
|
||||
//dhana
|
||||
>
|
||||
{!OrderStatus ? (
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount ? (
|
||||
|
|
@ -4717,14 +4725,14 @@ const BSBillingTable3Pay = () => {
|
|||
OrderType === 'Failed'
|
||||
? FailedTotalAmt
|
||||
: Math.round(
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
}
|
||||
failedOrderData={failedOrderData}
|
||||
/>
|
||||
|
|
@ -4800,9 +4808,9 @@ const BSBillingTable3Pay = () => {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue