priceoveride
This commit is contained in:
parent
0236fee8af
commit
a123ddfe5e
|
|
@ -2454,12 +2454,12 @@ const BSBillingTable1 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${item.OfferPrice}`
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2745,12 +2745,12 @@ const BSBillingTable1 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${item.OfferPrice}`
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3090,12 +3090,12 @@ const BSBillingTable1 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${item.OfferPrice}`
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3413,15 +3413,16 @@ const BSBillingTable1 = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${item.OfferPrice}`
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ export default function BST1Payment() {
|
|||
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType);
|
||||
const SelCustId = useSelector(GlobalSelCustId);
|
||||
const selOption = useSelector(GlobalSelOption);
|
||||
console.log(selOption, 'selOptionbst234343',GetCustId);
|
||||
console.log(selOption, 'selOptionbst234343', GetCustId);
|
||||
|
||||
const SelectedTableDetails = useSelector(GlobalSelectedTableDetails);
|
||||
const GlobalAddCustomerDetails1 = useSelector(GlobalAddCustomerDetails);
|
||||
|
|
@ -728,7 +728,7 @@ export default function BST1Payment() {
|
|||
setEmpData(datas?.[0]);
|
||||
};
|
||||
const getCustomerData = async () => {
|
||||
await dispatch(
|
||||
await dispatch(
|
||||
getAddCustomerDetails({
|
||||
CompId: CompId,
|
||||
AppId: AppId,
|
||||
|
|
@ -905,7 +905,7 @@ export default function BST1Payment() {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -2026,15 +2026,15 @@ export default function BST1Payment() {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -2051,6 +2051,9 @@ export default function BST1Payment() {
|
|||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -2124,7 +2127,7 @@ export default function BST1Payment() {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -2141,9 +2144,9 @@ export default function BST1Payment() {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
|
||||
SalesPaymentType: 'normal',
|
||||
|
|
@ -2159,8 +2162,8 @@ export default function BST1Payment() {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -2173,15 +2176,15 @@ export default function BST1Payment() {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -2201,29 +2204,29 @@ export default function BST1Payment() {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -2234,13 +2237,13 @@ export default function BST1Payment() {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -2316,14 +2319,14 @@ export default function BST1Payment() {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2480,14 +2483,14 @@ export default function BST1Payment() {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2588,14 +2591,14 @@ export default function BST1Payment() {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2770,14 +2773,14 @@ export default function BST1Payment() {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -2795,7 +2798,7 @@ export default function BST1Payment() {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -3575,31 +3578,31 @@ export default function BST1Payment() {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
{paybtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
paybtns?.map((payment) => (
|
||||
<div className="Table3-cash">
|
||||
<button
|
||||
className={
|
||||
paybtnselected === payment.ModeId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: paybtnselected === payment.ModeId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -3613,13 +3616,13 @@ export default function BST1Payment() {
|
|||
onClick={() =>
|
||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||
? handleUPIButtonClick(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
: handlePaymentMode(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
}
|
||||
>
|
||||
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||
|
|
@ -3678,10 +3681,10 @@ export default function BST1Payment() {
|
|||
<button
|
||||
className={
|
||||
refundPaySelected === payment.ConfigId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: refundPaySelected === payment.ConfigId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -3756,9 +3759,9 @@ export default function BST1Payment() {
|
|||
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -3808,16 +3811,16 @@ export default function BST1Payment() {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
|
|
@ -3836,14 +3839,14 @@ export default function BST1Payment() {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3860,39 +3863,39 @@ export default function BST1Payment() {
|
|||
|
||||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
||||
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
||||
|
|
@ -3908,14 +3911,14 @@ export default function BST1Payment() {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3997,58 +4000,58 @@ export default function BST1Payment() {
|
|||
<div>
|
||||
{unpaidFlow == false
|
||||
? holdCheckedSalesSetup &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
{unpaidFlow == false
|
||||
? holdCheckedSalesSetup &&
|
||||
paybtns?.length > 0 &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
paybtns?.length > 0 &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -4091,9 +4094,9 @@ export default function BST1Payment() {
|
|||
addnewAccess
|
||||
? 'price-button-disabled'
|
||||
: FirstPaymentclick === false &&
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
? !OrderStatus
|
||||
? salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount
|
||||
|
|
@ -4115,7 +4118,7 @@ export default function BST1Payment() {
|
|||
{isMobile ? (
|
||||
!OrderStatus ? (
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
<div>
|
||||
Refund: ₹
|
||||
{(previousNetAmount || 0) -
|
||||
|
|
@ -4341,14 +4344,14 @@ export default function BST1Payment() {
|
|||
OrderType === 'Failed'
|
||||
? FailedTotalAmt
|
||||
: Math.round(
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
}
|
||||
failedOrderData={failedOrderData}
|
||||
/>
|
||||
|
|
@ -4481,9 +4484,9 @@ export default function BST1Payment() {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1545,7 +1545,7 @@ const BSBillingTable2 = () => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -2106,15 +2106,15 @@ const BSBillingTable2 = () => {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -2130,7 +2130,9 @@ const BSBillingTable2 = () => {
|
|||
ModelNumber: a.ModelNumber,
|
||||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -2206,7 +2208,7 @@ const BSBillingTable2 = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -2223,9 +2225,9 @@ const BSBillingTable2 = () => {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
// "Credit": TotalAmount,
|
||||
// "Debit": 0,
|
||||
|
|
@ -2242,8 +2244,8 @@ const BSBillingTable2 = () => {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -2256,15 +2258,15 @@ const BSBillingTable2 = () => {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -2284,29 +2286,29 @@ const BSBillingTable2 = () => {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -2317,13 +2319,13 @@ const BSBillingTable2 = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -2402,14 +2404,14 @@ const BSBillingTable2 = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2566,14 +2568,14 @@ const BSBillingTable2 = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2677,14 +2679,14 @@ const BSBillingTable2 = () => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2861,14 +2863,14 @@ const BSBillingTable2 = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -2887,7 +2889,7 @@ const BSBillingTable2 = () => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -3660,7 +3662,7 @@ const BSBillingTable2 = () => {
|
|||
);
|
||||
};
|
||||
return (
|
||||
<Suspense fallback={<BillingTableSkeleton />}>
|
||||
<Suspense fallback={<BillingTableSkeleton />}>
|
||||
<div
|
||||
className={
|
||||
templateData?.BookingLayout?.[0] === 'Layout6'
|
||||
|
|
@ -3814,16 +3816,16 @@ const BSBillingTable2 = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
width: '2rem',
|
||||
|
|
@ -3843,14 +3845,14 @@ const BSBillingTable2 = () => {
|
|||
width: '1.6rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3876,14 +3878,14 @@ const BSBillingTable2 = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3985,31 +3987,31 @@ const BSBillingTable2 = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
{paybtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
paybtns?.map((payment) => (
|
||||
<div className="Table3-cash">
|
||||
<button
|
||||
className={
|
||||
paybtnselected === payment.ModeId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: paybtnselected === payment.ModeId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4023,13 +4025,13 @@ const BSBillingTable2 = () => {
|
|||
onClick={() =>
|
||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||
? handleUPIButtonClick(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
: handlePaymentMode(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
}
|
||||
>
|
||||
<div
|
||||
|
|
@ -4086,10 +4088,10 @@ const BSBillingTable2 = () => {
|
|||
<button
|
||||
className={
|
||||
refundPaySelected === payment.ConfigId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: refundPaySelected === payment.ConfigId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4160,9 +4162,9 @@ const BSBillingTable2 = () => {
|
|||
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -4179,39 +4181,39 @@ const BSBillingTable2 = () => {
|
|||
|
||||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{tabledata?.length > 0 && (
|
||||
<div style={{ width: '2rem' }}>
|
||||
{tableOptions
|
||||
|
|
@ -4280,68 +4282,68 @@ const BSBillingTable2 = () => {
|
|||
<>
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
!OrderStatus &&
|
||||
OrderType != 'Failed' &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<>
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
<button
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
className={
|
||||
FirstPaymentclick === false
|
||||
? 'hold-btn'
|
||||
: 'hold-btn-disable'
|
||||
}
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
!OrderStatus &&
|
||||
OrderType != 'Failed' &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<>
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
<button
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
className={
|
||||
FirstPaymentclick === false
|
||||
? 'hold-btn'
|
||||
: 'hold-btn-disable'
|
||||
}
|
||||
>
|
||||
<BsPauseFill />
|
||||
<p
|
||||
className="hold-btn-txt"
|
||||
style={{
|
||||
fontFamily: FontFamily['para'],
|
||||
}}
|
||||
>
|
||||
<BsPauseFill />
|
||||
<p
|
||||
className="hold-btn-txt"
|
||||
style={{
|
||||
fontFamily: FontFamily['para'],
|
||||
}}
|
||||
>
|
||||
Hold
|
||||
</p>
|
||||
</button>
|
||||
</TooltipWrapper>
|
||||
</>
|
||||
)
|
||||
Hold
|
||||
</p>
|
||||
</button>
|
||||
</TooltipWrapper>
|
||||
</>
|
||||
)
|
||||
: ''}
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
</>
|
||||
))}
|
||||
|
|
@ -4357,9 +4359,9 @@ const BSBillingTable2 = () => {
|
|||
addnewAccess
|
||||
? 'billing-btn-deactive'
|
||||
: FirstPaymentclick === false &&
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
? salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount
|
||||
? 'billing-btn'
|
||||
|
|
@ -4610,14 +4612,14 @@ const BSBillingTable2 = () => {
|
|||
OrderType === 'Failed'
|
||||
? FailedTotalAmt
|
||||
: Math.round(
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
}
|
||||
failedOrderData={failedOrderData}
|
||||
/>
|
||||
|
|
@ -4752,9 +4754,9 @@ const BSBillingTable2 = () => {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -2596,15 +2596,15 @@ const BSBillingTable3 = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
:item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2881,7 +2881,7 @@ const BSBillingTable3 = () => {
|
|||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3206,7 +3206,7 @@ const BSBillingTable3 = () => {
|
|||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
|
||||
|
|
@ -3516,7 +3516,7 @@ const BSBillingTable3 = () => {
|
|||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ const BSBilling4Payment = () => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
console.log(selectedStyle, style, 'style');
|
||||
if (selectedStyle) {
|
||||
|
|
@ -2128,15 +2128,15 @@ const BSBilling4Payment = () => {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -2154,6 +2154,9 @@ const BSBilling4Payment = () => {
|
|||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
BookingDate: AvailableDate ? a.BookedDate : null,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -2229,7 +2232,7 @@ const BSBilling4Payment = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -2246,9 +2249,9 @@ const BSBilling4Payment = () => {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
SalesPaymentType: 'normal',
|
||||
PaymentDetail: [
|
||||
|
|
@ -2263,8 +2266,8 @@ const BSBilling4Payment = () => {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -2277,15 +2280,15 @@ const BSBilling4Payment = () => {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -2305,29 +2308,29 @@ const BSBilling4Payment = () => {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -2338,13 +2341,13 @@ const BSBilling4Payment = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -2422,14 +2425,14 @@ const BSBilling4Payment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2590,14 +2593,14 @@ const BSBilling4Payment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2704,14 +2707,14 @@ const BSBilling4Payment = () => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2887,14 +2890,14 @@ const BSBilling4Payment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -2913,7 +2916,7 @@ const BSBilling4Payment = () => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -3150,9 +3153,9 @@ const BSBilling4Payment = () => {
|
|||
AppId: AppId,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||
|
|
@ -3164,9 +3167,9 @@ const BSBilling4Payment = () => {
|
|||
ProdSubCat: ProdSubCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -3177,9 +3180,9 @@ const BSBilling4Payment = () => {
|
|||
prodCat: prodCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -3806,9 +3809,9 @@ const BSBilling4Payment = () => {
|
|||
'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -3829,16 +3832,16 @@ const BSBilling4Payment = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
width: '2rem',
|
||||
|
|
@ -3859,14 +3862,14 @@ const BSBilling4Payment = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3896,14 +3899,14 @@ const BSBilling4Payment = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3921,39 +3924,39 @@ const BSBilling4Payment = () => {
|
|||
|
||||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{tabledata?.length > 0 && (
|
||||
<div style={{ width: '2rem' }}>
|
||||
{tableOptions
|
||||
|
|
@ -4021,66 +4024,66 @@ const BSBilling4Payment = () => {
|
|||
<>
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Hold'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Hold'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Recall'}
|
||||
isMobile={isMobile}
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper
|
||||
title={'Recall'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed'
|
||||
? 'none'
|
||||
: 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed'
|
||||
? 'none'
|
||||
: 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
</>
|
||||
))}
|
||||
|
|
@ -4106,31 +4109,31 @@ const BSBilling4Payment = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
{paybtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
paybtns?.map((payment) => (
|
||||
<div className="Table3-cash">
|
||||
<button
|
||||
className={
|
||||
paybtnselected === payment.ModeId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: paybtnselected === payment.ModeId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4144,13 +4147,13 @@ const BSBilling4Payment = () => {
|
|||
onClick={() =>
|
||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||
? handleUPIButtonClick(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
: handlePaymentMode(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
}
|
||||
>
|
||||
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||
|
|
@ -4209,10 +4212,10 @@ const BSBilling4Payment = () => {
|
|||
<button
|
||||
className={
|
||||
refundPaySelected === payment.ConfigId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: refundPaySelected === payment.ConfigId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4476,9 +4479,9 @@ const BSBilling4Payment = () => {
|
|||
addnewAccess
|
||||
? 'Table4-Btn-final-price-disabled'
|
||||
: FirstPaymentclick === false &&
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
? !OrderStatus
|
||||
? salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount
|
||||
|
|
@ -4498,7 +4501,7 @@ const BSBilling4Payment = () => {
|
|||
>
|
||||
{!OrderStatus ? (
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
<p className="Table4-Order">
|
||||
Refund: ₹
|
||||
{(previousNetAmount || 0) -
|
||||
|
|
@ -4509,7 +4512,7 @@ const BSBilling4Payment = () => {
|
|||
<div
|
||||
className="Table4-rate"
|
||||
style={{ fontFamily: FontFamily['head'] }}
|
||||
// onClick={() => AddBookingDetails(BookingType, true)}
|
||||
// onClick={() => AddBookingDetails(BookingType, true)}
|
||||
>
|
||||
{isMobile ? (
|
||||
`₹ ${Math.round(
|
||||
|
|
@ -4530,9 +4533,9 @@ const BSBilling4Payment = () => {
|
|||
? FailedTotalAmt
|
||||
: credit && overAllBal >= 0
|
||||
? Math.max(
|
||||
0,
|
||||
TotalAmount - overAllBal
|
||||
)
|
||||
0,
|
||||
TotalAmount - overAllBal
|
||||
)
|
||||
: TotalAmount
|
||||
)}
|
||||
/>
|
||||
|
|
@ -4708,8 +4711,8 @@ const BSBilling4Payment = () => {
|
|||
columns={columns}
|
||||
data={TableData}
|
||||
dataSource={TableData}
|
||||
// pagination={handlePageChange}
|
||||
// onChange={handleChange}
|
||||
// pagination={handlePageChange}
|
||||
// onChange={handleChange}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
|
@ -4740,14 +4743,14 @@ const BSBilling4Payment = () => {
|
|||
OrderType === 'Failed'
|
||||
? FailedTotalAmt
|
||||
: Math.round(
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
}
|
||||
failedOrderData={failedOrderData}
|
||||
/>
|
||||
|
|
@ -4825,9 +4828,9 @@ const BSBilling4Payment = () => {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -2594,12 +2594,12 @@ const BSBillingTable4 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2865,12 +2865,12 @@ const BSBillingTable4 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3189,12 +3189,12 @@ const BSBillingTable4 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3491,12 +3491,12 @@ const BSBillingTable4 = () => {
|
|||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
|
|||
|
|
@ -1166,7 +1166,7 @@ const BSBillingTable5 = () => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -2122,15 +2122,15 @@ const BSBillingTable5 = () => {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -2147,6 +2147,9 @@ const BSBillingTable5 = () => {
|
|||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -2221,7 +2224,7 @@ const BSBillingTable5 = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -2238,9 +2241,9 @@ const BSBillingTable5 = () => {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
SalesPaymentType: 'normal',
|
||||
PaymentDetail: [
|
||||
|
|
@ -2255,8 +2258,8 @@ const BSBillingTable5 = () => {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -2269,15 +2272,15 @@ const BSBillingTable5 = () => {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -2297,29 +2300,29 @@ const BSBillingTable5 = () => {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -2330,13 +2333,13 @@ const BSBillingTable5 = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -2411,14 +2414,14 @@ const BSBillingTable5 = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2577,14 +2580,14 @@ const BSBillingTable5 = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2691,14 +2694,14 @@ const BSBillingTable5 = () => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2874,14 +2877,14 @@ const BSBillingTable5 = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
rbookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
rbookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -2900,7 +2903,7 @@ const BSBillingTable5 = () => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -3746,32 +3749,32 @@ const BSBillingTable5 = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
{paybtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
paybtns?.map((payment) => (
|
||||
<div className="Table3-cash">
|
||||
<button
|
||||
className={
|
||||
paybtnselected === payment.ModeId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: paybtnselected === payment.ModeId &&
|
||||
(!UpinotSelected ||
|
||||
!CardoptionnotSelected)
|
||||
(!UpinotSelected ||
|
||||
!CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -3785,13 +3788,13 @@ const BSBillingTable5 = () => {
|
|||
onClick={() =>
|
||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||
? handleUPIButtonClick(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
: handlePaymentMode(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
}
|
||||
>
|
||||
<div
|
||||
|
|
@ -3804,16 +3807,16 @@ const BSBillingTable5 = () => {
|
|||
{payment.ModeName}
|
||||
{payment?.ModeName?.toLowerCase() ===
|
||||
'card' && (
|
||||
<CardPopover
|
||||
CardPayOption={CardPayOption}
|
||||
SelectedCardOption={SelectedCardOption}
|
||||
AddCardOption={AddCardOption}
|
||||
CardOptionOpen={CardOptionOpen}
|
||||
EnableCardOptions={EnableCardOptions}
|
||||
paygate={paygate}
|
||||
paydevice={paydevice}
|
||||
/>
|
||||
)}
|
||||
<CardPopover
|
||||
CardPayOption={CardPayOption}
|
||||
SelectedCardOption={SelectedCardOption}
|
||||
AddCardOption={AddCardOption}
|
||||
CardOptionOpen={CardOptionOpen}
|
||||
EnableCardOptions={EnableCardOptions}
|
||||
paygate={paygate}
|
||||
paydevice={paydevice}
|
||||
/>
|
||||
)}
|
||||
{payment?.ModeName?.toLowerCase() === 'upi' && (
|
||||
<UpiPopover
|
||||
defaultPaymentMode={defaultPaymentMode}
|
||||
|
|
@ -3849,11 +3852,11 @@ const BSBillingTable5 = () => {
|
|||
<button
|
||||
className={
|
||||
refundPaySelected === payment.ConfigId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: refundPaySelected === payment.ConfigId &&
|
||||
(!UpinotSelected ||
|
||||
!CardoptionnotSelected)
|
||||
(!UpinotSelected ||
|
||||
!CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -4064,16 +4067,16 @@ const BSBillingTable5 = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
width: '2rem',
|
||||
|
|
@ -4093,14 +4096,14 @@ const BSBillingTable5 = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -4147,9 +4150,9 @@ const BSBillingTable5 = () => {
|
|||
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -4165,38 +4168,38 @@ const BSBillingTable5 = () => {
|
|||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{tabledata?.length > 0 && dinePreference && (
|
||||
<div style={{ width: '2rem' }}>
|
||||
{tableOptions
|
||||
|
|
@ -4240,14 +4243,14 @@ const BSBillingTable5 = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -4297,28 +4300,28 @@ const BSBillingTable5 = () => {
|
|||
<>
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
!BookingTypeBoth &&
|
||||
BookingType !== 'Dine In' &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
<button
|
||||
className="BSBIllingTable5-cnclbtn"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
color: 'default',
|
||||
backgroundColor: '#eef3f3',
|
||||
}}
|
||||
>
|
||||
<p className="BigScreen">HOLD ✋</p>
|
||||
<span className="SmallScreen">✋</span>
|
||||
</button>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
!BookingTypeBoth &&
|
||||
BookingType !== 'Dine In' &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
paybtns?.length > 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
<button
|
||||
className="BSBIllingTable5-cnclbtn"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
color: 'default',
|
||||
backgroundColor: '#eef3f3',
|
||||
}}
|
||||
>
|
||||
<p className="BigScreen">HOLD ✋</p>
|
||||
<span className="SmallScreen">✋</span>
|
||||
</button>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
{unpaidFlow === false &&
|
||||
item?.OptionName === 'Hold' &&
|
||||
|
|
@ -4357,9 +4360,9 @@ const BSBillingTable5 = () => {
|
|||
addnewAccess
|
||||
? 'BSBIllingTable5-paybtn-noitems-disable'
|
||||
: FirstPaymentclick === false &&
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
? !OrderStatus
|
||||
? salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount
|
||||
|
|
@ -4378,7 +4381,7 @@ const BSBillingTable5 = () => {
|
|||
>
|
||||
{!OrderStatus ? (
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
<div>
|
||||
Refund: ₹
|
||||
{(previousNetAmount || 0) -
|
||||
|
|
@ -4601,14 +4604,14 @@ const BSBillingTable5 = () => {
|
|||
OrderType === 'Failed'
|
||||
? FailedTotalAmt
|
||||
: Math.round(
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
}
|
||||
failedOrderData={failedOrderData}
|
||||
/>
|
||||
|
|
@ -4636,14 +4639,14 @@ const BSBillingTable5 = () => {
|
|||
{(filteredSettingNames?.includes('Print') ||
|
||||
!MobileNoWhatsApp ||
|
||||
!MobileNoWhatsApp.value) && (
|
||||
<FaPrint
|
||||
size={32}
|
||||
color="#1292EE"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={handlePrintOrToken}
|
||||
title="Print"
|
||||
/>
|
||||
)}
|
||||
<FaPrint
|
||||
size={32}
|
||||
color="#1292EE"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={handlePrintOrToken}
|
||||
title="Print"
|
||||
/>
|
||||
)}
|
||||
|
||||
{filteredSettingNames?.includes('SMS') && isMobile && (
|
||||
<MdSms
|
||||
|
|
@ -4726,9 +4729,9 @@ const BSBillingTable5 = () => {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -2397,15 +2397,15 @@ const BSBillingTable6 = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2652,15 +2652,15 @@ const BSBillingTable6 = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2954,14 +2954,14 @@ const BSBillingTable6 = () => {
|
|||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3237,15 +3237,16 @@ const BSBillingTable6 = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
|
||||
{item?.Type != 'C'
|
||||
? item.Offer
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState, useRef, lazy ,Suspense } from 'react';
|
||||
import React, { useEffect, useState, useRef, lazy, Suspense } from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import moment from 'moment';
|
||||
|
|
@ -469,7 +469,7 @@ const BST6Payment = () => {
|
|||
// for customised invoice number
|
||||
const { invoiceDate, clearInvoiceDate } = useDateStore();
|
||||
const CurrentOrderId = useSelector(GlobalCurrentOrderId);
|
||||
const holdCheckedSalesSetup = tableOptions?.some(
|
||||
const holdCheckedSalesSetup = tableOptions?.some(
|
||||
(item) => item?.OptionName === 'Hold'
|
||||
);
|
||||
|
||||
|
|
@ -759,7 +759,7 @@ const BST6Payment = () => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -2112,15 +2112,15 @@ const BST6Payment = () => {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -2137,6 +2137,9 @@ const BST6Payment = () => {
|
|||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -2210,7 +2213,7 @@ const BST6Payment = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -2227,9 +2230,9 @@ const BST6Payment = () => {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
SalesPaymentType: 'normal',
|
||||
PaymentDetail: [
|
||||
|
|
@ -2244,8 +2247,8 @@ const BST6Payment = () => {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -2258,15 +2261,15 @@ const BST6Payment = () => {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -2286,29 +2289,29 @@ const BST6Payment = () => {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -2319,13 +2322,13 @@ const BST6Payment = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -2402,14 +2405,14 @@ const BST6Payment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2570,14 +2573,14 @@ const BST6Payment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2684,14 +2687,14 @@ const BST6Payment = () => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2867,14 +2870,14 @@ const BST6Payment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -2893,7 +2896,7 @@ const BST6Payment = () => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -3596,59 +3599,59 @@ const BST6Payment = () => {
|
|||
<>
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
OrderCardDetail?.length != 0 &&
|
||||
CheckOrderType?.length === 0 &&
|
||||
OrderType != 'Failed' &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
paybtns?.length > 0 &&
|
||||
!addnewAccess && (
|
||||
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => AddBookingDetails('Hold')}
|
||||
style={{
|
||||
fontSize: '30px',
|
||||
cursor: 'pointer',
|
||||
color: '' ? '#52c41a' : '#1292EE',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
{unpaidFlow == false
|
||||
? item?.OptionName == 'Hold' &&
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess &&
|
||||
paybtns?.length > 0 &&
|
||||
!OtherServicesglobal && (
|
||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
BookingType !== 'Dine In' &&
|
||||
!BookingTypeBoth &&
|
||||
Holddata?.length > 0 &&
|
||||
OrderCardDetail?.length == 0 &&
|
||||
CheckBookingStatus != 'Close' &&
|
||||
!addnewAccess &&
|
||||
paybtns?.length > 0 &&
|
||||
!OtherServicesglobal && (
|
||||
<TooltipWrapper title={'Recall'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<Badge
|
||||
count={Holddata?.length}
|
||||
size={'small'}
|
||||
offset={[0, 7]}
|
||||
>
|
||||
<PozoHoldIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => HandleholdModelOpen()}
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
cursor: 'pointer',
|
||||
color: Holddata ? '#52c41a' : 'default',
|
||||
pointerEvents:
|
||||
OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
/>
|
||||
</Badge>
|
||||
</TooltipWrapper>
|
||||
)
|
||||
: ''}
|
||||
</>
|
||||
))}
|
||||
|
|
@ -3659,16 +3662,16 @@ const BST6Payment = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
width: '2rem',
|
||||
|
|
@ -3688,14 +3691,14 @@ const BST6Payment = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3761,31 +3764,31 @@ const BST6Payment = () => {
|
|||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 'none'
|
||||
: 'auto',
|
||||
opacity:
|
||||
(BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
CheckOrderType?.length > 0) &&
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
!unpaidFlow &&
|
||||
OrderStatus
|
||||
? 0.5
|
||||
: 1,
|
||||
}}
|
||||
>
|
||||
{paybtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
paybtns?.map((payment) => (
|
||||
<div className="Table6-cash">
|
||||
<button
|
||||
className={
|
||||
paybtnselected === payment.ModeId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: paybtnselected === payment.ModeId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -3799,13 +3802,13 @@ const BST6Payment = () => {
|
|||
onClick={() =>
|
||||
payment?.ModeName?.toLowerCase() === 'upi' // Change the condition to payment.Id
|
||||
? handleUPIButtonClick(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
: handlePaymentMode(
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
payment.ModeId,
|
||||
payment.ModeName
|
||||
)
|
||||
}
|
||||
>
|
||||
{/* {UpiOption === "" && payment?.Name?.toLowerCase() === "upi" && <p> UPI</p>} */}
|
||||
|
|
@ -3864,10 +3867,10 @@ const BST6Payment = () => {
|
|||
<button
|
||||
className={
|
||||
refundPaySelected === payment.ConfigId &&
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
(UpinotSelected || CardoptionnotSelected)
|
||||
? 'Btn-payment-mode-notupisel'
|
||||
: refundPaySelected === payment.ConfigId &&
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
(!UpinotSelected || !CardoptionnotSelected)
|
||||
? 'Btn-payment-mode'
|
||||
: 'Btn-payment-mode-sel'
|
||||
}
|
||||
|
|
@ -3918,9 +3921,9 @@ const BST6Payment = () => {
|
|||
addnewAccess
|
||||
? 'BST6Payment-Button-pay-disabled'
|
||||
: FirstPaymentclick === false &&
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
OrderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus != 'Close'
|
||||
? !OrderStatus
|
||||
? salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount
|
||||
|
|
@ -3942,7 +3945,7 @@ const BST6Payment = () => {
|
|||
>
|
||||
{!OrderStatus ? (
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
currentOrderNetAmount < previousNetAmount ? (
|
||||
<div>
|
||||
Refund: ₹
|
||||
{(previousNetAmount || 0) -
|
||||
|
|
@ -4094,9 +4097,9 @@ const BST6Payment = () => {
|
|||
>
|
||||
<div className="BST6Payment-buttons">
|
||||
{paybtnselected ==
|
||||
paybtns?.filter(
|
||||
(item) => item?.ModeName?.toLowerCase() === 'cash'
|
||||
)?.[0]?.ModeId ? (
|
||||
paybtns?.filter(
|
||||
(item) => item?.ModeName?.toLowerCase() === 'cash'
|
||||
)?.[0]?.ModeId ? (
|
||||
<PaymentInput
|
||||
totalAmount={TotalAmount}
|
||||
BillingTableName="BillingTable6"
|
||||
|
|
@ -4135,9 +4138,9 @@ const BST6Payment = () => {
|
|||
OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -4154,38 +4157,38 @@ const BST6Payment = () => {
|
|||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{tabledata?.length > 0 && dinePreference && (
|
||||
<div style={{ width: '2rem' }}>
|
||||
{tableOptions
|
||||
|
|
@ -4229,14 +4232,14 @@ const BST6Payment = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
OrderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -4474,14 +4477,14 @@ const BST6Payment = () => {
|
|||
OrderType === 'Failed'
|
||||
? FailedTotalAmt
|
||||
: Math.round(
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
OrderCardDetail?.reduce(
|
||||
(acc, data) => data?.TotalAmt + acc,
|
||||
0
|
||||
) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)
|
||||
}
|
||||
failedOrderData={failedOrderData}
|
||||
/>
|
||||
|
|
@ -4588,9 +4591,9 @@ const BST6Payment = () => {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
@ -4781,9 +4784,9 @@ const BST6Payment = () => {
|
|||
|
||||
const qty = isGroup
|
||||
? OrderCardDetail.filter((o) => o.id === groupKey).reduce(
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
(sum, o) => sum + (o.OrderQty || 1),
|
||||
0
|
||||
)
|
||||
: item.OrderQty || 1;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ const BSBilling7Payment = () => {
|
|||
const screenwidth = useSelector(GlobalScreenSize);
|
||||
const defaultBookingType = useSelector(GlobalDefaultBookingType);
|
||||
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
|
||||
const AllBookingType=useSelector(GlobalAllBookingType)
|
||||
const AllBookingType = useSelector(GlobalAllBookingType)
|
||||
const FontFamily = useSelector(GlobalSelectedFont);
|
||||
const OrderCardDetail = useSelector(GlobalOrderCardDetails);
|
||||
const GetCustId = useSelector(GlobalCustId);
|
||||
|
|
@ -471,7 +471,7 @@ const BSBilling7Payment = () => {
|
|||
// for customised invoice number
|
||||
const { invoiceDate, clearInvoiceDate } = useDateStore();
|
||||
const CurrentOrderId = useSelector(GlobalCurrentOrderId);
|
||||
const holdCheckedSalesSetup = tableOptions?.some(
|
||||
const holdCheckedSalesSetup = tableOptions?.some(
|
||||
(item) => item?.OptionName === 'Hold'
|
||||
);
|
||||
|
||||
|
|
@ -570,7 +570,7 @@ const BSBilling7Payment = () => {
|
|||
if (!preOrder) {
|
||||
const totalSum = OrderCardDetail?.reduce(
|
||||
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
|
||||
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
|
||||
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
|
||||
0
|
||||
);
|
||||
|
||||
|
|
@ -696,9 +696,8 @@ const BSBilling7Payment = () => {
|
|||
}, []);
|
||||
useEffect(() => {
|
||||
if (CompId && BranchId && AppId) {
|
||||
if(holdCheckedSalesSetup)
|
||||
{
|
||||
getHolddata();
|
||||
if (holdCheckedSalesSetup) {
|
||||
getHolddata();
|
||||
}
|
||||
// getUnpaiddatas();
|
||||
getCustomerData();
|
||||
|
|
@ -1627,14 +1626,14 @@ const BSBilling7Payment = () => {
|
|||
};
|
||||
|
||||
const getBookingTypeId = async () => {
|
||||
setConfigDataList(AllBookingType);
|
||||
let configdata = AllBookingType;
|
||||
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
|
||||
setConfigDataList(AllBookingType);
|
||||
let configdata = AllBookingType;
|
||||
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
|
||||
|
||||
let filterconfigdata = configdata?.find(
|
||||
(a) => a?.ConfigName === checkName
|
||||
);
|
||||
setSelectedBookingType(filterconfigdata?.ConfigId);
|
||||
let filterconfigdata = configdata?.find(
|
||||
(a) => a?.ConfigName === checkName
|
||||
);
|
||||
setSelectedBookingType(filterconfigdata?.ConfigId);
|
||||
};
|
||||
const gettodaydate = () => {
|
||||
const currentDate = new Date();
|
||||
|
|
@ -1926,9 +1925,8 @@ const BSBilling7Payment = () => {
|
|||
setCurrentOrderNetAmount(0);
|
||||
setPreviousNetAmount(0);
|
||||
setUpinotSelected(false);
|
||||
if(holdCheckedSalesSetup)
|
||||
{
|
||||
getHolddata();
|
||||
if (holdCheckedSalesSetup) {
|
||||
getHolddata();
|
||||
}
|
||||
if (defaultBookingType === 'Both') {
|
||||
await dispatch(changeBookingType('TakeAway'));
|
||||
|
|
@ -2122,6 +2120,9 @@ const BSBilling7Payment = () => {
|
|||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
|
||||
}));
|
||||
const NotSlectedTypeFind = temporderdetail?.find(
|
||||
(a) => a?.BookingType != SelectedBookingType
|
||||
|
|
@ -3328,10 +3329,10 @@ const BSBilling7Payment = () => {
|
|||
setDefaultPaymentMode([]);
|
||||
}
|
||||
};
|
||||
if(salesBillEdit){
|
||||
if (salesBillEdit) {
|
||||
setDefaultPaymentOption();
|
||||
}
|
||||
}, [defaultPaymentTrigger,salesBillEdit]);
|
||||
}, [defaultPaymentTrigger, salesBillEdit]);
|
||||
|
||||
const Otherserviceprint = async () => {
|
||||
if (OtherServicesPrintDetails?.length > 0) {
|
||||
|
|
@ -3652,39 +3653,39 @@ const BSBilling7Payment = () => {
|
|||
|
||||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{tabledata?.length > 0 && dinePreference && (
|
||||
<div style={{ width: '2rem' }}>
|
||||
{tableOptions
|
||||
|
|
|
|||
|
|
@ -2312,15 +2312,15 @@ const BSBillingTable7 = () => {
|
|||
fontFamily: 'Poppins',
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2539,14 +2539,14 @@ const BSBillingTable7 = () => {
|
|||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2822,15 +2822,15 @@ const BSBillingTable7 = () => {
|
|||
fontFamily: 'Poppins',
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3079,15 +3079,15 @@ const BSBillingTable7 = () => {
|
|||
fontFamily: 'Poppins',
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
|
|||
|
|
@ -2616,15 +2616,15 @@ const StandardTable = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -2940,15 +2940,15 @@ const StandardTable = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
@ -3317,14 +3317,14 @@ const StandardTable = () => {
|
|||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
|
||||
|
|
@ -3673,15 +3673,15 @@ const StandardTable = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: '-'}
|
||||
{item?.Type != 'C'
|
||||
? item.Offer && item.Offer > 0
|
||||
? item.Offer
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'
|
||||
: item?.OfferPrice && item?.OfferPrice > 0
|
||||
? item?.OfferType === 'F'
|
||||
? `₹${safeRound(item.OfferPrice)}`
|
||||
: `${item.OfferPrice}%`
|
||||
: item.DiscountAmt ? item.DiscountAmt : '-'}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'Quantity' && (
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ import {
|
|||
getExpireProductsList,
|
||||
getLowStockAlertProductsList,
|
||||
} from '../../../../../Features/ProductPage/ProductPage.js';
|
||||
|
||||
|
||||
// Jsx Files
|
||||
const CustomerOrders = lazy(
|
||||
() => import('../../BookingFunctionality/CustomerOrders.jsx')
|
||||
|
|
@ -1420,15 +1420,15 @@ const StandardTablePayment = () => {
|
|||
OrderStatus: 'O',
|
||||
OrderType:
|
||||
BookingType === 'Dine In' ||
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
BookingTypeBoth ||
|
||||
Estimation?.SettingValue == 'N'
|
||||
? 'S'
|
||||
: GlobEstBooking === 'OvrAllEst'
|
||||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -1445,6 +1445,9 @@ const StandardTablePayment = () => {
|
|||
BatchRef: a.BatchRef,
|
||||
PackageDtl: a.PackageDtl,
|
||||
SetCount: a.SetCount,
|
||||
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
|
||||
...(a?.DiscountType && { DiscountType: a.DiscountType }),
|
||||
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }),
|
||||
BookingDate: AvailableDate
|
||||
? Object.keys(ReportholdData)?.length > 0
|
||||
? a?.BookingDate
|
||||
|
|
@ -1524,7 +1527,7 @@ const StandardTablePayment = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
OrderDtlDetails:
|
||||
|
|
@ -1541,9 +1544,9 @@ const StandardTablePayment = () => {
|
|||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
|
||||
SalesPaymentType: 'normal',
|
||||
|
|
@ -1559,8 +1562,8 @@ const StandardTablePayment = () => {
|
|||
? PaymentgatewayUPI?.[0]?.ModeId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.ModeId
|
||||
: paybtnselected
|
||||
: paybtnselected
|
||||
? paybtnselected
|
||||
|
|
@ -1573,15 +1576,15 @@ const StandardTablePayment = () => {
|
|||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? null
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
|
||||
?.MerchantId
|
||||
?.MerchantId
|
||||
: null,
|
||||
PaymentOptionType:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
(refundPaySelectedName?.toLowerCase() === 'cash' ||
|
||||
refundPaySelectedName?.toLowerCase() === 'credit')
|
||||
? 'PC'
|
||||
: Paybtnnameselected?.toLowerCase() === 'cash'
|
||||
? 'PC'
|
||||
|
|
@ -1601,29 +1604,29 @@ const StandardTablePayment = () => {
|
|||
? null
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
|
||||
?.UPIDetailId
|
||||
?.UPIDetailId
|
||||
: SelectedUPIPayOption?.toLowerCase() === 'business'
|
||||
? BusinessPayOption?.find(
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
(busupi) => busupi?.ModeId === UpiId
|
||||
)?.MerchantUPIId
|
||||
: null,
|
||||
AccountDtl:
|
||||
salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? []
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
(upipay) => upipay?.UPIId === UpiId
|
||||
)
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pd') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
SelectedUPIPayOption?.toLowerCase() === 'pg') ||
|
||||
(Paybtnnameselected?.toLowerCase() === 'card' &&
|
||||
SelectedCardOption?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -1634,13 +1637,13 @@ const StandardTablePayment = () => {
|
|||
: Paybtnnameselected?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: Paybtnnameselected?.toLowerCase() === 'upi' &&
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
SelectedUPIPayOption?.toLowerCase() === 'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit:
|
||||
salesBillEdit &&
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
currentOrderNetAmount < previousNetAmount &&
|
||||
refundPaySelectedName?.toLowerCase() === 'credit'
|
||||
? Math.round(previousNetAmount - currentOrderNetAmount)
|
||||
: 0,
|
||||
Credit: salesBillEdit
|
||||
|
|
@ -1742,14 +1745,14 @@ const StandardTablePayment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -1908,14 +1911,14 @@ const StandardTablePayment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
response?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2020,14 +2023,14 @@ const StandardTablePayment = () => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -2101,9 +2104,9 @@ const StandardTablePayment = () => {
|
|||
AppId: AppId,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2116,9 +2119,9 @@ const StandardTablePayment = () => {
|
|||
ProdSubCat: ProdSubCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2129,9 +2132,9 @@ const StandardTablePayment = () => {
|
|||
prodCat: prodCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2311,14 +2314,14 @@ const StandardTablePayment = () => {
|
|||
setMessageType('success');
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
bookingpaymentupdate?.data?.OrderDetails?.length > 0 &&
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -2336,7 +2339,7 @@ const StandardTablePayment = () => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -2975,7 +2978,7 @@ const StandardTablePayment = () => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -3479,9 +3482,9 @@ const StandardTablePayment = () => {
|
|||
cursor: orderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
orderCardDetail?.length > 0 ||
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
(selOption?.value === undefined &&
|
||||
GlobalAddCustomerDetails1?.length === 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '28px',
|
||||
|
|
@ -3504,14 +3507,14 @@ const StandardTablePayment = () => {
|
|||
width: '1.5rem',
|
||||
cursor:
|
||||
orderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
color:
|
||||
orderCardDetail?.length === 0 ||
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
CheckBookingStatus == 'Close' ||
|
||||
addnewAccess
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
display: 'flex',
|
||||
|
|
@ -3526,39 +3529,39 @@ const StandardTablePayment = () => {
|
|||
|
||||
{/* Customer Orders */}
|
||||
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(orderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: orderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
orderCardDetail?.length > 0 ||
|
||||
(orderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
.length === 1) && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(orderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: orderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
orderCardDetail?.length > 0 ||
|
||||
(orderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
{tabledata?.length > 0 && dinePreference && (
|
||||
<div style={{ width: '2rem' }}>
|
||||
|
|
@ -3612,14 +3615,14 @@ const StandardTablePayment = () => {
|
|||
{(filteredSettingNames?.includes('Print') ||
|
||||
!MobileNoWhatsApp ||
|
||||
!MobileNoWhatsApp.value) && (
|
||||
<FaPrint
|
||||
size={32}
|
||||
color="#1292EE"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={handlePrintOrToken}
|
||||
title="Print"
|
||||
/>
|
||||
)}
|
||||
<FaPrint
|
||||
size={32}
|
||||
color="#1292EE"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={handlePrintOrToken}
|
||||
title="Print"
|
||||
/>
|
||||
)}
|
||||
|
||||
{filteredSettingNames?.includes('SMS') && isMobile && (
|
||||
<MdSms
|
||||
|
|
@ -3702,7 +3705,7 @@ const StandardTablePayment = () => {
|
|||
}}
|
||||
>
|
||||
{payBtns?.length > 0 &&
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
currentOrderNetAmount >= previousNetAmount ? (
|
||||
payBtns.map((payment) => {
|
||||
const mode = payment?.ModeName?.toLowerCase();
|
||||
const isSelected = paybtnselected === payment?.ModeId;
|
||||
|
|
@ -3713,9 +3716,9 @@ const StandardTablePayment = () => {
|
|||
const handleClick =
|
||||
mode === 'upi'
|
||||
? () =>
|
||||
handleUPIButtonClick(payment?.ModeId, payment?.ModeName)
|
||||
handleUPIButtonClick(payment?.ModeId, payment?.ModeName)
|
||||
: () =>
|
||||
handlePaymentMode(payment?.ModeId, payment?.ModeName);
|
||||
handlePaymentMode(payment?.ModeId, payment?.ModeName);
|
||||
|
||||
return (
|
||||
<div className="standard-pay-btns" key={payment?.ModeId}>
|
||||
|
|
@ -3867,9 +3870,9 @@ const StandardTablePayment = () => {
|
|||
addnewAccess
|
||||
? 'standard-pay-btn-disabled'
|
||||
: FirstPaymentclick === false &&
|
||||
orderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus !== 'Close'
|
||||
orderCardDetail?.length > 0 &&
|
||||
paybtnselected &&
|
||||
CheckBookingStatus !== 'Close'
|
||||
? !OrderStatus
|
||||
? salesBillEdit && currentOrderNetAmount < previousNetAmount
|
||||
? 'standard-pay-btn-refund'
|
||||
|
|
@ -3942,8 +3945,8 @@ const StandardTablePayment = () => {
|
|||
columns={columns}
|
||||
data={TableData}
|
||||
dataSource={TableData}
|
||||
// pagination={handlePageChange}
|
||||
// onChange={handleChange}
|
||||
// pagination={handlePageChange}
|
||||
// onChange={handleChange}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
|
@ -4109,11 +4112,11 @@ const StandardTablePayment = () => {
|
|||
handlesplitpaymentclose={handlesplitpaymentclose}
|
||||
TotalNetAmount={Math.round(
|
||||
orderCardDetail?.reduce((acc, data) => data?.TotalAmt + acc, 0) -
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
((OverAllSales > 0 ? OverAllSales : 0) +
|
||||
(OverAllEstimate > 0 ? OverAllEstimate : 0) +
|
||||
(Discount > 0 ? Discount : 0))
|
||||
)}
|
||||
// failedOrderData={failedOrderData}
|
||||
// failedOrderData={failedOrderData}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue