jut chnge
This commit is contained in:
parent
c4818c08e7
commit
0fc07aaeac
|
|
@ -1419,6 +1419,49 @@ export const getMissedOrderids = createAsyncThunk(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// get /LastBuyProductList
|
||||||
|
export const CustomerOrderList = createAsyncThunk(
|
||||||
|
'CustomerOrderList/LastBuyProductList',
|
||||||
|
async (data) => {
|
||||||
|
const { AppId, CompId, BranchId, MobileNo,FromDate,ToDate } = data;
|
||||||
|
if (
|
||||||
|
AppId != null &&
|
||||||
|
AppId != undefined &&
|
||||||
|
CompId != null &&
|
||||||
|
CompId != undefined &&
|
||||||
|
BranchId != null &&
|
||||||
|
BranchId != undefined &&
|
||||||
|
FromDate != null &&
|
||||||
|
FromDate != undefined &&
|
||||||
|
ToDate != null &&
|
||||||
|
ToDate != undefined &&
|
||||||
|
MobileNo != null &&
|
||||||
|
MobileNo != undefined
|
||||||
|
) {
|
||||||
|
return await axiosRetailInstanceData.get(
|
||||||
|
`/LastBuyProductList?compId=${CompId}&branchId=${BranchId}&appId=${AppId}&mobileNo=${MobileNo}&fromDate=${FromDate}&toDate=${ToDate}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (
|
||||||
|
AppId != null &&
|
||||||
|
AppId != undefined &&
|
||||||
|
CompId != null &&
|
||||||
|
CompId != undefined &&
|
||||||
|
BranchId != null &&
|
||||||
|
BranchId != undefined &&
|
||||||
|
MobileNo != null &&
|
||||||
|
MobileNo != undefined
|
||||||
|
) {
|
||||||
|
return await axiosRetailInstanceData.get(
|
||||||
|
`/LastBuyProductList?compId=${CompId}&branchId=${BranchId}&appId=${AppId}&mobileNo=${MobileNo}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
PrintStyle: null,
|
PrintStyle: null,
|
||||||
CustId: null,
|
CustId: null,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Popover, Modal } from 'antd';
|
import { Badge, Popover, Modal, Tooltip } from 'antd';
|
||||||
import { Tables } from '../../../../../Components/Tables/Table';
|
import { Tables } from '../../../../../Components/Tables/Table';
|
||||||
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
||||||
import { UpOutlined } from '@ant-design/icons';
|
import { UpOutlined } from '@ant-design/icons';
|
||||||
|
|
@ -181,7 +181,7 @@ import {
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import BSOtherServiceClaim from '../../UtillComponents/BSOtherServiceClaim.jsx';
|
import BSOtherServiceClaim from '../../UtillComponents/BSOtherServiceClaim.jsx';
|
||||||
|
|
@ -204,6 +204,7 @@ import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded
|
||||||
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -365,6 +366,7 @@ export default function BST1Payment() {
|
||||||
const [CardPayOption, setCardPayOption] = useState([]);
|
const [CardPayOption, setCardPayOption] = useState([]);
|
||||||
const [Splitpayment, setSplitpayment] = useState(false);
|
const [Splitpayment, setSplitpayment] = useState(false);
|
||||||
const [UnpaidConfirmation, setUnpaidConfirmation] = useState(false);
|
const [UnpaidConfirmation, setUnpaidConfirmation] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const [unpaidselectedindex, setunpaidselectedindex] = useState();
|
const [unpaidselectedindex, setunpaidselectedindex] = useState();
|
||||||
const GlobaluseOptions = useSelector(GlobalCommonPaymentOptions);
|
const GlobaluseOptions = useSelector(GlobalCommonPaymentOptions);
|
||||||
const [useOptions, setuseOptions] = useState([]);
|
const [useOptions, setuseOptions] = useState([]);
|
||||||
|
|
@ -3674,6 +3676,43 @@ export default function BST1Payment() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
||||||
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
@ -4344,6 +4383,24 @@ export default function BST1Payment() {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Popover, Modal } from 'antd';
|
import { Badge, Popover, Modal, Tooltip } from 'antd';
|
||||||
import {
|
import {
|
||||||
ArrowRightOutlined,
|
ArrowRightOutlined,
|
||||||
UpCircleOutlined,
|
UpCircleOutlined,
|
||||||
|
|
@ -189,7 +189,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -352,6 +352,7 @@ const BSBillingTable2 = () => {
|
||||||
const [Success, SetSuccess] = useState();
|
const [Success, SetSuccess] = useState();
|
||||||
const [brachName, setbrachName] = useState('');
|
const [brachName, setbrachName] = useState('');
|
||||||
const [UpiOpen, setUpiOpen] = useState(false);
|
const [UpiOpen, setUpiOpen] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
||||||
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
||||||
|
|
||||||
|
|
@ -1414,7 +1415,7 @@ const BSBillingTable2 = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
|
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -1966,15 +1967,15 @@ const BSBillingTable2 = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -2066,7 +2067,7 @@ const BSBillingTable2 = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -2083,9 +2084,9 @@ const BSBillingTable2 = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
// "Credit": TotalAmount,
|
// "Credit": TotalAmount,
|
||||||
// "Debit": 0,
|
// "Debit": 0,
|
||||||
|
|
@ -2100,8 +2101,8 @@ const BSBillingTable2 = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -2110,9 +2111,9 @@ const BSBillingTable2 = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -2131,26 +2132,26 @@ const BSBillingTable2 = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -2159,7 +2160,7 @@ const BSBillingTable2 = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -2235,14 +2236,14 @@ const BSBillingTable2 = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2394,14 +2395,14 @@ const BSBillingTable2 = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2505,14 +2506,14 @@ const BSBillingTable2 = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2689,14 +2690,14 @@ const BSBillingTable2 = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2715,7 +2716,7 @@ const BSBillingTable2 = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -3634,16 +3635,16 @@ const BSBillingTable2 = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
width: '2rem',
|
width: '2rem',
|
||||||
|
|
@ -3663,14 +3664,14 @@ const BSBillingTable2 = () => {
|
||||||
width: '1.6rem',
|
width: '1.6rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3696,14 +3697,14 @@ const BSBillingTable2 = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3805,16 +3806,16 @@ const BSBillingTable2 = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
}}
|
}}
|
||||||
|
|
@ -3825,10 +3826,10 @@ const BSBillingTable2 = () => {
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
paybtnselected === payment.ModeId &&
|
paybtnselected === payment.ModeId &&
|
||||||
(UpinotSelected || CardoptionnotSelected)
|
(UpinotSelected || CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode-notupisel'
|
? 'Btn-payment-mode-notupisel'
|
||||||
: paybtnselected === payment.ModeId &&
|
: paybtnselected === payment.ModeId &&
|
||||||
(!UpinotSelected || !CardoptionnotSelected)
|
(!UpinotSelected || !CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode'
|
? 'Btn-payment-mode'
|
||||||
: 'Btn-payment-mode-sel'
|
: 'Btn-payment-mode-sel'
|
||||||
}
|
}
|
||||||
|
|
@ -3842,9 +3843,9 @@ const BSBillingTable2 = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||||
? handleUPIButtonClick(
|
? handleUPIButtonClick(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
: handlePaymentMode(payment.ModeId, payment.ModeName)
|
: handlePaymentMode(payment.ModeId, payment.ModeName)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -3933,9 +3934,9 @@ const BSBillingTable2 = () => {
|
||||||
OrderCardDetail?.length > 0 && 'not-allowed',
|
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length > 0 ||
|
OrderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3950,6 +3951,41 @@ const BSBillingTable2 = () => {
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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 && (
|
{tabledata?.length > 0 && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4015,68 +4051,68 @@ const BSBillingTable2 = () => {
|
||||||
<>
|
<>
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
OrderCardDetail?.length != 0 &&
|
OrderCardDetail?.length != 0 &&
|
||||||
!OrderStatus &&
|
!OrderStatus &&
|
||||||
OrderType != 'Failed' &&
|
OrderType != 'Failed' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<>
|
<>
|
||||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||||
<button
|
<button
|
||||||
onClick={() => AddBookingDetails('Hold')}
|
onClick={() => AddBookingDetails('Hold')}
|
||||||
className={
|
className={
|
||||||
FirstPaymentclick === false
|
FirstPaymentclick === false
|
||||||
? 'hold-btn'
|
? 'hold-btn'
|
||||||
: 'hold-btn-disable'
|
: 'hold-btn-disable'
|
||||||
}
|
}
|
||||||
|
>
|
||||||
|
<BsPauseFill />
|
||||||
|
<p
|
||||||
|
className="hold-btn-txt"
|
||||||
|
style={{
|
||||||
|
fontFamily: FontFamily['para'],
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<BsPauseFill />
|
Hold
|
||||||
<p
|
</p>
|
||||||
className="hold-btn-txt"
|
</button>
|
||||||
style={{
|
</TooltipWrapper>
|
||||||
fontFamily: FontFamily['para'],
|
</>
|
||||||
}}
|
)
|
||||||
>
|
|
||||||
Hold
|
|
||||||
</p>
|
|
||||||
</button>
|
|
||||||
</TooltipWrapper>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
: ''}
|
: ''}
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
Holddata?.length > 0 &&
|
Holddata?.length > 0 &&
|
||||||
OrderCardDetail?.length == 0 &&
|
OrderCardDetail?.length == 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<Badge
|
<Badge
|
||||||
count={Holddata?.length}
|
count={Holddata?.length}
|
||||||
size={'small'}
|
size={'small'}
|
||||||
offset={[0, 7]}
|
offset={[0, 7]}
|
||||||
>
|
>
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => HandleholdModelOpen()}
|
onClick={() => HandleholdModelOpen()}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: Holddata ? '#52c41a' : 'default',
|
color: Holddata ? '#52c41a' : 'default',
|
||||||
pointerEvents:
|
pointerEvents:
|
||||||
OrderType === 'Failed' ? 'none' : 'auto',
|
OrderType === 'Failed' ? 'none' : 'auto',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Badge>
|
</Badge>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
@ -4092,9 +4128,9 @@ const BSBillingTable2 = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'billing-btn-deactive'
|
? 'billing-btn-deactive'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
OrderCardDetail?.length > 0 &&
|
OrderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus != 'Close'
|
CheckBookingStatus != 'Close'
|
||||||
? 'billing-btn'
|
? 'billing-btn'
|
||||||
: 'billing-btn-deactive'
|
: 'billing-btn-deactive'
|
||||||
}
|
}
|
||||||
|
|
@ -4460,9 +4496,9 @@ const BSBillingTable2 = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4542,6 +4578,7 @@ const BSBillingTable2 = () => {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DefaultModal
|
<DefaultModal
|
||||||
open={businessUPI}
|
open={businessUPI}
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
|
|
@ -4579,6 +4616,23 @@ const BSBillingTable2 = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
DownCircleOutlined,
|
DownCircleOutlined,
|
||||||
UpOutlined,
|
UpOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { Popover, Badge, Modal } from 'antd';
|
import { Popover, Badge, Modal, Tooltip } from 'antd';
|
||||||
import {
|
import {
|
||||||
printDiv,
|
printDiv,
|
||||||
extractLastNumberOrderId,
|
extractLastNumberOrderId,
|
||||||
|
|
@ -186,7 +186,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -210,6 +210,7 @@ import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
|
||||||
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -898,7 +899,7 @@ const BSBillingTable3Pay = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
|
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -2112,15 +2113,15 @@ const BSBillingTable3Pay = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -2212,7 +2213,7 @@ const BSBillingTable3Pay = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -2229,9 +2230,9 @@ const BSBillingTable3Pay = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
SalesPaymentType: 'normal',
|
SalesPaymentType: 'normal',
|
||||||
PaymentDetail: [
|
PaymentDetail: [
|
||||||
|
|
@ -2244,8 +2245,8 @@ const BSBillingTable3Pay = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -2253,9 +2254,9 @@ const BSBillingTable3Pay = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -2274,26 +2275,26 @@ const BSBillingTable3Pay = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -2302,7 +2303,7 @@ const BSBillingTable3Pay = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -2377,14 +2378,14 @@ const BSBillingTable3Pay = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2539,14 +2540,14 @@ const BSBillingTable3Pay = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2649,14 +2650,14 @@ const BSBillingTable3Pay = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2833,14 +2834,14 @@ const BSBillingTable3Pay = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2859,7 +2860,7 @@ const BSBillingTable3Pay = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -3571,9 +3572,9 @@ const BSBillingTable3Pay = () => {
|
||||||
OrderCardDetail?.length > 0 && 'not-allowed',
|
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length > 0 ||
|
OrderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3595,16 +3596,16 @@ const BSBillingTable3Pay = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
width: '2rem',
|
width: '2rem',
|
||||||
|
|
@ -3627,14 +3628,14 @@ const BSBillingTable3Pay = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3648,7 +3649,41 @@ const BSBillingTable3Pay = () => {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
|
||||||
|
<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 && (
|
{tabledata?.length > 0 && (
|
||||||
<>
|
<>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -3722,65 +3757,65 @@ const BSBillingTable3Pay = () => {
|
||||||
<>
|
<>
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
OrderCardDetail?.length != 0 &&
|
OrderCardDetail?.length != 0 &&
|
||||||
CheckOrderType?.length === 0 &&
|
CheckOrderType?.length === 0 &&
|
||||||
OrderType != 'Failed' &&
|
OrderType != 'Failed' &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
title={'Hold (Alt+W)'}
|
title={'Hold (Alt+W)'}
|
||||||
isMobile={isMobile}
|
isMobile={isMobile}
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => AddBookingDetails('Hold', false)}
|
onClick={() => AddBookingDetails('Hold', false)}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: '' ? '#52c41a' : '#1292EE',
|
color: '' ? '#52c41a' : '#1292EE',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
Holddata?.length > 0 &&
|
Holddata?.length > 0 &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
OrderCardDetail?.length == 0 &&
|
OrderCardDetail?.length == 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
title={'Recall (Alt+W)'}
|
title={'Recall (Alt+W)'}
|
||||||
isMobile={isMobile}
|
isMobile={isMobile}
|
||||||
|
>
|
||||||
|
{' '}
|
||||||
|
<Badge
|
||||||
|
count={Holddata?.length}
|
||||||
|
size={'small'}
|
||||||
|
offset={[0, 7]}
|
||||||
>
|
>
|
||||||
{' '}
|
<PozoHoldIcon
|
||||||
<Badge
|
className="BSBillingNav-icon-table-icon"
|
||||||
count={Holddata?.length}
|
onClick={() => HandleholdModelOpen()}
|
||||||
size={'small'}
|
style={{
|
||||||
offset={[0, 7]}
|
fontSize: '28px',
|
||||||
>
|
cursor: 'pointer',
|
||||||
<PozoHoldIcon
|
color: Holddata ? '#52c41a' : 'default',
|
||||||
className="BSBillingNav-icon-table-icon"
|
pointerEvents:
|
||||||
onClick={() => HandleholdModelOpen()}
|
OrderType === 'Failed' ? 'none' : 'auto',
|
||||||
style={{
|
}}
|
||||||
fontSize: '28px',
|
/>
|
||||||
cursor: 'pointer',
|
</Badge>
|
||||||
color: Holddata ? '#52c41a' : 'default',
|
</TooltipWrapper>
|
||||||
pointerEvents:
|
)
|
||||||
OrderType === 'Failed' ? 'none' : 'auto',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Badge>
|
|
||||||
</TooltipWrapper>
|
|
||||||
)
|
|
||||||
: ''}
|
: ''}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
@ -3826,14 +3861,14 @@ const BSBillingTable3Pay = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3903,16 +3938,16 @@ const BSBillingTable3Pay = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
}}
|
}}
|
||||||
|
|
@ -3923,10 +3958,10 @@ const BSBillingTable3Pay = () => {
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
paybtnselected === payment.ModeId &&
|
paybtnselected === payment.ModeId &&
|
||||||
(UpinotSelected || CardoptionnotSelected)
|
(UpinotSelected || CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode-notupisel'
|
? 'Btn-payment-mode-notupisel'
|
||||||
: paybtnselected === payment.ModeId &&
|
: paybtnselected === payment.ModeId &&
|
||||||
(!UpinotSelected || !CardoptionnotSelected)
|
(!UpinotSelected || !CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode'
|
? 'Btn-payment-mode'
|
||||||
: 'Btn-payment-mode-sel'
|
: 'Btn-payment-mode-sel'
|
||||||
}
|
}
|
||||||
|
|
@ -3940,13 +3975,13 @@ const BSBillingTable3Pay = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||||
? handleUPIButtonClick(
|
? handleUPIButtonClick(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
: handlePaymentMode(
|
: handlePaymentMode(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||||
|
|
@ -4236,9 +4271,9 @@ const BSBillingTable3Pay = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'BSBillingTable3-paybtn-deactive'
|
? 'BSBillingTable3-paybtn-deactive'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
OrderCardDetail?.length > 0 &&
|
OrderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus != 'Close'
|
CheckBookingStatus != 'Close'
|
||||||
? !OrderStatus
|
? !OrderStatus
|
||||||
? 'BSBillingTable3-paybtn'
|
? 'BSBillingTable3-paybtn'
|
||||||
: 'BSBillingTable3-paybtn Order'
|
: 'BSBillingTable3-paybtn Order'
|
||||||
|
|
@ -4253,7 +4288,7 @@ const BSBillingTable3Pay = () => {
|
||||||
// financialYearError:
|
// financialYearError:
|
||||||
handleButtonClick
|
handleButtonClick
|
||||||
}
|
}
|
||||||
//dhana
|
//dhana
|
||||||
>
|
>
|
||||||
{!OrderStatus ? (
|
{!OrderStatus ? (
|
||||||
<>
|
<>
|
||||||
|
|
@ -4546,9 +4581,9 @@ const BSBillingTable3Pay = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4663,6 +4698,23 @@ const BSBillingTable3Pay = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Modal, Popover } from 'antd';
|
import { Badge, Modal, Popover, Tooltip } from 'antd';
|
||||||
import { BiRightArrowAlt } from 'react-icons/bi';
|
import { BiRightArrowAlt } from 'react-icons/bi';
|
||||||
import { AiOutlineClose } from 'react-icons/ai';
|
import { AiOutlineClose } from 'react-icons/ai';
|
||||||
import BSSummery from '../BSBillingTableSummery/BSSummery';
|
import BSSummery from '../BSBillingTableSummery/BSSummery';
|
||||||
|
|
@ -190,7 +190,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -215,6 +215,7 @@ import CardPopover from '../StandardTable/Utils/CardPopover.jsx';
|
||||||
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
||||||
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -319,6 +320,7 @@ const BSBilling4Payment = () => {
|
||||||
const [paymentModeDisplay, setPaymentModeDisplay] = useState(true);
|
const [paymentModeDisplay, setPaymentModeDisplay] = useState(true);
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const AppId = SessionData?.AppId;
|
const AppId = SessionData?.AppId;
|
||||||
const CompId = SessionData?.CompId;
|
const CompId = SessionData?.CompId;
|
||||||
|
|
@ -773,7 +775,7 @@ const BSBilling4Payment = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
console.log(selectedStyle, style, 'style');
|
console.log(selectedStyle, style, 'style');
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -1996,15 +1998,15 @@ const BSBilling4Payment = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -2097,7 +2099,7 @@ const BSBilling4Payment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -2114,9 +2116,9 @@ const BSBilling4Payment = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
SalesPaymentType: 'normal',
|
SalesPaymentType: 'normal',
|
||||||
PaymentDetail: [
|
PaymentDetail: [
|
||||||
|
|
@ -2129,8 +2131,8 @@ const BSBilling4Payment = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -2138,9 +2140,9 @@ const BSBilling4Payment = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -2159,26 +2161,26 @@ const BSBilling4Payment = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -2187,7 +2189,7 @@ const BSBilling4Payment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -2262,14 +2264,14 @@ const BSBilling4Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2425,14 +2427,14 @@ const BSBilling4Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2539,14 +2541,14 @@ const BSBilling4Payment = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2722,14 +2724,14 @@ const BSBilling4Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2748,7 +2750,7 @@ const BSBilling4Payment = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -2985,9 +2987,9 @@ const BSBilling4Payment = () => {
|
||||||
AppId: AppId,
|
AppId: AppId,
|
||||||
...(AvailableDate && selectedDate
|
...(AvailableDate && selectedDate
|
||||||
? {
|
? {
|
||||||
fromDate: selectedDate?.[0],
|
fromDate: selectedDate?.[0],
|
||||||
toDate: selectedDate?.[1],
|
toDate: selectedDate?.[1],
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||||
|
|
@ -2999,9 +3001,9 @@ const BSBilling4Payment = () => {
|
||||||
ProdSubCat: ProdSubCat,
|
ProdSubCat: ProdSubCat,
|
||||||
...(AvailableDate && selectedDate
|
...(AvailableDate && selectedDate
|
||||||
? {
|
? {
|
||||||
fromDate: selectedDate?.[0],
|
fromDate: selectedDate?.[0],
|
||||||
toDate: selectedDate?.[1],
|
toDate: selectedDate?.[1],
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3012,9 +3014,9 @@ const BSBilling4Payment = () => {
|
||||||
prodCat: prodCat,
|
prodCat: prodCat,
|
||||||
...(AvailableDate && selectedDate
|
...(AvailableDate && selectedDate
|
||||||
? {
|
? {
|
||||||
fromDate: selectedDate?.[0],
|
fromDate: selectedDate?.[0],
|
||||||
toDate: selectedDate?.[1],
|
toDate: selectedDate?.[1],
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3629,9 +3631,9 @@ const BSBilling4Payment = () => {
|
||||||
OrderCardDetail?.length > 0 && 'not-allowed',
|
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length > 0 ||
|
OrderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3652,16 +3654,16 @@ const BSBilling4Payment = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
width: '2rem',
|
width: '2rem',
|
||||||
|
|
@ -3682,14 +3684,14 @@ const BSBilling4Payment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3701,6 +3703,40 @@ const BSBilling4Payment = () => {
|
||||||
</div>
|
</div>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
||||||
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
@ -3715,14 +3751,14 @@ const BSBilling4Payment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3804,61 +3840,61 @@ const BSBilling4Payment = () => {
|
||||||
<>
|
<>
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
OrderCardDetail?.length != 0 &&
|
OrderCardDetail?.length != 0 &&
|
||||||
CheckOrderType?.length === 0 &&
|
CheckOrderType?.length === 0 &&
|
||||||
OrderType != 'Failed' &&
|
OrderType != 'Failed' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => AddBookingDetails('Hold')}
|
onClick={() => AddBookingDetails('Hold')}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: '' ? '#52c41a' : '#1292EE',
|
color: '' ? '#52c41a' : '#1292EE',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
Holddata?.length > 0 &&
|
Holddata?.length > 0 &&
|
||||||
OrderCardDetail?.length == 0 &&
|
OrderCardDetail?.length == 0 &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
title={'Recall'}
|
title={'Recall'}
|
||||||
isMobile={isMobile}
|
isMobile={isMobile}
|
||||||
|
>
|
||||||
|
{' '}
|
||||||
|
<Badge
|
||||||
|
count={Holddata?.length}
|
||||||
|
size={'small'}
|
||||||
|
offset={[0, 7]}
|
||||||
>
|
>
|
||||||
{' '}
|
<PozoHoldIcon
|
||||||
<Badge
|
className="BSBillingNav-icon-table-icon"
|
||||||
count={Holddata?.length}
|
onClick={() => HandleholdModelOpen()}
|
||||||
size={'small'}
|
style={{
|
||||||
offset={[0, 7]}
|
fontSize: '28px',
|
||||||
>
|
cursor: 'pointer',
|
||||||
<PozoHoldIcon
|
color: Holddata ? '#52c41a' : 'default',
|
||||||
className="BSBillingNav-icon-table-icon"
|
pointerEvents:
|
||||||
onClick={() => HandleholdModelOpen()}
|
OrderType === 'Failed' ? 'none' : 'auto',
|
||||||
style={{
|
}}
|
||||||
fontSize: '28px',
|
/>
|
||||||
cursor: 'pointer',
|
</Badge>
|
||||||
color: Holddata ? '#52c41a' : 'default',
|
</TooltipWrapper>
|
||||||
pointerEvents:
|
)
|
||||||
OrderType === 'Failed' ? 'none' : 'auto',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Badge>
|
|
||||||
</TooltipWrapper>
|
|
||||||
)
|
|
||||||
: ''}
|
: ''}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
@ -3884,16 +3920,16 @@ const BSBilling4Payment = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
}}
|
}}
|
||||||
|
|
@ -3904,10 +3940,10 @@ const BSBilling4Payment = () => {
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
paybtnselected === payment.ModeId &&
|
paybtnselected === payment.ModeId &&
|
||||||
(UpinotSelected || CardoptionnotSelected)
|
(UpinotSelected || CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode-notupisel'
|
? 'Btn-payment-mode-notupisel'
|
||||||
: paybtnselected === payment.ModeId &&
|
: paybtnselected === payment.ModeId &&
|
||||||
(!UpinotSelected || !CardoptionnotSelected)
|
(!UpinotSelected || !CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode'
|
? 'Btn-payment-mode'
|
||||||
: 'Btn-payment-mode-sel'
|
: 'Btn-payment-mode-sel'
|
||||||
}
|
}
|
||||||
|
|
@ -3921,13 +3957,13 @@ const BSBilling4Payment = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||||
? handleUPIButtonClick(
|
? handleUPIButtonClick(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
: handlePaymentMode(
|
: handlePaymentMode(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||||
|
|
@ -4210,9 +4246,9 @@ const BSBilling4Payment = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'Table4-Btn-final-price-disabled'
|
? 'Table4-Btn-final-price-disabled'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
OrderCardDetail?.length > 0 &&
|
OrderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus != 'Close'
|
CheckBookingStatus != 'Close'
|
||||||
? !OrderStatus
|
? !OrderStatus
|
||||||
? 'Table4-Btn-final-price'
|
? 'Table4-Btn-final-price'
|
||||||
: 'Table4-Btn-final-price order'
|
: 'Table4-Btn-final-price order'
|
||||||
|
|
@ -4232,7 +4268,7 @@ const BSBilling4Payment = () => {
|
||||||
<div
|
<div
|
||||||
className="Table4-rate"
|
className="Table4-rate"
|
||||||
style={{ fontFamily: FontFamily['head'] }}
|
style={{ fontFamily: FontFamily['head'] }}
|
||||||
// onClick={() => AddBookingDetails(BookingType, true)}
|
// onClick={() => AddBookingDetails(BookingType, true)}
|
||||||
>
|
>
|
||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
`₹ ${Math.round(
|
`₹ ${Math.round(
|
||||||
|
|
@ -4423,8 +4459,8 @@ const BSBilling4Payment = () => {
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={TableData}
|
data={TableData}
|
||||||
dataSource={TableData}
|
dataSource={TableData}
|
||||||
// pagination={handlePageChange}
|
// pagination={handlePageChange}
|
||||||
// onChange={handleChange}
|
// onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
@ -4529,9 +4565,9 @@ const BSBilling4Payment = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4646,6 +4682,23 @@ const BSBilling4Payment = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useState, useRef } from 'react';
|
import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Popover, Badge, Modal } from 'antd';
|
import { Popover, Badge, Modal, Tooltip } from 'antd';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import {
|
import {
|
||||||
UpOutlined,
|
UpOutlined,
|
||||||
|
|
@ -188,7 +188,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -381,6 +381,7 @@ const BSBillingTable5 = () => {
|
||||||
const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger);
|
const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger);
|
||||||
const [defaultPaymentMode, setDefaultPaymentMode] = useState([]);
|
const [defaultPaymentMode, setDefaultPaymentMode] = useState([]);
|
||||||
const [defaultEnabled, setDefaultEnabled] = useState(false);
|
const [defaultEnabled, setDefaultEnabled] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
// Usage
|
// Usage
|
||||||
const allowedNames = ['whatsapp', 'Print', 'SMS'];
|
const allowedNames = ['whatsapp', 'Print', 'SMS'];
|
||||||
const [MobileNoWhatsApp, setMobileNoWhatsApp] = useState();
|
const [MobileNoWhatsApp, setMobileNoWhatsApp] = useState();
|
||||||
|
|
@ -1055,7 +1056,7 @@ const BSBillingTable5 = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
|
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -2010,15 +2011,15 @@ const BSBillingTable5 = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -2109,7 +2110,7 @@ const BSBillingTable5 = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -2126,9 +2127,9 @@ const BSBillingTable5 = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
SalesPaymentType: 'normal',
|
SalesPaymentType: 'normal',
|
||||||
PaymentDetail: [
|
PaymentDetail: [
|
||||||
|
|
@ -2141,8 +2142,8 @@ const BSBillingTable5 = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -2150,9 +2151,9 @@ const BSBillingTable5 = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -2171,26 +2172,26 @@ const BSBillingTable5 = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -2199,7 +2200,7 @@ const BSBillingTable5 = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -2271,14 +2272,14 @@ const BSBillingTable5 = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2432,14 +2433,14 @@ const BSBillingTable5 = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2546,14 +2547,14 @@ const BSBillingTable5 = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2729,14 +2730,14 @@ const BSBillingTable5 = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
rbookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
rbookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2755,7 +2756,7 @@ const BSBillingTable5 = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -3590,16 +3591,16 @@ const BSBillingTable5 = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
}}
|
}}
|
||||||
|
|
@ -3610,10 +3611,10 @@ const BSBillingTable5 = () => {
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
paybtnselected === payment.ModeId &&
|
paybtnselected === payment.ModeId &&
|
||||||
(UpinotSelected || CardoptionnotSelected)
|
(UpinotSelected || CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode-notupisel'
|
? 'Btn-payment-mode-notupisel'
|
||||||
: paybtnselected === payment.ModeId &&
|
: paybtnselected === payment.ModeId &&
|
||||||
(!UpinotSelected || !CardoptionnotSelected)
|
(!UpinotSelected || !CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode'
|
? 'Btn-payment-mode'
|
||||||
: 'Btn-payment-mode-sel'
|
: 'Btn-payment-mode-sel'
|
||||||
}
|
}
|
||||||
|
|
@ -3627,13 +3628,13 @@ const BSBillingTable5 = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||||
? handleUPIButtonClick(
|
? handleUPIButtonClick(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
: handlePaymentMode(
|
: handlePaymentMode(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -3858,16 +3859,16 @@ const BSBillingTable5 = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
width: '2rem',
|
width: '2rem',
|
||||||
|
|
@ -3887,14 +3888,14 @@ const BSBillingTable5 = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3941,9 +3942,9 @@ const BSBillingTable5 = () => {
|
||||||
OrderCardDetail?.length > 0 && 'not-allowed',
|
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length > 0 ||
|
OrderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3956,7 +3957,40 @@ const BSBillingTable5 = () => {
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4000,14 +4034,14 @@ const BSBillingTable5 = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -4057,28 +4091,28 @@ const BSBillingTable5 = () => {
|
||||||
<>
|
<>
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
OrderCardDetail?.length != 0 &&
|
OrderCardDetail?.length != 0 &&
|
||||||
CheckOrderType?.length === 0 &&
|
CheckOrderType?.length === 0 &&
|
||||||
OrderType != 'Failed' &&
|
OrderType != 'Failed' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||||
<button
|
<button
|
||||||
className="BSBIllingTable5-cnclbtn"
|
className="BSBIllingTable5-cnclbtn"
|
||||||
onClick={() => AddBookingDetails('Hold')}
|
onClick={() => AddBookingDetails('Hold')}
|
||||||
style={{
|
style={{
|
||||||
color: 'default',
|
color: 'default',
|
||||||
backgroundColor: '#eef3f3',
|
backgroundColor: '#eef3f3',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<p className="BigScreen">HOLD ✋</p>
|
<p className="BigScreen">HOLD ✋</p>
|
||||||
<span className="SmallScreen">✋</span>
|
<span className="SmallScreen">✋</span>
|
||||||
</button>
|
</button>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
{unpaidFlow === false &&
|
{unpaidFlow === false &&
|
||||||
item?.OptionName === 'Hold' &&
|
item?.OptionName === 'Hold' &&
|
||||||
|
|
@ -4117,9 +4151,9 @@ const BSBillingTable5 = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'BSBIllingTable5-paybtn-noitems-disable'
|
? 'BSBIllingTable5-paybtn-noitems-disable'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
OrderCardDetail?.length > 0 &&
|
OrderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus != 'Close'
|
CheckBookingStatus != 'Close'
|
||||||
? !OrderStatus
|
? !OrderStatus
|
||||||
? 'BSBIllingTable5-paybtn-noitems'
|
? 'BSBIllingTable5-paybtn-noitems'
|
||||||
: 'BSBIllingTable5-paybtn-noitems Order'
|
: 'BSBIllingTable5-paybtn-noitems Order'
|
||||||
|
|
@ -4370,14 +4404,14 @@ const BSBillingTable5 = () => {
|
||||||
{(filteredSettingNames?.includes('Print') ||
|
{(filteredSettingNames?.includes('Print') ||
|
||||||
!MobileNoWhatsApp ||
|
!MobileNoWhatsApp ||
|
||||||
!MobileNoWhatsApp.value) && (
|
!MobileNoWhatsApp.value) && (
|
||||||
<FaPrint
|
<FaPrint
|
||||||
size={32}
|
size={32}
|
||||||
color="#1292EE"
|
color="#1292EE"
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
onClick={handlePrintOrToken}
|
onClick={handlePrintOrToken}
|
||||||
title="Print"
|
title="Print"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{filteredSettingNames?.includes('SMS') && isMobile && (
|
{filteredSettingNames?.includes('SMS') && isMobile && (
|
||||||
<MdSms
|
<MdSms
|
||||||
|
|
@ -4458,9 +4492,9 @@ const BSBillingTable5 = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4595,6 +4629,23 @@ const BSBillingTable5 = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { AiOutlineClose, AiOutlineArrowRight } from 'react-icons/ai';
|
||||||
import { Tables } from '../../../../../Components/Tables/Table';
|
import { Tables } from '../../../../../Components/Tables/Table';
|
||||||
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
||||||
import { UpCircleOutlined, UpOutlined } from '@ant-design/icons';
|
import { UpCircleOutlined, UpOutlined } from '@ant-design/icons';
|
||||||
import { Popover, Badge, Modal } from 'antd';
|
import { Popover, Badge, Modal, Tooltip } from 'antd';
|
||||||
import {
|
import {
|
||||||
printDiv,
|
printDiv,
|
||||||
extractLastNumberOrderId,
|
extractLastNumberOrderId,
|
||||||
|
|
@ -187,7 +187,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { TfiClipboard } from 'react-icons/tfi';
|
import { TfiClipboard } from 'react-icons/tfi';
|
||||||
|
|
@ -211,6 +211,7 @@ import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded
|
||||||
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -360,6 +361,7 @@ const BST6Payment = () => {
|
||||||
const [UpiPayOption, setUpiPayOption] = useState([]);
|
const [UpiPayOption, setUpiPayOption] = useState([]);
|
||||||
const [CardPayOption, setCardPayOption] = useState([]);
|
const [CardPayOption, setCardPayOption] = useState([]);
|
||||||
const [Splitpayment, setSplitpayment] = useState(false);
|
const [Splitpayment, setSplitpayment] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
|
|
||||||
//Total calculation
|
//Total calculation
|
||||||
const [failedOrderData, setFailedOrderData] = useState();
|
const [failedOrderData, setFailedOrderData] = useState();
|
||||||
|
|
@ -671,7 +673,7 @@ const BST6Payment = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
|
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -2049,15 +2051,15 @@ const BST6Payment = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -2147,7 +2149,7 @@ const BST6Payment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -2164,9 +2166,9 @@ const BST6Payment = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
SalesPaymentType: 'normal',
|
SalesPaymentType: 'normal',
|
||||||
PaymentDetail: [
|
PaymentDetail: [
|
||||||
|
|
@ -2179,8 +2181,8 @@ const BST6Payment = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -2188,9 +2190,9 @@ const BST6Payment = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -2209,26 +2211,26 @@ const BST6Payment = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -2237,7 +2239,7 @@ const BST6Payment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -2311,14 +2313,14 @@ const BST6Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2474,14 +2476,14 @@ const BST6Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2588,14 +2590,14 @@ const BST6Payment = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2771,14 +2773,14 @@ const BST6Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2797,7 +2799,7 @@ const BST6Payment = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -3497,59 +3499,59 @@ const BST6Payment = () => {
|
||||||
<>
|
<>
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
OrderCardDetail?.length != 0 &&
|
OrderCardDetail?.length != 0 &&
|
||||||
CheckOrderType?.length === 0 &&
|
CheckOrderType?.length === 0 &&
|
||||||
OrderType != 'Failed' &&
|
OrderType != 'Failed' &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => AddBookingDetails('Hold')}
|
onClick={() => AddBookingDetails('Hold')}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: '' ? '#52c41a' : '#1292EE',
|
color: '' ? '#52c41a' : '#1292EE',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
Holddata?.length > 0 &&
|
Holddata?.length > 0 &&
|
||||||
OrderCardDetail?.length == 0 &&
|
OrderCardDetail?.length == 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
!addnewAccess &&
|
!addnewAccess &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
!OtherServicesglobal && (
|
!OtherServicesglobal && (
|
||||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<Badge
|
<Badge
|
||||||
count={Holddata?.length}
|
count={Holddata?.length}
|
||||||
size={'small'}
|
size={'small'}
|
||||||
offset={[0, 7]}
|
offset={[0, 7]}
|
||||||
>
|
>
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => HandleholdModelOpen()}
|
onClick={() => HandleholdModelOpen()}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: Holddata ? '#52c41a' : 'default',
|
color: Holddata ? '#52c41a' : 'default',
|
||||||
pointerEvents:
|
pointerEvents:
|
||||||
OrderType === 'Failed' ? 'none' : 'auto',
|
OrderType === 'Failed' ? 'none' : 'auto',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Badge>
|
</Badge>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
@ -3560,16 +3562,16 @@ const BST6Payment = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
width: '2rem',
|
width: '2rem',
|
||||||
|
|
@ -3589,14 +3591,14 @@ const BST6Payment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3662,16 +3664,16 @@ const BST6Payment = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
}}
|
}}
|
||||||
|
|
@ -3682,10 +3684,10 @@ const BST6Payment = () => {
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
paybtnselected === payment.ModeId &&
|
paybtnselected === payment.ModeId &&
|
||||||
(UpinotSelected || CardoptionnotSelected)
|
(UpinotSelected || CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode-notupisel'
|
? 'Btn-payment-mode-notupisel'
|
||||||
: paybtnselected === payment.ModeId &&
|
: paybtnselected === payment.ModeId &&
|
||||||
(!UpinotSelected || !CardoptionnotSelected)
|
(!UpinotSelected || !CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode'
|
? 'Btn-payment-mode'
|
||||||
: 'Btn-payment-mode-sel'
|
: 'Btn-payment-mode-sel'
|
||||||
}
|
}
|
||||||
|
|
@ -3699,13 +3701,13 @@ const BST6Payment = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||||
? handleUPIButtonClick(
|
? handleUPIButtonClick(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
: handlePaymentMode(
|
: handlePaymentMode(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{/* {UpiOption === "" && payment?.Name?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
{/* {UpiOption === "" && payment?.Name?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||||
|
|
@ -3777,9 +3779,9 @@ const BST6Payment = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'BST6Payment-Button-pay-disabled'
|
? 'BST6Payment-Button-pay-disabled'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
OrderCardDetail?.length > 0 &&
|
OrderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus != 'Close'
|
CheckBookingStatus != 'Close'
|
||||||
? !OrderStatus
|
? !OrderStatus
|
||||||
? 'BST6Payment-Button-pay'
|
? 'BST6Payment-Button-pay'
|
||||||
: 'BST6Payment-Button-pay Order'
|
: 'BST6Payment-Button-pay Order'
|
||||||
|
|
@ -3941,9 +3943,9 @@ const BST6Payment = () => {
|
||||||
>
|
>
|
||||||
<div className="BST6Payment-buttons">
|
<div className="BST6Payment-buttons">
|
||||||
{paybtnselected ==
|
{paybtnselected ==
|
||||||
paybtns?.filter(
|
paybtns?.filter(
|
||||||
(item) => item?.ModeName?.toLowerCase() === 'cash'
|
(item) => item?.ModeName?.toLowerCase() === 'cash'
|
||||||
)?.[0]?.ModeId ? (
|
)?.[0]?.ModeId ? (
|
||||||
<PaymentInput
|
<PaymentInput
|
||||||
totalAmount={TotalAmount}
|
totalAmount={TotalAmount}
|
||||||
BillingTableName="BillingTable6"
|
BillingTableName="BillingTable6"
|
||||||
|
|
@ -3982,9 +3984,9 @@ const BST6Payment = () => {
|
||||||
OrderCardDetail?.length > 0 && 'not-allowed',
|
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length > 0 ||
|
OrderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3998,6 +4000,40 @@ const BST6Payment = () => {
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4041,14 +4077,14 @@ const BST6Payment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -4388,9 +4424,9 @@ const BST6Payment = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4531,7 +4567,23 @@ const BST6Payment = () => {
|
||||||
)
|
)
|
||||||
// ))
|
// ))
|
||||||
}
|
}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<DefaultModal
|
<DefaultModal
|
||||||
className={'paymentoptionsModal'}
|
className={'paymentoptionsModal'}
|
||||||
open={OtherServicesModal}
|
open={OtherServicesModal}
|
||||||
|
|
@ -4561,9 +4613,9 @@ const BST6Payment = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Popover, Modal } from 'antd';
|
import { Badge, Popover, Modal, Tooltip } from 'antd';
|
||||||
import { BiRightArrowAlt } from 'react-icons/bi';
|
import { BiRightArrowAlt } from 'react-icons/bi';
|
||||||
import { AiOutlineClose } from 'react-icons/ai';
|
import { AiOutlineClose } from 'react-icons/ai';
|
||||||
import BSSummery from '../BSBillingTableSummery/BSSummery.jsx';
|
import BSSummery from '../BSBillingTableSummery/BSSummery.jsx';
|
||||||
|
|
@ -185,7 +185,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { TfiClipboard } from 'react-icons/tfi';
|
import { TfiClipboard } from 'react-icons/tfi';
|
||||||
|
|
@ -209,7 +209,7 @@ import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
const RetailApiurl = import.meta.env.ENV_API_URL;
|
const RetailApiurl = import.meta.env.ENV_API_URL;
|
||||||
|
|
@ -329,7 +329,7 @@ const BSBilling7Payment = () => {
|
||||||
const [hold, setHold] = useState(false);
|
const [hold, setHold] = useState(false);
|
||||||
const [addcustomer, setAddCustomer] = useState(false);
|
const [addcustomer, setAddCustomer] = useState(false);
|
||||||
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
||||||
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false); const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
||||||
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
||||||
//Total calculation
|
//Total calculation
|
||||||
const TotalItems = OrderCardDetail?.length;
|
const TotalItems = OrderCardDetail?.length;
|
||||||
|
|
@ -810,7 +810,7 @@ const BSBilling7Payment = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
|
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -2016,15 +2016,15 @@ const BSBilling7Payment = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -2115,7 +2115,7 @@ const BSBilling7Payment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -2132,9 +2132,9 @@ const BSBilling7Payment = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
SalesPaymentType: 'normal',
|
SalesPaymentType: 'normal',
|
||||||
PaymentDetail: [
|
PaymentDetail: [
|
||||||
|
|
@ -2147,8 +2147,8 @@ const BSBilling7Payment = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -2156,9 +2156,9 @@ const BSBilling7Payment = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -2177,26 +2177,26 @@ const BSBilling7Payment = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -2205,7 +2205,7 @@ const BSBilling7Payment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -2279,14 +2279,14 @@ const BSBilling7Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2439,14 +2439,14 @@ const BSBilling7Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2553,14 +2553,14 @@ const BSBilling7Payment = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2735,14 +2735,14 @@ const BSBilling7Payment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2761,7 +2761,7 @@ const BSBilling7Payment = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -3541,9 +3541,9 @@ const BSBilling7Payment = () => {
|
||||||
OrderCardDetail?.length > 0 && 'not-allowed',
|
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length > 0 ||
|
OrderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3556,6 +3556,41 @@ const BSBilling7Payment = () => {
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -3592,16 +3627,16 @@ const BSBilling7Payment = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
width: '2rem',
|
width: '2rem',
|
||||||
|
|
@ -3621,14 +3656,14 @@ const BSBilling7Payment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3656,14 +3691,14 @@ const BSBilling7Payment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
OrderCardDetail?.length === 0 ||
|
OrderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3713,59 +3748,59 @@ const BSBilling7Payment = () => {
|
||||||
<>
|
<>
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
OrderCardDetail?.length != 0 &&
|
OrderCardDetail?.length != 0 &&
|
||||||
OrderType != 'Failed' &&
|
OrderType != 'Failed' &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
!addnewAccess && (
|
!addnewAccess && (
|
||||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => AddBookingDetails('Hold')}
|
onClick={() => AddBookingDetails('Hold')}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '30px',
|
fontSize: '30px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: '' ? '#52c41a' : '#1292EE',
|
color: '' ? '#52c41a' : '#1292EE',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
|
|
||||||
{unpaidFlow == false
|
{unpaidFlow == false
|
||||||
? item?.OptionName == 'Hold' &&
|
? item?.OptionName == 'Hold' &&
|
||||||
BookingType !== 'Dine In' &&
|
BookingType !== 'Dine In' &&
|
||||||
!BookingTypeBoth &&
|
!BookingTypeBoth &&
|
||||||
Holddata?.length > 0 &&
|
Holddata?.length > 0 &&
|
||||||
OrderCardDetail?.length == 0 &&
|
OrderCardDetail?.length == 0 &&
|
||||||
CheckBookingStatus != 'Close' &&
|
CheckBookingStatus != 'Close' &&
|
||||||
paybtns?.length > 0 &&
|
paybtns?.length > 0 &&
|
||||||
!addnewAccess &&
|
!addnewAccess &&
|
||||||
!OtherServicesglobal && (
|
!OtherServicesglobal && (
|
||||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<Badge
|
<Badge
|
||||||
count={Holddata?.length}
|
count={Holddata?.length}
|
||||||
size={'small'}
|
size={'small'}
|
||||||
offset={[0, 7]}
|
offset={[0, 7]}
|
||||||
>
|
>
|
||||||
<PozoHoldIcon
|
<PozoHoldIcon
|
||||||
className="BSBillingNav-icon-table-icon"
|
className="BSBillingNav-icon-table-icon"
|
||||||
onClick={() => HandleholdModelOpen()}
|
onClick={() => HandleholdModelOpen()}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: Holddata ? '#52c41a' : 'default',
|
color: Holddata ? '#52c41a' : 'default',
|
||||||
pointerEvents:
|
pointerEvents:
|
||||||
OrderType === 'Failed' ? 'none' : 'auto',
|
OrderType === 'Failed' ? 'none' : 'auto',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Badge>
|
</Badge>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
@ -3791,16 +3826,16 @@ const BSBilling7Payment = () => {
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 'none'
|
? 'none'
|
||||||
: 'auto',
|
: 'auto',
|
||||||
opacity:
|
opacity:
|
||||||
(BookingType === 'Dine In' ||
|
(BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
CheckOrderType?.length > 0) &&
|
CheckOrderType?.length > 0) &&
|
||||||
!unpaidFlow &&
|
!unpaidFlow &&
|
||||||
OrderStatus
|
OrderStatus
|
||||||
? 0.5
|
? 0.5
|
||||||
: 1,
|
: 1,
|
||||||
}}
|
}}
|
||||||
|
|
@ -3811,10 +3846,10 @@ const BSBilling7Payment = () => {
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
paybtnselected === payment.ModeId &&
|
paybtnselected === payment.ModeId &&
|
||||||
(UpinotSelected || CardoptionnotSelected)
|
(UpinotSelected || CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode-notupisel'
|
? 'Btn-payment-mode-notupisel'
|
||||||
: paybtnselected === payment.ModeId &&
|
: paybtnselected === payment.ModeId &&
|
||||||
(!UpinotSelected || !CardoptionnotSelected)
|
(!UpinotSelected || !CardoptionnotSelected)
|
||||||
? 'Btn-payment-mode'
|
? 'Btn-payment-mode'
|
||||||
: 'Btn-payment-mode-sel'
|
: 'Btn-payment-mode-sel'
|
||||||
}
|
}
|
||||||
|
|
@ -3828,9 +3863,9 @@ const BSBilling7Payment = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||||
? handleUPIButtonClick(
|
? handleUPIButtonClick(
|
||||||
payment.ModeId,
|
payment.ModeId,
|
||||||
payment.ModeName
|
payment.ModeName
|
||||||
)
|
)
|
||||||
: handlePaymentMode(payment.ModeId, payment.ModeName)
|
: handlePaymentMode(payment.ModeId, payment.ModeName)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
@ -4116,9 +4151,9 @@ const BSBilling7Payment = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'Table4-Btn-final-price-disabled'
|
? 'Table4-Btn-final-price-disabled'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
OrderCardDetail?.length > 0 &&
|
OrderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus != 'Close'
|
CheckBookingStatus != 'Close'
|
||||||
? !OrderStatus
|
? !OrderStatus
|
||||||
? 'Table4-Btn-final-price'
|
? 'Table4-Btn-final-price'
|
||||||
: 'Table4-Btn-final-price Order'
|
: 'Table4-Btn-final-price Order'
|
||||||
|
|
@ -4139,7 +4174,7 @@ const BSBilling7Payment = () => {
|
||||||
<div
|
<div
|
||||||
className="Table4-rate"
|
className="Table4-rate"
|
||||||
style={{ fontFamily: FontFamily['head'] }}
|
style={{ fontFamily: FontFamily['head'] }}
|
||||||
// onClick={() => AddBookingDetails(BookingType, true)}
|
// onClick={() => AddBookingDetails(BookingType, true)}
|
||||||
>
|
>
|
||||||
{/* ₹ {Math.round(TotalAmount)} */}
|
{/* ₹ {Math.round(TotalAmount)} */}
|
||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
|
|
@ -4344,9 +4379,9 @@ const BSBilling7Payment = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4438,8 +4473,8 @@ const BSBilling7Payment = () => {
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={TableData}
|
data={TableData}
|
||||||
dataSource={TableData}
|
dataSource={TableData}
|
||||||
// pagination={handlePageChange}
|
// pagination={handlePageChange}
|
||||||
// onChange={handleChange}
|
// onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
@ -4544,9 +4579,9 @@ const BSBilling7Payment = () => {
|
||||||
|
|
||||||
const qty = isGroup
|
const qty = isGroup
|
||||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||||
(sum, o) => sum + (o.OrderQty || 1),
|
(sum, o) => sum + (o.OrderQty || 1),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
: item.OrderQty || 1;
|
: item.OrderQty || 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -4638,6 +4673,23 @@ const BSBilling7Payment = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
FaAngleDown,
|
FaAngleDown,
|
||||||
|
FaCartPlus,
|
||||||
FaMoneyBillWave,
|
FaMoneyBillWave,
|
||||||
FaPrint,
|
FaPrint,
|
||||||
FaWhatsapp,
|
FaWhatsapp,
|
||||||
|
|
@ -200,6 +201,7 @@ import {
|
||||||
getLowStockAlertProductsList,
|
getLowStockAlertProductsList,
|
||||||
} from '../../../../../Features/ProductPage/ProductPage.js';
|
} from '../../../../../Features/ProductPage/ProductPage.js';
|
||||||
import { PostBlockSlots } from '../../../../../Features/Kiosk/kiosk.js';
|
import { PostBlockSlots } from '../../../../../Features/Kiosk/kiosk.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
const RetailApiurl = import.meta.env.ENV_API_URL;
|
const RetailApiurl = import.meta.env.ENV_API_URL;
|
||||||
|
|
@ -342,6 +344,7 @@ const StandardTablePayment = () => {
|
||||||
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
||||||
const [creditCustomerOpen, setcreditCustomerOpen] = useState(false);
|
const [creditCustomerOpen, setcreditCustomerOpen] = useState(false);
|
||||||
const [Splitpayment, setSplitpayment] = useState(false);
|
const [Splitpayment, setSplitpayment] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
||||||
const [PaymentUpiOptions, setPaymentUpiOptions] = useState([]);
|
const [PaymentUpiOptions, setPaymentUpiOptions] = useState([]);
|
||||||
const [PaymentDeviceCard, setPaymentDeviceCard] = useState([]);
|
const [PaymentDeviceCard, setPaymentDeviceCard] = useState([]);
|
||||||
|
|
@ -1358,15 +1361,15 @@ const StandardTablePayment = () => {
|
||||||
OrderStatus: 'O',
|
OrderStatus: 'O',
|
||||||
OrderType:
|
OrderType:
|
||||||
BookingType === 'Dine In' ||
|
BookingType === 'Dine In' ||
|
||||||
BookingTypeBoth ||
|
BookingTypeBoth ||
|
||||||
Estimation?.SettingValue == 'N'
|
Estimation?.SettingValue == 'N'
|
||||||
? 'S'
|
? 'S'
|
||||||
: GlobEstBooking === 'OvrAllEst'
|
: GlobEstBooking === 'OvrAllEst'
|
||||||
? 'E'
|
? 'E'
|
||||||
: GlobEstBooking === 'ParEst'
|
: GlobEstBooking === 'ParEst'
|
||||||
? GlobProdwisedata?.includes(
|
? GlobProdwisedata?.includes(
|
||||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||||
)
|
)
|
||||||
? 'E'
|
? 'E'
|
||||||
: 'S'
|
: 'S'
|
||||||
: 'S',
|
: 'S',
|
||||||
|
|
@ -1462,7 +1465,7 @@ const StandardTablePayment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
OrderDtlDetails:
|
OrderDtlDetails:
|
||||||
|
|
@ -1479,9 +1482,9 @@ const StandardTablePayment = () => {
|
||||||
? globalTipAmount === 0
|
? globalTipAmount === 0
|
||||||
? SelectedTableDetails
|
? SelectedTableDetails
|
||||||
: SelectedTableDetails?.map((item) => ({
|
: SelectedTableDetails?.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
TipsAmount: globalTipAmount,
|
TipsAmount: globalTipAmount,
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
|
|
||||||
SalesPaymentType: 'normal',
|
SalesPaymentType: 'normal',
|
||||||
|
|
@ -1495,8 +1498,8 @@ const StandardTablePayment = () => {
|
||||||
? PaymentgatewayUPI?.[0]?.ModeId
|
? PaymentgatewayUPI?.[0]?.ModeId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find(
|
? BusinessPayOption?.find(
|
||||||
(busupi) => busupi?.ModeId === UpiId
|
(busupi) => busupi?.ModeId === UpiId
|
||||||
)?.ModeId
|
)?.ModeId
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
: paybtnselected
|
: paybtnselected
|
||||||
? paybtnselected
|
? paybtnselected
|
||||||
|
|
@ -1504,9 +1507,9 @@ const StandardTablePayment = () => {
|
||||||
Amount: Math.round(TotalAmount),
|
Amount: Math.round(TotalAmount),
|
||||||
MerchantId:
|
MerchantId:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantId
|
?.MerchantId
|
||||||
: null,
|
: null,
|
||||||
PaymentOptionType:
|
PaymentOptionType:
|
||||||
Paybtnnameselected?.toLowerCase() === 'cash'
|
Paybtnnameselected?.toLowerCase() === 'cash'
|
||||||
|
|
@ -1525,26 +1528,26 @@ const StandardTablePayment = () => {
|
||||||
ModeOfPayment:
|
ModeOfPayment:
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||||
?.UPIDetailId
|
?.UPIDetailId
|
||||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||||
?.MerchantUPIId
|
?.MerchantUPIId
|
||||||
: null,
|
: null,
|
||||||
AccountDtl:
|
AccountDtl:
|
||||||
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||||
(upipay) => upipay?.UPIId === UpiId
|
(upipay) => upipay?.UPIId === UpiId
|
||||||
)
|
)
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pd')
|
SelectedCardOption?.toLowerCase() === 'pd')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||||
SelectedCardOption?.toLowerCase() === 'pg')
|
SelectedCardOption?.toLowerCase() === 'pg')
|
||||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||||
: [],
|
: [],
|
||||||
PaymentStatus:
|
PaymentStatus:
|
||||||
|
|
@ -1553,7 +1556,7 @@ const StandardTablePayment = () => {
|
||||||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||||
? 'S'
|
? 'S'
|
||||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||||
? 'S'
|
? 'S'
|
||||||
: 'P',
|
: 'P',
|
||||||
Debit: 0,
|
Debit: 0,
|
||||||
|
|
@ -1652,14 +1655,14 @@ const StandardTablePayment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -1813,14 +1816,14 @@ const StandardTablePayment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
response?.data?.OrderDetails?.length > 0 &&
|
response?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -1923,14 +1926,14 @@ const StandardTablePayment = () => {
|
||||||
}
|
}
|
||||||
setMessageData(
|
setMessageData(
|
||||||
response?.data?.response +
|
response?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(response?.data?.OrderDetails?.length > 0
|
(response?.data?.OrderDetails?.length > 0
|
||||||
? response?.data?.OrderId &&
|
? response?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
response?.data?.OrderId,
|
response?.data?.OrderId,
|
||||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
if (response?.data?.OrderDetails?.length > 0) {
|
if (response?.data?.OrderDetails?.length > 0) {
|
||||||
setPrintOrderDetails([response?.data]);
|
setPrintOrderDetails([response?.data]);
|
||||||
|
|
@ -2000,9 +2003,9 @@ const StandardTablePayment = () => {
|
||||||
AppId: AppId,
|
AppId: AppId,
|
||||||
...(AvailableDate && selectedDate
|
...(AvailableDate && selectedDate
|
||||||
? {
|
? {
|
||||||
fromDate: selectedDate?.[0],
|
fromDate: selectedDate?.[0],
|
||||||
toDate: selectedDate?.[1],
|
toDate: selectedDate?.[1],
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||||
|
|
@ -2014,9 +2017,9 @@ const StandardTablePayment = () => {
|
||||||
ProdSubCat: ProdSubCat,
|
ProdSubCat: ProdSubCat,
|
||||||
...(AvailableDate && selectedDate
|
...(AvailableDate && selectedDate
|
||||||
? {
|
? {
|
||||||
fromDate: selectedDate?.[0],
|
fromDate: selectedDate?.[0],
|
||||||
toDate: selectedDate?.[1],
|
toDate: selectedDate?.[1],
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2027,9 +2030,9 @@ const StandardTablePayment = () => {
|
||||||
prodCat: prodCat,
|
prodCat: prodCat,
|
||||||
...(AvailableDate && selectedDate
|
...(AvailableDate && selectedDate
|
||||||
? {
|
? {
|
||||||
fromDate: selectedDate?.[0],
|
fromDate: selectedDate?.[0],
|
||||||
toDate: selectedDate?.[1],
|
toDate: selectedDate?.[1],
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2209,14 +2212,14 @@ const StandardTablePayment = () => {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(
|
setMessageData(
|
||||||
bookingpaymentupdate?.data?.response +
|
bookingpaymentupdate?.data?.response +
|
||||||
' ' +
|
' ' +
|
||||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||||
? bookingpaymentupdate?.data?.OrderId &&
|
? bookingpaymentupdate?.data?.OrderId &&
|
||||||
extractLastNumberOrderId(
|
extractLastNumberOrderId(
|
||||||
bookingpaymentupdate?.data?.OrderId,
|
bookingpaymentupdate?.data?.OrderId,
|
||||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
);
|
);
|
||||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||||
|
|
@ -2234,7 +2237,7 @@ const StandardTablePayment = () => {
|
||||||
if (
|
if (
|
||||||
Date.now() - startTime >
|
Date.now() - startTime >
|
||||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||||
60000
|
60000
|
||||||
) {
|
) {
|
||||||
// 60,000 ms = 1 minute
|
// 60,000 ms = 1 minute
|
||||||
|
|
||||||
|
|
@ -2881,7 +2884,7 @@ const StandardTablePayment = () => {
|
||||||
|
|
||||||
const selectedStyle =
|
const selectedStyle =
|
||||||
stylesMap[
|
stylesMap[
|
||||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||||
];
|
];
|
||||||
|
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
|
|
@ -3365,9 +3368,9 @@ const StandardTablePayment = () => {
|
||||||
(acc, data) => parseFloat(data?.TotalAmt || 0) + acc,
|
(acc, data) => parseFloat(data?.TotalAmt || 0) + acc,
|
||||||
0
|
0
|
||||||
) -
|
) -
|
||||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||||
(Discount > 0 ? Discount : 0))
|
(Discount > 0 ? Discount : 0))
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -3385,9 +3388,9 @@ const StandardTablePayment = () => {
|
||||||
cursor: orderCardDetail?.length > 0 && 'not-allowed',
|
cursor: orderCardDetail?.length > 0 && 'not-allowed',
|
||||||
color:
|
color:
|
||||||
orderCardDetail?.length > 0 ||
|
orderCardDetail?.length > 0 ||
|
||||||
(selOption?.value === undefined &&
|
(selOption?.value === undefined &&
|
||||||
GlobalAddCustomerDetails1?.length === 0 &&
|
GlobalAddCustomerDetails1?.length === 0 &&
|
||||||
GetCustId?.CustMobile === undefined)
|
GetCustId?.CustMobile === undefined)
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
fontSize: '28px',
|
fontSize: '28px',
|
||||||
|
|
@ -3410,14 +3413,14 @@ const StandardTablePayment = () => {
|
||||||
width: '1.5rem',
|
width: '1.5rem',
|
||||||
cursor:
|
cursor:
|
||||||
orderCardDetail?.length === 0 ||
|
orderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'not-allowed'
|
? 'not-allowed'
|
||||||
: 'pointer',
|
: 'pointer',
|
||||||
color:
|
color:
|
||||||
orderCardDetail?.length === 0 ||
|
orderCardDetail?.length === 0 ||
|
||||||
CheckBookingStatus == 'Close' ||
|
CheckBookingStatus == 'Close' ||
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'gray'
|
? 'gray'
|
||||||
: 'rgb(18, 146, 238)',
|
: 'rgb(18, 146, 238)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -3430,6 +3433,42 @@ const StandardTablePayment = () => {
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
|
||||||
|
<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 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -3486,14 +3525,14 @@ const StandardTablePayment = () => {
|
||||||
{(filteredSettingNames?.includes('Print') ||
|
{(filteredSettingNames?.includes('Print') ||
|
||||||
!MobileNoWhatsApp ||
|
!MobileNoWhatsApp ||
|
||||||
!MobileNoWhatsApp.value) && (
|
!MobileNoWhatsApp.value) && (
|
||||||
<FaPrint
|
<FaPrint
|
||||||
size={32}
|
size={32}
|
||||||
color="#1292EE"
|
color="#1292EE"
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
onClick={handlePrintOrToken}
|
onClick={handlePrintOrToken}
|
||||||
title="Print"
|
title="Print"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{filteredSettingNames?.includes('SMS') && isMobile && (
|
{filteredSettingNames?.includes('SMS') && isMobile && (
|
||||||
<MdSms
|
<MdSms
|
||||||
|
|
@ -3582,7 +3621,7 @@ const StandardTablePayment = () => {
|
||||||
const handleClick =
|
const handleClick =
|
||||||
mode === 'upi'
|
mode === 'upi'
|
||||||
? () =>
|
? () =>
|
||||||
handleUPIButtonClick(payment?.ModeId, payment?.ModeName)
|
handleUPIButtonClick(payment?.ModeId, payment?.ModeName)
|
||||||
: () => handlePaymentMode(payment?.ModeId, payment?.ModeName);
|
: () => handlePaymentMode(payment?.ModeId, payment?.ModeName);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -3679,9 +3718,9 @@ const StandardTablePayment = () => {
|
||||||
addnewAccess
|
addnewAccess
|
||||||
? 'standard-pay-btn-disabled'
|
? 'standard-pay-btn-disabled'
|
||||||
: FirstPaymentclick === false &&
|
: FirstPaymentclick === false &&
|
||||||
orderCardDetail?.length > 0 &&
|
orderCardDetail?.length > 0 &&
|
||||||
paybtnselected &&
|
paybtnselected &&
|
||||||
CheckBookingStatus !== 'Close'
|
CheckBookingStatus !== 'Close'
|
||||||
? !OrderStatus
|
? !OrderStatus
|
||||||
? 'standard-pay-btn'
|
? 'standard-pay-btn'
|
||||||
: 'standard-pay-btn order-complete'
|
: 'standard-pay-btn order-complete'
|
||||||
|
|
@ -3745,8 +3784,8 @@ const StandardTablePayment = () => {
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={TableData}
|
data={TableData}
|
||||||
dataSource={TableData}
|
dataSource={TableData}
|
||||||
// pagination={handlePageChange}
|
// pagination={handlePageChange}
|
||||||
// onChange={handleChange}
|
// onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
@ -3911,11 +3950,11 @@ const StandardTablePayment = () => {
|
||||||
handlesplitpaymentclose={handlesplitpaymentclose}
|
handlesplitpaymentclose={handlesplitpaymentclose}
|
||||||
TotalNetAmount={Math.round(
|
TotalNetAmount={Math.round(
|
||||||
orderCardDetail?.reduce((acc, data) => data?.TotalAmt + acc, 0) -
|
orderCardDetail?.reduce((acc, data) => data?.TotalAmt + acc, 0) -
|
||||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||||
(Discount > 0 ? Discount : 0))
|
(Discount > 0 ? Discount : 0))
|
||||||
)}
|
)}
|
||||||
// failedOrderData={failedOrderData}
|
// failedOrderData={failedOrderData}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -3975,6 +4014,23 @@ const StandardTablePayment = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{
|
{
|
||||||
OtherServicesPrintDetails?.length > 0 && (
|
OtherServicesPrintDetails?.length > 0 && (
|
||||||
// PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
// PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,339 @@
|
||||||
|
import { useDispatch } from "react-redux";
|
||||||
|
import { changeOrderCardDetails, CustomerOrderList, getProductsearch } from "../../../../Features/BookingScreen/BookingData/BookingData";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { ExtractDateFormate, getSession } from "../../../../Services/Others";
|
||||||
|
import { Tables } from "../../../../Components/Tables/Table";
|
||||||
|
import { IoEye } from "react-icons/io5";
|
||||||
|
import { DatePicker, Modal } from "antd";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
const CustomerOrders = ({ CustomerDetails, close }) => {
|
||||||
|
|
||||||
|
const CompId = getSession('CompId');
|
||||||
|
const BranchId = getSession('BranchId');
|
||||||
|
const AppId = getSession('AppId');
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [custpmerOrderData, setCustpmerOrderData] = useState();
|
||||||
|
console.log(CustomerDetails, 'CustomerDetails');
|
||||||
|
|
||||||
|
const [page, setpage] = useState(1);
|
||||||
|
const [selectedProducts, setSelectedProducts] = useState();
|
||||||
|
const [productModal, setProductModal] = useState(false);
|
||||||
|
const [selectedRange, setSelectedRange] = useState([dayjs(), dayjs()]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setSelectedRange([dayjs(), dayjs()]);
|
||||||
|
customerFetch();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (selectedRange && selectedRange[0] && selectedRange[1]) {
|
||||||
|
customerFetch();
|
||||||
|
}
|
||||||
|
}, [selectedRange]);
|
||||||
|
|
||||||
|
const getApiRange = () => {
|
||||||
|
if (!selectedRange || !selectedRange[0] || !selectedRange[1]) return { fromDate: '', toDate: '' };
|
||||||
|
|
||||||
|
return {
|
||||||
|
fromDate: selectedRange[0].format('YYYY-MM-DD'),
|
||||||
|
toDate: selectedRange[1].format('YYYY-MM-DD'),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const customerFetch = async () => {
|
||||||
|
const { fromDate, toDate } = getApiRange();
|
||||||
|
const data = {
|
||||||
|
AppId: AppId,
|
||||||
|
BranchId: BranchId,
|
||||||
|
CompId: CompId,
|
||||||
|
MobileNo: CustomerDetails?.value,
|
||||||
|
FromDate: fromDate,
|
||||||
|
ToDate: toDate,
|
||||||
|
}
|
||||||
|
const response = await dispatch(CustomerOrderList(data)).unwrap();
|
||||||
|
if (response?.data?.statusCode === 1) {
|
||||||
|
setCustpmerOrderData(response?.data?.data)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setCustpmerOrderData()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const ViewProductdetails = (products) => {
|
||||||
|
setSelectedProducts(products);
|
||||||
|
setProductModal(true);
|
||||||
|
};
|
||||||
|
const handlePageChange = (current) => {
|
||||||
|
setpage(current);
|
||||||
|
};
|
||||||
|
// const handleRowDataClick = (record) => {
|
||||||
|
// dispatch(changeOrderCardDetails(record?.productDetails));
|
||||||
|
// close();
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getProductsearchData = async (prodName) => {
|
||||||
|
const data = {
|
||||||
|
CompId,
|
||||||
|
BranchId,
|
||||||
|
AppId,
|
||||||
|
ProdName: prodName
|
||||||
|
}
|
||||||
|
const response = await dispatch(getProductsearch(data)).unwrap();
|
||||||
|
console.log(response, 'response23232323');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowDataClick = (record) => {
|
||||||
|
if (!record?.productDetails?.length) return;
|
||||||
|
const prodName = record.productDetails[0]?.ProdName;
|
||||||
|
getProductsearchData(prodName);
|
||||||
|
|
||||||
|
console.log(record.productDetails[0]?.ProdName, 'record?.productDetails');
|
||||||
|
|
||||||
|
const formattedData = record.productDetails.map((prod) => ({
|
||||||
|
ProdCat: prod.ProdCat,
|
||||||
|
Type: prod.Type,
|
||||||
|
|
||||||
|
OverallQuantity: prod.OverallQuantity ?? 0,
|
||||||
|
ActiveStatus: record.ActiveStatus,
|
||||||
|
|
||||||
|
AvailableFrom: prod.AvailableFrom,
|
||||||
|
AvailableTo: prod.AvailableTo,
|
||||||
|
|
||||||
|
Cess: prod.Cess ?? 0,
|
||||||
|
HSNCode: prod.HSN ?? null,
|
||||||
|
|
||||||
|
BrandName: prod.BrandName ?? null,
|
||||||
|
OpeningQty: prod.OpeningQty ?? 0,
|
||||||
|
PartNumber: prod.PartNumber ?? null,
|
||||||
|
|
||||||
|
ProdId: prod.ProdId,
|
||||||
|
ProdLogo: prod.ProdLogo ?? null,
|
||||||
|
ProdName: prod.ProdName,
|
||||||
|
|
||||||
|
QRCode: prod.QRCode ?? null,
|
||||||
|
QtyBasedPrice: prod.QtyBasedPrice ?? null,
|
||||||
|
Rack: prod.Rack ?? null,
|
||||||
|
Size: prod.Size,
|
||||||
|
|
||||||
|
StockAvailable: prod.StockAvailable ?? null,
|
||||||
|
TokenAvailable: prod.TokenAvailable ?? null,
|
||||||
|
|
||||||
|
TaxId: prod.ProdTaxId ?? null,
|
||||||
|
TaxPercentage: prod.ProdTaxPercentage ?? 0,
|
||||||
|
TaxName: prod.TaxName ?? null,
|
||||||
|
|
||||||
|
UniqueId: prod.UniqueId ?? null,
|
||||||
|
UomName: prod.UomName,
|
||||||
|
|
||||||
|
SinglePc: prod.SinglePc ?? null,
|
||||||
|
NoOfPcs: prod.NoOfPcs ?? 0,
|
||||||
|
|
||||||
|
ProdVariantName: prod.ProdVariantName ?? null,
|
||||||
|
VariantAvailableFrom: prod.VariantAvailableFrom ?? null,
|
||||||
|
VariantAvailableTo: prod.VariantAvailableTo ?? null,
|
||||||
|
|
||||||
|
BalanceQty: prod.BalanceQty ?? 0,
|
||||||
|
BatchRef: prod.BatchRef ?? null,
|
||||||
|
|
||||||
|
FullProductIdentifierDtls: prod.ProductIdentifierDtls ?? [],
|
||||||
|
|
||||||
|
InwardDate: prod.BookingDate ?? null,
|
||||||
|
InwardDtlId: prod.InwardDtlId ?? null,
|
||||||
|
InwardId: prod.InwardId ?? null,
|
||||||
|
|
||||||
|
MRP: prod.MRP ?? 0,
|
||||||
|
OrderRate: prod.Rate ?? 0,
|
||||||
|
SellingPrice: prod.Rate ?? 0,
|
||||||
|
|
||||||
|
SuppId: prod.SuppId ?? null,
|
||||||
|
SuppName: prod.SuppName ?? null,
|
||||||
|
|
||||||
|
OverAllPcs: prod.OverAllPcs ?? 0,
|
||||||
|
Offer: prod.OfferAmt ?? 0,
|
||||||
|
|
||||||
|
BookingTypeName: prod.BookingTypeName ?? null,
|
||||||
|
CounterName: prod.CounterName ?? null,
|
||||||
|
|
||||||
|
DiscountLimitType: prod.DiscountLimitType ?? null,
|
||||||
|
DiscountLimit: prod.DiscountLimit ?? 0,
|
||||||
|
|
||||||
|
BookedDate: prod.BookedDate ?? [],
|
||||||
|
BalanceBookedQty: prod.BalanceBookedQty ?? null,
|
||||||
|
|
||||||
|
ScaleType: prod.ScaleType ?? "",
|
||||||
|
|
||||||
|
localId: prod.localId ?? uuidv4(),
|
||||||
|
|
||||||
|
OrderQty: prod.SalesQty ?? 0,
|
||||||
|
TotalAmt: prod.TotalAmt ?? 0,
|
||||||
|
TaxAmt: prod.TaxAmt ?? 0,
|
||||||
|
WithoutTaxRate: prod.WithoutTaxRate ?? 0,
|
||||||
|
}));
|
||||||
|
|
||||||
|
dispatch(changeOrderCardDetails(formattedData));
|
||||||
|
close();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'Sl.No',
|
||||||
|
key: 'sno',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, __, index) => (page - 1) * 10 + index + 1,
|
||||||
|
onCell: (record) => ({
|
||||||
|
onClick: () => handleRowDataClick(record),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Sales Date',
|
||||||
|
dataIndex: 'SalesDate',
|
||||||
|
key: 'SalesDate',
|
||||||
|
align: 'center',
|
||||||
|
render: (text) => ExtractDateFormate(text),
|
||||||
|
onCell: (record) => ({
|
||||||
|
onClick: () => handleRowDataClick(record),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Amount',
|
||||||
|
dataIndex: 'NetAmount',
|
||||||
|
key: 'NetAmount',
|
||||||
|
align: 'center',
|
||||||
|
onCell: (record) => ({
|
||||||
|
onClick: () => handleRowDataClick(record),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: 'No of Products',
|
||||||
|
key: 'productCount',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, record) => (
|
||||||
|
<span
|
||||||
|
style={{ color: '#1292EE', fontSize: '16px', cursor: 'pointer' }}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation(); // 👈 IMPORTANT
|
||||||
|
ViewProductdetails(record.productDetails);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{record?.productDetails?.length || 0}
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const productColumns = [
|
||||||
|
{
|
||||||
|
title: 'Sl.No',
|
||||||
|
key: 'sno',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, __, index) => index + 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Product Name',
|
||||||
|
dataIndex: 'ProdName',
|
||||||
|
key: 'ProdName',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, record) =>
|
||||||
|
`${record?.ProdName || '-'}${record?.UomName ? ` ${record.Size + record.UomName}` : ''}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Qty',
|
||||||
|
dataIndex: 'SalesQty',
|
||||||
|
key: 'SalesQty',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.SalesQty || '-',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Variant',
|
||||||
|
key: 'ProdVariantName',
|
||||||
|
align: 'ProdVariantName',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.ProdVariantName || '-',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Rate',
|
||||||
|
key: 'Rate',
|
||||||
|
align: 'right',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.Rate || 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'MRP',
|
||||||
|
key: 'MRP',
|
||||||
|
align: 'right',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.MRP || 0,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const disableFutureDates = (current) => {
|
||||||
|
return current && current > dayjs().endOf('day');
|
||||||
|
};
|
||||||
|
const onRangeChange = (dates) => {
|
||||||
|
setSelectedRange(dates);
|
||||||
|
};
|
||||||
|
const getRangePickerValue = () => selectedRange || [dayjs(), dayjs()];
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
|
<div>
|
||||||
|
<p>Customer Name : {CustomerDetails?.CustName}</p>
|
||||||
|
<p>Customer Name : {CustomerDetails?.value}</p>
|
||||||
|
</div>
|
||||||
|
<div className='fromlabelDate'>
|
||||||
|
<label>Select Date</label>
|
||||||
|
<RangePicker
|
||||||
|
onChange={onRangeChange}
|
||||||
|
format="DD-MMM-YYYY" // display format
|
||||||
|
disabledDate={disableFutureDates}
|
||||||
|
inputReadOnly={true}
|
||||||
|
value={getRangePickerValue()}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="reportTable">
|
||||||
|
<Tables
|
||||||
|
columns={columns}
|
||||||
|
data={custpmerOrderData}
|
||||||
|
dataSource={custpmerOrderData}
|
||||||
|
pagination={handlePageChange}
|
||||||
|
/>{' '}
|
||||||
|
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
open={productModal}
|
||||||
|
title="Product Details"
|
||||||
|
width={700}
|
||||||
|
footer={null}
|
||||||
|
onCancel={() => setProductModal(false)}
|
||||||
|
>
|
||||||
|
<Tables
|
||||||
|
columns={productColumns}
|
||||||
|
data={selectedProducts}
|
||||||
|
pagination={false}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CustomerOrders;
|
||||||
|
|
@ -82,11 +82,11 @@ const CardPage1 = (props) => {
|
||||||
(cartItem) =>
|
(cartItem) =>
|
||||||
cartItem?.ProdId === item?.ProductDetail?.[0]?.ProdId &&
|
cartItem?.ProdId === item?.ProductDetail?.[0]?.ProdId &&
|
||||||
cartItem?.InwardDtlId ===
|
cartItem?.InwardDtlId ===
|
||||||
item?.ProductDetail?.[0]?.ProdVariantDetails?.[0]?.StockDetails?.[0]
|
item?.ProductDetail?.[0]?.ProdVariantDetails?.[0]?.StockDetails?.[0]
|
||||||
?.InwardDtlId &&
|
?.InwardDtlId &&
|
||||||
cartItem?.OrderRate ===
|
cartItem?.OrderRate ===
|
||||||
item?.ProductDetail?.[0]?.ProdVariantDetails?.[0]?.StockDetails?.[0]
|
item?.ProductDetail?.[0]?.ProdVariantDetails?.[0]?.StockDetails?.[0]
|
||||||
?.SellPrice
|
?.SellPrice
|
||||||
);
|
);
|
||||||
if (Isincart && Isincart?.StockAvailable === 'Y') {
|
if (Isincart && Isincart?.StockAvailable === 'Y') {
|
||||||
if (Isincart?.BalanceQty > Isincart?.OrderQty) {
|
if (Isincart?.BalanceQty > Isincart?.OrderQty) {
|
||||||
|
|
@ -141,13 +141,13 @@ const CardPage1 = (props) => {
|
||||||
(cartItem) =>
|
(cartItem) =>
|
||||||
cartItem?.ProdId === qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId &&
|
cartItem?.ProdId === qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId &&
|
||||||
cartItem?.InwardDtlId ===
|
cartItem?.InwardDtlId ===
|
||||||
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
|
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
|
||||||
item?.VarientIndex
|
item?.VarientIndex
|
||||||
]?.StockDetails?.[0]?.InwardDtlId &&
|
]?.StockDetails?.[0]?.InwardDtlId &&
|
||||||
cartItem?.OrderRate ===
|
cartItem?.OrderRate ===
|
||||||
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
|
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
|
||||||
item?.VarientIndex
|
item?.VarientIndex
|
||||||
]?.StockDetails?.[0]?.SellPrice
|
]?.StockDetails?.[0]?.SellPrice
|
||||||
);
|
);
|
||||||
console.log(Isincart, item, KioskOrderDetails, 'IsincartsingleVarient');
|
console.log(Isincart, item, KioskOrderDetails, 'IsincartsingleVarient');
|
||||||
if (Isincart && Isincart?.StockAvailable === 'Y') {
|
if (Isincart && Isincart?.StockAvailable === 'Y') {
|
||||||
|
|
@ -236,7 +236,7 @@ const CardPage1 = (props) => {
|
||||||
SinglePc: onePcs ? 'Y' : 'N',
|
SinglePc: onePcs ? 'Y' : 'N',
|
||||||
NoOfPcs: onePcs
|
NoOfPcs: onePcs
|
||||||
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
?.StockDetails?.[stockIndex]?.NoOfPcs
|
?.StockDetails?.[stockIndex]?.NoOfPcs
|
||||||
: null,
|
: null,
|
||||||
ProdVariantName:
|
ProdVariantName:
|
||||||
a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
|
|
@ -261,14 +261,14 @@ const CardPage1 = (props) => {
|
||||||
?.StockDetails?.[stockIndex]?.InwardId,
|
?.StockDetails?.[stockIndex]?.InwardId,
|
||||||
MRP: onePcs
|
MRP: onePcs
|
||||||
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
?.StockDetails?.[stockIndex]?.OnePcsPrice
|
?.StockDetails?.[stockIndex]?.OnePcsPrice
|
||||||
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
?.StockDetails?.[stockIndex]?.MRP,
|
?.StockDetails?.[stockIndex]?.MRP,
|
||||||
OrderRate: onePcs
|
OrderRate: onePcs
|
||||||
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
?.StockDetails?.[stockIndex]?.OnePcsPrice
|
?.StockDetails?.[stockIndex]?.OnePcsPrice
|
||||||
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
?.StockDetails?.[stockIndex]?.SellPrice,
|
?.StockDetails?.[stockIndex]?.SellPrice,
|
||||||
SuppId:
|
SuppId:
|
||||||
a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
|
||||||
?.StockDetails?.[stockIndex]?.SuppId,
|
?.StockDetails?.[stockIndex]?.SuppId,
|
||||||
|
|
@ -312,28 +312,28 @@ const CardPage1 = (props) => {
|
||||||
cartItem // if the item is already in the cart, increase the quantity of the item
|
cartItem // if the item is already in the cart, increase the quantity of the item
|
||||||
) =>
|
) =>
|
||||||
cartItem.ProdId === item.ProdId &&
|
cartItem.ProdId === item.ProdId &&
|
||||||
cartItem.InwardDtlId === item.InwardDtlId &&
|
cartItem.InwardDtlId === item.InwardDtlId &&
|
||||||
cartItem.OrderRate === item.OrderRate &&
|
cartItem.OrderRate === item.OrderRate &&
|
||||||
cartItem?.BookingTypeName === item?.BookingTypeName
|
cartItem?.BookingTypeName === item?.BookingTypeName
|
||||||
? {
|
? {
|
||||||
...cartItem,
|
...cartItem,
|
||||||
OrderQty: cartItem.OrderQty + 1,
|
OrderQty: cartItem.OrderQty + 1,
|
||||||
TotalAmt: (cartItem.OrderQty + 1) * cartItem.OrderRate,
|
TotalAmt: (cartItem.OrderQty + 1) * cartItem.OrderRate,
|
||||||
TaxAmt: (
|
TaxAmt: (
|
||||||
|
((cartItem.OrderQty + 1) *
|
||||||
|
cartItem.OrderRate *
|
||||||
|
cartItem.TaxPercentage) /
|
||||||
|
(100 + cartItem.TaxPercentage)
|
||||||
|
).toFixed(2),
|
||||||
|
WithoutTaxRate:
|
||||||
|
(cartItem.OrderQty + 1) * cartItem.OrderRate -
|
||||||
|
(
|
||||||
((cartItem.OrderQty + 1) *
|
((cartItem.OrderQty + 1) *
|
||||||
cartItem.OrderRate *
|
cartItem.OrderRate *
|
||||||
cartItem.TaxPercentage) /
|
cartItem.TaxPercentage) /
|
||||||
(100 + cartItem.TaxPercentage)
|
(100 + cartItem.TaxPercentage)
|
||||||
).toFixed(2),
|
).toFixed(2),
|
||||||
WithoutTaxRate:
|
}
|
||||||
(cartItem.OrderQty + 1) * cartItem.OrderRate -
|
|
||||||
(
|
|
||||||
((cartItem.OrderQty + 1) *
|
|
||||||
cartItem.OrderRate *
|
|
||||||
cartItem.TaxPercentage) /
|
|
||||||
(100 + cartItem.TaxPercentage)
|
|
||||||
).toFixed(2),
|
|
||||||
}
|
|
||||||
: cartItem // otherwise, return the cart item
|
: cartItem // otherwise, return the cart item
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -520,9 +520,9 @@ const CardPage1 = (props) => {
|
||||||
card?.OverAllQty,
|
card?.OverAllQty,
|
||||||
KioskOrderDetails
|
KioskOrderDetails
|
||||||
) > 0) ||
|
) > 0) ||
|
||||||
card?.ProductDetail?.some(
|
card?.ProductDetail?.some(
|
||||||
(item) => item?.StockAvailable !== 'Y'
|
(item) => item?.StockAvailable !== 'Y'
|
||||||
)
|
)
|
||||||
? 'KioskCard-card'
|
? 'KioskCard-card'
|
||||||
: 'KioskCard-card-dis'
|
: 'KioskCard-card-dis'
|
||||||
}
|
}
|
||||||
|
|
@ -550,9 +550,9 @@ const CardPage1 = (props) => {
|
||||||
card?.OverAllQty,
|
card?.OverAllQty,
|
||||||
KioskOrderDetails
|
KioskOrderDetails
|
||||||
) > 0) ||
|
) > 0) ||
|
||||||
card?.ProductDetail?.some(
|
card?.ProductDetail?.some(
|
||||||
(item) => item?.StockAvailable !== 'Y'
|
(item) => item?.StockAvailable !== 'Y'
|
||||||
) ? (
|
) ? (
|
||||||
''
|
''
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
|
|
@ -574,18 +574,18 @@ const CardPage1 = (props) => {
|
||||||
card?.ProductDetail?.some(
|
card?.ProductDetail?.some(
|
||||||
(item) => item?.StockAvailable !== 'Y'
|
(item) => item?.StockAvailable !== 'Y'
|
||||||
)) && (
|
)) && (
|
||||||
<div className="dishPrize">
|
<div className="dishPrize">
|
||||||
<p>
|
<p>
|
||||||
<MdCurrencyRupee
|
<MdCurrencyRupee
|
||||||
style={{ marginBottom: '-2px', marginRight: '-5px' }}
|
style={{ marginBottom: '-2px', marginRight: '-5px' }}
|
||||||
/>{' '}
|
/>{' '}
|
||||||
{ItemSellingPrice(card)}
|
{ItemSellingPrice(card)}
|
||||||
<span className="BSItemCard-itemCount">
|
<span className="BSItemCard-itemCount">
|
||||||
({ItemSize(card)} {ItemUomName(card)})
|
({ItemSize(card)} {ItemUomName(card)})
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
|
@ -737,7 +737,7 @@ const CardPage1 = (props) => {
|
||||||
KioskOrderDetails,
|
KioskOrderDetails,
|
||||||
item?.ProdVariantName
|
item?.ProdVariantName
|
||||||
) > 0 ||
|
) > 0 ||
|
||||||
qtydata?.ProductDetail?.[QtyIndex]?.StockAvailable !== 'Y'
|
qtydata?.ProductDetail?.[QtyIndex]?.StockAvailable !== 'Y'
|
||||||
? 'ProVariantCard'
|
? 'ProVariantCard'
|
||||||
: 'ProVariantCard-dis'
|
: 'ProVariantCard-dis'
|
||||||
}
|
}
|
||||||
|
|
@ -752,7 +752,7 @@ const CardPage1 = (props) => {
|
||||||
KioskOrderDetails,
|
KioskOrderDetails,
|
||||||
item?.ProdVariantName
|
item?.ProdVariantName
|
||||||
) > 0 ||
|
) > 0 ||
|
||||||
qtydata?.ProductDetail?.[QtyIndex]?.StockAvailable !==
|
qtydata?.ProductDetail?.[QtyIndex]?.StockAvailable !==
|
||||||
'Y' ? (
|
'Y' ? (
|
||||||
<div>₹ {item?.StockDetails?.[0]?.SellPrice} </div>
|
<div>₹ {item?.StockDetails?.[0]?.SellPrice} </div>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
4692
src/check.jsx
4692
src/check.jsx
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue