From 50f6afee7f593692091b7de5095bf81500de6f92 Mon Sep 17 00:00:00 2001 From: karthikalakshmi Date: Wed, 4 Mar 2026 09:36:32 +0530 Subject: [PATCH] FIX#223 Logon System Customer mobile number get in salespage --- .../BSBillingTable3/BSBillingTable3.jsx | 7 +- .../BSBillingTable3/BSBillingTable3pay.jsx | 29 +- .../StandardTable/StandardTablePayment.jsx | 2 +- .../Components/BSItemCards/BSItemCard.jsx | 33 + .../BookingFunctionality/CustomerOTP.jsx | 482 +++ .../BookingFunctionality/CustomerOtp.scss | 701 ++++ .../UtillComponents/BSSelectCustomer.jsx | 3 + .../ThermalPrinter/PrintStyle4.jsx | 3701 +++++++++-------- .../BookingScreen/Template/PaymentOptions.js | 73 +- .../Kiosk/Payment/KioskPaymentWithModal.jsx | 12 +- .../Kiosk/Payment/KioskPaymentWithModal.scss | 3 +- .../PaymentDetails/PaymentDetailsList.jsx | 1 + src/Pages/Preference/PreferenceList.jsx | 6 + src/Pages/UpiDetails/UpiDetailslist.jsx | 1 + src/Pages/openingStock/openingStockForm.scss | 9 + .../PaymentDetails/PaymentDetails.scss | 1 + src/Styles/UpiDetails/upidetails.scss | 2 +- 17 files changed, 3214 insertions(+), 1852 deletions(-) create mode 100644 src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx create mode 100644 src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOtp.scss diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx index d059d55..dbe08a3 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx @@ -100,6 +100,11 @@ const BSBillingTable3 = () => { setting?.SettingIdName?.toLowerCase() === 'decimal' && setting?.SettingValue === 'Y' ); + const salesaskiosk = preferenceDatas?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'salespageaskiosk' && + setting?.SettingValue === 'Y' + ); const SessionData = useSelector(StoredSessionData); const BranchId = SessionData?.BranchId; const AppId = SessionData?.AppId; @@ -2357,7 +2362,7 @@ const BSBillingTable3 = () => { fontSize: '16px', }} > - {tableData?.length > 0 ? ( + {(tableData?.length > 0 && !salesaskiosk)? ( import('../../UtillComponents/PaymentGatewayEmbedded.jsx') ); @@ -269,6 +270,7 @@ const BSBillingTable3Pay = () => { const previousOrderOfferDetails = useSelector( GlobalPreviousOrderOfferDetails ); + const CustomerMobileNumber = useSelector(GlobalSelCustId, shallowEqual); const AllPaymentOptions = useSelector(GlobalpaymentOptionData); const FreeProdList = useSelector(GlobalFreeProdList); const offerAppliedProducts = useSelector( @@ -301,6 +303,7 @@ const BSBillingTable3Pay = () => { const FontFamily = useSelector(GlobalSelectedFont); const GetCustId = useSelector(GlobalCustId); const SelCustId = useSelector(GlobalSelCustId); + console.log(GetCustId, SelCustId, 'GetCustId, SelCustId'); const selOption = useSelector(GlobalSelOption); const SelectedTableDetails = useSelector(GlobalSelectedTableDetails); const defaultBookingType = useSelector(GlobalDefaultBookingType); @@ -378,6 +381,17 @@ const BSBillingTable3Pay = () => { const [PrintOrderDetails, setPrintOrderDetails] = useState([]); const OrderCardDetail = useSelector(GlobalOrderCardDetails); const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false); + const [CustomerOtpmodalopen, setCustomerOtpmodalopen] = useState(false); + const isOtpEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'kioskotp' && + setting?.SettingValue === 'Y' + ); + const salesaskiosk = SettingDataSelector?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'salespageaskiosk' && + setting?.SettingValue === 'Y' + ); console.log(OrderCardDetail, 'OrderCardDetail'); //Total calculation @@ -707,6 +721,10 @@ const BSBillingTable3Pay = () => { // dispatch(getPrintSelectionComponentData(Data1)).unwrap(); }, []); + useEffect(() => { + (!CustomerMobileNumber && isOtpEnabled && salesaskiosk) && setCustomerOtpmodalopen(true); + }, [PrintOrderDetails, CustomerMobileNumber]); + useEffect(() => { const getPrintData = async () => { try { @@ -1072,9 +1090,9 @@ const BSBillingTable3Pay = () => { setDefaultPaymentMode([]); } }; - if (salesBillEdit) { + // if (salesBillEdit) { setDefaultPaymentOption(); - } + // } }, [defaultPaymentTrigger, salesBillEdit]); const TokenPrint = async (index) => { @@ -4917,6 +4935,13 @@ const BSBillingTable3Pay = () => { } /> )} + + {(CustomerOtpmodalopen && isOtpEnabled && salesaskiosk) && ( + setCustomerOtpmodalopen(false)} + /> + )} ); diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx index 9a3c694..56e39ff 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx @@ -2908,7 +2908,7 @@ const StandardTablePayment = () => { PrintOrderDetails?.[0]?.OrderDetails?.[0]?.productDetails?.some( (product) => product.TokenAvailable === 'Y' ); - if (!isMobile) { + if (isMobile) { if (MobileA4Print) { await MobileMultiPdfPrintTrigger({ preferenceDetails, diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx index 768c6e8..857f940 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx @@ -2100,6 +2100,39 @@ const BSItemCard = (props) => { setMessageType('warning'); return; } + } else if (itemWiseLimitPreferenece) { + const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => { + const inwardId = curr?.InwardDtlId; + const qty = Number(curr?.OrderQty) || 0; + + if (acc[inwardId]) { + acc[inwardId] += qty; + } else { + acc[inwardId] = qty; + } + + return acc; + }, {}); + + const currentInwardId = item?.InwardDtlId; + const addQty = Qty || 1; + + if (inwardQtyMap[currentInwardId]) { + inwardQtyMap[currentInwardId] += addQty; + } else { + inwardQtyMap[currentInwardId] = addQty; + } + + console.log('Final InwardDtlId Qty Map:', inwardQtyMap); + const isExceeded = Object.values(inwardQtyMap).some( + (qty) => qty > maxQtyLimit + ); + + if (isExceeded) { + setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`); + setMessageType('warning'); + return; + } } } diff --git a/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx b/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx new file mode 100644 index 0000000..c79b1e5 --- /dev/null +++ b/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx @@ -0,0 +1,482 @@ +import { shallowEqual, useSelector } from 'react-redux'; +import { + changeCustomerID, + ChangeSelectedCustDisable, + changeSelectedCustId, + changeSelectedOption, + PreferenceData, +} from '../../../../Features/BookingScreen/BookingData/BookingData'; + +import { useCallback, useEffect, useState } from 'react'; +import { + changeKioskCustomerMobileNo, + globalKioskCustomerMobileNo, +} from '../../../../Features/Kiosk/kiosk.js'; +import { HiOutlineBackspace } from 'react-icons/hi'; +import { useDispatch } from 'react-redux'; +import { isIndianMobile } from '../../../../utils/calculations.js'; +import { IoIosWarning } from 'react-icons/io'; +import './CustomerOTP.scss'; +import { Messages } from '../../../../Components/Notifications/Messages.jsx'; +import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx'; +import { + checkLastOrderTimeLimit, + sendupiotp, +} from '../../../../Features/UpiDetails/UpiDetails.js'; +import { StoredSessionData } from '../../../../Features/ThemeChange/ThemeChange.js'; +import { getAddCustomerDetails, postAddCustomerDetails } from '../../../../Features/BookingScreen/Customer/addCustomer.js'; +const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => { + const SettingDataSelector = useSelector(PreferenceData); + const CustomerMobileNumber = useSelector(globalKioskCustomerMobileNo); + + const SessionData = useSelector(StoredSessionData, shallowEqual); + const dispatch = useDispatch(); + const [number, setNumber] = useState( + CustomerMobileNumber ? CustomerMobileNumber : '' + ); + const [messageType, setMessageType] = useState(null); + const [messageData, setMessageData] = useState(null); + const [canResend, setCanResend] = useState(true); + const [otpInput, setOtpInput] = useState(['', '', '', '']); + const [otpIndex, setOtpIndex] = useState(0); + const [otpSent, setOtpSent] = useState(false); + const [otpVerifed, setOtpVerified] = useState(false); + const [otpNumber, setOTPNumber] = useState(null); + const [maxLimitExceeded, setMaxLimitExceeded] = useState(null); + const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null); + const isOtpEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'kioskotp' && + setting?.SettingValue === 'Y' + ); + const isTimeLimitEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find( + (setting) => + (setting?.SettingIdName?.toLowerCase() === 'hours' || + setting?.SettingIdName?.toLowerCase() === 'minutes') && + setting?.SettingValue === 'Y' + ); + + useEffect(() => { + isIndianMobile(number) && fetchCustomerDetails(number); + }, [number]); + useEffect(() => { + if (otpInput.every((input) => input !== '')) { + verifyOtp(); + } + }, [otpInput]); + const fetchCustomerDetails = async (number) => { + const response = await dispatch( + getAddCustomerDetails({ + MobileNo: number, + AppId: SessionData.AppId, + CompId: SessionData.CompId, + BranchId: SessionData.BranchId, + }) + )?.unwrap(); + if (response?.data?.statusCode === 1) { + console.log( + 'response?.data?.CustomerId', + response?.data, + response?.data?.data?.[0]?.CustId + ); + dispatch(changeCustomerID(response?.data?.data?.[0]?.CustId)); + let custvalues = { + value: number, + label: response?.data?.data?.[0]?.CustName || number, + CustId: response?.data?.data?.[0]?.CustId, + ...response?.data?.data?.[0], + }; + // {value: '8428086416', label: 'mohan', CustId: 'CUST1-281-437-74', CustName: 'mohan', Address1: undefined, …} + await dispatch(changeSelectedOption(custvalues)); + await dispatch(changeSelectedCustId(response?.data?.data?.[0]?.CustId)); + await dispatch( + ChangeSelectedCustDisable(true) + ); + }else{ + let postdata = { + "CustMobile":number, + "CustomerProfile": null, + "AppId": SessionData.AppId, + "CompId": SessionData.CompId, + "BranchId": SessionData.BranchId, + "CreatedBy": SessionData.UserId, + "InitialOutStanding": null, + "OfferType": "P", + "MarriedStatus": "N", + "CustomerAddressDtl": [] + } + let response1 = await dispatch(postAddCustomerDetails(postdata)).unwrap(); + + if (response1?.data?.statusCode == 1) { + dispatch(changeSelectedOption(null)); + dispatch( + changeCustomerID( + response1?.data?.CustomerDetails?.[ + response1?.data?.CustomerDetails.length - 1 + ] + ) + ); + dispatch( + changeSelectedCustId(response1?.data?.CustomerDetails?.[0]?.CustId) + ); + dispatch( + ChangeSelectedCustDisable(true) + ); + + } else{ + setMessageData('Invalid mobile No.'); + setMessageType('error'); + setNumber(''); + } + } + }; + const setNumberFun = (newValue) => { + setNumber((prevNumber) => { + if (prevNumber.length < 10) { + return prevNumber + newValue; + } + return prevNumber; + }); + }; + + const handleOtpNumber = (num) => { + if (otpIndex > 3) return; + + const newOtp = [...otpInput]; + newOtp[otpIndex] = num.toString(); + setOtpInput(newOtp); + + if (otpIndex < 3) { + setOtpIndex(otpIndex + 1); + } + }; + + const handleOtpBackspace = () => { + if (otpIndex < 0) return; + + const newOtp = [...otpInput]; + + if (newOtp[otpIndex]) { + newOtp[otpIndex] = ''; + } else if (otpIndex > 0) { + newOtp[otpIndex - 1] = ''; + setOtpIndex(otpIndex - 1); + } + + setOtpInput(newOtp); + }; + + const handleBackspace = () => { + setNumber((prevNumber) => prevNumber.slice(0, -1)); + }; + const checkLast30MinOrder = async (MobileNo) => { + const response = await dispatch( + checkLastOrderTimeLimit({ + MobileNo, + AppId: SessionData.AppId, + CompId: SessionData.CompId, + BranchId: SessionData.BranchId, + }) + )?.unwrap(); + return response?.data; + }; + const sendOTP = async () => { + const valid = isIndianMobile(number); + if (valid) { + if (isTimeLimitEnabled) { + const withinTimeLimit = await checkLast30MinOrder(number); + if (withinTimeLimit?.IsEligible === false) { + // setMessageData(withinTimeLimit?.response); + // setMessageType('warning'); + setMaxLimitExceededMessage(withinTimeLimit?.response); + setMaxLimitExceeded(true); + await dispatch(changeSelectedOption(null)); + await dispatch(changeSelectedCustId(null)); + // Reset after 3 seconds + setTimeout(() => { + setMaxLimitExceeded(false); + setMaxLimitExceededMessage(null); + }, 2500); + return; + } + } + } else { + setMessageData('Please enter valid mobile No.'); + setMessageType('warning'); + return; + } + try { + setOtpIndex(0); + setOtpSent(true); + let response = await dispatch( + sendupiotp({ + MobileNo: number, + CreatedBy: 0, + }) + )?.unwrap(); + if (response?.data?.statusCode == 1) { + setMessageData('OTP sent to your mobile number'); + setMessageType('success'); + setOTPNumber(response?.data?.OTP); + startResendTimer(); + } + } catch (error) { + console.log(error); + } + }; + const verifyOtp = () => { + const enteredOtp = otpInput.join(''); + + if (enteredOtp === otpNumber?.toString()) { + setMessageType('success'); + setMessageData('OTP Verified Successfully'); + setOtpSent(false); + setOtpInput(['', '', '', '']); + HandleCloseModal(); + // setShowPaymentMethods(true); + setOtpVerified(true); + } else { + setMessageType('error'); + setMessageData('Invalid OTP'); + setOtpInput(['', '', '', '']); + setOtpIndex(0); + } + }; + const onComplete = useCallback(() => { + setMessageData(null); + setMessageType(null); + }, []); + return ( + <> + + 768 ? 900 : 700} + children={ +
+

+ {isOtpEnabled ? 'Enter Mobile Number To Order' : 'PAYMENT'} +

+
+ {!otpSent && !otpVerifed && ( + <> +
+ {/*

+ Get your order bill on your mobile
+ via SMS / Whatsapp +

*/} +
+ +
+ + {number?.length === 10 && !isIndianMobile(number) && ( +
+ Please Enter Valid Mobile Number +
+ )} +
+ + {/* input boxxes */} +
+
+
+

setNumberFun(1)}>1

+

setNumberFun(2)}>2

+

setNumberFun(3)}>3

+
+
+

setNumberFun(4)}>4

+

setNumberFun(5)}>5

+

setNumberFun(6)}>6

+
+
+

setNumberFun(7)}>7

+

setNumberFun(8)}>8

+

setNumberFun(9)}>9

+
+
+

+ +

+

setNumberFun(0)}>0

+

+
+
+
+ {isOtpEnabled && ( + <> + + + )} + + )} + {isOtpEnabled && otpSent && ( +
+
+ Enter OTP +
+ {/* Mobile Number + Edit */} +
+ {number} + + ``{' '} +
+ + {/* 4 Digit OTP Input */} +
+
+ {otpInput.map((digit, index) => ( + setOtpIndex(index)} + readOnly + /> + ))} +
+ +
+ {/* */} + + +
+
+
+
+
+

handleOtpNumber(1)}>1

+

handleOtpNumber(2)}>2

+

handleOtpNumber(3)}>3

+
+
+

handleOtpNumber(4)}>4

+

handleOtpNumber(5)}>5

+

handleOtpNumber(6)}>6

+
+
+

handleOtpNumber(7)}>7

+

handleOtpNumber(8)}>8

+

handleOtpNumber(9)}>9

+
+
+

+ +

+

handleOtpNumber(0)}>0

+

+
+
+
+ + {/* Buttons */} +
+ )} + {/* {(!isOtpEnabled || (otpVerifed)) && <> +

Select Payment Method

+ {console.log('selectedOption', selectedPaymentOption)} +
+ + {counterAvailability && ( +
handlePaymentOption('Counter')} + > + +

+ PAY AT THE COUNTER +

+
+ )} + {paymentOptionDetailsBusinessUpi && ( +
handlePaymentOption('BU')} + > + +

UPI

+
+ )} + {!paymentOptionDetailsBusinessUpi && !counterAvailability && ( +
+ Please Set Payment Options Contact Admin +
+ )} +
+ } */} +
+
+

+ + {maxLimitExceededMessage} +

