#198 Hold Issue Solving

This commit is contained in:
karthikalakshmi 2026-03-02 10:50:47 +05:30
parent 26fd4b0947
commit decc8e2424
9 changed files with 48 additions and 30 deletions

View File

@ -103,6 +103,18 @@ export const ReprintDetails = createAsyncThunk(
} }
); );
export const VerifiedPaymentDtl = createAsyncThunk(
"addCustomer/ReprintDetails",
async (data) => {
const { AppId, CompId, BranchId, OrderId } = data || {};
if (OrderId) {
return await axiosRetailInstanceData.get(
`/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&OrderId=${OrderId}`
);
}
}
);
const initialState = { const initialState = {

View File

@ -138,8 +138,8 @@ import {
getAddCustomerDetails, getAddCustomerDetails,
getDefaultPaymentOptions, getDefaultPaymentOptions,
GlobalAddCustomerDetails, GlobalAddCustomerDetails,
ReprintDetails,
triggerCustomerRefresh, triggerCustomerRefresh,
VerifiedPaymentDtl,
} from '../../../../../Features/BookingScreen/Customer/addCustomer'; } from '../../../../../Features/BookingScreen/Customer/addCustomer';
import PozoHoldIcon from '../../UtillComponents/Pozo retail icons/PozoHoldIcon'; import PozoHoldIcon from '../../UtillComponents/Pozo retail icons/PozoHoldIcon';
import PozoDineInIcon from '../../UtillComponents/Pozo retail icons/PozoDineIn.jsx'; import PozoDineInIcon from '../../UtillComponents/Pozo retail icons/PozoDineIn.jsx';
@ -421,6 +421,7 @@ export default function BST1Payment() {
const [empData, setEmpData] = useState(); const [empData, setEmpData] = useState();
const [addnewAccess, setaddnewAccess] = useState(true); const [addnewAccess, setaddnewAccess] = useState(true);
const tableOptions = templateData?.BookingBilling?.[1]; const tableOptions = templateData?.BookingBilling?.[1];
const NavBarOptions = templateData?.BookingNavbar?.[1];
const paymentInput = paybtns?.filter( const paymentInput = paybtns?.filter(
(item) => item?.ModeName?.toLowerCase() === 'cash' (item) => item?.ModeName?.toLowerCase() === 'cash'
)?.[0]?.ModeId; )?.[0]?.ModeId;
@ -649,7 +650,7 @@ export default function BST1Payment() {
//mohan stoped data //mohan stoped data
useEffect(() => { useEffect(() => {
if (CompId && BranchId && AppId) { if (CompId && BranchId && AppId) {
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
// getUnpaiddatas(); // getUnpaiddatas();
@ -837,7 +838,7 @@ export default function BST1Payment() {
OrderId: businessUPIOrderId, OrderId: businessUPIOrderId,
}; };
const res = await dispatch(ReprintDetails(data)).unwrap(); const res = await dispatch(VerifiedPaymentDtl(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
const orderData = [{ OrderDetails: res.data.data }]; const orderData = [{ OrderDetails: res.data.data }];
@ -1846,7 +1847,7 @@ export default function BST1Payment() {
setUpinotSelected(false); setUpinotSelected(false);
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
setPreviousNetAmount(0); setPreviousNetAmount(0);
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
if (defaultBookingType === 'Both') { if (defaultBookingType === 'Both') {

View File

@ -157,8 +157,8 @@ import {
getAddCustomerDetails, getAddCustomerDetails,
getDefaultPaymentOptions, getDefaultPaymentOptions,
GlobalAddCustomerDetails, GlobalAddCustomerDetails,
ReprintDetails,
triggerCustomerRefresh, triggerCustomerRefresh,
VerifiedPaymentDtl,
} from '../../../../../Features/BookingScreen/Customer/addCustomer.js'; } from '../../../../../Features/BookingScreen/Customer/addCustomer.js';
import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip'; import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip';
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBIllingTable2.scss'; import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBIllingTable2.scss';
@ -389,6 +389,7 @@ const BSBillingTable2 = () => {
const [addcustomer, setAddCustomer] = useState(false); const [addcustomer, setAddCustomer] = useState(false);
const [paybtns, setpaybtns] = useState([]); const [paybtns, setpaybtns] = useState([]);
const tableOptions = templateData?.BookingBilling?.[1]; const tableOptions = templateData?.BookingBilling?.[1];
const NavBarOptions = templateData?.BookingNavbar?.[1];
const [paybtnselected, setPaybtnselected] = useState(); const [paybtnselected, setPaybtnselected] = useState();
const [Paybtnnameselected, setPaybtnnameselected] = useState(); const [Paybtnnameselected, setPaybtnnameselected] = useState();
const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger); const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger);
@ -733,7 +734,7 @@ const BSBillingTable2 = () => {
}, []); }, []);
useEffect(() => { useEffect(() => {
if (CompId && BranchId && AppId) { if (CompId && BranchId && AppId) {
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
@ -1292,7 +1293,7 @@ const BSBillingTable2 = () => {
OrderId: businessUPIOrderId, OrderId: businessUPIOrderId,
}; };
const res = await dispatch(ReprintDetails(data)).unwrap(); const res = await dispatch(VerifiedPaymentDtl(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
const orderData = [{ OrderDetails: res.data.data }]; const orderData = [{ OrderDetails: res.data.data }];
@ -1927,7 +1928,7 @@ const BSBillingTable2 = () => {
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
setPreviousNetAmount(0); setPreviousNetAmount(0);
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
if (defaultBookingType === 'Both') { if (defaultBookingType === 'Both') {

View File

@ -164,8 +164,8 @@ import {
getAddCustomerDetails, getAddCustomerDetails,
getDefaultPaymentOptions, getDefaultPaymentOptions,
GlobalAddCustomerDetails, GlobalAddCustomerDetails,
ReprintDetails,
triggerCustomerRefresh, triggerCustomerRefresh,
VerifiedPaymentDtl,
} from '../../../../../Features/BookingScreen/Customer/addCustomer'; } from '../../../../../Features/BookingScreen/Customer/addCustomer';
import PozoHoldIcon from '../../UtillComponents/Pozo retail icons/PozoHoldIcon'; import PozoHoldIcon from '../../UtillComponents/Pozo retail icons/PozoHoldIcon';
import PozoUnpaidIcon from '../../UtillComponents/Pozo retail icons/PozoUnpaidIcon.jsx'; import PozoUnpaidIcon from '../../UtillComponents/Pozo retail icons/PozoUnpaidIcon.jsx';
@ -409,6 +409,8 @@ const BSBillingTable3Pay = () => {
const [creditCustomerOpen, setcreditCustomerOpen] = useState(false); const [creditCustomerOpen, setcreditCustomerOpen] = useState(false);
const tableOptions = BSLayoutData?.BookingBilling?.[1]; const tableOptions = BSLayoutData?.BookingBilling?.[1];
const NavBarOptions = BSLayoutData?.BookingNavbar?.[1];
// BookingNavbar
const GlobEstBooking = useSelector(GlobalEstimateBooking); const GlobEstBooking = useSelector(GlobalEstimateBooking);
const GlobProdwisedata = useSelector(GlobalSelProdWiseEst); const GlobProdwisedata = useSelector(GlobalSelProdWiseEst);
const GlobalUpiID = useSelector(GlobalUpiIDprint); const GlobalUpiID = useSelector(GlobalUpiIDprint);
@ -715,7 +717,7 @@ const BSBillingTable3Pay = () => {
OrderId: businessUPIOrderId, OrderId: businessUPIOrderId,
}; };
const res = await dispatch(ReprintDetails(data)).unwrap(); const res = await dispatch(VerifiedPaymentDtl(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
const orderData = [{ OrderDetails: res.data.data }]; const orderData = [{ OrderDetails: res.data.data }];
@ -759,7 +761,7 @@ const BSBillingTable3Pay = () => {
}; };
useEffect(() => { useEffect(() => {
if (CompId && BranchId && AppId) { if (CompId && BranchId && AppId) {
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
@ -2022,7 +2024,7 @@ const BSBillingTable3Pay = () => {
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
setPreviousNetAmount(0); setPreviousNetAmount(0);
setUpinotSelected(false); setUpinotSelected(false);
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
if (defaultBookingType === 'Both') { if (defaultBookingType === 'Both') {
@ -3594,8 +3596,9 @@ const BSBillingTable3Pay = () => {
className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`} className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`}
style={{ style={{
transition: 'max-height 0.3s ease-in-out', transition: 'max-height 0.3s ease-in-out',
overflow: 'scroll', overflow: 'auto',
maxHeight: responsiveBill ? '180px' : '0px', maxHeight: responsiveBill ? '180px' : '0px',
scrollbarWidth: 'thin',
}} }}
> >
{Array.isArray(OrderCardDetail) && {Array.isArray(OrderCardDetail) &&
@ -3919,13 +3922,13 @@ const BSBillingTable3Pay = () => {
</TooltipWrapper> </TooltipWrapper>
) )
: ''} : ''}
{unpaidFlow == false {unpaidFlow == false
? item?.OptionName == 'Hold' && ? item?.OptionName == 'Hold' &&
paybtns?.length > 0 && paybtns?.length > 0 &&
BookingType !== 'Dine In' && BookingType !== 'Dine In' &&
!BookingTypeBoth && !BookingTypeBoth &&
Holddata?.length > 0 && Holddata?.length > 0 &&
paybtns?.length > 0 &&
OrderCardDetail?.length == 0 && OrderCardDetail?.length == 0 &&
CheckBookingStatus != 'Close' && CheckBookingStatus != 'Close' &&
!addnewAccess && ( !addnewAccess && (

View File

@ -150,8 +150,8 @@ import {
getAddCustomerDetails, getAddCustomerDetails,
getDefaultPaymentOptions, getDefaultPaymentOptions,
GlobalAddCustomerDetails, GlobalAddCustomerDetails,
ReprintDetails,
triggerCustomerRefresh, triggerCustomerRefresh,
VerifiedPaymentDtl,
} from '../../../../../Features/BookingScreen/Customer/addCustomer'; } from '../../../../../Features/BookingScreen/Customer/addCustomer';
import BSCustomerSelect from '../../UtillComponents/BSSelectCustomer.jsx'; import BSCustomerSelect from '../../UtillComponents/BSSelectCustomer.jsx';
import PozoUnpaidIcon from '../../UtillComponents/Pozo retail icons/PozoUnpaidIcon.jsx'; import PozoUnpaidIcon from '../../UtillComponents/Pozo retail icons/PozoUnpaidIcon.jsx';
@ -356,6 +356,7 @@ const BSBillingTable5 = () => {
(item) => item?.OptionName == 'Offer' (item) => item?.OptionName == 'Offer'
); );
const tableOptions = templateData?.BookingBilling?.[1]; const tableOptions = templateData?.BookingBilling?.[1];
const NavBarOptions = templateData?.BookingNavbar?.[1];
const ReportholdData = useSelector(GlobalReorderHoldDetails); const ReportholdData = useSelector(GlobalReorderHoldDetails);
const Custdisable = useSelector(GlobalSelectedCustDisable); const Custdisable = useSelector(GlobalSelectedCustDisable);
const GlobEstBooking = useSelector(GlobalEstimateBooking); const GlobEstBooking = useSelector(GlobalEstimateBooking);
@ -759,7 +760,7 @@ const BSBillingTable5 = () => {
useEffect(() => { useEffect(() => {
if (CompId && BranchId && AppId) { if (CompId && BranchId && AppId) {
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
getCustomerData(); getCustomerData();
@ -1553,7 +1554,7 @@ const BSBillingTable5 = () => {
OrderId: businessUPIOrderId, OrderId: businessUPIOrderId,
}; };
const res = await dispatch(ReprintDetails(data)).unwrap(); const res = await dispatch(VerifiedPaymentDtl(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
const orderData = [{ OrderDetails: res.data.data }]; const orderData = [{ OrderDetails: res.data.data }];
@ -1945,7 +1946,7 @@ const BSBillingTable5 = () => {
setUpinotSelected(false); setUpinotSelected(false);
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
setPreviousNetAmount(0); setPreviousNetAmount(0);
if (holdCheckedSalesSetup) { if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
getHolddata(); getHolddata();
} }
if (defaultBookingType === 'Both') { if (defaultBookingType === 'Both') {

View File

@ -134,8 +134,8 @@ import {
getAddCustomerDetails, getAddCustomerDetails,
getDefaultPaymentOptions, getDefaultPaymentOptions,
GlobalAddCustomerDetails, GlobalAddCustomerDetails,
ReprintDetails,
triggerCustomerRefresh, triggerCustomerRefresh,
VerifiedPaymentDtl,
} from '../../../../../Features/BookingScreen/Customer/addCustomer.js'; } from '../../../../../Features/BookingScreen/Customer/addCustomer.js';
import { import {
changeholddata, changeholddata,
@ -723,7 +723,7 @@ const BSBilling7Payment = () => {
OrderId: businessUPIOrderId, OrderId: businessUPIOrderId,
}; };
const res = await dispatch(ReprintDetails(data)).unwrap(); const res = await dispatch(VerifiedPaymentDtl(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
const orderData = [{ OrderDetails: res.data.data }]; const orderData = [{ OrderDetails: res.data.data }];

View File

@ -354,7 +354,7 @@ const BSC1NavBar = () => {
</TooltipWrapper> </TooltipWrapper>
)} )}
{!isMobile && ( {isMobile && (
<div className="comboPrinterIcon"> <div className="comboPrinterIcon">
<BSPrinterSetting /> <BSPrinterSetting />
</div> </div>

View File

@ -1813,8 +1813,8 @@ const FeaturesFunctionalities = (props) => {
setTabledata(holdingData?.data?.data); setTabledata(holdingData?.data?.data);
dispatch(changeholddata(holdingData?.data?.data)); dispatch(changeholddata(holdingData?.data?.data));
} else { } else {
// props.handleHoldCancel(); props.handleHoldCancel();
props?.closeModal(); // props?.closeModal();
setHold(false); setHold(false);
const dataValue = { CompId: CompId, BranchId: BranchId, AppId: AppId }; const dataValue = { CompId: CompId, BranchId: BranchId, AppId: AppId };
let responseValue = await dispatch(gettinghold(dataValue)).unwrap(); let responseValue = await dispatch(gettinghold(dataValue)).unwrap();
@ -1941,8 +1941,8 @@ const FeaturesFunctionalities = (props) => {
await dispatch(changeSelectedCustId(b?.CustSuppId)); await dispatch(changeSelectedCustId(b?.CustSuppId));
await dispatch(ChangeTotalAmount(b?.ExtraChargeDetails)); await dispatch(ChangeTotalAmount(b?.ExtraChargeDetails));
setHold(false); setHold(false);
// props.handleHoldCancel(); props.handleHoldCancel();
props?.closeModal(); // props?.closeModal();
}; };
const removeAll = async () => { const removeAll = async () => {
@ -1981,8 +1981,8 @@ const FeaturesFunctionalities = (props) => {
setMessageType('success'); setMessageType('success');
setMessageData(response?.data?.response); setMessageData(response?.data?.response);
// props.handleHoldCancel(); props.handleHoldCancel();
props?.closeModal(); // props?.closeModal();
setHold(false); setHold(false);
const dataValue = { CompId: CompId, BranchId: BranchId, AppId: AppId }; const dataValue = { CompId: CompId, BranchId: BranchId, AppId: AppId };
let responseValue = await dispatch(gettinghold(dataValue)).unwrap(); let responseValue = await dispatch(gettinghold(dataValue)).unwrap();
@ -2605,7 +2605,7 @@ const FeaturesFunctionalities = (props) => {
</div> </div>
</div> </div>
} }
handleCancel={props.handleHoldCancel} handleCancel={props?.handleHoldCancel}
/> />
</div> </div>

View File

@ -78,7 +78,7 @@ import KioskBookingReceipt from '../../paymentpdfPage/KioskBookingReceipt.jsx';
import { getSalesDetails } from '../../../Features/PaymentGateway/PaymentGateway.js'; import { getSalesDetails } from '../../../Features/PaymentGateway/PaymentGateway.js';
import { sendSms } from '../../../Features/Payment/PaymentDetails/PaymentDetails.js'; import { sendSms } from '../../../Features/Payment/PaymentDetails/PaymentDetails.js';
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin.js'; import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin.js';
import { ReprintDetails } from '../../../Features/BookingScreen/Customer/addCustomer.js'; import { VerifiedPaymentDtl } from '../../../Features/BookingScreen/Customer/addCustomer.js';
import PaymentGatewayEmbedded from '../../BookingScreen/Components/UtillComponents/PaymentGatewayEmbedded.jsx'; import PaymentGatewayEmbedded from '../../BookingScreen/Components/UtillComponents/PaymentGatewayEmbedded.jsx';
import MobileMultiPdfPrintTrigger from '../../BookingScreen/Components/UtillComponents/MobileMultiPdfPrintTrigger.jsx'; import MobileMultiPdfPrintTrigger from '../../BookingScreen/Components/UtillComponents/MobileMultiPdfPrintTrigger.jsx';
@ -182,7 +182,7 @@ const KioskPayment = (props) => {
OrderId: TransctionId, OrderId: TransctionId,
}; };
const res = await dispatch(ReprintDetails(data)).unwrap(); const res = await dispatch(VerifiedPaymentDtl(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
const orderData = [{ OrderDetails: res.data.data }]; const orderData = [{ OrderDetails: res.data.data }];