Merge pull request '#198 Hold Issue Solving' (#199) from Uomdisplayinprint into main

Reviewed-on: Pozomind/pozo-retail-app#199
This commit is contained in:
karthikalakshmi 2026-03-02 10:51:57 +05:30
commit 56f3a2fdba
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 = {

View File

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

View File

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

View File

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

View File

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

View File

@ -134,8 +134,8 @@ import {
getAddCustomerDetails,
getDefaultPaymentOptions,
GlobalAddCustomerDetails,
ReprintDetails,
triggerCustomerRefresh,
VerifiedPaymentDtl,
} from '../../../../../Features/BookingScreen/Customer/addCustomer.js';
import {
changeholddata,
@ -723,7 +723,7 @@ const BSBilling7Payment = () => {
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) {
const orderData = [{ OrderDetails: res.data.data }];

View File

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

View File

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

View File

@ -78,7 +78,7 @@ import KioskBookingReceipt from '../../paymentpdfPage/KioskBookingReceipt.jsx';
import { getSalesDetails } from '../../../Features/PaymentGateway/PaymentGateway.js';
import { sendSms } from '../../../Features/Payment/PaymentDetails/PaymentDetails.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 MobileMultiPdfPrintTrigger from '../../BookingScreen/Components/UtillComponents/MobileMultiPdfPrintTrigger.jsx';
@ -182,7 +182,7 @@ const KioskPayment = (props) => {
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) {
const orderData = [{ OrderDetails: res.data.data }];