+
+
+ } + /> + + ); +}; +export default CustomerMobileNumberModal; diff --git a/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOtp.scss b/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOtp.scss new file mode 100644 index 0000000..e68c81a --- /dev/null +++ b/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOtp.scss @@ -0,0 +1,701 @@ +.BSOTPpaymentModal_main { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + width: 100%; + height: 100%; + gap: 10px; + + .BSOTPprompt { + width: 100%; + display: flex; + align-items: flex-start; + justify-content: flex-start; + text-align: left; + + p { + text-align: left; + font-family: 'Gilroy'; + font-weight: 700; + font-size: 26px; + } + } + + .BSOTPKioskPayment-inputModal { + align-content: center; + align-items: center; + display: flex; + justify-content: center; + padding: 1rem 1rem; + flex-direction: column; + + .input-err { + color: red; + font-size: 13px; + margin-top: 4px; + font-family: 'Poppins', sans-serif; + } + + input { + width: 50vw; + height: 4rem; + padding: 0rem 1rem; + font-family: 'Gilroy', sans-serif; + font-size: 22px; + border: none; + letter-spacing: 1px; + font-weight: 500; + border: 1px solid rgba(0, 0, 0, 0.199); + border-radius: 8px; + } + } + + .BSOTPKiosk-dailpadModal { + background-color: #e1eef1; + display: flex; + flex-direction: column; + row-gap: 16px; + padding: 10px 10px; + border-radius: 8px; + width: 60%; + @media (max-width: 768px) { + width: 100%; + } + } + + .BSOTPpaymentChoise { + display: flex; + align-items: center; + justify-content: center; + column-gap: 3rem; + row-gap: 1rem; + + .BSOTPupi { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + width: 110px; + height: 110px; + border: 1px solid rgba(0, 0, 0, 0.199); + border-radius: 8px; + cursor: pointer; + + p { + font-weight: 500; + font-size: 16px; + } + } + } + + .BSOTPchoiseTitle { + display: flex; + width: 100%; + align-items: flex-start; + padding: 1rem 2rem; + } + + .BSOTPKioskPayment-dailpad-main { + display: flex; + flex-direction: column; + row-gap: 12px; + padding: 16px 0px; + align-items: center; + width: 100%; + overflow-x: hidden; + } + .BSOTPKioskPayment-dailpad-1, + .BSOTPKioskPayment-dailpad-2, + .BSOTPKioskPayment-dailpad-3 { + display: flex; + align-items: center; + justify-content: center; + column-gap: 1.5rem; + row-gap: 2rem; + + p { + background-color: #fff; + padding: 10px 10px; + width: 25%; + text-align: center; + border-radius: 12px; + cursor: pointer; + font-family: 'Gilroy', sans-serif; + font-weight: 600; + font-size: 28px; + } + } + + .BSOTPKioskPayment-dailpad-4 { + display: flex; + align-items: center; + justify-content: center; + flex-direction: row-reverse; + column-gap: 1.5rem; + + p { + background-color: #fff; + padding: 10px 10px; + width: 25%; + text-align: center; + border-radius: 12px; + cursor: pointer; + font-family: 'Gilroy', sans-serif; + font-weight: 600; + font-size: 28px; + } + } + + .ant-modal .ant-modal-content { + height: 90vh !important; + } +} + +.BSOTPTitlepayment { + margin: 0; + color: rgba(0, 0, 0, 0.88); + font-weight: 600; + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; + font-family: 'Barlow Condensed'; + font-size: 24px !important; +} + +.BSOTPpaymentCardMain { + display: flex; + align-items: flex-start; + width: 100%; + flex-direction: row; + justify-content: space-around; + background-color: #fff; + box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; + padding: 1rem 1rem; + height: 45vh; + position: relative; + + .ant-radio-wrapper .ant-radio-checked .ant-radio-inner { + background-color: var(--SELECTED_COLOR) !important; + border-color: var(--SELECTED_COLOR) !important; + } + + .BSOTPcardChooice { + width: 40%; + display: flex; + flex-direction: column; + align-items: flex-start; + row-gap: 10px; + column-gap: 10px; + } + + .BSOTPcardoption { + display: flex; + align-items: center; + justify-content: flex-start; + column-gap: 10px; + // box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; + box-shadow: + rgba(0, 0, 0, 0.1) 0px 10px 36px 0px, + rgba(0, 0, 0, 0.06) 0px 0px 0px 1px; + border-radius: 6px; + + padding: 4px 14px; + cursor: pointer; + width: 95%; + + img { + width: 30px; + height: 22px; + } + } + + .BSOTPcardname { + font-size: 16px; + font-weight: 550; + } + + .BSOTPcardname2 { + font-size: 11px; + font-weight: 550; + margin-top: -1px; + } + + .BSOTPbankChooice { + width: 60%; + border-radius: 6px; + + .searchbar { + display: flex; + padding: 1px 12px; + // border: 1px solid #1c1c1c; + // box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; + box-shadow: + rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, + rgba(0, 0, 0, 0.06) 0px 0px 0px 1px; + + border-radius: 6px; + align-items: center; + // border: 1px solid black; + } + + input { + border: none; + outline: none; + padding: 1px 10px; + } + + .titlechoose { + display: flex; + align-items: center; + font-size: 16px; + column-gap: 1rem; + padding-bottom: 9px; + border-bottom: 1px solid #1c1c1c; + } + + .choosecardMain { + padding: 10px 10px; + margin-top: -1rem; + } + + .bankname { + display: flex; + align-items: center; + column-gap: 10px; + font-size: 16px; + padding: 10px 10px; + font-weight: 500; + text-transform: capitalize; + } + } + + .BSOTPbuttonOfpay { + position: absolute; + bottom: -60px; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + column-gap: 11rem; + padding: 1rem 4rem; + + .inr { + font-size: 22px; + color: #4eb14e; + font-weight: 600; + } + + .primary_Button { + display: flex; + align-items: center; + justify-content: center; + padding: 10px 16px; + cursor: pointer; + background-color: #4eb14e !important; + color: #fff; + border-radius: 6px; + } + } +} + +.searchbar :focus { + .ant-input-outlined { + box-shadow: none; + } +} + +.searchbar:focus-within { + .ant-input-outlined { + box-shadow: none; + } +} + +.searchbar .ant-input-search .ant-input:focus { + background-color: #fff !important; + border: #fff !important; +} + +.searchbar .ant-input-search .ant-input:focus { + border-color: #fff !important; +} + +.paymentCardMain .ant-collapse { + width: 100%; + border: none; + // box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; + box-shadow: + rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, + rgba(0, 0, 0, 0.06) 0px 0px 0px 1px; +} + +.paymentCardMain .ant-radio-group, +.ant-radio-wrapper span.ant-radio + * { + padding: 10px 10px; +} + +.paymentCardMain .ant-modal .ant-modal-content { + padding: 54px 35px !important; +} + +.paymentCardMain + .ant-collapse + .ant-collapse-item:last-child + > .ant-collapse-content { + overflow: scroll; + height: 26vh; +} + +.paymentCardMain .ant-input-search .ant-input:hover, +.paymentCardMain .ant-input:hover { + border: none; + outline: none; + + &:focus { + border: none; + outline: none; + } +} + +@media (max-width: 768px) { + .BSOTPpaymentModal_main .BSOTPKiosk-dailpadModal { + padding: 2rem 0rem; + } + + .BSOTPpaymentModal_main .BSOTPpaymentChoise { + column-gap: 1rem; + } + + .BSOTPpaymentModal_main .BSOTPpaymentChoise .upi { + width: 100px; + } + + .BSOTPpaymentModal_main .BSOTPbuttonOfpay { + width: max-content; + } + + .BSOTPTitlepayment { + text-wrap: nowrap; + font-size: 19px !important; + } +} + +.BSOTPpayment-modal { + position: absolute; + top: 50%; + transform: translateY(-50%); + background: white; + width: 420px; + height: 540px; + border-radius: 12px; + box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2); + padding: 16px; + z-index: 10; +} + +.BSOTPmodal-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + // filter: blur(5px); + // pointer-events: none; + // user-select: none; + width: 70vw; + margin: 1rem 0; + font-family: 'Poppins'; + font-weight: 500; + + @media (max-width: 768px) { + width: 95vw; + } +} + +.BSOTPpayment-modal { + position: fixed; + z-index: 1000; + top: 50%; + left: 0; + right: 0; + bottom: 0; + width: 100%; + border-radius: 0; + height: 100%; + backdrop-filter: blur(5px); + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + background-color: rgba(255, 255, 255, 0.2); + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + /* for Safari */ +} + +.BSOTPpaymentclose-btn { + width: max-content; + height: max-content; + border: none; + background-color: unset; + color: #ff0000; + cursor: pointer; + font-size: 20px; + padding: 4px; +} + +.BSOTPpayment-frame { + width: 70vw; + height: 70vh; + + @media (max-width: 768px) { + width: 95vw; + height: 80vh; + } +} + +.BSOTPKioskOPTBTn { + width: 60%; + padding: 12px 16px; + font-size: 20px; + font-family: 'Poppins'; + font-weight: 400; + border: none; + outline: none; + background-color: #000000; + color: #fff; + border-radius: 10px; + cursor: pointer; + @media (max-width: 768px) { + width: 100%; + } +} + +.BSOTPotp-section { + text-align: center; + width: 100%; + + .BSOTPotp-mobile-row { + display: flex; + justify-content: center; + align-items: center; + gap: 15px; + margin-bottom: 20px; + font-family: 'Poppins'; + + .BSOTPotp-mobile-number { + font-size: 20px; + font-weight: 600; + letter-spacing: 1px; + } + + .BSOTPotp-edit-btn { + background: none; + border: none; + color: #007bff; + font-size: 14px; + cursor: pointer; + font-family: 'Poppins'; + + &:hover { + text-decoration: underline; + } + } + } + + .BSOTPotp-input-container { + display: flex; + justify-content: center; + gap: 20px; + + .BSOTP-otp-box { + width: 65px; + height: 65px; + font-size: 28px; + text-align: center; + border: 2px solid #ccc; + border-radius: 8px; + outline: none; + transition: 0.2s ease; + + &:focus { + border-color: #28a745; + box-shadow: 0 0 6px rgba(40, 167, 69, 0.4); + } + } + + .otp-box.active { + border: 2px solid #28a745; + } + } + + .BSOTPotp-buttons { + display: flex; + justify-content: center; + gap: 20px; + + button { + min-width: 140px; + padding: 12px 18px; + font-size: 16px; + font-weight: 500; + border-radius: 8px; + cursor: pointer; + transition: 0.2s ease; + font-family: 'Poppins', sans-serif !important; + display: flex; + align-items: center; + justify-content: center; + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } + } + + .verify-btn { + background-color: #28a745; + border: none; + color: #fff; + + &:hover:not(:disabled) { + background-color: #218838; + } + } + + .BSOTPresend-btn { + background-color: #ffc107; + border: none; + color: #000; + + &:hover:not(:disabled) { + background-color: #e0a800; + } + } + } +} +.BSOTPItem3Warning { + position: fixed; + top: 0%; + left: 0%; + bottom: 0; + right: 0%; + background-color: #00000096; + z-index: 100; + font-family: 'Poppins'; + font-size: 16px; + font-weight: 500; + width: 100%; + height: 100%; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + flex-direction: column; + backdrop-filter: blur(4px); + + /* Animation initial state */ + opacity: 0; + visibility: hidden; + transition: + opacity 0.3s ease, + visibility 0.3s ease; + + p { + display: flex; + box-shadow: + rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, + rgba(0, 0, 0, 0.06) 0px 0px 0px 1px; + align-items: center; + justify-content: center; + gap: 10px; + background-color: #fff; + padding: 15px 20px; + border-radius: 8px; + + /* popup animation */ + transform: scale(0.8); + transition: transform 0.3s ease; + } +} + +/* When visible */ +.BSOTPItem3Warning.showing { + opacity: 1; + visibility: visible; + + p { + transform: scale(1); + } +} + +.BSOTPinputModal { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + .input-err { + font-family: 'Poppins', sans-serif; + font-size: 12px; + margin-top: 6px; + color: rgb(224, 0, 0); + } + input { + width: 60%; + outline: none; + font-family: 'Poppins', sans-serif; + font-weight: 600; + margin: 0; + text-align: center; + height: 45px; + border-radius: 6px; + border: 1px solid #333; + font-size: 20px; + @media (max-width: 768px) { + width: 100%; + } + } +} +.BSOTPdailpad-main { + display: flex; + flex-direction: column; + row-gap: 12px; + padding: 14px 0px; + align-items: center; + overflow-x: hidden; + width: 100%; +} + +.BSOTPotp-box { + width: 55px; + height: 55px; + font-size: 24px; + text-align: center; + border: 2px solid #ccc; + border-radius: 8px; + outline: none; + transition: 0.2s ease; + font-family: 'Poppins'; + font-weight: 500; + + &:focus { + border-color: #28a745; + box-shadow: 0 0 6px rgba(40, 167, 69, 0.4); + } +} + +.BSOTPotp-box.active { + border: 2px solid #28a745; +} +.BSOTPpaymentModal-Master { + scrollbar-width: thin; + height: 90vh; + overflow: auto; +} +.optEnterResendOTP { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; +} diff --git a/src/Pages/BookingScreen/Components/UtillComponents/BSSelectCustomer.jsx b/src/Pages/BookingScreen/Components/UtillComponents/BSSelectCustomer.jsx index 58ddafc..b466313 100644 --- a/src/Pages/BookingScreen/Components/UtillComponents/BSSelectCustomer.jsx +++ b/src/Pages/BookingScreen/Components/UtillComponents/BSSelectCustomer.jsx @@ -136,8 +136,11 @@ const BSCustomerSelect = ({ TopName = null }) => { ); const BSLayout1Data = useSelector(getTemplateData); const selOption = useSelector(GlobalSelOption); + console.log(selOption, 'selOption'); const GetCustId = useSelector(GlobalCustId); + console.log(GetCustId, 'GetCustId'); const Custdisable = useSelector(GlobalSelectedCustDisable); + console.log(Custdisable, 'Custdisable'); const SessionData = useSelector(StoredSessionData); const OrderOfferDetails = useSelector( GlobalOfferAppliedProducts, diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx index 94f9589..7c5db87 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx @@ -90,7 +90,7 @@ const Printstyle4 = ({ const GlobalHsnCode = useSelector(GlobalprintHsnCode); const GlobalQrcodet = useSelector(GlobalprintQrcodet); const GlobaldummyData = useSelector(GlobalPritdummyData); - console.log(GlobaldummyData, "GlobaldummyData") + console.log(GlobaldummyData, 'GlobaldummyData'); const GlobalSignature = useSelector(GlobalprintSignature); const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions); const GlobalSignatureImages = useSelector(GlobalSignatureImage); @@ -115,7 +115,7 @@ const Printstyle4 = ({ ), ]; console.log(table2Data, 'table2Data'); - const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( (i) => i.SettingIdName === 'PrintUom' )?.[0]; const estimatePrintHeader = @@ -125,8 +125,7 @@ const Printstyle4 = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' @@ -160,7 +159,7 @@ const Printstyle4 = ({ let PaymentStatusSuccess = PaymentStatus?.filter( (ps) => ps.PaymentStatus === 'S' ); - const isEditedBill = PaymentStatus?.some(payment => { + const isEditedBill = PaymentStatus?.some((payment) => { const type = payment?.AdjustmentType?.toLowerCase(); return ( (type === 'extra' || type === 'refund') && @@ -170,7 +169,7 @@ const Printstyle4 = ({ }); const lastTransaction = PaymentStatus?.find( (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y' - ) + ); const keysLength = Object.keys(table2Data ?? {}).length; if (keysLength > 0) { @@ -200,7 +199,7 @@ const Printstyle4 = ({ const TakeawayData = table2Data?.productDetails?.filter( (item) => item.BookingTypeName?.toLowerCase() === 'takeaway' ); - console.log(TakeawayData, "TakeawayData") + console.log(TakeawayData, 'TakeawayData'); const DineInData = table2Data?.productDetails?.filter( (item) => item.BookingTypeName?.toLowerCase() === 'dine in' ); @@ -348,7 +347,7 @@ const Printstyle4 = ({ : 0; const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10); - console.log(paginatedChunks, 'paginatedChunks') + console.log(paginatedChunks, 'paginatedChunks'); return ( <> {FormatTheme ? ( @@ -375,8 +374,8 @@ const Printstyle4 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -426,7 +425,7 @@ const Printstyle4 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '} @@ -493,12 +492,12 @@ const Printstyle4 = ({ >
Dt: {GlobaldummyData ? formattedDate : Date1} - - {SalesModePref?.SettingValue == 'Y' && + {SalesModePref?.SettingValue == 'Y' && (
{' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + Name : {table2Data?.SalesMode == 'R' ? 'RT' : 'WS'}{' '} +
+ )}
@@ -506,10 +505,10 @@ const Printstyle4 = ({ {GlobaldummyData ? '51' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
{/*
{GlobaldummyData ? formattedDate : Date1}
*/} @@ -552,7 +551,7 @@ const Printstyle4 = ({ > {(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference && + {takeAwayPreference && (
TakeAway
- } + )}
{GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && } {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} {dataChunk?.map((item, index) => { - - const identifiers = item?.ProductIdentifierDtls ?? []; + const identifiers = + item?.ProductIdentifierDtls ?? []; const serials = identifiers - .filter(d => d.SerialNumber) - .map(d => d.SerialNumber); + .filter((d) => d.SerialNumber) + .map((d) => d.SerialNumber); const imeis = identifiers - .filter(d => d.IMEI1 || d.IMEI2) - .map(d => [d.IMEI1, d.IMEI2].filter(Boolean).join(", ")); + .filter((d) => d.IMEI1 || d.IMEI2) + .map((d) => + [d.IMEI1, d.IMEI2].filter(Boolean).join(', ') + ); const descriptions = identifiers - .filter(d => d.Description) - .map(d => d.Description); + .filter((d) => d.Description) + .map((d) => d.Description); - const packageList = PackageDetails?.filter( - pkg => pkg.ProdId === item.ProdId - ) ?? []; + const packageList = + PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ) ?? []; return ( - {/* SL NO */} {GlobaldummyData ? GlobalSlNo && - : SLNO && - } + : SLNO && ( + + )} {/* ITEM COLUMN */} {GlobaldummyData ? GlobalItem && : Item && ( - - ) - } + {/* Description from first identifier */} + {descriptions[0] && ( +
{descriptions[0]}
+ )} + + )} {/* Quantity */} - {(GlobaldummyData ? GlobalQuantity : Quantity) && ( - )} {/* HSN */} - {(GlobaldummyData ? GlobalHsnCode : HsnCode) && ( - )} {/* MRP */} {(GlobaldummyData ? GlobalMRP : MRP) && ( - )} {/* Discount */} - {(GlobaldummyData ? GlobalDiscount : Discount) && ( - @@ -824,20 +837,21 @@ const Printstyle4 = ({ {/* Rate */} {(GlobaldummyData ? GlobalRate : Rate) && ( - )} {/* Amount */} {(GlobaldummyData ? GlobalAmount : Amount) && ( - )} - ); })} @@ -864,138 +878,138 @@ const Printstyle4 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && } {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -1005,119 +1019,119 @@ const Printstyle4 = ({ {GlobaldummyData ? GlobalSlNo && : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); })} @@ -1167,64 +1181,40 @@ const Printstyle4 = ({ : Number(table2Data?.NetAmount).toFixed(2)} - {/*
-
-
Items
-
Qty
- {(table2Data?.OverallDisc > 0 || - TotalOfferAmount > 0) && ( -
- Off -
- )} -
Amount
-
-
-
:
-
:
- {(table2Data?.OverallDisc > 0 || - TotalOfferAmount > 0) &&
:
} -
:
-
-
-
- {GlobaldummyData - ? '8' - : totalQuantityFilter?.length} +
+
+
ITEM :
+
+ {GlobaldummyData ? '1,066' : productsData?.length}
-
- {GlobaldummyData ? '9' : totalQuantity} -
- {(table2Data?.OverallDisc > 0 || - TotalOfferAmount > 0) && ( -
- {GlobaldummyData - ? '100' - : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)}{' '} -
- )} -
+
+
+
QTY :
+
{GlobaldummyData ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} + : Number( + productsData?.reduce( + (a, b) => a + b.SalesQty, + 0 + ) + )}
-
*/} +
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( @@ -1386,17 +1376,17 @@ const Printstyle4 = ({ ' hundred' + (num % 100 ? ' ' + - (num % 100 < 20 - ? ones[num % 100] - : tens[ - Math.floor( - (num % 100) / 10 - ) - ] + - (num % 10 - ? ' ' + - ones[num % 10] - : '')) + (num % 100 < 20 + ? ones[num % 100] + : tens[ + Math.floor( + (num % 100) / 10 + ) + ] + + (num % 10 + ? ' ' + + ones[num % 10] + : '')) : '') ); return num.toString(); @@ -1616,20 +1606,38 @@ const Printstyle4 = ({
{isEditedBill && lastTransaction && ( -
+
-
- Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
+ + Bill Gross Amount + + + {(lastTransaction?.BeforeAdjustment || 0).toFixed( + 2 + )} +
{'Adjustment Amount'} - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {lastTransaction?.AdjustmentType === 'REFUND' + ? '-' + : '+'} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
-
- Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
+ + Net Bill Amount + + + {(lastTransaction?.AfterAdjustment || 0).toFixed( + 2 + )} +
@@ -1659,83 +1683,83 @@ const Printstyle4 = ({ {GlobaldummyData ? GlobalCredit && ( -
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
- {(() => { - const c = table2Data.CustomerDetails[0]; - const items = []; + table2Data?.CustomerDetails?.length > 0 && ( +
+ {(() => { + const c = table2Data.CustomerDetails[0]; + const items = []; - if ( - PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' - ) { - if (c.OldCreditBal !== 0) { + if ( + PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' + ) { + if (c.OldCreditBal !== 0) { + items.push({ + label: + c.OldCreditBal > 0 + ? 'Advance Amount' + : 'Opening Balance', + value: Math.abs(c.OldCreditBal).toFixed(2), + }); + } + } + + if (c.CurrentCreditBal !== 0) { items.push({ label: - c.OldCreditBal > 0 - ? 'Advance Amount' - : 'Opening Balance', - value: Math.abs(c.OldCreditBal).toFixed(2), + c.CurrentCreditBal > 0 + ? 'Current Advance Amount' + : 'Current Balance Amount', + value: Math.abs(c.CurrentCreditBal).toFixed( + 2 + ), }); } - } - if (c.CurrentCreditBal !== 0) { - items.push({ - label: - c.CurrentCreditBal > 0 - ? 'Current Advance Amount' - : 'Current Balance Amount', - value: Math.abs(c.CurrentCreditBal).toFixed( - 2 - ), - }); - } - - return items.map((i, idx) => ( -

- - {i.label} - - : - - {i.value} - -

- )); - })()} -
- )} + return items.map((i, idx) => ( +

+ + {i.label} + + : + + {i.value} + +

+ )); + })()} +
+ )} {/*
*/}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( @@ -1744,59 +1768,59 @@ const Printstyle4 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
- image -
- Scan to Pay{' '} +
+ image +
+ Scan to Pay{' '} +
+
+ ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed( + 2 + )} +
-
- ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
-
- ) + ) : Qrcodet && - paymentTypeUPI && ( -
- -
- Scan to Pay{' '} + paymentTypeUPI && ( +
+ +
+ Scan to Pay{' '} +
+
+ ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed( + 2 + )} +
-
- ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
-
- )} + )}
)} @@ -1808,26 +1832,29 @@ const Printstyle4 = ({ extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && ( - <> - {/*

Split Payment:

*/} - {Object.keys(aggregatedPayments).map( - (paymentType) => ( -
- {paymentType}:{' '} - {aggregatedPayments[paymentType].toFixed(2)} -
- ) - )} - - )} + {PaymentStatusSuccess?.length > 1 && + !isEditedBill && ( + <> + {/*

Split Payment:

*/} + {Object.keys(aggregatedPayments).map( + (paymentType) => ( +
+ {paymentType}:{' '} + {aggregatedPayments[paymentType].toFixed( + 2 + )} +
+ ) + )} + + )} {GlobaldummyData && GlobalCashierName && (
@@ -1902,28 +1929,28 @@ const Printstyle4 = ({
{GlobaldummyData ? GlobalIsnotes && ( -
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

-
-
- ) +
+
+ ) : Notestext && ( -
-

- {Notestext} -

+
+

+ {Notestext} +

-
-
- )} +
+
+ )}
)} @@ -1943,137 +1970,137 @@ const Printstyle4 = ({ > {GlobaldummyData ? GlobaltermsAndConditions && ( -
-

- Terms & Conditions -

-
    -
  1. - Once goods are sold, they are not - exchangeable or refundable. -
  2. -
  3. - Please check the product before leaving - the counter. -
  4. -
-
- ) - : TermsnAdCondition == true && - TermsAndConditions?.length > 0 && ( -
-

- Terms & Conditions -

-
    - {TermsAndConditions?.map((item) => ( -
  1. - {item?.TermsandConditions} +

    + Terms & Conditions +

    +
      +
    1. + Once goods are sold, they are not + exchangeable or refundable.
    2. - ))} - {/*
    3. Please check the product before leaving the counter.
    4. */} -
    -
- )} +
  • + Please check the product before leaving + the counter. +
  • + +
    + ) + : TermsnAdCondition == true && + TermsAndConditions?.length > 0 && ( +
    +

    + Terms & Conditions +

    +
      + {TermsAndConditions?.map((item) => ( +
    1. + {item?.TermsandConditions} +
    2. + ))} + {/*
    3. Please check the product before leaving the counter.
    4. */} +
    +
    + )} {GlobaldummyData ? GlobalSignature && ( -
    -

    - Signature -

    - -
    - ) +

    + Signature +

    + +
    + ) : Signature == true && ( -
    -

    - Signature -

    - -
    - )} +

    + Signature +

    + +
    + )}
    )}
    @@ -2143,51 +2170,40 @@ const Printstyle4 = ({ : Number(table2Data?.NetAmount).toFixed(2)}
    - {/*
    -
    -
    Items
    -
    Qty
    - {(table2Data?.OverallDisc > 0 || - TotalOfferAmount > 0) && ( -
    - Off -
    - )} -
    Amount
    -
    -
    -
    :
    -
    :
    - {(table2Data?.OverallDisc > 0 || - TotalOfferAmount > 0) &&
    :
    } -
    :
    -
    -
    -
    - {GlobaldummyData ? '8' : totalQuantityFilter?.length} +
    +
    +
    ITEM :
    +
    + {GlobaldummyData ? '1,066' : productsData?.length}
    -
    - {GlobaldummyData ? '9' : totalQuantity} -
    - {(table2Data?.OverallDisc > 0 || - TotalOfferAmount > 0) && ( -
    - {GlobaldummyData - ? '100' - : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)}{' '} -
    - )} -
    +
    +
    +
    QTY :
    +
    {GlobaldummyData ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} + : Number( + productsData?.reduce( + (a, b) => a + b.SalesQty, + 0 + ) + )}
    -
    */} +
    {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( @@ -2349,16 +2365,16 @@ const Printstyle4 = ({ ' hundred' + (num % 100 ? ' ' + - (num % 100 < 20 - ? ones[num % 100] - : tens[ - Math.floor( - (num % 100) / 10 - ) - ] + - (num % 10 - ? ' ' + ones[num % 10] - : '')) + (num % 100 < 20 + ? ones[num % 100] + : tens[ + Math.floor( + (num % 100) / 10 + ) + ] + + (num % 10 + ? ' ' + ones[num % 10] + : '')) : '') ); return num.toString(); @@ -2578,20 +2594,38 @@ const Printstyle4 = ({
    {isEditedBill && lastTransaction && ( -
    +
    -
    - Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    + + Bill Gross Amount + + + {(lastTransaction?.BeforeAdjustment || 0).toFixed( + 2 + )} +
    {'Adjustment Amount'} - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {lastTransaction?.AdjustmentType === 'REFUND' + ? '-' + : '+'} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    -
    - Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    + + Net Bill Amount + + + {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    @@ -2621,81 +2669,81 @@ const Printstyle4 = ({ {GlobaldummyData ? GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    - {(() => { - const c = table2Data.CustomerDetails[0]; - const items = []; + table2Data?.CustomerDetails?.length > 0 && ( +
    + {(() => { + const c = table2Data.CustomerDetails[0]; + const items = []; - if ( - PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' - ) { - if (c.OldCreditBal !== 0) { + if ( + PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' + ) { + if (c.OldCreditBal !== 0) { + items.push({ + label: + c.OldCreditBal > 0 + ? 'Advance Amount' + : 'Opening Balance', + value: Math.abs(c.OldCreditBal).toFixed(2), + }); + } + } + + if (c.CurrentCreditBal !== 0) { items.push({ label: - c.OldCreditBal > 0 - ? 'Advance Amount' - : 'Opening Balance', - value: Math.abs(c.OldCreditBal).toFixed(2), + c.CurrentCreditBal > 0 + ? 'Current Advance Amount' + : 'Current Balance Amount', + value: Math.abs(c.CurrentCreditBal).toFixed(2), }); } - } - if (c.CurrentCreditBal !== 0) { - items.push({ - label: - c.CurrentCreditBal > 0 - ? 'Current Advance Amount' - : 'Current Balance Amount', - value: Math.abs(c.CurrentCreditBal).toFixed(2), - }); - } - - return items.map((i, idx) => ( -

    - - {i.label} - - : - - {i.value} - -

    - )); - })()} -
    - )} + return items.map((i, idx) => ( +

    + + {i.label} + + : + + {i.value} + +

    + )); + })()} +
    + )}
    {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( @@ -2704,55 +2752,55 @@ const Printstyle4 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - image -
    - Scan to Pay{' '} +
    + image +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
    -
    - ) + ) : Qrcodet && - paymentTypeUPI && ( -
    - -
    - Scan to Pay{' '} + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
    -
    - )} + )}
    )}
    @@ -2763,7 +2811,7 @@ const Printstyle4 = ({ extractLastNumber(table2Data?.SalesId)}
    - {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && ( + {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> {/*

    Split Payment:

    */} {Object.keys(aggregatedPayments).map( @@ -2856,28 +2904,28 @@ const Printstyle4 = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

    -
    -
    - ) +
    +
    + ) : Notestext && ( -
    -

    - {Notestext} -

    +
    +

    + {Notestext} +

    -
    -
    - )} +
    +
    + )}
    )} @@ -2897,137 +2945,137 @@ const Printstyle4 = ({ > {GlobaldummyData ? GlobaltermsAndConditions && ( -
    -

    - Terms & Conditions -

    -
      -
    1. - Once goods are sold, they are not - exchangeable or refundable. -
    2. -
    3. - Please check the product before leaving the - counter. -
    4. -
    -
    - ) - : TermsnAdCondition == true && - TermsAndConditions?.length > 0 && ( -
    -

    - Terms & Conditions -

    -
      - {TermsAndConditions?.map((item) => ( -
    1. - {item?.TermsandConditions} +

      + Terms & Conditions +

      +
        +
      1. + Once goods are sold, they are not + exchangeable or refundable.
      2. - ))} - {/*
      3. Please check the product before leaving the counter.
      4. */} -
      -
    - )} +
  • + Please check the product before leaving the + counter. +
  • + +
    + ) + : TermsnAdCondition == true && + TermsAndConditions?.length > 0 && ( +
    +

    + Terms & Conditions +

    +
      + {TermsAndConditions?.map((item) => ( +
    1. + {item?.TermsandConditions} +
    2. + ))} + {/*
    3. Please check the product before leaving the counter.
    4. */} +
    +
    + )} {GlobaldummyData ? GlobalSignature && ( -
    -

    - Signature -

    - -
    - ) +

    + Signature +

    + +
    + ) : Signature == true && ( -
    -

    - Signature -

    - -
    - )} +

    + Signature +

    + +
    + )}
    )}
    @@ -3110,18 +3158,18 @@ const Printstyle4 = ({ {GlobaldummyData ? 'BranchAddress, Town- 635XXX City - State' : (table2Data?.AddressDetails?.[0]?.Address1 || '') + - (table2Data?.AddressDetails?.[0]?.City - ? (table2Data?.AddressDetails?.[0]?.Address1 && - table2Data?.AddressDetails?.[0]?.City - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.City - : '') + - (table2Data?.AddressDetails?.[0]?.Zip - ? (table2Data?.AddressDetails?.[0]?.City && - table2Data?.AddressDetails?.[0]?.Zip - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.Zip - : '')} + (table2Data?.AddressDetails?.[0]?.City + ? (table2Data?.AddressDetails?.[0]?.Address1 && + table2Data?.AddressDetails?.[0]?.City + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.City + : '') + + (table2Data?.AddressDetails?.[0]?.Zip + ? (table2Data?.AddressDetails?.[0]?.City && + table2Data?.AddressDetails?.[0]?.Zip + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.Zip + : '')}
    {' '} @@ -3149,12 +3197,9 @@ const Printstyle4 = ({ >
    Dt: {GlobaldummyData ? formattedDate : Date1} - - {SalesModePref?.SettingValue == 'Y' && -
    - {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
    } + {SalesModePref?.SettingValue == 'Y' && ( +
    Name : {table2Data?.SalesMode == 'R' ? 'RT' : 'WS'}
    + )}
    @@ -3162,10 +3207,10 @@ const Printstyle4 = ({ {GlobaldummyData ? '51' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
    @@ -3203,7 +3248,7 @@ const Printstyle4 = ({
    {(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference && + {takeAwayPreference && (
    Take Away
    - } + )}
    ###ItemItem - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
    {index + 1}{chunkIndex * chunkSize + index + 1} + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} - {/* Product Name */} -
    {item?.ProdName}
    +
    + {/* Product Name */} +
    {item?.ProdName}
    - {/* Package OR Size */} - {packageList.length > 0 ? ( -
    - {packageList.map((pkg, i) => ( -
    - {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType}) -
    - ))} -
    - ) : ( -
    - {(UomPrint?.SettingValue === 'Y' - ? (item?.Size || '1') + - (item?.SinglePc === 'Y' - ? ' PCS' - : item?.Type !== 'C' - ? ` ${item?.UomName}` - : ' COMBO') - : '')} - {item?.BrandName || ""} -
    - )} + {/* Package OR Size */} + {packageList.length > 0 ? ( +
    + {packageList.map((pkg, i) => ( +
    + {pkg.ParcelCount} PCS{' '} + {pkg.ParcelQty} PACK ( + {pkg.ParcelType}) +
    + ))} +
    + ) : ( +
    + {UomPrint?.SettingValue === 'Y' + ? (item?.Size || '1') + + (item?.SinglePc === 'Y' + ? ' PCS' + : item?.Type !== 'C' + ? ` ${item?.UomName}` + : ' COMBO') + : ''} + {item?.BrandName || ''} +
    + )} - {/* Serials */} - {serials.map((s, i) => ( -
    {s}
    - ))} + {/* Serials */} + {serials.map((s, i) => ( +
    {s}
    + ))} - {/* IMEIs */} - {imeis.map((iVal, i) => ( -
    {iVal}
    - ))} + {/* IMEIs */} + {imeis.map((iVal, i) => ( +
    {iVal}
    + ))} - {/* Description from first identifier */} - {descriptions[0] && ( -
    {descriptions[0]}
    - )} -
    + {(GlobaldummyData + ? GlobalQuantity + : Quantity) && ( + {item?.SalesQty} + {(GlobaldummyData + ? GlobalHsnCode + : HsnCode) && ( + {item?.HSN} - {item?.SinglePc === "Y" ? item?.Rate : item?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} - {item?.Type !== "C" + {(GlobaldummyData + ? GlobalDiscount + : Discount) && ( + + {item?.Type !== 'C' ? item?.OfferAmt || 0 : item?.OfferValue || 0} + {item?.Rate} - {item?.Type !== "C" - ? (item?.TotalAmt || 0) - (item?.OfferAmt || 0) - : (item?.TotalAmt || 0) - (item?.OfferValue || 0)} + + {item?.Type !== 'C' + ? (item?.TotalAmt || 0) - + (item?.OfferAmt || 0) + : (item?.TotalAmt || 0) - + (item?.OfferValue || 0)}
    ###ItemItem - Qty - + Qty + - Qty - + Qty + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
    {index + 1} - {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} -
    {item?.ProdName}
    - {UomPrint?.SettingValue === 'Y' && -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    - } -
    +
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + )} +
    - {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {' '} - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - + {' '} + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
    @@ -3230,48 +3275,48 @@ const Printstyle4 = ({ : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {/* {GlobaldummyData ? GlobalTax && ( - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -3329,212 +3374,246 @@ const Printstyle4 = ({ {GlobaldummyData ? GlobalItem && : Item && ( - - )} + {/* Description from first identifier */} + {item?.ProductIdentifierDtls?.find( + (d) => + d.SerialNumber || d.IMEI1 || d.IMEI2 + )?.Description && ( +
    + { + item.ProductIdentifierDtls.find( + (d) => + d.SerialNumber || + d.IMEI1 || + d.IMEI2 + ).Description + } +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + {/* Description from first identifier */} + {item?.ProductIdentifierDtls?.find( + (d) => + d.SerialNumber || + d.IMEI1 || + d.IMEI2 + )?.Description && ( +
    + { + item.ProductIdentifierDtls.find( + (d) => + d.SerialNumber || + d.IMEI1 || + d.IMEI2 + ).Description + } +
    + )} + + ) : ( +
    + {UomPrint?.SettingValue === 'Y' && ( + <> + ({item?.Size || '1'}){' '} + {item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO'}{' '} + + )} + {item?.BrandName || ''} +
    + )} + + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - ) - : Tax == true && - table2Data?.OrderType !== 'E' && ( - - )} - - )} + + ) + : Tax == true && + table2Data?.OrderType !== 'E' && ( + + )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); } @@ -3569,48 +3648,48 @@ const Printstyle4 = ({ : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {/* {GlobaldummyData ? GlobalTax && ( - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -3668,159 +3747,160 @@ const Printstyle4 = ({ {GlobaldummyData ? GlobalItem && : Item && ( - - )} + ? ` ${ + item.ProductIdentifierDtls.find( + (item1) => + item1.IMEI1 || + item1.IMEI2 || + item1.SerialNumber + ).Description + }` + : '') + ).trim()} + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax == true && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); } @@ -3841,7 +3921,6 @@ const Printstyle4 = ({ )}
    -
    - {/*
    -
    OVER ALL QTY
    -
    - {GlobaldummyData - ? '1,066' - : Number(productsData?.reduce((a, b) => a + b.SalesQty, 0))} -
    -
    */} +
    -
    +
    ITEM :
    -
    - {GlobaldummyData - ? '1,066' - : productsData?.length} -
    +
    {GlobaldummyData ? '1,066' : productsData?.length}
    -
    +
    QTY :
    {GlobaldummyData @@ -3914,51 +3969,7 @@ const Printstyle4 = ({ : Number(productsData?.reduce((a, b) => a + b.SalesQty, 0))}
    -
    - - {/*
    -
    -
    Items
    -
    Qty
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( -
    - Off -
    - )} -
    Amount
    -
    -
    -
    :
    -
    :
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( -
    :
    - )} -
    :
    -
    -
    -
    - {GlobaldummyData ? '8' : totalQuantityFilter?.length} -
    -
    - {GlobaldummyData ? '9' : totalQuantity} -
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( -
    - {GlobaldummyData - ? '100' - : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)}{' '} -
    - )} -
    - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
    -
    -
    */}
    {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( @@ -4111,14 +4122,14 @@ const Printstyle4 = ({ ' hundred' + (num % 100 ? ' ' + - (num % 100 < 20 - ? ones[num % 100] - : tens[ - Math.floor((num % 100) / 10) - ] + - (num % 10 - ? ' ' + ones[num % 10] - : '')) + (num % 100 < 20 + ? ones[num % 100] + : tens[ + Math.floor((num % 100) / 10) + ] + + (num % 10 + ? ' ' + ones[num % 10] + : '')) : '') ); return num.toString(); @@ -4334,20 +4345,33 @@ const Printstyle4 = ({
    {isEditedBill && lastTransaction && ( -
    +
    -
    - Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    + + Bill Gross Amount + + + {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    {'Adjustment Amount'} {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    -
    - Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    + + Net Bill Amount + + + {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    )} {GlobaldummyData ? GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    - {(() => { - const c = table2Data.CustomerDetails[0]; - const items = []; + table2Data?.CustomerDetails?.length > 0 && ( +
    + {(() => { + const c = table2Data.CustomerDetails[0]; + const items = []; - if ( - PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit' - ) { - if (c.OldCreditBal !== 0) { + if ( + PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit' + ) { + if (c.OldCreditBal !== 0) { + items.push({ + label: + c.OldCreditBal > 0 + ? 'Advance Amount' + : 'Opening Balance', + value: Math.abs(c.OldCreditBal).toFixed(2), + }); + } + } + + if (c.CurrentCreditBal !== 0) { items.push({ label: - c.OldCreditBal > 0 - ? 'Advance Amount' - : 'Opening Balance', - value: Math.abs(c.OldCreditBal).toFixed(2), + c.CurrentCreditBal > 0 + ? 'Current Advance Amount' + : 'Current Balance Amount', + value: Math.abs(c.CurrentCreditBal).toFixed(2), }); } - } - if (c.CurrentCreditBal !== 0) { - items.push({ - label: - c.CurrentCreditBal > 0 - ? 'Current Advance Amount' - : 'Current Balance Amount', - value: Math.abs(c.CurrentCreditBal).toFixed(2), - }); - } - - return items.map((i, idx) => ( -

    - {i.label} - : - {i.value} -

    - )); - })()} -
    - )} + return items.map((i, idx) => ( +

    + {i.label} + : + {i.value} +

    + )); + })()} +
    + )}
    {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( @@ -4457,62 +4493,61 @@ const Printstyle4 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - image -
    Scan to Pay
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} +
    + image +
    Scan to Pay
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - ) + ) : Qrcodet && - paymentTypeUPI && ( -
    - -
    Scan to Pay
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} + paymentTypeUPI && ( +
    + +
    Scan to Pay
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - )} + )}
    )}
    - {/*
    Scan to Pay
    */}
    YOUR ORDER NO: {table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && ( + {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> {/*

    Split Payment:

    */} {Object.keys(aggregatedPayments).map((paymentType) => ( @@ -4596,21 +4631,21 @@ const Printstyle4 = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

    -
    -
    - ) +
    +
    + ) : Notestext && ( -
    -

    {Notestext}

    +
    +

    {Notestext}

    -
    -
    - )} +
    +
    + )}
    )} @@ -4630,136 +4665,136 @@ const Printstyle4 = ({ > {GlobaldummyData ? GlobaltermsAndConditions && ( -
    -

    - Terms & Conditions -

    -
      -
    1. - Once goods are sold, they are not exchangeable or - refundable. -
    2. -
    3. - Please check the product before leaving the counter. -
    4. -
    -
    - ) - : TermsnAdCondition == true && - TermsAndConditions?.length > 0 && ( -
    -

    - Terms & Conditions -

    -
      - {TermsAndConditions?.map((item) => ( -
    1. - {item?.TermsandConditions} +

      + Terms & Conditions +

      +
        +
      1. + Once goods are sold, they are not exchangeable or + refundable.
      2. - ))} - {/*
      3. Please check the product before leaving the counter.
      4. */} -
      -
    - )} +
  • + Please check the product before leaving the counter. +
  • + +
    + ) + : TermsnAdCondition == true && + TermsAndConditions?.length > 0 && ( +
    +

    + Terms & Conditions +

    +
      + {TermsAndConditions?.map((item) => ( +
    1. + {item?.TermsandConditions} +
    2. + ))} + {/*
    3. Please check the product before leaving the counter.
    4. */} +
    +
    + )} {GlobaldummyData ? GlobalSignature && ( -
    -

    - Signature -

    - -
    - ) +

    + Signature +

    + +
    + ) : Signature == true && ( -
    -

    - Signature -

    - -
    - )} +

    + Signature +

    + +
    + )}
    )}
    diff --git a/src/Pages/BookingScreen/Template/PaymentOptions.js b/src/Pages/BookingScreen/Template/PaymentOptions.js index 4d8790a..334b50b 100644 --- a/src/Pages/BookingScreen/Template/PaymentOptions.js +++ b/src/Pages/BookingScreen/Template/PaymentOptions.js @@ -192,12 +192,25 @@ export const usePaymentOptions = ({ AppId, CompId, BranchId, UserId }) => { ) === undefined && Pay_at_the_counter !== undefined; - if (UpiCondition) { + let BusinessUPI = Formated_Payment_Details?.find((item) => item.OptionName == 'Business Upi') + if (UpiCondition || BusinessUPI) { let UpiDetailsResponse = await dispatch( getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'U' }) ).unwrap(); + let BusinessUpi = await dispatch( + getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'BU' }) + ).unwrap(); + let data = BusinessUpi?.data?.data + const hasNonUPI = Formated_Payment_Details + ?.find(item => item.OptionName === 'Pay at the counter') + ?.ModeDetails + ?.every(e => e?.ModeName !== "UPI"); + + const hasChooseBusinessUpi = Formated_Payment_Details + ?.find(item => item.OptionName === 'Business Upi') + ?.ModeDetails if ( - UpiDetailsResponse?.data?.statusCode === 0 && + UpiDetailsResponse?.data?.statusCode === 0 && BusinessUpi?.data?.statusCode === 0 && BusinessUpi?.data?.data?.length === 0 && UpiDetailsResponse?.data?.data?.length === 0 ) { Formated_Payment_Details = Formated_Payment_Details.map((item) => { @@ -210,6 +223,62 @@ export const usePaymentOptions = ({ AppId, CompId, BranchId, UserId }) => { return item; }); } + else if (BusinessUpi?.data?.data?.length === 1 && hasNonUPI && hasChooseBusinessUpi) { + Formated_Payment_Details = Formated_Payment_Details.map((item) => { + if (item.OptionName === 'Pay at the counter') { + let reqDatfromBusinessUpi = BusinessUPI?.ModeDetails?.[0] + + return { + ...item, + ModeDetails: [ + ...item?.ModeDetails, + { + "PaymentOptionId": reqDatfromBusinessUpi?.PaymentOptionId, + "PaymentModeId": reqDatfromBusinessUpi?.PaymentModeId, + "ModeId": reqDatfromBusinessUpi?.ModeId, + "ModeName": "UPI", + "ModeDefault": "Y", + "ModeImage": "", + "PayOpt": null, + "CardType": null, + "MerchantUPIId": null, + "MerchantMobile": null, + "MerchantNumber": null, + "RefreshToken": null, + "Token": null, + "MerchantId": null, + "ActiveStatus": reqDatfromBusinessUpi?.ActiveStatus, + "CreatedBy": 0, + "CreatedDate": "2026-03-03T19:07:54.393", + "UpdatedBy": null, + "UpdatedDate": null, + "MethodDetails": [] + } + ], + }; + } + + // IMPORTANT: return other items unchanged + return item; + }); + } + else if (UpiDetailsResponse?.data?.statusCode === 0 && UpiDetailsResponse?.data?.data?.length === 0) { + Formated_Payment_Details = Formated_Payment_Details.map((item) => { + if (item.OptionName === 'Pay at the counter') { + return { + ...item, + ModeDetails: Pay_at_the_counter_witoutUPIMode, + }; + } + return item; + }); + + } + + + + //// + } if ( diff --git a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx index 6275047..3329419 100644 --- a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx +++ b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx @@ -968,16 +968,6 @@ const KioskPayment = (props) => { }; await dispatch(sendSms(postData)); } - const goFullScreen = () => { - const elem = document.documentElement; - - if (!document.fullscreenElement) { - elem.requestFullscreen?.().catch((err) => { - console.log("Fullscreen error:", err); - }); - } - }; - goFullScreen(); clearAllStates(); } else { if ( @@ -1954,7 +1944,7 @@ const KioskPayment = (props) => { open={open} handleCancel={!selectedPaymentOption && HandleCloseModal} footer={false} - width={width > 768 ? 900 : 700} + width={width > 768 ? 800 : 600} children={ showPaymentGatewayOptions ? (
    diff --git a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.scss b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.scss index 0e9d260..9e27acb 100644 --- a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.scss +++ b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.scss @@ -560,4 +560,5 @@ } } } -} \ No newline at end of file +} + diff --git a/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx b/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx index ba1ed67..5eda141 100644 --- a/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx +++ b/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx @@ -31,6 +31,7 @@ import { DefaultModal } from '../../../Components/Modal/DefaultModal.jsx'; import { DropDowns } from '../../../Components/Forms/DropDown.jsx'; import { useAuth } from '../../../AuthContext.jsx'; import { FeatureAddon } from '../../../Features/BookingScreen/BookingData/BookingData.js'; + import "../../../Pages/openingStock/openingStockForm.scss" const PaymentDetailsList = () => { const { SadminuserAccess } = useAuth(); diff --git a/src/Pages/Preference/PreferenceList.jsx b/src/Pages/Preference/PreferenceList.jsx index 25a14aa..40f3989 100644 --- a/src/Pages/Preference/PreferenceList.jsx +++ b/src/Pages/Preference/PreferenceList.jsx @@ -67,6 +67,7 @@ const PreferenceList = () => { dashboard: allSettingsMap['dashboard']?.value === 'Y', shortcutkeys: allSettingsMap['shortcutkeys']?.value === 'Y', autoreceivestock: allSettingsMap['autoreceivestock']?.value === 'Y', + salespageaskiosk: allSettingsMap['salespageaskiosk']?.value === 'Y', kioskotp: allSettingsMap['kioskotp']?.value === 'Y', decimal: allSettingsMap['decimal']?.value === 'Y', enabledModules: [ @@ -308,6 +309,7 @@ const PreferenceList = () => { dashboard: values.dashboard, shortcutkeys: values.shortcutkeys, autoreceivestock: values.autoreceivestock, + salespageaskiosk: values.salespageaskiosk, kioskotp: values.kioskotp, decimal: values.decimal, searchfocus: values.searchfocus, @@ -512,6 +514,10 @@ const PreferenceList = () => { {renderCheckbox( 'decimal', 'Display values with 2 decimal places throughout the app?' + )} + {renderCheckbox( + 'salespageaskiosk', + 'Do you want to open sales page as kiosk layout?' )} {(allSettingsMap['onlineindividualslots'] !== undefined || allSettingsMap['allow individual booking'] !== undefined || diff --git a/src/Pages/UpiDetails/UpiDetailslist.jsx b/src/Pages/UpiDetails/UpiDetailslist.jsx index 68a4cb5..5feeaae 100644 --- a/src/Pages/UpiDetails/UpiDetailslist.jsx +++ b/src/Pages/UpiDetails/UpiDetailslist.jsx @@ -23,6 +23,7 @@ import { } from '../../Features/UpiDetails/UpiDetails.js'; import { changeBreadCrumb } from '../../Features/AppPage/CenterPage.js'; import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx'; + import "../../Pages/openingStock/openingStockForm.scss" const UpiDetailslist = () => { const navigateTo = useNavigate(); diff --git a/src/Pages/openingStock/openingStockForm.scss b/src/Pages/openingStock/openingStockForm.scss index 338ade5..a791dfa 100644 --- a/src/Pages/openingStock/openingStockForm.scss +++ b/src/Pages/openingStock/openingStockForm.scss @@ -299,3 +299,12 @@ .purchase-entry-form { width: 100%; } +.otpInput { + width: 2.5rem !important; + height: 2.5rem; + margin: 0 0.14rem; + font-size: 1rem; + text-align: center; + border-radius: 4px; + border: 1px solid rgba(0, 0, 0, 0.3); +} \ No newline at end of file diff --git a/src/Styles/Payment/PaymentDetails/PaymentDetails.scss b/src/Styles/Payment/PaymentDetails/PaymentDetails.scss index a295e1f..0627393 100644 --- a/src/Styles/Payment/PaymentDetails/PaymentDetails.scss +++ b/src/Styles/Payment/PaymentDetails/PaymentDetails.scss @@ -30,6 +30,7 @@ display: flex; flex-direction: row; column-gap: 0.5rem; + margin-top: 10px; } .defaultandCustomisedTheme { diff --git a/src/Styles/UpiDetails/upidetails.scss b/src/Styles/UpiDetails/upidetails.scss index 8789f38..3ff2191 100644 --- a/src/Styles/UpiDetails/upidetails.scss +++ b/src/Styles/UpiDetails/upidetails.scss @@ -27,8 +27,8 @@ display: flex; flex-direction: row; column-gap: 0.5rem; + margin-top: 10px; } - // Branch Login Design by Vicky .branchLoginMaster {
    Item - Qty - + Qty + - Qty - + Qty + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
    {item?.ProdName} -
    {item?.ProdName}
    +
    +
    {item?.ProdName}
    - {/* Serial Numbers */} - {item?.ProductIdentifierDtls - ?.filter(d => d.SerialNumber) - ?.map((d, i) => ( + {/* Serial Numbers */} + {item?.ProductIdentifierDtls?.filter( + (d) => d.SerialNumber + )?.map((d, i) => (
    {d.SerialNumber}
    ))} - {/* IMEI Numbers */} - {item?.ProductIdentifierDtls - ?.filter(d => d.IMEI1 || d.IMEI2) - ?.map((d, i) => ( + {/* IMEI Numbers */} + {item?.ProductIdentifierDtls?.filter( + (d) => d.IMEI1 || d.IMEI2 + )?.map((d, i) => (
    - {[d.IMEI1, d.IMEI2].filter(Boolean).join(", ")} + {[d.IMEI1, d.IMEI2] + .filter(Boolean) + .join(', ')}
    ))} - {/* Description from first identifier */} - {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( -
    - {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description} -
    - )} -
    - {item?.SalesQty} + + {item?.SalesQty} -
    - - {/* Package Details */} - {PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId).length > 0 ? ( -
    - {PackageDetails - ?.filter(pkg => pkg.ProdId === item.ProdId) - ?.map((pkg, index) => ( +
    + {/* Package Details */} + {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
    + {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + )?.map((pkg, index) => (
    - {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType}) + {pkg.ParcelCount} PCS{' '} + {pkg.ParcelQty} PACK ( + {pkg.ParcelType})
    ))} - {/* Serial */} - {item?.ProductIdentifierDtls - ?.filter(d => d.SerialNumber) - ?.map((d, i) => ( + {/* Serial */} + {item?.ProductIdentifierDtls?.filter( + (d) => d.SerialNumber + )?.map((d, i) => (
    {d.SerialNumber}
    ))} - {/* IMEI */} - {item?.ProductIdentifierDtls - ?.filter(d => d.IMEI1 || d.IMEI2) - ?.map((d, i) => ( + {/* IMEI */} + {item?.ProductIdentifierDtls?.filter( + (d) => d.IMEI1 || d.IMEI2 + )?.map((d, i) => (
    - {[d.IMEI1, d.IMEI2].filter(Boolean).join(', ')} + {[d.IMEI1, d.IMEI2] + .filter(Boolean) + .join(', ')}
    ))} - {/* Description from first identifier */} - {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( -
    - {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description} -
    - )} - -
    - ) : ( -
    - {UomPrint?.SettingValue === 'Y' && ( - <>({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'} - )} - {item?.BrandName || ""} -
    - )} - -
    -
    - {item?.SalesQty} - + {item?.SalesQty} + - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - {GlobaldummyData - ? GlobalTax && ( - - {/* */} - - GST:{' '} - {' '} - {item?.ProdTaxPercentage || 0} - - {/* */} - - GST:{' '} - {' '} - {item?.ProdTaxPercentage || 0} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + {GlobaldummyData + ? GlobalTax && ( + + {/* */} + + GST:{' '} + {' '} + {item?.ProdTaxPercentage || 0} + + {/* */} + + GST:{' '} + {' '} + {item?.ProdTaxPercentage || 0} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {' '} - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - + {' '} + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
    Item - Qty - + Qty + - Qty - + Qty + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
    {item?.ProdName} -
    {item?.ProdName}
    - {( - (item?.ProductIdentifierDtls - ?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (items) => items.SerialNumber - ) - .map( - (a, index) => - ` ${a.SerialNumber}` - ) - .join('') - : '') + - (item?.ProductIdentifierDtls - ?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 || item1.IMEI2 - ) - .map((item2) => { - const imei1 = - item2.IMEI1 || ''; - const imei2 = - item2.IMEI2 || ''; - return ` ${[imei1, imei2].filter(Boolean).join(',')}`; - }) - .join('') - : '') - + - (item?.ProductIdentifierDtls?.length > 0 && +
    +
    {item?.ProdName}
    + {( + (item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (items) => items.SerialNumber + ) + .map( + (a, index) => ` ${a.SerialNumber}` + ) + .join('') + : '') + + (item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 || item1.IMEI2 + ) + .map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ` ${[imei1, imei2].filter(Boolean).join(',')}`; + }) + .join('') + : '') + + (item?.ProductIdentifierDtls?.length > + 0 && item?.ProductIdentifierDtls.find( (item1) => - item1.IMEI1 || item1.IMEI2 || item1.SerialNumber + item1.IMEI1 || + item1.IMEI2 || + item1.SerialNumber )?.Description - ? ` ${item.ProductIdentifierDtls.find( - (item1) => - item1.IMEI1 || item1.IMEI2 || item1.SerialNumber - ).Description}` - : '') - ).trim()} -
    - {item?.SalesQty} -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    -
    + {item?.SalesQty} +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    +
    - {item?.SalesQty} - {UomPrint?.SettingValue === 'Y' && -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    - } -
    + {item?.SalesQty} + {UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + )} +
    - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {' '} - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - + {' '} + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +