Merge pull request 'Web to Mobile Design' (#261) from PushMainVM into main

Reviewed-on: Pozomind/pozo-retail-app#261
This commit is contained in:
karthikalakshmi 2026-03-09 10:48:27 +05:30
commit 08336219e0
25 changed files with 10572 additions and 10571 deletions

View File

@ -20,7 +20,6 @@ const IndividualBooking = lazy(
const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL; const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL;
const subDirectory = import.meta.env.ENV_BASE_URL; const subDirectory = import.meta.env.ENV_BASE_URL;
import '../ownLib/my-ui-lib.css'; import '../ownLib/my-ui-lib.css';
import CardSkeleton from './Components/Skeleton/CardSkeleton.jsx';
import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx'; import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx';
import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx'; import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx';
import useSubscriptionManager from './useSubscriptionManager.js'; import useSubscriptionManager from './useSubscriptionManager.js';
@ -189,10 +188,10 @@ const AppRoutes = () => {
} catch (err) {} } catch (err) {}
}; };
}, [navigate, location.pathname, location.search]); }, [navigate, location.pathname, location.search]);
// mohan // mohan
useEffect(() => { useEffect(() => {
if (isMobile || isIOS) { if (isMobile || isIOS) {
console.log("📱 Mobile/iOS device → skipping DevTools detection"); console.log('📱 Mobile/iOS device → skipping DevTools detection');
return; return;
} }
const checkDevTools = setInterval(() => { const checkDevTools = setInterval(() => {
@ -200,8 +199,7 @@ const AppRoutes = () => {
setDevToolsOpen(true); setDevToolsOpen(true);
document.body.innerHTML = document.body.innerHTML =
"<h1 style='color: red; text-align: center;'>Close Inspect to continue using the application.</h1>"; "<h1 style='color: red; text-align: center;'>Close Inspect to continue using the application.</h1>";
} } else if (!devtools.isOpen && devToolsOpen) {
else if (!devtools.isOpen && devToolsOpen) {
setDevToolsOpen(false); setDevToolsOpen(false);
setTimeout(() => { setTimeout(() => {
@ -240,7 +238,7 @@ const AppRoutes = () => {
); );
} }
return ( return (
<Suspense fallback={<CardSkeleton />}> <Suspense fallback={null}>
<Routes> <Routes>
<Route <Route
path={`${subDirectory}selfBooking/:SelfBookingId`} path={`${subDirectory}selfBooking/:SelfBookingId`}

View File

@ -8,7 +8,7 @@
scrollbar-width: none; scrollbar-width: none;
@media (max-width: 500px) { @media (max-width: 500px) {
overflow: scroll; overflow: auto;
} }
&.pozo-menu-vertical { &.pozo-menu-vertical {
@ -38,18 +38,18 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 7px 8px; padding: 6px 8px;
cursor: pointer; cursor: pointer;
transition: transition:
background 0.2s, background 0.2s,
color 0.2s; color 0.2s;
border-radius: 8px; border-radius: 6px;
margin: 1px 3px; margin: 1px 3px;
font-size: 13px; font-size: 13px;
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
position: relative; position: relative;
min-height: 36px; min-height: 34px;
font-family: "Poppins", sans-serif !important; font-family: "Poppins", sans-serif !important;
&:hover:not(.selected):not(.active-path) { &:hover:not(.selected):not(.active-path) {
@ -183,8 +183,8 @@
max-width: 300px; max-width: 300px;
max-height: 54vh; max-height: 54vh;
overflow-y: auto; overflow-y: auto;
animation: dropdownFadeIn 0.2s ease;
scrollbar-width: thin; scrollbar-width: thin;
animation: dropdownFadeIn 0.2s ease;
z-index: 1050 !important; z-index: 1050 !important;
// Ensure no transform interference // Ensure no transform interference

View File

@ -1,4 +1,4 @@
import React, { useState, useEffect, lazy, Suspense } from 'react'; import React, { useState, useEffect, lazy } from 'react';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { Button, Popover } from 'antd'; import { Button, Popover } from 'antd';
import { AiOutlineClose } from 'react-icons/ai'; import { AiOutlineClose } from 'react-icons/ai';
@ -16,7 +16,6 @@ import { isMobile } from 'react-device-detect';
import { getTemplateData } from '../../../../../Features/ThemeChange/ThemeChange.js'; import { getTemplateData } from '../../../../../Features/ThemeChange/ThemeChange.js';
import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx'; import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx';
import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip'; import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
// jsx File // jsx File
const BSBillingTable1 = lazy( const BSBillingTable1 = lazy(
() => import('../BSBillingTable1/BSBillingTable1.jsx') () => import('../BSBillingTable1/BSBillingTable1.jsx')
@ -129,7 +128,6 @@ export default function BSBTOverall1() {
}, [width]); }, [width]);
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<> <>
<div <div
className={ className={
@ -208,18 +206,14 @@ export default function BSBTOverall1() {
> >
<BSCustomerSelect /> <BSCustomerSelect />
<TooltipWrapper <TooltipWrapper title={'Add Customer'} isMobile={isMobile}>
title={'Add Customer'}
isMobile={isMobile}
>
{' '} {' '}
<PozoAddCustomerIcon <PozoAddCustomerIcon
className="BSBillingNav-icon-table-icon" className="BSBillingNav-icon-table-icon"
onClick={handleAddCustomer} onClick={handleAddCustomer}
style={{ style={{
fontSize: '25px', fontSize: '25px',
color: color: selOption || GetCustId ? '#52c41a' : '#1292EE',
selOption || GetCustId ? '#52c41a' : '#1292EE',
cursor: Custdisable ? 'not-allowed' : 'pointer', cursor: Custdisable ? 'not-allowed' : 'pointer',
}} }}
/> />
@ -255,6 +249,5 @@ export default function BSBTOverall1() {
</div> </div>
</div> </div>
</> </>
</Suspense>
); );
} }

View File

@ -1,4 +1,4 @@
import React, { useState, useEffect, lazy, Suspense } from 'react'; import React, { useState, useEffect, lazy } from 'react';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { Popconfirm, Tooltip } from 'antd'; import { Popconfirm, Tooltip } from 'antd';
import { AiOutlineClose, AiFillDelete } from 'react-icons/ai'; import { AiOutlineClose, AiFillDelete } from 'react-icons/ai';
@ -83,7 +83,6 @@ const CustomerPriceHistory = lazy(
() => import('../../UtillComponents/CustomerPriceHistory.jsx') () => import('../../UtillComponents/CustomerPriceHistory.jsx')
); // Scss File ); // Scss File
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.scss'; import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.scss';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
const BSBillingTable1 = () => { const BSBillingTable1 = () => {
const { removeExtraCharge } = useUtilsComponent(); const { removeExtraCharge } = useUtilsComponent();
@ -2034,7 +2033,6 @@ const BSBillingTable1 = () => {
}; };
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<> <>
<div className="BillingTable1-Structure" style={{ overflow: 'auto' }}> <div className="BillingTable1-Structure" style={{ overflow: 'auto' }}>
<div className="BillingTable1-table-div"> <div className="BillingTable1-table-div">
@ -2259,7 +2257,8 @@ const BSBillingTable1 = () => {
{OldtableDataTakeAway?.map((item, index) => ( {OldtableDataTakeAway?.map((item, index) => (
<tr <tr
key={index} key={index}
className={`${item?.SalesId && OrderType !== 'Hold' className={`${
item?.SalesId && OrderType !== 'Hold'
? 'Billing-Table1-row-disabled' ? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row' : 'Billing-Table1-row'
} }
@ -2275,8 +2274,7 @@ const BSBillingTable1 = () => {
: triggerAnimation && : triggerAnimation &&
index === 0 && index === 0 &&
!item?.SalesId && !item?.SalesId &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength
PreviousdataLength
? 'wheat' ? 'wheat'
: triggerAnimation && : triggerAnimation &&
index === 0 && index === 0 &&
@ -2292,17 +2290,13 @@ const BSBillingTable1 = () => {
? 'rgb(243, 248, 213)' ? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' && : GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes( GlobProdwisedata?.includes(
item?.InwardDtlId + item?.InwardDtlId + ' ' + item?.BookingTypeName
' ' +
item?.BookingTypeName
) )
? '#b2d1f7' ? '#b2d1f7'
: index % 2 === 0 : index % 2 === 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6', : '#d6d6d6',
animation: animation:
BillOrderPre === 'Y' && !BookingTypeBoth BillOrderPre === 'Y' && !BookingTypeBoth
@ -2354,9 +2348,9 @@ const BSBillingTable1 = () => {
textAlign: 'left', textAlign: 'left',
}} }}
onClick={() => onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
(item.FullProductIdentifierDtls?.length > 0 || item.ProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item) : editField && handleEditQuantity(item)
} }
@ -2398,8 +2392,7 @@ const BSBillingTable1 = () => {
> >
{item.ProdDetail?.map((prod, index) => ( {item.ProdDetail?.map((prod, index) => (
<p key={index}> <p key={index}>
{prod.ProdName} - {prod.Size}{' '} {prod.ProdName} - {prod.Size} {prod.UomName}
{prod.UomName}
</p> </p>
))} ))}
</div> </div>
@ -2456,12 +2449,16 @@ const BSBillingTable1 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2555,7 +2552,8 @@ const BSBillingTable1 = () => {
{OldtableDataDinein?.map((item, index) => ( {OldtableDataDinein?.map((item, index) => (
<tr <tr
key={OldtableDataTakeAway?.length + index} key={OldtableDataTakeAway?.length + index}
className={`${item?.SalesId className={`${
item?.SalesId
? 'Billing-Table1-row-disabled' ? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row' : 'Billing-Table1-row'
} }
@ -2576,8 +2574,7 @@ const BSBillingTable1 = () => {
? 'wheat' ? 'wheat'
: BookingType !== 'Dine In' && : BookingType !== 'Dine In' &&
triggerAnimation && triggerAnimation &&
OldtableDataTakeAway?.length + index === OldtableDataTakeAway?.length + index === 0 &&
0 &&
tableDataDinein?.length >= tableDataDinein?.length >=
PreviousdataLength && PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
@ -2689,8 +2686,7 @@ const BSBillingTable1 = () => {
> >
{item.ProdDetail?.map((prod, index) => ( {item.ProdDetail?.map((prod, index) => (
<p key={index}> <p key={index}>
{prod.ProdName} - {prod.Size}{' '} {prod.ProdName} - {prod.Size} {prod.UomName}
{prod.UomName}
</p> </p>
))} ))}
</div> </div>
@ -2747,12 +2743,16 @@ const BSBillingTable1 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2851,7 +2851,8 @@ const BSBillingTable1 = () => {
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
index index
} }
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'Billing-Table1-row-disabled' ? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row' : 'Billing-Table1-row'
} }
@ -2871,8 +2872,7 @@ const BSBillingTable1 = () => {
index === index ===
0 && 0 &&
!item?.SalesId && !item?.SalesId &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength
PreviousdataLength
? 'wheat' ? 'wheat'
: BookingType !== 'Dine In' && : BookingType !== 'Dine In' &&
triggerAnimation && triggerAnimation &&
@ -2912,9 +2912,7 @@ const BSBillingTable1 = () => {
? 'rgb(243, 248, 213)' ? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' && : GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes( GlobProdwisedata?.includes(
item?.InwardDtlId + item?.InwardDtlId + ' ' + item?.BookingTypeName
' ' +
item?.BookingTypeName
) )
? '#b2d1f7' ? '#b2d1f7'
: (OldtableDataDinein?.length + : (OldtableDataDinein?.length +
@ -2924,9 +2922,7 @@ const BSBillingTable1 = () => {
0 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6', : '#d6d6d6',
animation: animation:
BillOrderPre === 'Y' && !BookingTypeBoth BillOrderPre === 'Y' && !BookingTypeBoth
@ -2984,9 +2980,9 @@ const BSBillingTable1 = () => {
textAlign: 'left', textAlign: 'left',
}} }}
onClick={() => onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
(item.FullProductIdentifierDtls?.length > 0 || item.ProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item) : editField && handleEditQuantity(item)
} }
@ -3034,8 +3030,7 @@ const BSBillingTable1 = () => {
> >
{item.ProdDetail?.map((prod, index) => ( {item.ProdDetail?.map((prod, index) => (
<p key={index}> <p key={index}>
{prod.ProdName} - {prod.Size}{' '} {prod.ProdName} - {prod.Size} {prod.UomName}
{prod.UomName}
</p> </p>
))} ))}
</div> </div>
@ -3092,12 +3087,16 @@ const BSBillingTable1 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3197,7 +3196,8 @@ const BSBillingTable1 = () => {
tableDataTakeAway?.length + tableDataTakeAway?.length +
index index
} }
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'Billing-Table1-row-disabled' ? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row' : 'Billing-Table1-row'
} }
@ -3243,9 +3243,7 @@ const BSBillingTable1 = () => {
? 'rgb(243, 248, 213)' ? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' && : GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes( GlobProdwisedata?.includes(
item?.InwardDtlId + item?.InwardDtlId + ' ' + item?.BookingTypeName
' ' +
item?.BookingTypeName
) )
? '#b2d1f7' ? '#b2d1f7'
: (OldtableDataTakeAway?.length + : (OldtableDataTakeAway?.length +
@ -3256,9 +3254,7 @@ const BSBillingTable1 = () => {
0 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6', : '#d6d6d6',
animation: animation:
BillOrderPre === 'Y' && !BookingTypeBoth BillOrderPre === 'Y' && !BookingTypeBoth
@ -3360,8 +3356,7 @@ const BSBillingTable1 = () => {
> >
{item.ProdDetail?.map((prod, index) => ( {item.ProdDetail?.map((prod, index) => (
<p key={index}> <p key={index}>
{prod.ProdName} - {prod.Size}{' '} {prod.ProdName} - {prod.Size} {prod.UomName}
{prod.UomName}
</p> </p>
))} ))}
</div> </div>
@ -3415,16 +3410,19 @@ const BSBillingTable1 = () => {
} }
}} }}
> >
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3541,7 +3539,6 @@ const BSBillingTable1 = () => {
</div> </div>
</div> </div>
</> </>
</Suspense>
); );
}; };

View File

@ -1,11 +1,4 @@
import React, { import React, { useCallback, useEffect, useState, useRef, lazy } from 'react';
useCallback,
useEffect,
useState,
useRef,
lazy,
Suspense,
} from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import moment from 'moment'; import moment from 'moment';
@ -220,7 +213,6 @@ const OtherServicePrintStyle1 = lazy(
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx') import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
); );
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx'; import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
const BSOtherServiceClaim = lazy( const BSOtherServiceClaim = lazy(
() => import('../../UtillComponents/BSOtherServiceClaim.jsx') () => import('../../UtillComponents/BSOtherServiceClaim.jsx')
); );
@ -722,7 +714,6 @@ const BSBillingTable2 = () => {
Discount, Discount,
]); ]);
useEffect(() => { useEffect(() => {
const fetchPrinterMapping = async () => { const fetchPrinterMapping = async () => {
try { try {
if (UserType !== 'Super Admin' && isMobile && MobileA4Print) { if (UserType !== 'Super Admin' && isMobile && MobileA4Print) {
@ -733,19 +724,20 @@ const BSBillingTable2 = () => {
UserId: UserId, UserId: UserId,
}; };
// && isMobile && MobileA4Print // && isMobile && MobileA4Print
const response = await dispatch(getPrinterMappingDetails(data)).unwrap(); const response = await dispatch(
getPrinterMappingDetails(data)
).unwrap();
if (response?.data?.statusCode === 0) { if (response?.data?.statusCode === 0) {
handlePrintMappingClick() handlePrintMappingClick();
} }
console.log(response, "printer mapping response"); console.log(response, 'printer mapping response');
} }
} catch (error) { } catch (error) {
console.error("Error fetching printer mapping:", error); console.error('Error fetching printer mapping:', error);
} }
}; };
fetchPrinterMapping(); fetchPrinterMapping();
}, []); }, []);
const handlePrintMappingClick = () => { const handlePrintMappingClick = () => {
// setReprint1(true) // setReprint1(true)
@ -753,7 +745,10 @@ const BSBillingTable2 = () => {
}; };
useEffect(() => { useEffect(() => {
if (CompId && BranchId && AppId) { if (CompId && BranchId && AppId) {
if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { if (
holdCheckedSalesSetup ||
NavBarOptions?.some((e) => e?.OptionName == 'Hold')
) {
getHolddata(); getHolddata();
} }
@ -1947,7 +1942,10 @@ const BSBillingTable2 = () => {
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
setPreviousNetAmount(0); setPreviousNetAmount(0);
if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { if (
holdCheckedSalesSetup ||
NavBarOptions?.some((e) => e?.OptionName == 'Hold')
) {
getHolddata(); getHolddata();
} }
if (defaultBookingType === 'Both') { if (defaultBookingType === 'Both') {
@ -2151,7 +2149,7 @@ const BSBillingTable2 = () => {
PackageDtl: a.PackageDtl, PackageDtl: a.PackageDtl,
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }), ...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
...(a?.DiscountType && { DiscountType: a.DiscountType }), ...(a?.DiscountType && { DiscountType: a.DiscountType }),
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }) ...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }),
})); }));
const NotSlectedTypeFind = temporderdetail?.find( const NotSlectedTypeFind = temporderdetail?.find(
(a) => a?.BookingType != SelectedBookingType (a) => a?.BookingType != SelectedBookingType
@ -3681,7 +3679,6 @@ const BSBillingTable2 = () => {
); );
}; };
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<div <div
className={ className={
templateData?.BookingLayout?.[0] === 'Layout6' templateData?.BookingLayout?.[0] === 'Layout6'
@ -4047,10 +4044,7 @@ const BSBillingTable2 = () => {
payment.ModeId, payment.ModeId,
payment.ModeName payment.ModeName
) )
: handlePaymentMode( : handlePaymentMode(payment.ModeId, payment.ModeName)
payment.ModeId,
payment.ModeName
)
} }
> >
<div <div
@ -4199,8 +4193,10 @@ const BSBillingTable2 = () => {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch') {SelCustId &&
.length === 1) && ( tableOptions?.filter(
(item) => item.OptionName === 'PreviousBillFetch'
).length === 1 && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div
@ -4240,10 +4236,7 @@ const BSBillingTable2 = () => {
.map((filteredItem) => ( .map((filteredItem) => (
<React.Fragment key={filteredItem.TemplateOptionsId}> <React.Fragment key={filteredItem.TemplateOptionsId}>
{!OtherServicesglobal && ( {!OtherServicesglobal && (
<TooltipWrapper <TooltipWrapper title="Unpaid Bills" isMobile={isMobile}>
title="Unpaid Bills"
isMobile={isMobile}
>
{' '} {' '}
<PozoUnpaidIcon <PozoUnpaidIcon
className="BSBillingNav-icon-table-icon" className="BSBillingNav-icon-table-icon"
@ -4381,8 +4374,7 @@ const BSBillingTable2 = () => {
OrderCardDetail?.length > 0 && OrderCardDetail?.length > 0 &&
paybtnselected && paybtnselected &&
CheckBookingStatus != 'Close' CheckBookingStatus != 'Close'
? salesBillEdit && ? salesBillEdit && currentOrderNetAmount < previousNetAmount
currentOrderNetAmount < previousNetAmount
? 'billing-btn' ? 'billing-btn'
: 'billing-btn' : 'billing-btn'
: 'billing-btn-deactive' : 'billing-btn-deactive'
@ -4407,9 +4399,7 @@ const BSBillingTable2 = () => {
) : ( ) : (
<> <>
<div className="billing-in-style"> <div className="billing-in-style">
<h1 style={{ fontFamily: FontFamily['head'] }}> <h1 style={{ fontFamily: FontFamily['head'] }}>Total</h1>
Total
</h1>
</div> </div>
<div> <div>
@ -4614,8 +4604,8 @@ const BSBillingTable2 = () => {
<div> <div>
You have already selected a table. If you click 'OK,' the You have already selected a table. If you click 'OK,' the
table selection will be removed, and the unpaid flow will table selection will be removed, and the unpaid flow will
continue. If you click 'Cancel,' the dine-in flow will continue. If you click 'Cancel,' the dine-in flow will proceed
proceed as selected. as selected.
</div> </div>
</> </>
} }
@ -4733,9 +4723,7 @@ const BSBillingTable2 = () => {
) )
} }
CreatedDate={OtherServicesPrintDetails?.CreatedDate} CreatedDate={OtherServicesPrintDetails?.CreatedDate}
PaymentStatus={ PaymentStatus={OtherServicesPrintDetails?.[0]?.PaymentOrderDtl}
OtherServicesPrintDetails?.[0]?.PaymentOrderDtl
}
Preference={SettingDataSelector} Preference={SettingDataSelector}
printDatas={printDatas} printDatas={printDatas}
/> />
@ -4846,9 +4834,7 @@ const BSBillingTable2 = () => {
color: '#fff', color: '#fff',
border: 'none', border: 'none',
borderRadius: 4, borderRadius: 4,
cursor: hasVehicleInputErrors() cursor: hasVehicleInputErrors() ? 'not-allowed' : 'pointer',
? 'not-allowed'
: 'pointer',
}} }}
> >
Submit Submit
@ -4914,7 +4900,6 @@ const BSBillingTable2 = () => {
)} )}
</div> </div>
</div> </div>
</Suspense>
); );
}; };

View File

@ -4,7 +4,6 @@ import React, {
useState, useState,
useRef, useRef,
lazy, lazy,
Suspense,
} from 'react'; } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
@ -214,8 +213,7 @@ import CardPopover from '../StandardTable/Utils/CardPopover.jsx';
import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx'; import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx'; import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js'; import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; import CustomerMobileNumberModal from '../../BookingFunctionality/CustomerOTP.jsx';
import CustomerMobileNumberModal from '../../BookingFunctionality/CustomerOTP.jsx';
const PaymentGatewayEmbedded = lazy( const PaymentGatewayEmbedded = lazy(
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx') () => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
); );
@ -3632,7 +3630,6 @@ const BSBillingTable3Pay = () => {
); );
}; };
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<> <>
<div className="BSBilling3PayMaster"> <div className="BSBilling3PayMaster">
{screenwidth <= 768 && ( {screenwidth <= 768 && (
@ -4970,7 +4967,6 @@ const BSBillingTable3Pay = () => {
/> />
)} )}
</> </>
</Suspense>
); );
}; };

View File

@ -1,4 +1,4 @@
import React, { lazy, useEffect, useState, Suspense } from 'react'; import React, { lazy, useEffect, useState } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { isMobile } from 'react-device-detect'; import { isMobile } from 'react-device-detect';
import { AiFillDelete, AiOutlineClose } from 'react-icons/ai'; import { AiFillDelete, AiOutlineClose } from 'react-icons/ai';
@ -83,7 +83,6 @@ import {
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js'; import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js'; import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
import { useUtilsComponent } from '../../../../../Services/utils.js'; import { useUtilsComponent } from '../../../../../Services/utils.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
const CustomerPriceHistory = lazy( const CustomerPriceHistory = lazy(
() => import('../../UtillComponents/CustomerPriceHistory.jsx') () => import('../../UtillComponents/CustomerPriceHistory.jsx')
); );
@ -1626,7 +1625,6 @@ const BSBillingTable4 = () => {
BuyInwardDtlId: null, BuyInwardDtlId: null,
Offer: item?.Offer, Offer: item?.Offer,
OrderRate: item?.OrderRate, OrderRate: item?.OrderRate,
}); });
} else { } else {
const isCheck = GlobalOfferAppliedProductsData?.find( const isCheck = GlobalOfferAppliedProductsData?.find(
@ -2192,7 +2190,6 @@ const BSBillingTable4 = () => {
}; };
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<div <div
className={ className={
isMobile ? 'BSBilling4-tablediv-mobile' : 'BSBilling4-tablediv' isMobile ? 'BSBilling4-tablediv-mobile' : 'BSBilling4-tablediv'
@ -2407,7 +2404,8 @@ const BSBillingTable4 = () => {
{OldtableDataTakeAway?.map((item, index) => ( {OldtableDataTakeAway?.map((item, index) => (
<tr <tr
key={index} key={index}
className={`${item?.SalesId && OrderType !== 'Hold' className={`${
item?.SalesId && OrderType !== 'Hold'
? 'BSBill-Table3-content-Disabled' ? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content' : 'BSBill-Table3-content'
} }
@ -2428,8 +2426,7 @@ const BSBillingTable4 = () => {
: BookingType !== 'Dine In' && : BookingType !== 'Dine In' &&
triggerAnimation && triggerAnimation &&
index === 0 && index === 0 &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength &&
PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
!UnpaidData !UnpaidData
? 'wheat' ? 'wheat'
@ -2491,15 +2488,15 @@ const BSBillingTable4 = () => {
className="Table4-items for-combo" className="Table4-items for-combo"
style={{ fontFamily: 'Poppins' }} style={{ fontFamily: 'Poppins' }}
onClick={() => onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 || item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) item.ProductIdentifierDtls?.length > 0 ||
imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item) : editField && handleEditQuantity(item)
} }
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2596,12 +2593,16 @@ const BSBillingTable4 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2681,7 +2682,8 @@ const BSBillingTable4 = () => {
{OldtableDataDinein?.map((item, index) => ( {OldtableDataDinein?.map((item, index) => (
<tr <tr
key={OldtableDataTakeAway?.length + index} key={OldtableDataTakeAway?.length + index}
className={`${item?.SalesId className={`${
item?.SalesId
? 'BSBill-Table3-content-Disabled' ? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content' : 'BSBill-Table3-content'
} }
@ -2769,8 +2771,7 @@ const BSBillingTable4 = () => {
}} }}
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2867,12 +2868,16 @@ const BSBillingTable4 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2956,7 +2961,8 @@ const BSBillingTable4 = () => {
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
index index
} }
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table3-content-Disabled' ? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content' : 'BSBill-Table3-content'
} }
@ -2983,8 +2989,7 @@ const BSBillingTable4 = () => {
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
index === index ===
0 && 0 &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength &&
PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
!UnpaidData !UnpaidData
? 'wheat' ? 'wheat'
@ -2995,9 +3000,7 @@ const BSBillingTable4 = () => {
0 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6' : '#d6d6d6'
: (OldtableDataDinein?.length + : (OldtableDataDinein?.length +
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
@ -3075,17 +3078,15 @@ const BSBillingTable4 = () => {
className="Table4-items for-combo" className="Table4-items for-combo"
style={{ fontFamily: 'Poppins' }} style={{ fontFamily: 'Poppins' }}
onClick={() => onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 || item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) item.ProductIdentifierDtls?.length > 0 ||
imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item, index) : editField && handleEditQuantity(item, index)
} }
> >
{item?.Type !== 'OS' {item?.Type !== 'OS' ? item.ProdName : item.ServiceName}
? item.ProdName &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
: item.ServiceName}
&nbsp;{' '}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -3191,12 +3192,16 @@ const BSBillingTable4 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3281,7 +3286,8 @@ const BSBillingTable4 = () => {
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
index index
} }
className={`${item?.SalesId && OrderType !== 'Hold' className={`${
item?.SalesId && OrderType !== 'Hold'
? 'BSBill-Table3-content-Disabled' ? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content' : 'BSBill-Table3-content'
} }
@ -3395,8 +3401,7 @@ const BSBillingTable4 = () => {
}} }}
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -3493,12 +3498,16 @@ const BSBillingTable4 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3598,7 +3607,6 @@ const BSBillingTable4 = () => {
/> />
)} )}
</div> </div>
</Suspense>
); );
}; };

View File

@ -1,4 +1,4 @@
import React, { useEffect, useState, useRef, lazy, Suspense } from 'react'; import React, { useEffect, useState, useRef, lazy } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import moment from 'moment'; import moment from 'moment';
import { Popover, Badge, Modal, Tooltip } from 'antd'; import { Popover, Badge, Modal, Tooltip } from 'antd';
@ -197,7 +197,6 @@ import {
import CardPopover from '../StandardTable/Utils/CardPopover.jsx'; import CardPopover from '../StandardTable/Utils/CardPopover.jsx';
import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx'; import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js'; import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx'; import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
// Jsx Files // Jsx Files
const OtherServicePrintStyle1 = lazy( const OtherServicePrintStyle1 = lazy(
@ -565,7 +564,6 @@ const BSBillingTable5 = () => {
} }
}, [OrderCardDetail]); }, [OrderCardDetail]);
useEffect(() => { useEffect(() => {
const fetchPrinterMapping = async () => { const fetchPrinterMapping = async () => {
try { try {
if (UserType !== 'Super Admin' && isMobile && MobileA4Print) { if (UserType !== 'Super Admin' && isMobile && MobileA4Print) {
@ -576,19 +574,20 @@ const BSBillingTable5 = () => {
UserId: UserId, UserId: UserId,
}; };
// && isMobile && MobileA4Print // && isMobile && MobileA4Print
const response = await dispatch(getPrinterMappingDetails(data)).unwrap(); const response = await dispatch(
getPrinterMappingDetails(data)
).unwrap();
if (response?.data?.statusCode === 0) { if (response?.data?.statusCode === 0) {
handlePrintMappingClick() handlePrintMappingClick();
} }
console.log(response, "printer mapping response"); console.log(response, 'printer mapping response');
} }
} catch (error) { } catch (error) {
console.error("Error fetching printer mapping:", error); console.error('Error fetching printer mapping:', error);
} }
}; };
fetchPrinterMapping(); fetchPrinterMapping();
}, []); }, []);
const handlePrintMappingClick = () => { const handlePrintMappingClick = () => {
// setReprint1(true) // setReprint1(true)
@ -777,7 +776,10 @@ const BSBillingTable5 = () => {
useEffect(() => { useEffect(() => {
if (CompId && BranchId && AppId) { if (CompId && BranchId && AppId) {
if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { if (
holdCheckedSalesSetup ||
NavBarOptions?.some((e) => e?.OptionName == 'Hold')
) {
getHolddata(); getHolddata();
} }
getCustomerData(); getCustomerData();
@ -1963,7 +1965,10 @@ const BSBillingTable5 = () => {
setUpinotSelected(false); setUpinotSelected(false);
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
setPreviousNetAmount(0); setPreviousNetAmount(0);
if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { if (
holdCheckedSalesSetup ||
NavBarOptions?.some((e) => e?.OptionName == 'Hold')
) {
getHolddata(); getHolddata();
} }
if (defaultBookingType === 'Both') { if (defaultBookingType === 'Both') {
@ -2168,7 +2173,7 @@ const BSBillingTable5 = () => {
SetCount: a.SetCount, SetCount: a.SetCount,
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }), ...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
...(a?.DiscountType && { DiscountType: a.DiscountType }), ...(a?.DiscountType && { DiscountType: a.DiscountType }),
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }) ...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }),
})); }));
const NotSlectedTypeFind = temporderdetail?.find( const NotSlectedTypeFind = temporderdetail?.find(
(a) => a?.BookingType != SelectedBookingType (a) => a?.BookingType != SelectedBookingType
@ -3628,7 +3633,6 @@ const BSBillingTable5 = () => {
}; };
return ( return (
<> <>
<Suspense fallback={<BillingTableSkeleton />}>
<div <div
className={ className={
templateData?.BookingLayout?.[0] === 'Layout6' templateData?.BookingLayout?.[0] === 'Layout6'
@ -3749,10 +3753,7 @@ const BSBillingTable5 = () => {
<div className="BSBillingTable-billtable"> <div className="BSBillingTable-billtable">
<div className="BSBillingTable5-payOpt"> <div className="BSBillingTable5-payOpt">
<div className="payrow1"> <div className="payrow1">
<Messages <Messages messageType={messageType} messageData={messageData} />
messageType={messageType}
messageData={messageData}
/>
</div> </div>
<div className="payrow2"> <div className="payrow2">
@ -3792,8 +3793,7 @@ const BSBillingTable5 = () => {
(UpinotSelected || CardoptionnotSelected) (UpinotSelected || CardoptionnotSelected)
? 'Btn-payment-mode-notupisel' ? 'Btn-payment-mode-notupisel'
: paybtnselected === payment.ModeId && : paybtnselected === payment.ModeId &&
(!UpinotSelected || (!UpinotSelected || !CardoptionnotSelected)
!CardoptionnotSelected)
? 'Btn-payment-mode' ? 'Btn-payment-mode'
: 'Btn-payment-mode-sel' : 'Btn-payment-mode-sel'
} }
@ -3824,8 +3824,7 @@ const BSBillingTable5 = () => {
}} }}
> >
{payment.ModeName} {payment.ModeName}
{payment?.ModeName?.toLowerCase() === {payment?.ModeName?.toLowerCase() === 'card' && (
'card' && (
<CardPopover <CardPopover
CardPayOption={CardPayOption} CardPayOption={CardPayOption}
SelectedCardOption={SelectedCardOption} SelectedCardOption={SelectedCardOption}
@ -3874,8 +3873,7 @@ const BSBillingTable5 = () => {
(UpinotSelected || CardoptionnotSelected) (UpinotSelected || CardoptionnotSelected)
? 'Btn-payment-mode-notupisel' ? 'Btn-payment-mode-notupisel'
: refundPaySelected === payment.ConfigId && : refundPaySelected === payment.ConfigId &&
(!UpinotSelected || (!UpinotSelected || !CardoptionnotSelected)
!CardoptionnotSelected)
? 'Btn-payment-mode' ? 'Btn-payment-mode'
: 'Btn-payment-mode-sel' : 'Btn-payment-mode-sel'
} }
@ -4041,10 +4039,7 @@ const BSBillingTable5 = () => {
</div> </div>
</div> </div>
</div> </div>
<div <div style={{ justifyContent: 'center' }} className="CustomerAddSrch">
style={{ justifyContent: 'center' }}
className="CustomerAddSrch"
>
<div style={{ height: '2.1rem' }}> <div style={{ height: '2.1rem' }}>
{tableOptions {tableOptions
.filter((item) => item.OptionName === 'AddCustomer') .filter((item) => item.OptionName === 'AddCustomer')
@ -4185,8 +4180,10 @@ const BSBillingTable5 = () => {
'' ''
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch') {SelCustId &&
.length === 1) && ( tableOptions?.filter(
(item) => item.OptionName === 'PreviousBillFetch'
).length === 1 && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div
@ -4399,12 +4396,10 @@ const BSBillingTable5 = () => {
} }
> >
{!OrderStatus ? ( {!OrderStatus ? (
salesBillEdit && salesBillEdit && currentOrderNetAmount < previousNetAmount ? (
currentOrderNetAmount < previousNetAmount ? (
<div> <div>
Refund: Refund:
{(previousNetAmount || 0) - {(previousNetAmount || 0) - (currentOrderNetAmount || 0)}
(currentOrderNetAmount || 0)}
</div> </div>
) : ( ) : (
<> <>
@ -4518,8 +4513,7 @@ const BSBillingTable5 = () => {
} }
/> />
{PrintOrderDetails?.length > 0 && {PrintOrderDetails?.length > 0 &&
PrintOrderDetails?.[0]?.OrderDetails?.map( PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
(orderDetail, index) => (
<div style={{ display: 'none' }}> <div style={{ display: 'none' }}>
<PaymentPdfBooking <PaymentPdfBooking
index={index} index={index}
@ -4538,13 +4532,11 @@ const BSBillingTable5 = () => {
printDatas={printDatas} printDatas={printDatas}
/> />
</div> </div>
) ))}
)}
{PrintOrderDetails?.length > 0 && {PrintOrderDetails?.length > 0 &&
(TokenOnly?.SettingValue === 'Y' || (TokenOnly?.SettingValue === 'Y' ||
IndividualToken?.SettingValue === 'Y') && IndividualToken?.SettingValue === 'Y') &&
PrintOrderDetails?.[0]?.OrderDetails?.map( PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
(orderDetail, index) => (
<div style={{ display: 'none' }}> <div style={{ display: 'none' }}>
<TokensinglePrint <TokensinglePrint
index={index} index={index}
@ -4561,8 +4553,7 @@ const BSBillingTable5 = () => {
PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl} PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl}
/> />
</div> </div>
) ))}
)}
{CreditCustomer && ( {CreditCustomer && (
<div style={{ display: 'none' }}> <div style={{ display: 'none' }}>
<BsBillingCreditCustomer <BsBillingCreditCustomer
@ -4606,8 +4597,8 @@ const BSBillingTable5 = () => {
<div> <div>
You have already selected a table. If you click 'OK,' the You have already selected a table. If you click 'OK,' the
table selection will be removed, and the unpaid flow will table selection will be removed, and the unpaid flow will
continue. If you click 'Cancel,' the dine-in flow will continue. If you click 'Cancel,' the dine-in flow will proceed
proceed as selected. as selected.
</div> </div>
</> </>
} }
@ -4709,9 +4700,7 @@ const BSBillingTable5 = () => {
) )
} }
CreatedDate={OtherServicesPrintDetails?.CreatedDate} CreatedDate={OtherServicesPrintDetails?.CreatedDate}
PaymentStatus={ PaymentStatus={OtherServicesPrintDetails?.[0]?.PaymentOrderDtl}
OtherServicesPrintDetails?.[0]?.PaymentOrderDtl
}
Preference={SettingDataSelector} Preference={SettingDataSelector}
printDatas={printDatas} printDatas={printDatas}
/> />
@ -4821,9 +4810,7 @@ const BSBillingTable5 = () => {
color: '#fff', color: '#fff',
border: 'none', border: 'none',
borderRadius: 4, borderRadius: 4,
cursor: hasVehicleInputErrors() cursor: hasVehicleInputErrors() ? 'not-allowed' : 'pointer',
? 'not-allowed'
: 'pointer',
}} }}
> >
Submit Submit
@ -4905,7 +4892,6 @@ const BSBillingTable5 = () => {
/> />
)} )}
</div> </div>
</Suspense>
</> </>
); );
}; };

