Merge pull request 'Imei modal' (#207) from Imeimodal into main

Reviewed-on: Pozomind/pozo-retail-app#207
This commit is contained in:
karthikalakshmi 2026-03-03 10:14:25 +05:30
commit 13940b3344
16 changed files with 1468 additions and 1324 deletions

View File

@ -106,6 +106,11 @@ const BSBillingTable1 = () => {
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y'
);
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId;
@ -2252,8 +2257,7 @@ const BSBillingTable1 = () => {
{OldtableDataTakeAway?.map((item, index) => (
<tr
key={index}
className={`${
item?.SalesId && OrderType !== 'Hold'
className={`${item?.SalesId && OrderType !== 'Hold'
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
@ -2348,8 +2352,9 @@ const BSBillingTable1 = () => {
textAlign: 'left',
}}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -2548,8 +2553,7 @@ const BSBillingTable1 = () => {
{OldtableDataDinein?.map((item, index) => (
<tr
key={OldtableDataTakeAway?.length + index}
className={`${
item?.SalesId
className={`${item?.SalesId
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
@ -2845,8 +2849,7 @@ const BSBillingTable1 = () => {
OldtableDataTakeAway?.length +
index
}
className={`${
BookingType === 'Dine In' && item?.SalesId
className={`${BookingType === 'Dine In' && item?.SalesId
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
@ -2979,8 +2982,9 @@ const BSBillingTable1 = () => {
textAlign: 'left',
}}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -3191,8 +3195,7 @@ const BSBillingTable1 = () => {
tableDataTakeAway?.length +
index
}
className={`${
BookingType === 'Dine In' && item?.SalesId
className={`${BookingType === 'Dine In' && item?.SalesId
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}

View File

@ -91,6 +91,12 @@ const BsBill2 = () => {
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
setting?.SettingValue === 'Y'
);
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
console.log(imeiModal, "imeiModalimeiModal")
const [count, setCount] = useState(1);
const ReorderProductData = useSelector(GlobalReorderProductDetails);
const CartOrderDetails = useSelector(GlobalOrderCardDetails);
@ -1379,7 +1385,7 @@ const BsBill2 = () => {
style={{ fontFamily: SelectedFont }}
onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0) &&
item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
handleImeiDetails(item)
}
>
@ -1848,7 +1854,7 @@ const BsBill2 = () => {
style={{ fontFamily: SelectedFont }}
onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0) &&
item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
handleImeiDetails(item)
}
>

View File

@ -147,6 +147,11 @@ const BSBillingTable3 = () => {
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
const tableDataDinein = tableData?.filter(
(a, b) => a.BookingTypeName === 'Dine In' && !a?.SalesId
@ -2492,8 +2497,9 @@ const BSBillingTable3 = () => {
className="Table3-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -3086,8 +3092,9 @@ const BSBillingTable3 = () => {
className="Table3-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item, index)
}

View File

@ -104,6 +104,11 @@ const BSBillingTable4 = () => {
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(item) => item.SettingIdName === 'BillItemsOrder'
)?.SettingValue;
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId;
@ -2484,8 +2489,8 @@ const BSBillingTable4 = () => {
className="Table4-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -3068,8 +3073,8 @@ const BSBillingTable4 = () => {
className="Table4-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item, index)
}

View File

@ -109,6 +109,11 @@ const BsBill = () => {
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
setting?.SettingValue === 'Y'
);
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
const [count, setCount] = useState(1);
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
@ -3393,8 +3398,8 @@ const BsBill = () => {
<td
className="BSBillingTable5-table-td for-combo"
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -4061,8 +4066,8 @@ const BsBill = () => {
<td
className="BSBillingTable5-table-td for-combo"
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}

View File

@ -137,6 +137,11 @@ const BSBillingTable6 = () => {
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(item) => item.SettingIdName === 'BillItemsOrder'
)?.SettingValue;
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
const OrderType = useSelector(GlobalOrderType);
const GlobEstBooking = useSelector(GlobalEstimateBooking);
@ -1485,7 +1490,7 @@ const BSBillingTable6 = () => {
CompleteRemove: true,
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
BuyInwardDtlId: null,
OrderRate:isPaidProductAvailableInCart?.OrderRate,
OrderRate: isPaidProductAvailableInCart?.OrderRate,
Offer: 0,
});
} else if (
@ -1570,7 +1575,7 @@ const BSBillingTable6 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate,
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: freeProdList?.OverAllFreeQty,
@ -2304,8 +2309,8 @@ const BSBillingTable6 = () => {
className="BillingTable6-table-td for-combo"
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -2855,8 +2860,8 @@ const BSBillingTable6 = () => {
className="BillingTable6-table-td for-combo"
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}

View File

@ -158,6 +158,11 @@ const BSBillingTable7 = () => {
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
setting?.SettingValue === 'Y'
);
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
useEffect(() => {
if (SelectedFont) {
WebFont.load({
@ -2730,7 +2735,7 @@ const BSBillingTable7 = () => {
}}
onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0) &&
item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
handleImeiDetails(item)
}
>

View File

@ -14,6 +14,8 @@ import {
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
import { useDispatch, useSelector } from 'react-redux';
import { validateSafeInput } from '../../../../../Services/Others';
import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
import "../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss"
const BSImeiDetails = (props) => {
const formRef = useRef(null);
const dispatch = useDispatch();
@ -26,7 +28,7 @@ const BSImeiDetails = (props) => {
const [SerialNumberList, setSerialNumberList] = useState([]);
const [IMEINumberList, setIMEINumberList] = useState([]);
console.log(SerialNumberList, IMEINumberList, 'SerialNumberList');
console.log(props, 'propsprops');
useEffect(() => {
let productidentifier = ProductDetail?.ProductIdentifierDtls
? ProductDetail?.ProductIdentifierDtls
@ -47,12 +49,17 @@ const BSImeiDetails = (props) => {
return [imei1, imei2].filter(Boolean).join(',');
})
);
formRef?.current?.setFieldsValue({
description: productidentifier?.[0]?.Description || "",
})
}, []);
const CloseDeviceDetailModal = () => {
props.handleDeviceDetailClose();
};
const ChangeRadioOption = (data) => {
setRadioBtnSelection(data);
formRef.current?.resetFields(['SerialNumber', 'SerialNumbertext', 'IMEINumber', 'IMEINumbertext']);
};
const SerialNumberOnchange = (e) => {
console.log(e, SerialNumberList, 'SerialNumberOnchange');
@ -65,7 +72,8 @@ const BSImeiDetails = (props) => {
} else {
setSerialNumberList([...SerialNumberList, e]);
}
} else {
}
else {
setMessageType('error');
setMessageData('Already Selected ');
}
@ -83,7 +91,7 @@ const BSImeiDetails = (props) => {
}
} else {
setMessageType('error');
setMessageData('Already Selected');
setMessageData('you cant enter more than Order Qty');
}
formRef.current?.resetFields();
@ -115,7 +123,7 @@ const BSImeiDetails = (props) => {
}
} else {
setMessageType('error');
setMessageData('Already Selected');
setMessageData('you cant enter more than Order Qty');
}
formRef.current?.resetFields();
};
@ -131,6 +139,8 @@ const BSImeiDetails = (props) => {
setMessageType(null);
}, []);
const AddDeviceDetails = () => {
console.log(formRef?.current?.getFieldsValue, "formRef?.current?.getFieldsValue")
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
// Create the new object array
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
@ -143,6 +153,7 @@ const BSImeiDetails = (props) => {
IMEI1: imeiPair[0] || '', // First IMEI number
IMEI2: imeiPair[1] || '', // Second IMEI number
MacId: '', // Default empty macid
Description: formRef.current?.getFieldsValue()?.description || '',
};
});
console.log(IdentifyDetails, 'IdentifyDetails');
@ -226,6 +237,7 @@ const BSImeiDetails = (props) => {
{RadioBtnSelection == 'Serial' && (
<div>
<div className="SerialNumberColumn">
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
<Form.Item name="SerialNumber">
<DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter(
@ -246,12 +258,18 @@ const BSImeiDetails = (props) => {
onChangeFunction={(e) => SerialNumberOnchange(e)}
/>
</Form.Item>
}
<Form.Item
name="SerialNumbertext"
rules={[
{
validator: async (_, value) => {
await validateSafeInput(value); // To block HTML tags & SQL keywords
if (value && !/^\d+$/.test(value)) {
return Promise.reject('Please enter only numbers');
}
await validateSafeInput(value);
return Promise.resolve();
},
},
@ -260,13 +278,16 @@ const BSImeiDetails = (props) => {
<InputField
field="SerialNumbertext"
name="SerialNumbertext"
// value={NewPrice1}
label="Serial Number"
fieldState={true}
fieldApi={true}
// id="error2"
autocomplete="off"
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
type="number"
onKeyDown={(e) => {
if (['e', 'E', '+', '-', '.'].includes(e.key)) {
e.preventDefault();
}
}}
/>
</Form.Item>
<Buttons
@ -277,6 +298,7 @@ const BSImeiDetails = (props) => {
></Buttons>
</div>
<div>Serial Number:</div>
<div className="SerialNumber-Selected">
{SerialNumberList?.map((item, index) => (
<div key={index}>
@ -292,9 +314,12 @@ const BSImeiDetails = (props) => {
</div>
</div>
)}
{RadioBtnSelection == 'IMEI' && (
<div>
<div className="SerialNumberColumn">
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
<Form.Item name="IMEINumber">
<DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter(
@ -317,13 +342,17 @@ const BSImeiDetails = (props) => {
className="field-DropDown"
onChangeFunction={(e) => IMEINumberOnchange(e)}
/>
</Form.Item>
</Form.Item>}
<Form.Item
name="IMEINumbertext"
rules={[
{
validator: async (_, value) => {
await validateSafeInput(value); // To block HTML tags & SQL keywords
if (value && !/^\d+$/.test(value)) {
return Promise.reject('Please enter only numbers');
}
await validateSafeInput(value);
return Promise.resolve();
},
},
@ -335,9 +364,13 @@ const BSImeiDetails = (props) => {
label="IMEI Number"
fieldState={true}
fieldApi={true}
// id="error2"
autocomplete="off"
// OnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
type="number"
onKeyDown={(e) => {
if (['e', 'E', '+', '-', '.'].includes(e.key)) {
e.preventDefault();
}
}}
/>
</Form.Item>
<Buttons
@ -363,7 +396,24 @@ const BSImeiDetails = (props) => {
</div>
</div>
)}
<div style={{ display: "flex", marginTop: "10px" }}>
<Form.Item name="description">
<TextAreaInput
disabled={
(IMEINumberList?.length === 0) &&
(SerialNumberList?.length === 0)
}
autoComplete="off"
label={<label>Description..</label>}
defaultValue=""
isOnChange={true}
/>
</Form.Item>
</div>
</Form>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Buttons
buttonText="Submit"
@ -372,11 +422,11 @@ const BSImeiDetails = (props) => {
icon={<ArrowRightOutlined />}
></Buttons>
</div>
</div>
</div >
}
handleCancel={CloseDeviceDetailModal}
/>
</div>
</div >
);
};
export default BSImeiDetails;

View File

@ -94,6 +94,9 @@ const ComboSalesBillTable = () => {
const removeProducts = useRemoveProducts();
const applyOffer = useApplyOfferto_CardDetail();
const preferenceDatas = useSelector(PreferenceData);
const UomPrint = preferenceDatas?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const preferenceDetails = preferenceDatas?.[0]?.SettingDtlDetails;
const preferenceOffer =
preferenceDetails?.find((item) => item.SettingIdName === 'Offer')

View File

@ -111,6 +111,11 @@ const StandardTable = () => {
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y'
);
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
setting?.SettingValue === 'Y'
);
const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId;
@ -3181,8 +3186,8 @@ const StandardTable = () => {
"'Inter', ui-sans-serif, system-ui, sans-serif",
}}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
(item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}

View File

@ -60,6 +60,7 @@ const PrintA5Style11 = ({
printDatas,
sportsAppPreference,
MembershipApplied = null,
SalesModePref,
}) => {
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
const GlobalSignature = useSelector(GlobalprintSignature);
@ -427,6 +428,8 @@ const PrintA5Style11 = ({
table2Data?.OrderId,
table2Data?.FYStatus
)}
{GlobaldummyData && '685'}
</div>
<div style={{ textAlign: 'center', width: '24vw' }}>
@ -446,10 +449,16 @@ const PrintA5Style11 = ({
justifyContent: 'space-between',
padding: '0rem 1rem',
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
flexDirection: 'column',
textAlign:'left'
}}
>
{' '}
<div>{Date1}</div>{' '}
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
</div>
</div>
@ -691,87 +700,70 @@ const PrintA5Style11 = ({
{chunkIndex * chunkSize + index + 1}
</td>
)}
{GlobaldummyData
? GlobalItem && <td>{item?.name}</td>
: Item == true && (
{GlobaldummyData ? (
GlobalItem && <td>{item?.name}</td>
) : (
Item && (
<td
style={{
display: 'flex',
flexDirection: 'column',
display: "flex",
flexDirection: "column",
}}
>
<div>{item?.ProdName}</div>
{PackageDetails?.filter(
(pkg) =>
pkg.ProdId === item.ProdId
(pkg) => pkg.ProdId === item.ProdId
).length > 0 ? (
<div>
{PackageDetails?.filter(
(pkg) =>
pkg.ProdId === item.ProdId
)?.map((item, index) => (
<span
key={index}
style={{ display: 'block' }}
>
{item.ParcelCount} PCS{' '}
{item.ParcelQty} PACK (
{item.ParcelType})
{PackageDetails
?.filter((pkg) => pkg.ProdId === item.ProdId)
?.map((pkg, index) => (
<span key={index} style={{ display: "block" }}>
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
</span>
))}
</div>
) : (
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
({item?.Size || "1"}{" "}
{item?.SinglePc === "Y"
? "PCS"
: item?.Type !== "C"
? item?.UomName
: 'COMBO'}
: "COMBO"}
)
</div>
)}
&nbsp;{' '}
{item?.BrandName !== null
? item?.BrandName
: ''}
&nbsp;
{item?.ProductIdentifierDtls
?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
items.SerialNumber ==
'' ||
items.SerialNumber == null
)
)?.map((a) => {
return (
<div>{a.SerialNumber}</div>
);
})
: ''}{' '}
{item?.ProductIdentifierDtls
?.length > 0
? item?.ProductIdentifierDtls.filter(
(item1) =>
item1.IMEI1 !== '' ||
item1.IMEI2 !== ''
)?.map((item2) => {
const imei1 =
item2.IMEI1 || '';
const imei2 =
item2.IMEI2 || '';
return (
{item?.BrandName && <div>{item.BrandName}</div>}
{/* Identifiers */}
{item?.ProductIdentifierDtls?.length > 0
? item.ProductIdentifierDtls.map((id, index) => (
<div key={index}>
{/* Serial */}
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
{/* IMEI */}
{(id?.IMEI1 || id?.IMEI2) && (
<div>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
</div>
);
})
: ''}
)}
{/* Description */}
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
id?.Description && (
<div>{id.Description}</div>
)}
</div>
))
: null}
</td>
)
)}
{GlobaldummyData
? GlobalHsnCode && (
@ -1694,66 +1686,53 @@ const PrintA5Style11 = ({
{chunkIndex * chunkSize + index + 1}
</td>
)}
{GlobaldummyData
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
{GlobaldummyData ? (
GlobalItem && <td>{item?.ProdName}</td>
) : (
Item && (
<td
style={{
display: 'flex',
flexDirection: 'column',
display: "flex",
flexDirection: "column",
}}
>
<div>{item?.ProdName}</div>
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
({item?.Size || "1"}{" "}
{item?.SinglePc === "Y"
? "PCS"
: item?.Type !== "C"
? item?.UomName
: 'COMBO'}
: "COMBO"}
)
</div>
&nbsp;{' '}
{item?.BrandName !== null
? item?.BrandName
: ''}
&nbsp;
{item?.ProductIdentifierDtls
?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
items.SerialNumber ==
'' ||
items.SerialNumber == null
)
)?.map((a) => {
return (
<div>{a.SerialNumber}</div>
);
})
: ''}{' '}
{item?.ProductIdentifierDtls
?.length > 0
? item?.ProductIdentifierDtls.filter(
(item1) =>
item1.IMEI1 !== '' ||
item1.IMEI2 !== ''
)?.map((item2) => {
const imei1 =
item2.IMEI1 || '';
const imei2 =
item2.IMEI2 || '';
return (
{item?.BrandName && <div>{item.BrandName}</div>}
{item?.ProductIdentifierDtls?.map((id, index) => (
<div key={index}>
{/* Serial Number */}
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
{/* IMEI */}
{(id?.IMEI1 || id?.IMEI2) && (
<div>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
</div>
);
})
: ''}
)}
{/* Description */}
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
id?.Description && (
<div>{id.Description}</div>
)}
</div>
))}
</td>
)
)}
{GlobaldummyData
? GlobalHsnCode && (

View File

@ -23,6 +23,7 @@ const TaxInvoice = ({
ReprintType,
printDatas,
}) => {
const GlobaldummyData = useSelector(GlobalPritdummyData);
const SettingData = useSelector(PreferenceData);
const estimatePrintHeader =
@ -833,27 +834,25 @@ const TaxInvoice = ({
{item.BrandName}{' '}
</div>
)}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber && items.SerialNumber !== ''
)?.map((a, i) => (
<div key={i}>{a.SerialNumber}</div>
))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
)?.map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return (
<div>
{item?.ProductIdentifierDtls?.map((id, i) => (
<div key={i}>
{[imei1, imei2].filter(Boolean).join(',')}
<div style={{ display: "flex", gap: "5px", flexWrap: "wrap" }}>
{id?.SerialNumber && <span>{id.SerialNumber}</span>}
{(id?.IMEI1 || id?.IMEI2) && (
<span>{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}</span>
)}
</div>
);
})
: ''}
{id?.Description && (
<div style={{ marginTop: "3px", wordBreak: "break-word" }}>
{id.Description}
</div>
)}
</div>
))}
</div>
</div>
<div
style={{

View File

@ -469,8 +469,8 @@ const Printstyle2 = ({
}}
>
Estimate Bill{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>
)}
{table2Data?.OrderType === 'E' ? (
@ -493,8 +493,8 @@ const Printstyle2 = ({
? PaymentStatusSuccess?.[0]?.PaymentTypeName
: ''}{' '}
&nbsp; Bill{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
</div>
)}
@ -513,7 +513,13 @@ const Printstyle2 = ({
</div>
<div style={{ fontWeight: '600', fontSize: '10px' }}>
{GlobaldummyData ? formattedDate : Date1}
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
</div>
</div>
<hr className="PrintStyle2-print-dottline" />
</div>
@ -726,6 +732,7 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
&nbsp;
<div style={{ display: "flex", gap: "3px" ,flexDirection:"column"}}>
{item?.ProductIdentifierDtls?.length >
0
? item?.ProductIdentifierDtls?.filter(
@ -758,6 +765,17 @@ const Printstyle2 = ({
);
})
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.map((a, i) => (
<div key={i}>{a.Description}</div>
))
: ''}
</div>
</div>
</td>
)}
@ -3098,8 +3116,8 @@ const Printstyle2 = ({
}}
>
Estimate Bill{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>
)}
{table2Data?.OrderType === 'E' ? (
@ -3123,8 +3141,8 @@ const Printstyle2 = ({
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ''}{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
</div>
)}
@ -3314,27 +3332,24 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
&nbsp;
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
items.SerialNumber == '' ||
items.SerialNumber == null
)
)?.map((a) => {
return <div>{a.SerialNumber}</div>;
})
: ''}{' '}
<div style={{ display: 'flex', gap: "3px",flexDirection:"column" }}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(item1) =>
item1.IMEI1 !== '' ||
item1.IMEI2 !== ''
)?.map((item2) => {
const imei1 = item2.IMEI1 || '';
const imei2 = item2.IMEI2 || '';
(items) =>
items.SerialNumber &&
items.SerialNumber !== ''
).map((a, i) => (
<div key={i}>{a.SerialNumber}</div>
))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
).map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return (
<div>
<div key={i}>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
@ -3342,6 +3357,16 @@ const Printstyle2 = ({
);
})
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.map((a, i) => (
<div key={i}>{a.Description}</div>
))
: ''}
</div>
</div>
</td>
)}

View File

@ -231,18 +231,28 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} </div>}
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>}
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>}
</div>
</div>)}
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", textAlign: 'center', padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", textAlign: 'center', padding: 0, fontWeight: 600 }}>Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>}
<hr className="PrintStyle3-print-dottline" />
<div className="PrintStyle3-print-ordr-dtls">
<div style={{ lineheight: '50px' }}>
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
</div>
</div>
@ -292,14 +302,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
)
</div>)}
&nbsp; {item?.BrandName !== null ? item?.BrandName : ""}&nbsp;
{item?.ProductIdentifierDtls?.length > 0 ? (item?.ProductIdentifierDtls?.filter((items) => !(items.SerialNumber == "" || items.SerialNumber == null))
?.map(a => { return (<div>{a.SerialNumber}</div>) })) : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter((item1) => item1.IMEI1 !== "" || item1.IMEI2 !== "")
?.map(item2 => {
const imei1 = item2.IMEI1 || "";
const imei2 = item2.IMEI2 || "";
return (<div>{[imei1, imei2].filter(Boolean).join(",")}</div>);
}
) : ""}
<div style={{ display: 'flex', gap: "3px",flexDirection:"column"}}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber &&
items.SerialNumber !== ''
).map((a, i) => (
<div key={i}>{a.SerialNumber}</div>
))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
).map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return (
<div key={i}>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
</div>
);
})
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.map((a, i) => (
<div key={i}>{a.Description} </div>
))
: ''}
</div>
</div>
</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
@ -1158,16 +1195,27 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>}
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""}
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>}
</div>
</div>)}
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>}
<hr className="PrintStyle3-print-dottline" />
<div className="PrintStyle3-print-ordr-dtls">
<div style={{ lineheight: '50px' }}>
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
</div>
</div>
@ -1213,14 +1261,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
)
</div>)}
&nbsp; {item?.BrandName !== null ? item?.BrandName : ""}&nbsp;
{item?.ProductIdentifierDtls?.length > 0 ? (item?.ProductIdentifierDtls?.filter((items) => !(items.SerialNumber == "" || items.SerialNumber == null))
?.map(a => { return (<div>{a.SerialNumber}</div>) })) : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter((item1) => item1.IMEI1 !== "" || item1.IMEI2 !== "")
?.map(item2 => {
const imei1 = item2.IMEI1 || "";
const imei2 = item2.IMEI2 || "";
return (<div>{[imei1, imei2].filter(Boolean).join(",")}</div>);
}
) : ""}
<div style={{ display: 'flex', gap: "3px",flexDirection:"column" }}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber &&
items.SerialNumber !== ''
).map((a, i) => (
<div key={i}>{a.SerialNumber}</div>
))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
).map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return (
<div key={i}>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
</div>
);
})
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.map((a, i) => (
<span key={i}>{a.Description}</span>
))
: ''}
</div>
</div>
</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}

View File

@ -119,6 +119,7 @@ const PreferenceList = () => {
],
scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
imeidetails:allSettingsMap['imeidetails']?.value === 'Y',
customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y',
upiqr: allSettingsMap['upiqr']?.value === 'Y',
lowstockreport: allSettingsMap['lowstockreport']?.value === 'Y',
@ -322,6 +323,7 @@ const PreferenceList = () => {
mobilea4: values.mobilea4,
scanlayout: values.scanlayout,
verifyproduct: values.verifyproduct,
imeidetails:values.imeidetails,
customisedbillnumber: values.customisedbillnumber,
upiqr: values.upiqr,
lowstockreport: values.lowstockreport,
@ -714,6 +716,10 @@ const PreferenceList = () => {
'verifyproduct',
'Do you Want Verify the Product?'
)}
{renderCheckbox(
'imeidetails',
'Do you want to open the IMEI model without IMEI details?'
)}
{renderCheckbox(
'customisedbillnumber',
'Do you Want Customised Bill Number?'

View File

@ -92,7 +92,7 @@ const PaymentPdfBooking = ({
const [BranchZip, setBranchZip] = useState();
const CashierName = getSession('userName');
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
console.log(printerTemplateStyle, 'printerTemplateStyle');
console.log(printerTemplateStyle, "printerTemplateStyle")
const appPreferences = useSelector(ApplicationPreferences);
const SettingData = useSelector(PreferenceData);
const estimatePrintHeader =
@ -423,7 +423,7 @@ const PaymentPdfBooking = ({
>
Estimate
</p>
<p
{/* <p
style={{
display: 'flex',
fontSize: '14px',
@ -435,7 +435,7 @@ const PaymentPdfBooking = ({
>
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
</p>
</p> */}
</div>
) : (
<div
@ -457,7 +457,7 @@ const PaymentPdfBooking = ({
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: 'Bill'}
</p>
<p
{/* <p
style={{
display: 'flex',
fontSize: '14px',
@ -469,7 +469,7 @@ const PaymentPdfBooking = ({
>
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
</p>
</p> */}
</div>
)}
</div>
@ -483,6 +483,11 @@ const PaymentPdfBooking = ({
table2Data?.FYStatus
)}
</div>
{SalesModePref?.SettingValue == 'Y' &&
<div style={{ fontSize: '12px', fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
<div className="Re-print-bold1">Date:{Date1}</div>
</div>
{TakeawayData?.length > 0 && (
@ -529,90 +534,51 @@ const PaymentPdfBooking = ({
<td className="Re-print-body-Product">
{item?.ProdName}
{PackageDetails?.filter(
(pkg) => pkg.ProdId === item.ProdId
).length > 0 ? (
{/* Package Details */}
{PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId).length > 0 && (
<div>
{PackageDetails?.filter(
(pkg) => pkg.ProdId === item.ProdId
)?.map((pkg, index) => (
<span key={index} style={{ display: 'block' }}>
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK (
{pkg.ParcelType})
{PackageDetails
?.filter(pkg => pkg.ProdId === item.ProdId)
?.map((pkg, index) => (
<span key={index} style={{ display: "block" }}>
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
</span>
))}
<span>
(
{item?.SinglePc === 'Y'
? 'PCS'
: item?.Type !== 'C'
? item?.UomName
: 'COMBO'}
) &nbsp;{' '}
{item?.BrandName !== null ? item?.BrandName : ''}
&nbsp;
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber &&
items.SerialNumber !== ''
).map((a, i) => (
<div key={i}>{a.SerialNumber}</div>
))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
).map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return (
<div key={i}>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
</div>
);
})
: ''}
</span>
</div>
) : (
<span>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc === 'Y'
? 'PCS'
: item?.Type !== 'C'
? item?.UomName
: 'COMBO'}
) &nbsp;{' '}
{item?.BrandName !== null ? item?.BrandName : ''}
&nbsp;
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber &&
items.SerialNumber !== ''
).map((a, i) => (
<div key={i}>{a.SerialNumber}</div>
))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
).map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return (
<div key={i}>
{[imei1, imei2].filter(Boolean).join(',')}
</div>
);
})
: ''}
</span>
)}
{/* Size, UOM, Brand */}
<div>
({item?.Size ?? '1'}{" "}
{item?.SinglePc === 'Y' ? "PCS" : item?.Type !== 'C' ? item?.UomName : "COMBO"}
) {item?.BrandName || ""}
</div>
{/* Product Identifiers */}
{item?.ProductIdentifierDtls?.map((detail, index) => {
const serial = detail.SerialNumber?.trim();
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(", ");
const description = detail.Description?.trim();
if (!serial && !imeis && !description) return null;
return (
<div key={index} style={{ display: "flex", flexDirection: "column", gap: "2px" }}>
{/* Serial + IMEIs */}
{(serial || imeis) && (
<div style={{ display: "flex", gap: "3px" }}>
{serial && <div>{serial}</div>}
{imeis && <div>{imeis}</div>}
</div>
)}
{/* Description */}
{description && <div>{description}</div>}
</div>
);
})}
{/* Available Time */}
{sportsAppPreference &&
`(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
</td>