View File

@ -1,4 +1,4 @@
import React, { Suspense, useEffect, useState, lazy } from 'react'; import React, { useEffect, useState, lazy } from 'react';
import { useSelector, useDispatch } from 'react-redux'; import { useSelector, useDispatch } from 'react-redux';
import { Popconfirm, Tooltip } from 'antd'; import { Popconfirm, Tooltip } from 'antd';
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.scss'; import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.scss';
@ -75,7 +75,6 @@ import {
import { getCustomerDisplayWindow } from '../../../../../Features/customerDisplayWindow/customerDisplayWindow.js'; import { getCustomerDisplayWindow } from '../../../../../Features/customerDisplayWindow/customerDisplayWindow.js';
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx'; import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
import { useUtilsComponent } from '../../../../../Services/utils.js'; import { useUtilsComponent } from '../../../../../Services/utils.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
const BSEditTotalAmt = lazy( const BSEditTotalAmt = lazy(
() => import('../BSEditTotalAmount/BSEditTotalAmt.jsx') () => import('../BSEditTotalAmount/BSEditTotalAmt.jsx')
); );
@ -2004,7 +2003,6 @@ const BSBillingTable6 = () => {
}; };
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<div <div
className={ className={
true true
@ -2247,8 +2245,7 @@ const BSBillingTable6 = () => {
? 'wheat' ? 'wheat'
: triggerAnimation && : triggerAnimation &&
index === 0 && index === 0 &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength &&
PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
!UnpaidData !UnpaidData
? 'wheat' ? 'wheat'
@ -2311,15 +2308,15 @@ const BSBillingTable6 = () => {
className="BillingTable6-table-td for-combo" className="BillingTable6-table-td for-combo"
style={{ fontFamily: 'Poppins', textAlign: 'left' }} style={{ fontFamily: 'Poppins', textAlign: 'left' }}
onClick={() => onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 || item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) item.ProductIdentifierDtls?.length > 0 ||
imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item) : editField && handleEditQuantity(item)
} }
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2402,12 +2399,16 @@ const BSBillingTable6 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2573,8 +2574,7 @@ const BSBillingTable6 = () => {
}} }}
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2657,12 +2657,16 @@ const BSBillingTable6 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2771,8 +2775,7 @@ const BSBillingTable6 = () => {
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
index === index ===
0 && 0 &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength &&
PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
!UnpaidData !UnpaidData
? 'wheat' ? 'wheat'
@ -2783,9 +2786,7 @@ const BSBillingTable6 = () => {
0 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6' : '#d6d6d6'
: (OldtableDataDinein?.length + : (OldtableDataDinein?.length +
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
@ -2862,15 +2863,15 @@ const BSBillingTable6 = () => {
className="BillingTable6-table-td for-combo" className="BillingTable6-table-td for-combo"
style={{ fontFamily: 'Poppins', textAlign: 'left' }} style={{ fontFamily: 'Poppins', textAlign: 'left' }}
onClick={() => onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 || item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) item.ProductIdentifierDtls?.length > 0 ||
imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item) : editField && handleEditQuantity(item)
} }
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2958,12 +2959,16 @@ const BSBillingTable6 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3158,8 +3163,7 @@ const BSBillingTable6 = () => {
}} }}
> >
{item.ProdName} {item.ProdName}
&nbsp;{' '} &nbsp; {item?.BrandName !== null ? item?.BrandName : ''}
{item?.BrandName !== null ? item?.BrandName : ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -3239,16 +3243,19 @@ const BSBillingTable6 = () => {
} }
}} }}
> >
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3345,7 +3352,6 @@ const BSBillingTable6 = () => {
/> />
)} )}
</div> </div>
</Suspense>
); );
}; };

View File

@ -94,7 +94,6 @@ import {
GlobalOverAllDiscSales, GlobalOverAllDiscSales,
ChangeOverAllDiscSales, ChangeOverAllDiscSales,
ChangeOverAllDiscEstimate, ChangeOverAllDiscEstimate,
GlobalBranchFinancialStatus, GlobalBranchFinancialStatus,
changeSummeryComboOfferAmount, changeSummeryComboOfferAmount,
ChangeComboCarddata, ChangeComboCarddata,
@ -176,7 +175,7 @@ import PozoSplitPaymentIcon from '../../UtillComponents/Pozo retail icons/PozoSp
import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx'; import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx';
import { import {
Global_OrderOfferDetail, Global_OrderOfferDetail,
Global_OverallOfferAmount Global_OverallOfferAmount,
} from '../../../../../Features/Offer/Offer.js'; } from '../../../../../Features/Offer/Offer.js';
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx'; import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip'; import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip';
@ -234,13 +233,15 @@ const BSBilling7Payment = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const salesBillEdit = useSelector(GlobalSalesBillEdit); const salesBillEdit = useSelector(GlobalSalesBillEdit);
const previousOrderPayment = useSelector(GlobalPreviousOrderPayment); const previousOrderPayment = useSelector(GlobalPreviousOrderPayment);
const previousOrderOfferDetails = useSelector(GlobalPreviousOrderOfferDetails); const previousOrderOfferDetails = useSelector(
GlobalPreviousOrderOfferDetails
);
const AllPaymentOptions = useSelector(GlobalpaymentOptionData); const AllPaymentOptions = useSelector(GlobalpaymentOptionData);
const Discount = useSelector(GlobalOverAllOfferAmt); const Discount = useSelector(GlobalOverAllOfferAmt);
const screenwidth = useSelector(GlobalScreenSize); const screenwidth = useSelector(GlobalScreenSize);
const defaultBookingType = useSelector(GlobalDefaultBookingType); const defaultBookingType = useSelector(GlobalDefaultBookingType);
const printerTemplateStyle = useSelector(SelectedPrintTemplate); const printerTemplateStyle = useSelector(SelectedPrintTemplate);
const AllBookingType = useSelector(GlobalAllBookingType) const AllBookingType = useSelector(GlobalAllBookingType);
const FontFamily = useSelector(GlobalSelectedFont); const FontFamily = useSelector(GlobalSelectedFont);
const OrderCardDetail = useSelector(GlobalOrderCardDetails); const OrderCardDetail = useSelector(GlobalOrderCardDetails);
const GetCustId = useSelector(GlobalCustId); const GetCustId = useSelector(GlobalCustId);
@ -342,7 +343,8 @@ const BSBilling7Payment = () => {
const [previousNetAmount, setPreviousNetAmount] = useState(0); const [previousNetAmount, setPreviousNetAmount] = useState(0);
const [addcustomer, setAddCustomer] = useState(false); const [addcustomer, setAddCustomer] = useState(false);
const [PrintOrderDetails, setPrintOrderDetails] = useState([]); const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false); const OverAllSales = useSelector(GlobalOverAllDiscSales); const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
const OverAllSales = useSelector(GlobalOverAllDiscSales);
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate); const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
//Total calculation //Total calculation
const TotalItems = OrderCardDetail?.length; const TotalItems = OrderCardDetail?.length;
@ -361,7 +363,12 @@ const BSBilling7Payment = () => {
return acc + Math.round(Number(item?.OrderQty || 0)); return acc + Math.round(Number(item?.OrderQty || 0));
}, 0); }, 0);
console.log(salesBillEdit, currentOrderNetAmount, previousNetAmount, "previousNetAmount") console.log(
salesBillEdit,
currentOrderNetAmount,
previousNetAmount,
'previousNetAmount'
);
const [UpiOption, setUpiOption] = useState(''); const [UpiOption, setUpiOption] = useState('');
const [BusinessPayOption, setBusinessPayoption] = useState([]); const [BusinessPayOption, setBusinessPayoption] = useState([]);
const [paymentSucess, setPaymentSuccess] = useState(false); const [paymentSucess, setPaymentSuccess] = useState(false);
@ -507,7 +514,6 @@ const BSBilling7Payment = () => {
}, [salesBillEdit]); }, [salesBillEdit]);
useEffect(() => { useEffect(() => {
if (salesBillEdit) { if (salesBillEdit) {
if (SelCustId) { if (SelCustId) {
setRefundPayBtns(AllPaymentOptions); setRefundPayBtns(AllPaymentOptions);
@ -522,9 +528,7 @@ const BSBilling7Payment = () => {
setRefundPayBtns(withoutCustomer); setRefundPayBtns(withoutCustomer);
} }
} }
}, [AllPaymentOptions, SelCustId, salesBillEdit]);
}, [AllPaymentOptions, SelCustId, salesBillEdit])
// Usage // Usage
useEffect(() => { useEffect(() => {
@ -626,14 +630,21 @@ const BSBilling7Payment = () => {
const filteredPayments = const filteredPayments =
previousOrderPayment?.filter( previousOrderPayment?.filter(
p => p?.LastOrderTran === 'Y' && p?.AfterAdjustment != null && p?.AfterAdjustment !== '' && p?.AfterAdjustment (p) =>
p?.LastOrderTran === 'Y' &&
p?.AfterAdjustment != null &&
p?.AfterAdjustment !== '' &&
p?.AfterAdjustment
) || []; ) || [];
const paymentsToUse = const paymentsToUse =
filteredPayments.length > 0 ? filteredPayments : previousOrderPayment || []; filteredPayments.length > 0
? filteredPayments
: previousOrderPayment || [];
const totalPreviouspayment = paymentsToUse?.reduce( const totalPreviouspayment = paymentsToUse?.reduce(
(acc, payment) => acc + parseFloat(payment.AfterAdjustment || payment.Amount || 0), (acc, payment) =>
acc + parseFloat(payment.AfterAdjustment || payment.Amount || 0),
0 0
); );
@ -642,8 +653,7 @@ const BSBilling7Payment = () => {
0 0
); );
const previousNetAmount = const previousNetAmount = totalPreviouspayment || 0;
(totalPreviouspayment) || 0;
let withdiscTotal = let withdiscTotal =
Total - Total -
@ -655,13 +665,34 @@ const BSBilling7Payment = () => {
withdiscTotal >= 0 withdiscTotal >= 0
? (Number(withdiscTotal) + Number(globalTipAmount)).toFixed(2) ? (Number(withdiscTotal) + Number(globalTipAmount)).toFixed(2)
: (Number(Total) + Number(globalTipAmount)).toFixed(2) : (Number(Total) + Number(globalTipAmount)).toFixed(2)
) );
console.log(salesBillEdit ? (currentOrderNetAmount > previousNetAmount) ? (currentOrderNetAmount - previousNetAmount) : 0 : currentOrderNetAmount, "totalPreviouspayment") console.log(
salesBillEdit
? currentOrderNetAmount > previousNetAmount
? currentOrderNetAmount - previousNetAmount
: 0
: currentOrderNetAmount,
'totalPreviouspayment'
);
setTotalAmount(salesBillEdit ? (currentOrderNetAmount > previousNetAmount) ? (currentOrderNetAmount - previousNetAmount) : 0 : currentOrderNetAmount); setTotalAmount(
salesBillEdit
? currentOrderNetAmount > previousNetAmount
? currentOrderNetAmount - previousNetAmount
: 0
: currentOrderNetAmount
);
setCurrentOrderNetAmount(currentOrderNetAmount); setCurrentOrderNetAmount(currentOrderNetAmount);
setPreviousNetAmount(previousNetAmount); setPreviousNetAmount(previousNetAmount);
dispatch(changeSummeryTotalAmount(salesBillEdit ? (currentOrderNetAmount > previousNetAmount) ? (currentOrderNetAmount - previousNetAmount) : 0 : currentOrderNetAmount)); dispatch(
changeSummeryTotalAmount(
salesBillEdit
? currentOrderNetAmount > previousNetAmount
? currentOrderNetAmount - previousNetAmount
: 0
: currentOrderNetAmount
)
);
dispatch(changeSummeryComboOfferAmount(withComboSum)); dispatch(changeSummeryComboOfferAmount(withComboSum));
@ -684,7 +715,6 @@ const BSBilling7Payment = () => {
Discount, Discount,
]); ]);
useEffect(() => { useEffect(() => {
const fetchPrinterMapping = async () => { const fetchPrinterMapping = async () => {
try { try {
if (UserType !== 'Super Admin' && isMobile && MobileA4Print) { if (UserType !== 'Super Admin' && isMobile && MobileA4Print) {
@ -695,19 +725,20 @@ const BSBilling7Payment = () => {
UserId: UserId, UserId: UserId,
}; };
// && isMobile && MobileA4Print // && isMobile && MobileA4Print
const response = await dispatch(getPrinterMappingDetails(data)).unwrap(); const response = await dispatch(
getPrinterMappingDetails(data)
).unwrap();
if (response?.data?.statusCode === 0) { if (response?.data?.statusCode === 0) {
handlePrintMappingClick() handlePrintMappingClick();
} }
console.log(response, "printer mapping response"); console.log(response, 'printer mapping response');
} }
} catch (error) { } catch (error) {
console.error("Error fetching printer mapping:", error); console.error('Error fetching printer mapping:', error);
} }
}; };
fetchPrinterMapping(); fetchPrinterMapping();
}, []); }, []);
const handlePrintMappingClick = () => { const handlePrintMappingClick = () => {
// setReprint1(true) // setReprint1(true)
@ -834,7 +865,6 @@ const BSBilling7Payment = () => {
: parseInt(value || 0); : parseInt(value || 0);
}; };
const getCustomerData = async () => { const getCustomerData = async () => {
await dispatch( await dispatch(
getAddCustomerDetails({ getAddCustomerDetails({
CompId: CompId, CompId: CompId,
@ -904,8 +934,9 @@ const BSBilling7Payment = () => {
async (orderDetail, index) => { async (orderDetail, index) => {
await printDiv(`${selectedStyle}-${index}`, style); // Use unique IDs for each print await printDiv(`${selectedStyle}-${index}`, style); // Use unique IDs for each print
if (orderDetail?.BookingTypeName !== 'Dine In') { if (orderDetail?.BookingTypeName !== 'Dine In') {
const groupedTokens = orderDetail?.productDetails?.filter(data => data?.EditTokenAvailable !== 'N')?.reduce( const groupedTokens = orderDetail?.productDetails
(acc, item, idx) => { ?.filter((data) => data?.EditTokenAvailable !== 'N')
?.reduce((acc, item, idx) => {
if (item.TokenAvailable === 'Y') { if (item.TokenAvailable === 'Y') {
if (!item.CounterName) { if (!item.CounterName) {
// If CounterName is null or empty // If CounterName is null or empty
@ -918,9 +949,7 @@ const BSBilling7Payment = () => {
} }
} }
return acc; return acc;
}, }, {});
{}
);
// Iterate over grouped tokens and print them // Iterate over grouped tokens and print them
const tokensToPrint = Object.entries(groupedTokens).map( const tokensToPrint = Object.entries(groupedTokens).map(
@ -984,7 +1013,11 @@ const BSBilling7Payment = () => {
const handleButtonClick = () => { const handleButtonClick = () => {
if (qrCode && SelectedUPIPayOption === 'Default' && UpiQRPreference) { if (qrCode && SelectedUPIPayOption === 'Default' && UpiQRPreference) {
UpiPayment(); UpiPayment();
} else if (salesBillEdit && currentOrderNetAmount < previousNetAmount && !refundPaySelected) { } else if (
salesBillEdit &&
currentOrderNetAmount < previousNetAmount &&
!refundPaySelected
) {
setMessageType('warning'); setMessageType('warning');
setMessageData('Please Select Refund Payment Method'); setMessageData('Please Select Refund Payment Method');
return; return;
@ -1649,9 +1682,7 @@ const BSBilling7Payment = () => {
let configdata = AllBookingType; let configdata = AllBookingType;
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType; let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
let filterconfigdata = configdata?.find( let filterconfigdata = configdata?.find((a) => a?.ConfigName === checkName);
(a) => a?.ConfigName === checkName
);
setSelectedBookingType(filterconfigdata?.ConfigId); setSelectedBookingType(filterconfigdata?.ConfigId);
}; };
const gettodaydate = () => { const gettodaydate = () => {
@ -1725,7 +1756,7 @@ const BSBilling7Payment = () => {
const handleRefundPaymentMode = (id, name) => { const handleRefundPaymentMode = (id, name) => {
setRefundPaySelected(id); setRefundPaySelected(id);
setRefundPaySelectedName(name); setRefundPaySelectedName(name);
} };
const addUpiOption = async (id, name, UPIId) => { const addUpiOption = async (id, name, UPIId) => {
await dispatch(changeUpiIDprint(UPIId)); await dispatch(changeUpiIDprint(UPIId));
@ -2141,7 +2172,7 @@ const BSBilling7Payment = () => {
SetCount: a.SetCount, SetCount: a.SetCount,
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }), ...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
...(a?.DiscountType && { DiscountType: a.DiscountType }), ...(a?.DiscountType && { DiscountType: a.DiscountType }),
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }) ...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }),
})); }));
const NotSlectedTypeFind = temporderdetail?.find( const NotSlectedTypeFind = temporderdetail?.find(
(a) => a?.BookingType != SelectedBookingType (a) => a?.BookingType != SelectedBookingType
@ -2240,8 +2271,10 @@ const BSBilling7Payment = () => {
SalesPaymentType: 'normal', SalesPaymentType: 'normal',
PaymentDetail: [ PaymentDetail: [
{ {
PaymentType: (salesBillEdit && currentOrderNetAmount < previousNetAmount) ? refundPaySelected : PaymentType:
Paybtnnameselected?.toLowerCase() === 'upi' salesBillEdit && currentOrderNetAmount < previousNetAmount
? refundPaySelected
: Paybtnnameselected?.toLowerCase() === 'upi'
? SelectedUPIPayOption?.toLowerCase() === 'pd' ? SelectedUPIPayOption?.toLowerCase() === 'pd'
? PaymentDeviceUPI?.[0]?.ModeId ? PaymentDeviceUPI?.[0]?.ModeId
: SelectedUPIPayOption?.toLowerCase() === 'pg' : SelectedUPIPayOption?.toLowerCase() === 'pg'
@ -2254,15 +2287,25 @@ const BSBilling7Payment = () => {
: paybtnselected : paybtnselected
? paybtnselected ? paybtnselected
: null, : null,
Amount: (salesBillEdit && currentOrderNetAmount < previousNetAmount) ? previousNetAmount - currentOrderNetAmount : Math.round(TotalAmount), Amount:
MerchantId: (salesBillEdit && currentOrderNetAmount < previousNetAmount) ? null : salesBillEdit && currentOrderNetAmount < previousNetAmount
Paybtnnameselected?.toLowerCase() === 'upi' && ? previousNetAmount - currentOrderNetAmount
: Math.round(TotalAmount),
MerchantId:
salesBillEdit && currentOrderNetAmount < previousNetAmount
? null
: Paybtnnameselected?.toLowerCase() === 'upi' &&
SelectedUPIPayOption?.toLowerCase() === 'business' SelectedUPIPayOption?.toLowerCase() === 'business'
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId) ? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId)
?.MerchantId ?.MerchantId
: null, : null,
PaymentOptionType: (salesBillEdit && currentOrderNetAmount < previousNetAmount) && (refundPaySelectedName?.toLowerCase() === 'cash' || refundPaySelectedName?.toLowerCase() === 'credit') ? 'PC' : PaymentOptionType:
Paybtnnameselected?.toLowerCase() === 'cash' salesBillEdit &&
currentOrderNetAmount < previousNetAmount &&
(refundPaySelectedName?.toLowerCase() === 'cash' ||
refundPaySelectedName?.toLowerCase() === 'credit')
? 'PC'
: Paybtnnameselected?.toLowerCase() === 'cash'
? 'PC' ? 'PC'
: Paybtnnameselected?.toLowerCase() === 'credit' : Paybtnnameselected?.toLowerCase() === 'credit'
? 'PC' ? 'PC'
@ -2275,16 +2318,21 @@ const BSBilling7Payment = () => {
? 'BU' ? 'BU'
: SelectedUPIPayOption : SelectedUPIPayOption
: null, : null,
ModeOfPayment: (salesBillEdit && currentOrderNetAmount < previousNetAmount) ? null : ModeOfPayment:
SelectedUPIPayOption?.toLowerCase() === 'default' salesBillEdit && currentOrderNetAmount < previousNetAmount
? null
: SelectedUPIPayOption?.toLowerCase() === 'default'
? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId) ? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId)
?.UPIDetailId ?.UPIDetailId
: SelectedUPIPayOption?.toLowerCase() === 'business' : SelectedUPIPayOption?.toLowerCase() === 'business'
? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId) ? BusinessPayOption?.find(
?.MerchantUPIId (busupi) => busupi?.ModeId === UpiId
)?.MerchantUPIId
: null, : null,
AccountDtl: (salesBillEdit && currentOrderNetAmount < previousNetAmount) ? [] : AccountDtl:
Paybtnnameselected?.toLowerCase() === 'upi' && salesBillEdit && currentOrderNetAmount < previousNetAmount
? []
: Paybtnnameselected?.toLowerCase() === 'upi' &&
SelectedUPIPayOption?.toLowerCase() === 'default' SelectedUPIPayOption?.toLowerCase() === 'default'
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find( ? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
(upipay) => upipay?.UPIId === UpiId (upipay) => upipay?.UPIId === UpiId
@ -2300,8 +2348,10 @@ const BSBilling7Payment = () => {
SelectedCardOption?.toLowerCase() === 'pg') SelectedCardOption?.toLowerCase() === 'pg')
? useOptions?.[0]?.PaymentDetails?.PaymentGateway ? useOptions?.[0]?.PaymentDetails?.PaymentGateway
: [], : [],
PaymentStatus: (salesBillEdit && currentOrderNetAmount < previousNetAmount) ? 'S' : PaymentStatus:
Paybtnnameselected?.toLowerCase() === 'cash' salesBillEdit && currentOrderNetAmount < previousNetAmount
? 'S'
: Paybtnnameselected?.toLowerCase() === 'cash'
? 'S' ? 'S'
: Paybtnnameselected?.toLowerCase() === 'credit' : Paybtnnameselected?.toLowerCase() === 'credit'
? 'S' ? 'S'
@ -2309,9 +2359,18 @@ const BSBilling7Payment = () => {
SelectedUPIPayOption?.toLowerCase() === 'default' SelectedUPIPayOption?.toLowerCase() === 'default'
? 'S' ? 'S'
: 'P', : 'P',
Debit: (salesBillEdit && currentOrderNetAmount < previousNetAmount && refundPaySelectedName?.toLowerCase() === 'credit') ? Math.round(previousNetAmount - currentOrderNetAmount) : 0, Debit:
Credit: salesBillEdit ? (currentOrderNetAmount > previousNetAmount && Paybtnnameselected?.toLowerCase() === 'credit') ? Math.round(TotalAmount) : 0 : salesBillEdit &&
currentOrderNetAmount < previousNetAmount &&
refundPaySelectedName?.toLowerCase() === 'credit'
? Math.round(previousNetAmount - currentOrderNetAmount)
: 0,
Credit: salesBillEdit
? currentOrderNetAmount > previousNetAmount &&
Paybtnnameselected?.toLowerCase() === 'credit' Paybtnnameselected?.toLowerCase() === 'credit'
? Math.round(TotalAmount)
: 0
: Paybtnnameselected?.toLowerCase() === 'credit'
? Math.round(TotalAmount) ? Math.round(TotalAmount)
: 0, : 0,
}, },
@ -3509,21 +3568,24 @@ const BSBilling7Payment = () => {
<div className="BSBilling4-price-full bsbilltable7"> <div className="BSBilling4-price-full bsbilltable7">
<div className="BSBilling4-price-content"> <div className="BSBilling4-price-content">
{screenwidth <= 768 && ( {screenwidth <= 768 && (
<div className="RowforResposiveBill7">
<div <div
className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`} className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`}
style={{ style={{
width: '100%', width: '100%',
transition: 'max-height 0.3s ease-in-out', transition: 'max-height 0.3s ease-in-out',
overflow: 'scroll', overflow: 'auto',
height: 'max-content',
maxHeight: responsiveBill ? '180px' : '0px', maxHeight: responsiveBill ? '180px' : '0px',
scrollbarWidth: 'thin',
}} }}
> >
{Array.isArray(OrderCardDetail) && OrderCardDetail?.length >= 1 && ( {Array.isArray(OrderCardDetail) &&
OrderCardDetail?.length >= 1 && (
<BSBillingTable7 optionNames={tableOptions} /> <BSBillingTable7 optionNames={tableOptions} />
)} )}
</div> </div>
)}
{screenwidth <= 768 && (
<div <div
style={{ style={{
display: 'flex', display: 'flex',
@ -3532,7 +3594,8 @@ const BSBilling7Payment = () => {
width: '100%', width: '100%',
}} }}
> >
{Array.isArray(OrderCardDetail) && OrderCardDetail?.length >= 1 && ( {Array.isArray(OrderCardDetail) &&
OrderCardDetail?.length >= 1 && (
<div <div
onClick={handleResponsiveBill} onClick={handleResponsiveBill}
className="Btn-responsiveBill" className="Btn-responsiveBill"
@ -3566,17 +3629,13 @@ const BSBilling7Payment = () => {
</div> </div>
)} )}
</div> </div>
</div>
)} )}
{/* {Array.isArray(OrderCardDetail) && OrderCardDetail?.length >= 1 && ( <div className="RowResposiveBill7">
<span className="Table3-Price-div-table">
{" "}
<BSBillingTable7 optionNames={tableOptions} />
</span>
)} */}
<div className="Table7-price-icon-container"> <div className="Table7-price-icon-container">
<Messages messageType={messageType} messageData={messageData} /> <Messages messageType={messageType} messageData={messageData} />
<div className="CustomerAddSrch"> <div className="CustomerAddSrch">
<div style={{ height: '2.1rem' }}> <div>
{tableOptions {tableOptions
?.filter((item) => item.OptionName === 'AddCustomer') ?.filter((item) => item.OptionName === 'AddCustomer')
?.map((filteredItem) => ( ?.map((filteredItem) => (
@ -3611,7 +3670,7 @@ const BSBilling7Payment = () => {
))} ))}
</div> </div>
</div> </div>
<div className="BS3hold-sum"> <div className="BS7hold-sum">
{(addcustomer || hold) && ( {(addcustomer || hold) && (
<FeaturesFunctionalities <FeaturesFunctionalities
handleAddCustomerCancel={handleAddCustomerCancel} handleAddCustomerCancel={handleAddCustomerCancel}
@ -3671,8 +3730,10 @@ const BSBilling7Payment = () => {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch') {SelCustId &&
.length === 1) && ( tableOptions?.filter(
(item) => item.OptionName === 'PreviousBillFetch'
).length === 1 && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div
@ -3894,7 +3955,10 @@ const BSBilling7Payment = () => {
paybtns?.length > 0 && paybtns?.length > 0 &&
!addnewAccess && !addnewAccess &&
!OtherServicesglobal && ( !OtherServicesglobal && (
<TooltipWrapper title={'Recall'} isMobile={isMobile}> <TooltipWrapper
title={'Recall'}
isMobile={isMobile}
>
{' '} {' '}
<Badge <Badge
count={Holddata?.length} count={Holddata?.length}
@ -3954,7 +4018,8 @@ const BSBilling7Payment = () => {
: 1, : 1,
}} }}
> >
{paybtns?.length > 0 && (currentOrderNetAmount >= previousNetAmount) ? ( {paybtns?.length > 0 &&
currentOrderNetAmount >= previousNetAmount ? (
paybtns?.map((payment) => ( paybtns?.map((payment) => (
<div className="Table3-cash"> <div className="Table3-cash">
<button <button
@ -3980,7 +4045,10 @@ const BSBilling7Payment = () => {
payment.ModeId, payment.ModeId,
payment.ModeName payment.ModeName
) )
: handlePaymentMode(payment.ModeId, payment.ModeName) : handlePaymentMode(
payment.ModeId,
payment.ModeName
)
} }
> >
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */} {/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
@ -4031,7 +4099,9 @@ const BSBilling7Payment = () => {
</button> </button>
</div> </div>
)) ))
) : (currentOrderNetAmount < previousNetAmount && salesBillEdit && refundPayBtns.length > 0) ? ( ) : currentOrderNetAmount < previousNetAmount &&
salesBillEdit &&
refundPayBtns.length > 0 ? (
refundPayBtns.map((payment) => ( refundPayBtns.map((payment) => (
<div className="Table3-cash"> <div className="Table3-cash">
<button <button
@ -4051,7 +4121,12 @@ const BSBilling7Payment = () => {
? 'blink-animation 0.5s infinite alternate' ? 'blink-animation 0.5s infinite alternate'
: 'none', : 'none',
}} }}
onClick={() => handleRefundPaymentMode(payment?.ConfigId, payment?.ConfigName)} onClick={() =>
handleRefundPaymentMode(
payment?.ConfigId,
payment?.ConfigName
)
}
> >
{/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */} {/* {UpiOption === "" && payment?.ModeName?.toLowerCase() === "upi" && <p> UPI</p>} */}
@ -4135,10 +4210,6 @@ const BSBilling7Payment = () => {
)} )}
</div> </div>
{/* {(selectCustomerDisplay === true || paymentModeDisplay === true) && (
<div className="BSBilling4-vertical-line"></div>
)} */}
<div <div
className={ className={
selectCustomerDisplay === true || paymentModeDisplay === true selectCustomerDisplay === true || paymentModeDisplay === true
@ -4253,8 +4324,6 @@ const BSBilling7Payment = () => {
/> />
</Popover> </Popover>
</div> </div>
</div> </div>
</div> </div>
<div className="Table4-finalprice"> <div className="Table4-finalprice">
@ -4268,8 +4337,10 @@ const BSBilling7Payment = () => {
OrderCardDetail?.length > 0 && OrderCardDetail?.length > 0 &&
paybtnselected && paybtnselected &&
CheckBookingStatus != 'Close' CheckBookingStatus != 'Close'
? !OrderStatus ? salesBillEdit && (currentOrderNetAmount < previousNetAmount) ? ? !OrderStatus
'Table4-Btn-final-price' ? salesBillEdit &&
currentOrderNetAmount < previousNetAmount
? 'Table4-Btn-final-price'
: 'Table4-Btn-final-price' : 'Table4-Btn-final-price'
: 'Table4-Btn-final-price Order' : 'Table4-Btn-final-price Order'
: 'Table4-Btn-final-price-disabled' : 'Table4-Btn-final-price-disabled'
@ -4283,7 +4354,15 @@ const BSBilling7Payment = () => {
handleButtonClick handleButtonClick
} }
> >
{!OrderStatus ? salesBillEdit && (currentOrderNetAmount < previousNetAmount) ? <p className="Table4-Order">Refund: {(previousNetAmount || 0) - (currentOrderNetAmount || 0)}</p> : ( {!OrderStatus ? (
salesBillEdit &&
currentOrderNetAmount < previousNetAmount ? (
<p className="Table4-Order">
Refund:
{(previousNetAmount || 0) -
(currentOrderNetAmount || 0)}
</p>
) : (
<> <>
<div className="Table4-fullrate"> <div className="Table4-fullrate">
<div <div
@ -4310,7 +4389,10 @@ const BSBilling7Payment = () => {
OrderType === 'Failed' OrderType === 'Failed'
? FailedTotalAmt ? FailedTotalAmt
: credit && overAllBal >= 0 : credit && overAllBal >= 0
? Math.max(0, TotalAmount - overAllBal) ? Math.max(
0,
TotalAmount - overAllBal
)
: TotalAmount : TotalAmount
)} )}
/> />
@ -4322,6 +4404,7 @@ const BSBilling7Payment = () => {
</div> </div>
</div> </div>
</> </>
)
) : ( ) : (
<div className="Table4-Order">ORDER</div> <div className="Table4-Order">ORDER</div>
)} )}
@ -4390,6 +4473,7 @@ const BSBilling7Payment = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
<DefaultModal <DefaultModal
open={UpiOpen} open={UpiOpen}
title="UPI PAYMENT" title="UPI PAYMENT"
@ -4616,10 +4700,17 @@ const BSBilling7Payment = () => {
SplitPaymentModal={Splitpayment} SplitPaymentModal={Splitpayment}
handlesplitpaymentclose={handlesplitpaymentclose} handlesplitpaymentclose={handlesplitpaymentclose}
TotalNetAmount={ TotalNetAmount={
OrderType === 'Failed' ? FailedTotalAmt : Math.round(OrderCardDetail?.reduce((acc, data) => data?.TotalAmt + acc, 0) - OrderType === 'Failed'
? FailedTotalAmt
: Math.round(
OrderCardDetail?.reduce(
(acc, data) => data?.TotalAmt + acc,
0
) -
((OverAllSales > 0 ? OverAllSales : 0) + ((OverAllSales > 0 ? OverAllSales : 0) +
(OverAllEstimate > 0 ? OverAllEstimate : 0) + (OverAllEstimate > 0 ? OverAllEstimate : 0) +
(Discount > 0 ? Discount : 0))) (Discount > 0 ? Discount : 0))
)
} }
failedOrderData={failedOrderData} failedOrderData={failedOrderData}
/> />

View File

@ -1,4 +1,4 @@
import React, { lazy, Suspense, useEffect, useState } from 'react'; import React, { lazy, useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss'; import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss';
import { import {
@ -71,7 +71,6 @@ const CustomerPriceHistory = lazy(
() => import('../../UtillComponents/CustomerPriceHistory.jsx') () => import('../../UtillComponents/CustomerPriceHistory.jsx')
); );
import { useUtilsComponent } from '../../../../../Services/utils.js'; import { useUtilsComponent } from '../../../../../Services/utils.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
const BSBillingTable7 = () => { const BSBillingTable7 = () => {
const { removeExtraCharge } = useUtilsComponent(); const { removeExtraCharge } = useUtilsComponent();
@ -1912,7 +1911,6 @@ const BSBillingTable7 = () => {
}; };
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<> <>
<div <div
style={{ style={{
@ -2191,11 +2189,12 @@ const BSBillingTable7 = () => {
? () => handleEditQuantity(item) ? () => handleEditQuantity(item)
: editdelete === 'Delete' : editdelete === 'Delete'
? () => removeFromCart(item) ? () => removeFromCart(item)
: () => { } : () => {}
} }
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
className={`${item?.SalesId && OrderType !== 'Hold' className={`${
item?.SalesId && OrderType !== 'Hold'
? 'BSBill-Table7-content-disabled' ? 'BSBill-Table7-content-disabled'
: 'BSBill-Table7-content' : 'BSBill-Table7-content'
} }
@ -2251,10 +2250,7 @@ const BSBillingTable7 = () => {
'variant' 'variant'
) && <span>{item?.ProdVariantName} </span>} ) && <span>{item?.ProdVariantName} </span>}
{item?.Size} {item?.Size}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName})
? 'PCS'
: item?.UomName}
)
</p> </p>
{item?.OfferMessage && {item?.OfferMessage &&
!Array.isArray(item.OfferMessage) && ( !Array.isArray(item.OfferMessage) && (
@ -2317,12 +2313,16 @@ const BSBillingTable7 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2383,8 +2383,7 @@ const BSBillingTable7 = () => {
: BookingType !== 'Dine In' && : BookingType !== 'Dine In' &&
triggerAnimation && triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 && OldtableDataTakeAway?.length + index === 0 &&
tableDataDinein?.length >= tableDataDinein?.length >= PreviousdataLength &&
PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
!UnpaidData !UnpaidData
? 'wheat' ? 'wheat'
@ -2420,11 +2419,12 @@ const BSBillingTable7 = () => {
? () => handleEditQuantity(item) ? () => handleEditQuantity(item)
: editdelete === 'Delete' : editdelete === 'Delete'
? () => removeFromCart(item) ? () => removeFromCart(item)
: () => { } : () => {}
} }
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
className={`${item?.SalesId className={`${
item?.SalesId
? 'BSBill-Table7-content-disabled' ? 'BSBill-Table7-content-disabled'
: 'BSBill-Table7-content' : 'BSBill-Table7-content'
} }
@ -2476,10 +2476,7 @@ const BSBillingTable7 = () => {
'variant' 'variant'
) && <span>{item?.ProdVariantName} </span>} ) && <span>{item?.ProdVariantName} </span>}
{item?.Size} {item?.Size}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName})
? 'PCS'
: item?.UomName}
)
</p> </p>
{item?.OfferMessage && {item?.OfferMessage &&
!Array.isArray(item.OfferMessage) && ( !Array.isArray(item.OfferMessage) && (
@ -2542,12 +2539,16 @@ const BSBillingTable7 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2625,9 +2626,7 @@ const BSBillingTable7 = () => {
2 === 2 ===
0 0
? 'white' ? 'white'
: SelectedBillColor?.[ : SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
? SelectedBillColor?.[ ? SelectedBillColor?.[
'OverallBackgroundColor' 'OverallBackgroundColor'
] ]
@ -2688,11 +2687,12 @@ const BSBillingTable7 = () => {
: '' : ''
: editdelete === 'Delete' : editdelete === 'Delete'
? () => removeFromCart(item) ? () => removeFromCart(item)
: () => { } : () => {}
} }
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table7-content-disabled' ? 'BSBill-Table7-content-disabled'
: 'BSBill-Table7-content' : 'BSBill-Table7-content'
} }
@ -2735,7 +2735,8 @@ const BSBillingTable7 = () => {
}} }}
onClick={() => onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 || (item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) && item.ProductIdentifierDtls?.length > 0 ||
imeiModal) &&
handleImeiDetails(item) handleImeiDetails(item)
} }
> >
@ -2754,9 +2755,7 @@ const BSBillingTable7 = () => {
<> <>
{!item?.ProdVariantName?.toLowerCase()?.includes( {!item?.ProdVariantName?.toLowerCase()?.includes(
'variant' 'variant'
) && ( ) && <span>{item?.ProdVariantName} </span>}
<span>{item?.ProdVariantName} </span>
)}
{item?.Size} {item?.Size}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
? 'PCS' ? 'PCS'
@ -2825,12 +2824,16 @@ const BSBillingTable7 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2901,8 +2904,7 @@ const BSBillingTable7 = () => {
tableDataTakeAway?.length + tableDataTakeAway?.length +
index === index ===
0 && 0 &&
tableDataDinein?.length >= tableDataDinein?.length >= PreviousdataLength &&
PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
!UnpaidData !UnpaidData
? 'wheat' ? 'wheat'
@ -2955,11 +2957,12 @@ const BSBillingTable7 = () => {
? () => handleEditQuantity(item) ? () => handleEditQuantity(item)
: editdelete === 'Delete' : editdelete === 'Delete'
? () => removeFromCart(item) ? () => removeFromCart(item)
: () => { } : () => {}
} }
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table7-content-disabled' ? 'BSBill-Table7-content-disabled'
: 'BSBill-Table7-content' : 'BSBill-Table7-content'
} }
@ -3015,10 +3018,7 @@ const BSBillingTable7 = () => {
'variant' 'variant'
) && <span>{item?.ProdVariantName} </span>} ) && <span>{item?.ProdVariantName} </span>}
{item?.Size} {item?.Size}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y' ? 'PCS' : item?.UomName})
? 'PCS'
: item?.UomName}
)
</p> </p>
{item?.OfferMessage && {item?.OfferMessage &&
!Array.isArray(item.OfferMessage) && ( !Array.isArray(item.OfferMessage) && (
@ -3081,12 +3081,16 @@ const BSBillingTable7 = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3161,7 +3165,6 @@ const BSBillingTable7 = () => {
/> />
)} )}
</> </>
</Suspense>
); );
}; };

View File

@ -1,4 +1,4 @@
import { useEffect, useState, lazy, Suspense } from 'react'; import { useEffect, useState, lazy } from 'react';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { Popconfirm, Tooltip } from 'antd'; import { Popconfirm, Tooltip } from 'antd';
import WebFont from 'webfontloader'; import WebFont from 'webfontloader';
@ -93,7 +93,6 @@ import {
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js'; import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js'; import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
import { useUtilsComponent } from '../../../../../Services/utils.js'; import { useUtilsComponent } from '../../../../../Services/utils.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
const StandardTable = () => { const StandardTable = () => {
const { removeExtraCharge } = useUtilsComponent(); const { removeExtraCharge } = useUtilsComponent();
@ -1244,7 +1243,7 @@ const StandardTable = () => {
InwardDtlId: isPaidproduct?.InwardDtlId, InwardDtlId: isPaidproduct?.InwardDtlId,
BuyInwardDtlId: null, BuyInwardDtlId: null,
Offer: 0, Offer: 0,
localid: isPaidproduct?.localid localid: isPaidproduct?.localid,
}); });
} else if (isPaidproduct?.OrderQty > item?.OrderQty) { } else if (isPaidproduct?.OrderQty > item?.OrderQty) {
// Just Decrease Paid Qty // Just Decrease Paid Qty
@ -1418,7 +1417,7 @@ const StandardTable = () => {
InwardDtlId: item?.InwardDtlId, InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null, BuyInwardDtlId: null,
Offer: item?.Offer, Offer: item?.Offer,
localid: item?.localid localid: item?.localid,
}); });
await ChangeFreeprodlistFn({ await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty, OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1498,7 +1497,7 @@ const StandardTable = () => {
InwardDtlId: item?.InwardDtlId, InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null, BuyInwardDtlId: null,
Offer: item?.Offer, Offer: item?.Offer,
localid: item?.localid localid: item?.localid,
}); });
await ChangeFreeprodlistFn({ await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty, OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -2123,7 +2122,6 @@ const StandardTable = () => {
const isAndroid = /Android/i.test(navigator.userAgent); const isAndroid = /Android/i.test(navigator.userAgent);
return ( return (
<Suspense fallback={<BillingTableSkeleton />}>
<div <div
className="standardTableMain" className="standardTableMain"
style={{ height: isMobile ? '86%' : '100%' }} style={{ height: isMobile ? '86%' : '100%' }}
@ -2395,7 +2393,8 @@ const StandardTable = () => {
{OldtableDataTakeAway?.map((item, index) => ( {OldtableDataTakeAway?.map((item, index) => (
<tr <tr
key={index} key={index}
className={`${item?.SalesId && OrderType !== 'Hold' className={`${
item?.SalesId && OrderType !== 'Hold'
? 'booking-billing-table-row-disabled' ? 'booking-billing-table-row-disabled'
: 'booking-billing-table-row' : 'booking-billing-table-row'
}`} }`}
@ -2410,8 +2409,7 @@ const StandardTable = () => {
: triggerAnimation && : triggerAnimation &&
index === 0 && index === 0 &&
!item?.SalesId && !item?.SalesId &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength
PreviousdataLength
? 'wheat' ? 'wheat'
: triggerAnimation && : triggerAnimation &&
index === 0 && index === 0 &&
@ -2427,17 +2425,13 @@ const StandardTable = () => {
? 'rgb(243, 248, 213)' ? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' && : GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes( GlobProdwisedata?.includes(
item?.InwardDtlId + item?.InwardDtlId + ' ' + item?.BookingTypeName
' ' +
item?.BookingTypeName
) )
? '#b2d1f7' ? '#b2d1f7'
: index % 2 === 0 : index % 2 === 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6', : '#d6d6d6',
animation: animation:
BillOrderPre === 'Y' && !BookingTypeBoth BillOrderPre === 'Y' && !BookingTypeBoth
@ -2502,9 +2496,7 @@ const StandardTable = () => {
> >
{item?.ProdName} {item?.ProdName}
&nbsp;{' '} &nbsp;{' '}
{item?.BrandName !== null {item?.BrandName !== null ? item?.BrandName : ''}
? item?.BrandName
: ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2517,9 +2509,7 @@ const StandardTable = () => {
( (
{!item?.ProdVariantName?.toLowerCase()?.includes( {!item?.ProdVariantName?.toLowerCase()?.includes(
'variant' 'variant'
) && ( ) && <span>{item?.ProdVariantName} </span>}
<span>{item?.ProdVariantName} </span>
)}
{AvailableDate ? ( {AvailableDate ? (
<> <>
{' '} {' '}
@ -2621,12 +2611,16 @@ const StandardTable = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -2726,7 +2720,8 @@ const StandardTable = () => {
{OldtableDataDinein?.map((item, index) => ( {OldtableDataDinein?.map((item, index) => (
<tr <tr
key={OldtableDataTakeAway?.length + index} key={OldtableDataTakeAway?.length + index}
className={`${item?.SalesId className={`${
item?.SalesId
? 'booking-billing-table-row-disabled' ? 'booking-billing-table-row-disabled'
: 'booking-billing-table-row' : 'booking-billing-table-row'
} }
@ -2748,8 +2743,7 @@ const StandardTable = () => {
? 'wheat' ? 'wheat'
: BookingType !== 'Dine In' && : BookingType !== 'Dine In' &&
triggerAnimation && triggerAnimation &&
OldtableDataTakeAway?.length + index === OldtableDataTakeAway?.length + index === 0 &&
0 &&
tableDataDinein?.length >= tableDataDinein?.length >=
PreviousdataLength && PreviousdataLength &&
!HoldOrderDtl && !HoldOrderDtl &&
@ -2827,9 +2821,7 @@ const StandardTable = () => {
> >
{item?.ProdName} {item?.ProdName}
&nbsp;{' '} &nbsp;{' '}
{item?.BrandName !== null {item?.BrandName !== null ? item?.BrandName : ''}
? item?.BrandName
: ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -2842,9 +2834,7 @@ const StandardTable = () => {
( (
{!item?.ProdVariantName?.toLowerCase()?.includes( {!item?.ProdVariantName?.toLowerCase()?.includes(
'variant' 'variant'
) && ( ) && <span>{item?.ProdVariantName} </span>}
<span>{item?.ProdVariantName} </span>
)}
{AvailableDate ? ( {AvailableDate ? (
<> <>
{' '} {' '}
@ -2945,12 +2935,16 @@ const StandardTable = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3055,7 +3049,8 @@ const StandardTable = () => {
OldtableDataTakeAway?.length + OldtableDataTakeAway?.length +
index index
} }
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'booking-billing-table-row-disabled' ? 'booking-billing-table-row-disabled'
: 'booking-billing-table-row' : 'booking-billing-table-row'
} }
@ -3073,8 +3068,7 @@ const StandardTable = () => {
index === index ===
0 && 0 &&
!item?.SalesId && !item?.SalesId &&
tableDataTakeAway?.length >= tableDataTakeAway?.length >= PreviousdataLength
PreviousdataLength
? 'wheat' ? 'wheat'
: BookingType !== 'Dine In' && : BookingType !== 'Dine In' &&
triggerAnimation && triggerAnimation &&
@ -3114,9 +3108,7 @@ const StandardTable = () => {
? 'rgb(243, 248, 213)' ? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' && : GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes( GlobProdwisedata?.includes(
item?.InwardDtlId + item?.InwardDtlId + ' ' + item?.BookingTypeName
' ' +
item?.BookingTypeName
) )
? '#b2d1f7' ? '#b2d1f7'
: (OldtableDataDinein?.length + : (OldtableDataDinein?.length +
@ -3126,9 +3118,7 @@ const StandardTable = () => {
0 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6', : '#d6d6d6',
animation: animation:
BillOrderPre === 'Y' && !BookingTypeBoth BillOrderPre === 'Y' && !BookingTypeBoth
@ -3188,8 +3178,9 @@ const StandardTable = () => {
"'Inter', ui-sans-serif, system-ui, sans-serif", "'Inter', ui-sans-serif, system-ui, sans-serif",
}} }}
onClick={() => onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 || item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal) item.ProductIdentifierDtls?.length > 0 ||
imeiModal
? handleImeiDetails(item) ? handleImeiDetails(item)
: editField && handleEditQuantity(item) : editField && handleEditQuantity(item)
} }
@ -3198,9 +3189,7 @@ const StandardTable = () => {
? item.ProdName ? item.ProdName
: item.ServiceName} : item.ServiceName}
&nbsp;{' '} &nbsp;{' '}
{item?.BrandName !== null {item?.BrandName !== null ? item?.BrandName : ''}
? item?.BrandName
: ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -3215,9 +3204,7 @@ const StandardTable = () => {
{!item?.ProdVariantName?.toLowerCase()?.includes( {!item?.ProdVariantName?.toLowerCase()?.includes(
'variant' 'variant'
) && ( ) && (
<span> <span>{item?.ProdVariantName} </span>
{item?.ProdVariantName}{' '}
</span>
)} )}
{AvailableDate ? ( {AvailableDate ? (
<> <>
@ -3225,8 +3212,7 @@ const StandardTable = () => {
( (
{`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`}
) &nbsp; ) &nbsp;
{item?.SinglePc == 'Y' && {item?.SinglePc == 'Y' && 'Single'}
'Single'}
</> </>
) : ( ) : (
<> <>
@ -3321,12 +3307,16 @@ const StandardTable = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
@ -3432,7 +3422,8 @@ const StandardTable = () => {
tableDataTakeAway?.length + tableDataTakeAway?.length +
index index
} }
className={`${BookingType === 'Dine In' && item?.SalesId className={`${
BookingType === 'Dine In' && item?.SalesId
? 'booking-billing-table-row-disabled' ? 'booking-billing-table-row-disabled'
: 'booking-billing-table-row' : 'booking-billing-table-row'
} }
@ -3476,9 +3467,7 @@ const StandardTable = () => {
? 'rgb(243, 248, 213)' ? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' && : GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes( GlobProdwisedata?.includes(
item?.InwardDtlId + item?.InwardDtlId + ' ' + item?.BookingTypeName
' ' +
item?.BookingTypeName
) )
? '#b2d1f7' ? '#b2d1f7'
: (OldtableDataTakeAway?.length + : (OldtableDataTakeAway?.length +
@ -3489,9 +3478,7 @@ const StandardTable = () => {
0 0
? 'white' ? 'white'
: SelectedBillColor?.['OverallBackgroundColor'] : SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[ ? SelectedBillColor?.['OverallBackgroundColor']
'OverallBackgroundColor'
]
: '#d6d6d6', : '#d6d6d6',
animation: animation:
BillOrderPre === 'Y' && !BookingTypeBoth BillOrderPre === 'Y' && !BookingTypeBoth
@ -3560,9 +3547,7 @@ const StandardTable = () => {
> >
{item?.ProdName} {item?.ProdName}
&nbsp;{' '} &nbsp;{' '}
{item?.BrandName !== null {item?.BrandName !== null ? item?.BrandName : ''}
? item?.BrandName
: ''}
{item?.Type != 'C' && ( {item?.Type != 'C' && (
<> <>
<p <p
@ -3575,9 +3560,7 @@ const StandardTable = () => {
( (
{!item?.ProdVariantName?.toLowerCase()?.includes( {!item?.ProdVariantName?.toLowerCase()?.includes(
'variant' 'variant'
) && ( ) && <span>{item?.ProdVariantName} </span>}
<span>{item?.ProdVariantName} </span>
)}
{AvailableDate ? ( {AvailableDate ? (
<> <>
{' '} {' '}
@ -3678,12 +3661,16 @@ const StandardTable = () => {
{item?.Type != 'C' {item?.Type != 'C'
? item.Offer && item.Offer > 0 ? item.Offer && item.Offer > 0
? item.Offer ? item.Offer
: item.DiscountAmt ? item.DiscountAmt : '-' : item.DiscountAmt
? item.DiscountAmt
: '-'
: item?.OfferPrice && item?.OfferPrice > 0 : item?.OfferPrice && item?.OfferPrice > 0
? item?.OfferType === 'F' ? item?.OfferType === 'F'
? `${safeRound(item.OfferPrice)}` ? `${safeRound(item.OfferPrice)}`
: `${item.OfferPrice}%` : `${item.OfferPrice}%`
: item.DiscountAmt ? item.DiscountAmt : '-'} : item.DiscountAmt
? item.DiscountAmt
: '-'}
</td> </td>
)} )}
{tableitem.OptionName == 'Quantity' && ( {tableitem.OptionName == 'Quantity' && (
@ -3801,7 +3788,6 @@ const StandardTable = () => {
</div> </div>
</div> </div>
</div> </div>
</Suspense>
); );
}; };

View File

@ -15,13 +15,11 @@ import {
PreferenceData, PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData'; } from '../../../../Features/BookingScreen/BookingData/BookingData';
import { ExtractDateFormate } from '../../../../Services/Others'; import { ExtractDateFormate } from '../../../../Services/Others';
import { RiArchiveLine } from 'react-icons/ri';
import { AiFillAlert } from 'react-icons/ai'; import { AiFillAlert } from 'react-icons/ai';
import { TbAlertTriangleFilled } from 'react-icons/tb';
import { IoEye } from 'react-icons/io5'; import { IoEye } from 'react-icons/io5';
import { DefaultModal } from '../../../../Components/Modal/DefaultModal'; import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
import { Tables } from '../../../../Components/Tables/Table'; import { Tables } from '../../../../Components/Tables/Table';
import '../../../../Styles/OverAllStyle/OverAllStyle.scss'; import '../../../../Styles/OverAllStyle/OverAllStyle.scss';
const NoDataComponent = () => ( const NoDataComponent = () => (
<div style={{ textAlign: 'center', padding: 20 }}> <div style={{ textAlign: 'center', padding: 20 }}>
@ -351,7 +349,13 @@ const BSExpireProductsList = () => {
messageData={message.data} messageData={message.data}
onComplete={onComplete} onComplete={onComplete}
/> />
<div
style={{
display: 'flex',
justifyContent: 'space-between',
marginTop: '20px',
}}
>
<Segmented <Segmented
value={selectedSegment} value={selectedSegment}
onChange={onChangeSegment} onChange={onChangeSegment}
@ -369,7 +373,7 @@ const BSExpireProductsList = () => {
}, },
]} ]}
/> />
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Search <Search
placeholder={`Search ${selectedSegment === 'expired' ? 'Expired' : 'Low Stock'} Products`} placeholder={`Search ${selectedSegment === 'expired' ? 'Expired' : 'Low Stock'} Products`}
onSearchChange={(e) => onSearchChange={(e) =>
@ -381,7 +385,7 @@ const BSExpireProductsList = () => {
</div> </div>
<Table <Table
className='LowStockAlterModalTable' className="LowStockAlterModalTable"
rowKey="InwardDtlId" rowKey="InwardDtlId"
columns={ columns={
selectedSegment === 'expired' ? expiredColumns : lowStockColumns selectedSegment === 'expired' ? expiredColumns : lowStockColumns

View File

@ -21,7 +21,11 @@ const RetailBookingClosing = (props) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const UserType = getSession('UserType'); const UserType = getSession('UserType');
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
const allowDecimal = preferenceDatas?.[0]?.SettingDtlDetails?.find((setting) => setting?.SettingIdName?.toLowerCase() === "decimal" && setting?.SettingValue === 'Y'); const allowDecimal = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y'
);
const CompId = getSession('CompId'); const CompId = getSession('CompId');
const AppId = getSession('AppId'); const AppId = getSession('AppId');
const UserId = getSession('UserId'); const UserId = getSession('UserId');
@ -298,39 +302,42 @@ const RetailBookingClosing = (props) => {
title={'Booking Close'} title={'Booking Close'}
handleCancel={props.PaymentClose} handleCancel={props.PaymentClose}
footer={false} footer={false}
width={700} width={750}
children={ children={
<div className="PaymentClosingOverAll"> <div className="PaymentClosingOverAll">
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div className="PaymentClosingOverAll-sub"> <div className="PaymentClosingOverAll-sub">
<div> <div className="ClosepayBTN">
{' '} <p> Received Amount </p>
Received Amount ={' '} <div>= </div>
<span style={{ color: '#28AA3A', cursor: 'pointer' }}> <span style={{ color: '#28AA3A', cursor: 'pointer' }}>
{safeRound(PaymentClosingData?.ReceivedAmount)} {safeRound(PaymentClosingData?.ReceivedAmount)}
</span> </span>
</div> </div>
<div> <div className="ClosepayBTN">
Cash Amount ={' '} <p> Cash Amount</p>
<div>= </div>
<span style={{ color: '#28AA3A', cursor: 'pointer' }}> <span style={{ color: '#28AA3A', cursor: 'pointer' }}>
{safeRound(PaymentClosingData?.OverAllCashAmount)} {safeRound(PaymentClosingData?.OverAllCashAmount)}
</span> </span>
</div> </div>
<div> <div className="ClosepayBTN">
Card Amount ={' '} <p> Card Amount</p>
<div>=</div>
<span style={{ color: '#28AA3A', cursor: 'pointer' }}> <span style={{ color: '#28AA3A', cursor: 'pointer' }}>
{safeRound(PaymentClosingData?.OverAllCardAmount)} {safeRound(PaymentClosingData?.OverAllCardAmount)}
</span> </span>
</div> </div>
<div> <div className="ClosepayBTN">
UPI Amount ={' '} <p>UPI Amount</p>
<div>=</div>
<span style={{ color: '#28AA3A', cursor: 'pointer' }}> <span style={{ color: '#28AA3A', cursor: 'pointer' }}>
{safeRound(PaymentClosingData?.OverAllUpiAmount)} {safeRound(PaymentClosingData?.OverAllUpiAmount)}
</span> </span>
</div> </div>
<div className="ClosepayBTN">
<div> <p> Total Cash In Hand</p>
Total Cash In Hand ={' '} <div>=</div>
<span style={{ color: '#28AA3A' }}> <span style={{ color: '#28AA3A' }}>
{safeRound(TotalCashInHand)} {safeRound(TotalCashInHand)}
</span> </span>

View File

@ -68,10 +68,19 @@
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
font-family: "Poppins"; font-family: "Poppins";
width: 250px; width: 300px;
div { margin-top: 10px;
}
.ClosepayBTN {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
p {
width: 150px;
}
span {
width: 50px;
text-align: right;
} }
} }

View File

@ -1,10 +1,18 @@
import React, { useState, useEffect, useRef, useCallback } from 'react'; import React, { useState, useEffect, useRef, useCallback } from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { ImWarning } from "react-icons/im"; import { ImWarning } from 'react-icons/im';
import { Form, Table, Input, Select, AutoComplete, Button, Tooltip } from 'antd'; import {
import { BsUpcScan } from "react-icons/bs"; Form,
import { FaLink } from "react-icons/fa"; Table,
Input,
Select,
AutoComplete,
Button,
Tooltip,
} from 'antd';
import { BsUpcScan } from 'react-icons/bs';
import { FaLink } from 'react-icons/fa';
import { import {
DeleteFilled, DeleteFilled,
ArrowRightOutlined, ArrowRightOutlined,
@ -13,7 +21,12 @@ import {
import { Messages } from '../../Components/Notifications/Messages.jsx'; import { Messages } from '../../Components/Notifications/Messages.jsx';
import { InputField } from '../../Components/Forms/InputField.jsx'; import { InputField } from '../../Components/Forms/InputField.jsx';
import Buttons from '../../Components/Forms/Buttons.jsx'; import Buttons from '../../Components/Forms/Buttons.jsx';
import { getSession, pdfDiv, printDiv, validateSafeInput } from '../../Services/Others'; import {
getSession,
pdfDiv,
printDiv,
validateSafeInput,
} from '../../Services/Others';
import FormHeader from '../PageComponents/FormHeader.jsx'; import FormHeader from '../PageComponents/FormHeader.jsx';
import { DropDowns } from '../../Components/Forms/DropDown.jsx'; import { DropDowns } from '../../Components/Forms/DropDown.jsx';
import { CiBarcode } from 'react-icons/ci'; import { CiBarcode } from 'react-icons/ci';
@ -32,14 +45,17 @@ import {
getEmpAccess, getEmpAccess,
} from '../../Features/AppPage/CenterPage.js'; } from '../../Features/AppPage/CenterPage.js';
import { useAuth } from '../../AuthContext.jsx'; import { useAuth } from '../../AuthContext.jsx';
import { getAllCustomer, getPreferenceData } from '../../Features/BookingScreen/BookingData/BookingData.js'; import {
getAllCustomer,
getPreferenceData,
} from '../../Features/BookingScreen/BookingData/BookingData.js';
const subDirectory = import.meta.env.BASE_URL; const subDirectory = import.meta.env.BASE_URL;
import TooltipWrapper from '../../Components/Tooltip/Tooltip'; import TooltipWrapper from '../../Components/Tooltip/Tooltip';
import { FaEye, FaPrint } from 'react-icons/fa'; import { FaEye, FaPrint } from 'react-icons/fa';
import { MdOutlineMail } from 'react-icons/md'; import { MdOutlineMail } from 'react-icons/md';
import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx'; import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx';
import FloatLabel from '../../Components/Forms/FloatLabel/index.jsx'; import FloatLabel from '../../Components/Forms/FloatLabel/index.jsx';
import { debounce } from "lodash"; import { debounce } from 'lodash';
import { getPrintSelectionComponentData } from '../../Features/ThemeChange/ThemeChange.js'; import { getPrintSelectionComponentData } from '../../Features/ThemeChange/ThemeChange.js';
import { PrintStyleFunction } from '../paymentpdfPage/PrintStyleFunction.js'; import { PrintStyleFunction } from '../paymentpdfPage/PrintStyleFunction.js';
import { isMobile } from 'react-device-detect'; import { isMobile } from 'react-device-detect';
@ -71,7 +87,7 @@ const SalesQuotationForm = () => {
const [SelProduct, setSelProduct] = useState(null); const [SelProduct, setSelProduct] = useState(null);
const [selectedProductName, setSelectedProductName] = useState(null); const [selectedProductName, setSelectedProductName] = useState(null);
const [productSearchText, setProductSearchText] = useState(""); const [productSearchText, setProductSearchText] = useState('');
const [scanner, setScanner] = useState(false); const [scanner, setScanner] = useState(false);
console.log(SelTaxTypeName, 'SelTaxTypeName'); console.log(SelTaxTypeName, 'SelTaxTypeName');
@ -95,7 +111,7 @@ const SalesQuotationForm = () => {
const [addnewAccess, setaddnewAccess] = useState(true); const [addnewAccess, setaddnewAccess] = useState(true);
const [isbarcode, setisbarcode] = useState(false); const [isbarcode, setisbarcode] = useState(false);
const [isSubmitted, setIsSubmitted] = useState(false); const [isSubmitted, setIsSubmitted] = useState(false);
const [usrMailDataModel, setusrMailDataModel] = useState(false) const [usrMailDataModel, setusrMailDataModel] = useState(false);
const [EnteredMailId, setEnteredMailId] = useState(null); const [EnteredMailId, setEnteredMailId] = useState(null);
const [PrintTempData, setPrintTempData] = useState([]); const [PrintTempData, setPrintTempData] = useState([]);
console.log(TableData, 'TableData'); console.log(TableData, 'TableData');
@ -111,8 +127,6 @@ const SalesQuotationForm = () => {
}, },
]; ];
// const QuotationStylepdf = `<style> // const QuotationStylepdf = `<style>
// * { // * {
// box-sizing: border-box; // box-sizing: border-box;
@ -371,7 +385,6 @@ const SalesQuotationForm = () => {
// font-size:20px; // font-size:20px;
// } // }
// } // }
// </style>`; // </style>`;
@ -559,15 +572,15 @@ const SalesQuotationForm = () => {
); );
if (matchedProduct) { if (matchedProduct) {
let productName = {}; let productName = {};
productName.label = `${matchedProduct?.ProdName} (${matchedProduct.Size} ${matchedProduct.UomName})${matchedProduct?.BrandName ? ` - ${matchedProduct?.BrandName}` : ''}` productName.label = `${matchedProduct?.ProdName} (${matchedProduct.Size} ${matchedProduct.UomName})${matchedProduct?.BrandName ? ` - ${matchedProduct?.BrandName}` : ''}`;
ProductDropDownChange(matchedProduct.ProdId, productName); ProductDropDownChange(matchedProduct.ProdId, productName);
if (matchedProduct?.ProdVariantPriceDetails?.length < 2) { if (matchedProduct?.ProdVariantPriceDetails?.length < 2) {
setSelectedProductName(""); setSelectedProductName('');
setSelProduct(null) setSelProduct(null);
} }
} else { } else {
setMessageType("error"); setMessageType('error');
setMessageData("The Scanned Product not Available in Product List") setMessageData('The Scanned Product not Available in Product List');
} }
}, 300), }, 300),
[ProductData] [ProductData]
@ -575,12 +588,16 @@ const SalesQuotationForm = () => {
const getPreference = async () => { const getPreference = async () => {
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId }; const data = { AppId: AppId, CompId: CompId, BranchId: BranchId };
const { data: res } = await dispatch(getPreferenceData(data)).unwrap() const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find((setting) => setting?.SettingIdName?.toLowerCase() === "decimal" && setting?.SettingValue === 'Y'); const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y'
);
if (decimalSetting) { if (decimalSetting) {
setAllowDecimal(true) setAllowDecimal(true);
}
} }
};
const changebarcode = useCallback(() => { const changebarcode = useCallback(() => {
setisbarcode((prev) => !prev); setisbarcode((prev) => !prev);
}, []); }, []);
@ -621,7 +638,6 @@ const SalesQuotationForm = () => {
// Print(); // Print();
// }, [PrintData]); // }, [PrintData]);
useEffect(() => { useEffect(() => {
let total = TableData?.reduce((accumulator, currentValue) => { let total = TableData?.reduce((accumulator, currentValue) => {
return accumulator + currentValue.NetAmt; return accumulator + currentValue.NetAmt;
@ -659,7 +675,9 @@ const SalesQuotationForm = () => {
).unwrap(); ).unwrap();
if (Product?.data?.statusCode === 1) { if (Product?.data?.statusCode === 1) {
let Productonlydata = Product?.data?.data?.filter( let Productonlydata = Product?.data?.data?.filter(
(item) => item?.ProdTypeName === 'Product' && (item?.StockAvailable === "Y" ? item?.BalanceQty > 0 : true) (item) =>
item?.ProdTypeName === 'Product' &&
(item?.StockAvailable === 'Y' ? item?.BalanceQty > 0 : true)
); );
setProductData(Productonlydata); setProductData(Productonlydata);
@ -684,13 +702,14 @@ const SalesQuotationForm = () => {
const Data = { AppId, CompId, BranchId }; const Data = { AppId, CompId, BranchId };
const printtemp = await dispatch(getPrintSelectionComponentData(Data)).unwrap(); const printtemp = await dispatch(
getPrintSelectionComponentData(Data)
).unwrap();
const printTypeName = printtemp?.data?.data const printTypeName = printtemp?.data?.data
?.flatMap(template => template.ComponentDetails || []) ?.flatMap((template) => template.ComponentDetails || [])
?.find( ?.find(
comp => (comp) =>
comp.SetasDefault === "Y" && comp.SetasDefault === 'Y' && comp.PrintTypeName === 'Sales Quotation'
comp.PrintTypeName === "Sales Quotation"
); );
setPrintTempData(printTypeName); setPrintTempData(printTypeName);
}; };
@ -739,33 +758,33 @@ const SalesQuotationForm = () => {
}; };
const handleScanSearch = () => { const handleScanSearch = () => {
if (scanner === false) { if (scanner === false) {
setMessageType("success"); setMessageType('success');
setMessageData("Search by QrCode/BarCode Enabled") setMessageData('Search by QrCode/BarCode Enabled');
} else { } else {
setMessageType("success"); setMessageType('success');
setMessageData("Search by QrCode/BarCode Disabled") setMessageData('Search by QrCode/BarCode Disabled');
} }
setScanner(prev => !prev) setScanner((prev) => !prev);
setSelectedProductName(null); setSelectedProductName(null);
setselectedProductVariantData(null); setselectedProductVariantData(null);
setVariants(null) setVariants(null);
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
ProdId: null, ProdId: null,
VarProdId: null VarProdId: null,
}); });
} };
const handleProductSearch = (value) => { const handleProductSearch = (value) => {
if (scanner) { if (scanner) {
debouncedScannerSearch(value); debouncedScannerSearch(value);
} }
setProductSearchText(value) setProductSearchText(value);
setSelectedProductName(value); setSelectedProductName(value);
setselectedProductVariantData([]); setselectedProductVariantData([]);
setVariants([]) setVariants([]);
}; };
const ProductDropDownChange = async (ProdId, option) => { const ProductDropDownChange = async (ProdId, option) => {
setProductSearchText("") setProductSearchText('');
setSelectedProductName(option?.label ? option?.label : '') setSelectedProductName(option?.label ? option?.label : '');
formRef?.current?.resetFields(['VarProdId']); formRef?.current?.resetFields(['VarProdId']);
console.log(ProductData, 'ProdIdProdId'); console.log(ProductData, 'ProdIdProdId');
@ -866,9 +885,7 @@ const SalesQuotationForm = () => {
)?.[0]?.ProdVariantName; )?.[0]?.ProdVariantName;
const ProdName1 = TableData?.some( const ProdName1 = TableData?.some(
(e) => (e) => e.ProdId == SelProduct && e.ProdVariantName === ProdName2
e.ProdId == SelProduct &&
e.ProdVariantName === ProdName2
); );
if (ProdName1) { if (ProdName1) {
setMessageType('error'); setMessageType('error');
@ -886,9 +903,7 @@ const SalesQuotationForm = () => {
// let x = VariantData1?.filter((e) => e.InwardDtlId == value); // let x = VariantData1?.filter((e) => e.InwardDtlId == value);
// let u = ProductData?.find((e) => e.ProdId == selectedProductData); // let u = ProductData?.find((e) => e.ProdId == selectedProductData);
// console.log(first) // console.log(first)
let ProductData1 = ProductData?.find( let ProductData1 = ProductData?.find((e) => e.ProdId == SelProduct);
(e) => e.ProdId == SelProduct
);
console.log(ProductData1, 'ProductData1ProductData1'); console.log(ProductData1, 'ProductData1ProductData1');
let mrp; let mrp;
let sellprice; let sellprice;
@ -988,7 +1003,7 @@ const SalesQuotationForm = () => {
title: 'Product Name', title: 'Product Name',
dataIndex: 'ProdName', dataIndex: 'ProdName',
key: 'ProdName', key: 'ProdName',
width: "230px", width: '230px',
align: 'right', align: 'right',
render: (text, record, index) => ( render: (text, record, index) => (
<a style={{ color: 'black' }}> <a style={{ color: 'black' }}>
@ -1350,7 +1365,8 @@ const SalesQuotationForm = () => {
? sellprice * parseInt(qty) ? sellprice * parseInt(qty)
: 0; : 0;
const taxamt = SelTaxTypeName?.toLowerCase() === 'withtax' const taxamt =
SelTaxTypeName?.toLowerCase() === 'withtax'
? (Amount * parseInt(record?.TaxPercentage)) / ? (Amount * parseInt(record?.TaxPercentage)) /
(100 + parseInt(record?.TaxPercentage)) (100 + parseInt(record?.TaxPercentage))
: 0; : 0;
@ -1373,22 +1389,12 @@ const SalesQuotationForm = () => {
[`Qty${index}`]: qty, [`Qty${index}`]: qty,
[`NetAmt${index}`]: Amount, [`NetAmt${index}`]: Amount,
// [`ReceivedQty${index}`]: qty,
// [`AcceptedQty${index}`]: acceptedQty,
// [`RejectedQty${index}`]: qty - acceptedQty,
// ReceivedQty: qty,
// AcceptedQty: acceptedQty,
// RejectedQty: qty - acceptedQty,
[`PurcDisc${index}`]: 0, [`PurcDisc${index}`]: 0,
[`DiscType${index}`]: 'P', [`DiscType${index}`]: 'P',
}); });
}; };
const handleDiscountTypeChange = (value, record, index) => { const handleDiscountTypeChange = (value, record, index) => {
// console.log(value,"valuevalue")
// const newData1 = [...TableData];
// const item = newData1[index];
// item.DiscountType = value;
// setTableData(newData1);
const tempamt = record.Qty * record.Price; const tempamt = record.Qty * record.Price;
const DisType = value; const DisType = value;
const amount = const amount =
@ -1530,23 +1536,16 @@ const SalesQuotationForm = () => {
PostData['TaxAmount'] = parseFloat( PostData['TaxAmount'] = parseFloat(
(TotalCgst + TotalSgst + TotalIgst)?.toFixed(2) (TotalCgst + TotalSgst + TotalIgst)?.toFixed(2)
); );
(PostData['CompId'] = CompId), ((PostData['CompId'] = CompId),
(PostData['BranchId'] = BranchId), (PostData['BranchId'] = BranchId),
(PostData['AppId'] = AppId); (PostData['AppId'] = AppId));
let res = await dispatch(postPurcQuotation(PostData)).unwrap(); let res = await dispatch(postPurcQuotation(PostData)).unwrap();
if (res?.data?.statusCode === 1) { if (res?.data?.statusCode === 1) {
setMessageType('success'); setMessageType('success');
setMessageData(res?.data?.response); setMessageData(res?.data?.response);
const custId = formRef.current?.getFieldValue('CustId'); const custId = formRef.current?.getFieldValue('CustId');
const customer = AllCustomer?.find(c => c.UserId === custId); const customer = AllCustomer?.find((c) => c.UserId === custId);
console.log(customer, "customertrt"); console.log(customer, 'customertrt');
// const printDataWithCustomer = {
// ...res?.data?.data,
// customerName: customer?.CustName || '',
// customerAddress: customer?.CustAddress || '',
// customerMobile: customer?.CustMobile || '',
// };
setPrintData(res?.data?.data); setPrintData(res?.data?.data);
setIsSubmitted(true); setIsSubmitted(true);
@ -1597,33 +1596,6 @@ const SalesQuotationForm = () => {
} }
}; };
// const handleSearch = (input) => {
// // Only proceed if input is not empty and isbarcode is true
// if (!input || !isbarcode) {
// return;
// }
// if (debounceRef.current) {
// clearTimeout(debounceRef.current);
// }
// debounceRef.current = setTimeout(async () => {
// const product = ProductData.find(
// (p) => p.QRCode?.toLowerCase() === input.toLowerCase()
// );
// console.log(input, 'inputinput', product);
// if (product) {
// setEditingKey('');
// await ProductDropDownChange(product.ProdId);
// setTimeout(() => {
// setSelProduct(null);
// formRef.current?.setFieldsValue({ ProdId: null });
// }, 100);
// }
// }, 300);
// };
const onChangeprodFunction = (e) => { const onChangeprodFunction = (e) => {
console.log(e, 'yyyyyyyyyyyyyy'); console.log(e, 'yyyyyyyyyyyyyy');
@ -1651,20 +1623,11 @@ const SalesQuotationForm = () => {
} }
}; };
// Add these functions inside your component, before the return statement:
// const handleEmailClick = () => {
// const subject = encodeURIComponent('Sales Quotation');
// const body = encodeURIComponent('Please find attached the purchase quotation.');
// window.open(`mailto:?subject=${subject}&body=${body}`);
// };
// const handlePrint = () => {
// printDiv('Pur-Quot-Print', QuotationStyle);
// };
// ...existing code...
const handlePrint = async () => { const handlePrint = async () => {
const style = await PrintStyleFunction( const style = await PrintStyleFunction(
PrintTempData?.StyleName == undefined ? 'Style 13' : PrintTempData?.StyleName, PrintTempData?.StyleName == undefined
? 'Style 13'
: PrintTempData?.StyleName,
'Quotation' 'Quotation'
); );
@ -1690,7 +1653,9 @@ const SalesQuotationForm = () => {
const selectedStyle = const selectedStyle =
stylesMap[ stylesMap[
PrintTempData?.StyleName == undefined ? 'Style 13' : PrintTempData?.StyleName PrintTempData?.StyleName == undefined
? 'Style 13'
: PrintTempData?.StyleName
]; ];
if (isMobile) { if (isMobile) {
@ -1700,15 +1665,13 @@ const SalesQuotationForm = () => {
UserId: UserId, UserId: UserId,
dispatch, dispatch,
}); });
} } else if (selectedStyle) {
else if (selectedStyle) {
await printDiv(`${selectedStyle}`, style); await printDiv(`${selectedStyle}`, style);
} }
}; };
const handleEmailClick = async (mail, data) => { const handleEmailClick = async (mail, data) => {
let record = mail == "mail" ? data : PrintData?.[0] let record = mail == 'mail' ? data : PrintData?.[0];
if (record?.Email) { if (record?.Email) {
setTimeout(async () => { setTimeout(async () => {
@ -1726,46 +1689,45 @@ const SalesQuotationForm = () => {
if (res?.data?.status === 1) { if (res?.data?.status === 1) {
setMessageData(res?.data?.response); setMessageData(res?.data?.response);
setMessageType('success'); setMessageType('success');
} } else {
else {
setMessageData(res?.data?.response); setMessageData(res?.data?.response);
setMessageType('error'); setMessageType('error');
} }
// setMessageData("Email sent successfully"); // setMessageData("Email sent successfully");
// setMessageType('success'); // setMessageType('success');
} catch (error) { } catch (error) {
console.error('❌ Email send failed:', error); console.error('❌ Email send failed:', error);
// alert(' Email failed to send'); // alert(' Email failed to send');
setMessageData("Email failed to send"); setMessageData('Email failed to send');
setMessageType('error'); setMessageType('error');
} }
}, 300); }, 300);
} else {
setusrMailDataModel(true);
} }
else {
setusrMailDataModel(true)
}
}; };
const handleUserMailmodalCancel = () => { const handleUserMailmodalCancel = () => {
setusrMailDataModel(false) setusrMailDataModel(false);
setEnteredMailId(null) setEnteredMailId(null);
emailform.resetFields(); emailform.resetFields();
// setQuotationProductdata([]) // setQuotationProductdata([])
} };
const emailSubmit = (values) => { const emailSubmit = (values) => {
let data = { ...PrintData?.[0], ...{ CustMail: values.email }, ...{ Email: values.email } }; let data = {
handleEmailClick("mail", data); ...PrintData?.[0],
...{ CustMail: values.email },
...{ Email: values.email },
};
handleEmailClick('mail', data);
setEnteredMailId(null); setEnteredMailId(null);
emailform.resetFields(); emailform.resetFields();
emailform.setFieldsValue({ email: '' }); emailform.setFieldsValue({ email: '' });
setusrMailDataModel(false); setusrMailDataModel(false);
}; };
return ( return (
<div className="pageOverAll"> <div className="pageOverAll">
<div className="userPage"> <div className="userPage">
@ -1775,11 +1737,14 @@ const SalesQuotationForm = () => {
messageData={messageData} messageData={messageData}
onComplete={onComplete} onComplete={onComplete}
/> />
<div className="formName" style={{ <div
className="formName"
style={{
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
marginTop: '5px', marginTop: '5px',
}}> }}
>
<FormHeader title={'Sales Quotation'} /> <FormHeader title={'Sales Quotation'} />
<div <div
style={{ style={{
@ -1793,10 +1758,12 @@ const SalesQuotationForm = () => {
cursor: 'pointer', cursor: 'pointer',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: '400', fontWeight: '400',
whiteSpace: "nowrap", whiteSpace: 'nowrap',
fontSize: "15px" fontSize: '15px',
}} }}
onClick={() => navigate(`${subDirectory}setting/sales-quotation/list`)} onClick={() =>
navigate(`${subDirectory}setting/sales-quotation/list`)
}
> >
<FaEye /> <span>View Quotation</span> <FaEye /> <span>View Quotation</span>
</div> </div>
@ -1857,129 +1824,67 @@ const SalesQuotationForm = () => {
/> />
</Form.Item> </Form.Item>
<div className="ProductDropDownChange-Quotation"> <div className="ProductDropDownChange-Quotation">
<Form.Item <Form.Item name="ProdId">
name="ProdId"
>
<div className="product-scan sales-quotation"> <div className="product-scan sales-quotation">
<FloatLabel label={"Product Name"} value={selectedProductName}> <FloatLabel
label={'Product Name'}
value={selectedProductName}
>
<AutoComplete <AutoComplete
className="field-DropDown" className="field-DropDown"
value={selectedProductName} value={selectedProductName}
filterOption={(input, option) => { filterOption={(input, option) => {
const product = ProductData.find(p => p.ProdId === option.value); const product = ProductData.find(
const nameMatch = option.label?.toLowerCase()?.includes(productSearchText?.toLowerCase()); (p) => p.ProdId === option.value
const qrMatch = product?.QRCode?.toLowerCase() == productSearchText?.toLowerCase(); );
const nameMatch = option.label
?.toLowerCase()
?.includes(productSearchText?.toLowerCase());
const qrMatch =
product?.QRCode?.toLowerCase() ==
productSearchText?.toLowerCase();
return nameMatch || qrMatch; return nameMatch || qrMatch;
}} }}
options={!scanner ? ProductData?.map options={
((option) => ({ !scanner
? ProductData?.map((option) => ({
value: option.ProdId, value: option.ProdId,
label: `${option.ProdName} (${option.Size} ${option.UomName})${option?.BrandName ? ` - ${option?.BrandName}` : ''}` label: `${option.ProdName} (${option.Size} ${option.UomName})${option?.BrandName ? ` - ${option?.BrandName}` : ''}`,
})) : []} }))
: []
}
onSelect={ProductDropDownChange} onSelect={ProductDropDownChange}
onChange={handleProductSearch} onChange={handleProductSearch}
onKeyDown={(e) => { onKeyDown={(e) => {
if (scanner && e.key === "Enter") { if (scanner && e.key === 'Enter') {
e.preventDefault(); e.preventDefault();
} }
}} }}
disabled={ProductData?.length === 0} disabled={ProductData?.length === 0}
> ></AutoComplete>
</AutoComplete>
</FloatLabel> </FloatLabel>
<Tooltip title={"BarCode/QrCode"} placement={"top"}> <Tooltip title={'BarCode/QrCode'} placement={'top'}>
<BsUpcScan strokeWidth={0.5} color="#000" style={{ fontSize: "16px", color: scanner ? "#52c41a" : "#888", fontWeight: "600" }} className="product-scan-Icon" onClick={handleScanSearch} /> <div className="BsUpcScanSQ">
<BsUpcScan
strokeWidth={0.5}
color="#000"
style={{
fontSize: '16px',
color: scanner ? '#52c41a' : '#888',
fontWeight: '600',
}}
className="product-scan-Icon"
onClick={handleScanSearch}
/>
</div>
</Tooltip> </Tooltip>
{ProductData?.length === 0 && <p style={{ color: "red" }}><ImWarning /> All Products have no Stock</p>} {ProductData?.length === 0 && (
<p style={{ color: 'red' }}>
<ImWarning /> All Products have no Stock
</p>
)}
</div> </div>
</Form.Item> </Form.Item>
{/* <Form.Item name="ProdId">
<AutoComplete
options={ProductData?.map((option) => ({
value:
option.ProdName +
' ' +
'(' +
option.Size +
option.UomName +
')',
label:
option.ProdName +
' ' +
'(' +
option.Size +
option.UomName +
')',
qrCode: option.QRCode,
}))}
style={{ width: '250px', height: '48px' }}
onSelect={(value, option) => {
if (isbarcode && option.qrCode) {
const productByQR = ProductData.find(
(p) => p.QRCode === option.qrCode
);
if (productByQR) {
ProductDropDownChange({
value:
productByQR.ProdName +
' ' +
'(' +
productByQR.Size +
productByQR.UomName +
')',
});
}
} else {
ProductDropDownChange(option);
}
}}
filterOption={(input, option) => {
if (isbarcode) {
return (
option.qrCode &&
option.qrCode
.toLowerCase()
.includes(input.toLowerCase())
);
} else {
return option.label
.toLowerCase()
.includes(input.toLowerCase());
}
}}
value={SelProduct}
>
<InputField
label="Product Name"
style={{}}
onChange={(e) =>
onChangeprodFunction(e?.target?.value)
}
onPressEnter={(e) =>
onChangeprodFunction(e?.target?.value)
}
isOnChange={SelProduct ? true : false}
suffix={
<TooltipWrapper
title="Search Product Name"
// isMobile={isMobile}
>
<CiBarcode
style={{
fontSize: '17px',
paddingRight: '1px',
}}
color={isbarcode ? 'green' : ' '}
onClick={changebarcode}
/>
<SearchOutlined
style={{ color: 'rgba(0,0,0,.45)' }}
/>
</TooltipWrapper>
}
/>
</AutoComplete>
</Form.Item> */}
</div> </div>
</div> </div>
@ -2025,7 +1930,10 @@ const SalesQuotationForm = () => {
</div> </div>
</div> </div>
</div> </div>
<div className="QuosubmitButton" style={{ display: 'flex', gap: '1rem' }}> <div
className="QuosubmitButton"
style={{ display: 'flex', gap: '1rem' }}
>
<Buttons <Buttons
buttonText="SUBMIT" buttonText="SUBMIT"
color="901D77" color="901D77"
@ -2055,50 +1963,31 @@ const SalesQuotationForm = () => {
</div> </div>
</> </>
)} )}
</div> </div>
</Form> </Form>
{TableData?.length > 0 && ( {TableData?.length > 0 && (
<div className="Quo-Summary-Quotation"> <div className="Quo-Summary-Quotation">
<div className='Quotation-summary'> Gross Total: {allowDecimal ? TotalBillAmount?.toFixed(2) : TotalBillAmount}</div> <div className="Quotation-summary">
<div className='Quotation-summary' > Total GST: {allowDecimal ? (TotalCgst + TotalSgst + TotalIgst)?.toFixed(2) : (TotalCgst + TotalSgst + TotalIgst)}</div> {' '}
Gross Total:{' '}
{allowDecimal ? TotalBillAmount?.toFixed(2) : TotalBillAmount}
</div>
<div className="Quotation-summary">
{' '}
Total GST:{' '}
{allowDecimal
? (TotalCgst + TotalSgst + TotalIgst)?.toFixed(2)
: TotalCgst + TotalSgst + TotalIgst}
</div>
{/* <div> Total SGST: {TotalSgst?.toFixed(2)}</div> {/* <div> Total SGST: {TotalSgst?.toFixed(2)}</div>
<div> Total IGST: {TotalIgst?.toFixed(2)}</div> */} <div> Total IGST: {TotalIgst?.toFixed(2)}</div> */}
<div className='Quotation-summary'> Total Amount: {allowDecimal ? Math.round(TotalAmount)?.toFixed(2) : Math.round(TotalAmount)}</div> <div className="Quotation-summary">
{/* <table style={{ width: '300px', border: '1px solid black' }}> {' '}
<tr> Total Amount:{' '}
<td style={{ textAlign: 'right' }}>Gross Total:</td> {allowDecimal
<td style={{ textAlign: 'right' }}> ? Math.round(TotalAmount)?.toFixed(2)
: Math.round(TotalAmount)}
</td> </div>
</tr>
<tr>
<td style={{ textAlign: 'right' }}>Total CGST:</td>
<td style={{ textAlign: 'right' }}>
{TotalCgst?.toFixed(2)}
</td>
</tr>
<tr>
<td style={{ textAlign: 'right' }}>Total SGST:</td>
<td style={{ textAlign: 'right' }}>
{TotalSgst?.toFixed(2)}
</td>
</tr>
<tr>
<td style={{ textAlign: 'right' }}>Total IGST:</td>
<td style={{ textAlign: 'right' }}>
{TotalIgst?.toFixed(2)}
</td>
</tr>
<tr>
<td style={{ textAlign: 'right' }}>
Total Amount(Round Off):
</td>
<td style={{ textAlign: 'right' }}>
{Math.round(TotalAmount)?.toFixed(2)}
</td>
</tr>
</table> */}
</div> </div>
)} )}
</div> </div>
@ -2109,20 +1998,17 @@ const SalesQuotationForm = () => {
handleCancel={handleUserMailmodalCancel} handleCancel={handleUserMailmodalCancel}
footer={false} footer={false}
children={ children={
<div> <div>
<Form form={emailform} layout="vertical" onFinish={emailSubmit}> <Form form={emailform} layout="vertical" onFinish={emailSubmit}>
<Form.Item <Form.Item
label="Mail ID" label="Mail ID"
name="email" name="email"
rules={[ rules={[
{ required: true, message: "Email is required" }, { required: true, message: 'Email is required' },
{ type: "email", message: "Enter a valid email address" }, { type: 'email', message: 'Enter a valid email address' },
]} ]}
> >
<Input <Input autoComplete="off" placeholder="Enter your email" />
autoComplete="off"
placeholder="Enter your email" />
</Form.Item> </Form.Item>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
@ -2134,7 +2020,10 @@ const SalesQuotationForm = () => {
/> />
<div style={{ display: 'none' }}> <div style={{ display: 'none' }}>
<PurchaseQuotationPrint PrintingData={PrintData} PrintTempData={PrintTempData} /> <PurchaseQuotationPrint
PrintingData={PrintData}
PrintTempData={PrintTempData}
/>
</div> </div>
</div> </div>
</div> </div>

View File

@ -44,7 +44,7 @@
.BSBilling4-tablediv-mobile { .BSBilling4-tablediv-mobile {
display: block; display: block;
height: 40vh; height: 40vh;
overflow-y: scroll; overflow-y: auto;
} }
.BSBilling4-tablediv-mobile::-webkit-scrollbar { .BSBilling4-tablediv-mobile::-webkit-scrollbar {
@ -316,6 +316,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
gap: 4px;
} }
@media (min-width: 280px) and (max-width: 499px) { @media (min-width: 280px) and (max-width: 499px) {
@ -340,11 +341,6 @@
row-gap: 0rem; row-gap: 0rem;
} }
.Table4-price-btn-master {
flex-direction: row;
align-items: center;
}
.Table4-cash { .Table4-cash {
width: 60px !important; width: 60px !important;
} }
@ -726,8 +722,10 @@
.BSBilling4-price-content { .BSBilling4-price-content {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 100vw; width: 100vw;
@media (max-width: 768px) {
width: 100% !important;
}
} }
.Table4-price-icon-container { .Table4-price-icon-container {
@ -789,3 +787,38 @@
font-weight: bold; font-weight: bold;
padding: 2px; padding: 2px;
} }
.BS7hold-sum {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
column-gap: 1rem;
color: var(--DEFAULT_SELECTED_COLOR);
}
.RowforResposiveBill7 {
display: flex;
flex-direction: column;
width: 100%;
}
.RowResposiveBill7 {
display: flex;
align-items: flex-start;
gap: 4px;
width: 100%;
}
.bsbilltable7 {
padding: 10px;
}
@media (max-width: 768px) {
.BSTable3_payroll {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.bsbilltable7 {
padding: 0;
}
}

View File

@ -109,7 +109,8 @@
.Btn-payment-mode { .Btn-payment-mode {
background-color: var(--SELECTED_COLOR); background-color: var(--SELECTED_COLOR);
color: #ffffff; color: #ffffff;
outline: none;border: none; outline: none;
border: none;
font-size: 12px; font-size: 12px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -318,9 +319,9 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
overflow: auto; overflow: auto;
scrollbar-width: none;
width: inherit; width: inherit;
height: 85vh; height: 85vh;
scrollbar-width: none;
border-radius: 10px; border-radius: 10px;
@media (max-width: 768px) { @media (max-width: 768px) {
width: 100% !important; width: 100% !important;
@ -333,9 +334,9 @@
.BSTable3 { .BSTable3 {
overflow-y: auto; overflow-y: auto;
scrollbar-width: none;
height: 100vh; height: 100vh;
background-color: #fff; background-color: #fff;
scrollbar-width: none;
} }
.Cust-tag { .Cust-tag {

View File

@ -95,9 +95,10 @@
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
max-width: 130px; max-width: 130px;
white-space: nowrap; display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
} }
.BSItemCard-itemPrice { .BSItemCard-itemPrice {

View File

@ -9,7 +9,7 @@
.receipt-reprint-header { .receipt-reprint-header {
display: flex; display: flex;
align-items: center; align-items: center;
// justify-content: space-between; flex-wrap: wrap;
gap: 10px; gap: 10px;
margin-bottom: 16px; margin-bottom: 16px;
} }

View File

@ -113,7 +113,8 @@ body {
@media (max-width: 768px) { @media (max-width: 768px) {
width: 100%; width: 100%;
margin: 0.5rem; margin: 0;
padding: 0.5rem;
min-height: 200px; min-height: 200px;
} }
@ -195,7 +196,7 @@ body {
} }
} }
.BSLayout2-Master .BSBTOverall1-Default { .BSLayout2-Master .BSBTOverall1-Default {
height: 81vh; height: 81vh;
} }
@ -229,7 +230,6 @@ body {
width: 100%; width: 100%;
} }
.NewLayoutBillContainer { .NewLayoutBillContainer {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -46,6 +46,12 @@
overflow: auto; overflow: auto;
height: 75vh; height: 75vh;
padding-bottom: 3rem; padding-bottom: 3rem;
white-space: nowrap;
width: 100%;
.printer-button {
width: 120px !important;
}
.modal-header { .modal-header {
text-align: center; text-align: center;
@ -75,13 +81,15 @@
.setting-card { .setting-card {
width: 30%; width: 30%;
@media (max-width: 768px) {
width: unset;
}
button { button {
background: #fff; background: #fff;
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
align-items: center; align-items: center;
// flex-direction: column;
padding: 10px 20px; padding: 10px 20px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
@ -166,11 +174,10 @@
// Responsive design // Responsive design
@media (max-width: 600px) { @media (max-width: 600px) {
.printer-settings-content { .printer-settings-content {
padding: 20px; padding: 10px;
.settings-grid { .settings-grid {
grid-template-columns: 1fr; gap: 10px;
gap: 15px;
} }
.modal-actions { .modal-actions {

View File

@ -68,10 +68,10 @@
column-gap: 3rem; column-gap: 3rem;
padding-top: 1rem; padding-top: 1rem;
height: 78vh; height: 78vh;
overflow: scroll; overflow: auto;
scrollbar-width: thin;
row-gap: 1.5rem; row-gap: 1.5rem;
padding-bottom: 4rem; padding-bottom: 4rem;
scrollbar-width: thin;
@media (max-width: 768px) { @media (max-width: 768px) {
padding-bottom: 4rem; padding-bottom: 4rem;
@ -131,6 +131,7 @@
} }
.sales-quotation { .sales-quotation {
position: relative;
.ant-select { .ant-select {
width: 250px !important; width: 250px !important;
height: 48px !important; height: 48px !important;
@ -139,4 +140,9 @@
input { input {
padding: 6px 25px 6px 12px !important; padding: 6px 25px 6px 12px !important;
} }
.BsUpcScanSQ {
position: absolute;
right: 10px;
top: 15px;
}
} }

View File

@ -4,7 +4,6 @@
} }
.MasterLedger-Report { .MasterLedger-Report {
// width: 100vw;
padding: 0rem 0; padding: 0rem 0;
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
@ -16,13 +15,16 @@
width: max-content !important; width: max-content !important;
} }
} }
.custom-table th {
white-space: nowrap;
}
} }
.LedgerTable { .LedgerTable {
height: 73vh; height: 73vh;
scrollbar-width: thin;
width: 100%; width: 100%;
overflow: auto; overflow: auto;
scrollbar-width: thin;
tr:nth-child(even) { tr:nth-child(even) {
background-color: #e9e8e8 !important; background-color: #e9e8e8 !important;
@ -49,7 +51,6 @@
.Dropdown-DatePicker { .Dropdown-DatePicker {
display: flex; display: flex;
align-items: center; align-items: center;
// padding: 0.2rem 0px;
flex-direction: row; flex-direction: row;
column-gap: 2rem; column-gap: 2rem;
flex-wrap: wrap; flex-wrap: wrap;
@ -80,12 +81,10 @@
.LedgerDropDate { .LedgerDropDate {
display: flex; display: flex;
// align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
gap: 2rem; gap: 2rem;
flex-wrap: wrap; flex-wrap: wrap;
// overflow-x: scroll;
} }
.ItemWiseReport-printerIcon-disabled { .ItemWiseReport-printerIcon-disabled {
@ -118,7 +117,6 @@
display: flex; display: flex;
padding-left: 10px; padding-left: 10px;
border-style: groove; border-style: groove;
// align-items: center;
} }
.LR-DatePicker { .LR-DatePicker {
@ -142,8 +140,8 @@
width: 72px; width: 72px;
} }
.LedgerTable .ant-table-wrapper .ant-table-thead>tr>th, .LedgerTable .ant-table-wrapper .ant-table-thead > tr > th,
.ant-table-wrapper .ant-table-thead>tr>td { .ant-table-wrapper .ant-table-thead > tr > td {
color: #000000; color: #000000;
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 600;
@ -174,7 +172,7 @@
} }
.MasterLedger-Report .ant-table-wrapper .ant-table-cell, .MasterLedger-Report .ant-table-wrapper .ant-table-cell,
.MasterLedger-Report .ant-table-wrapper .ant-table-thead>tr>th { .MasterLedger-Report .ant-table-wrapper .ant-table-thead > tr > th {
padding: 1px 13px; padding: 1px 13px;
width: 100px; width: 100px;
} }
@ -207,17 +205,15 @@
width: 200px !important; width: 200px !important;
} }
.LedgerTable { .LedgerTable {
height: 50vh; height: 50vh;
} }
.LedgerDropDate { .LedgerDropDate {
overflow-y: scroll; overflow-y: auto;
} }
.Ledger-datePicker { .Ledger-datePicker {
.ant-picker { .ant-picker {
width: 100px !important; width: 100px !important;
height: 50px !important; height: 50px !important;
@ -239,7 +235,7 @@
.AllRadioButton { .AllRadioButton {
width: 37vh; width: 37vh;
overflow-x: scroll; overflow-x: auto;
} }
} }
@ -265,7 +261,7 @@
border: 1px solid #909090; border: 1px solid #909090;
font-family: "Poppins", sans-serif; font-family: "Poppins", sans-serif;
>thead { > thead {
position: sticky; position: sticky;
top: -1px; top: -1px;
} }
@ -281,7 +277,6 @@
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
font-family: VAR(--HEADING_FONT_FAMILY); font-family: VAR(--HEADING_FONT_FAMILY);
// text-transform: uppercase;
text-transform: capitalize; text-transform: capitalize;
letter-spacing: 0.2px; letter-spacing: 0.2px;
} }
@ -290,7 +285,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
overflow: scroll; overflow: auto;
scrollbar-width: thin;
padding-bottom: 2rem; padding-bottom: 2rem;
} }
@ -336,7 +332,7 @@
justify-content: flex-end; justify-content: flex-end;
gap: 1rem; gap: 1rem;
>div { > div {
border-radius: 6px; border-radius: 6px;
padding: 5px 10px; padding: 5px 10px;
color: #fff; color: #fff;
@ -344,17 +340,16 @@
cursor: pointer; cursor: pointer;
} }
>div:nth-child(1) { > div:nth-child(1) {
background-color: #28aa3a; background-color: #28aa3a;
} }
>div:nth-child(2) { > div:nth-child(2) {
background-color: #ff0000; background-color: #ff0000;
} }
} }
.custom-table { .custom-table {
Button:disabled, Button:disabled,
Button[disabled] { Button[disabled] {
width: unset !important; width: unset !important;