Update src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
This commit is contained in:
parent
533dbbab1b
commit
46ef51019b
|
|
@ -103,7 +103,7 @@ const PrintStyle5 = ({
|
||||||
const GlobalCashierName = useSelector(GlobalprintCashierName);
|
const GlobalCashierName = useSelector(GlobalprintCashierName);
|
||||||
const GlobalLogo = useSelector(GlobalprintLogo);
|
const GlobalLogo = useSelector(GlobalprintLogo);
|
||||||
const GlobalCredit = useSelector(GlobalprintCredit);
|
const GlobalCredit = useSelector(GlobalprintCredit);
|
||||||
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
|
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
|
||||||
(i) => i.SettingIdName === 'PrintUom'
|
(i) => i.SettingIdName === 'PrintUom'
|
||||||
)?.[0];
|
)?.[0];
|
||||||
const estimatePrintHeader =
|
const estimatePrintHeader =
|
||||||
|
|
@ -440,8 +440,8 @@ const PrintStyle5 = ({
|
||||||
{table2Data?.OrderType === 'E' && estimateTitle && (
|
{table2Data?.OrderType === 'E' && estimateTitle && (
|
||||||
<div style={{ textTransform: 'uppercase' }}>
|
<div style={{ textTransform: 'uppercase' }}>
|
||||||
Estimate{' '}
|
Estimate{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{table2Data?.OrderType === 'E' ? (
|
{table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -455,8 +455,8 @@ const PrintStyle5 = ({
|
||||||
: PaymentStatusSuccess?.length === 1
|
: PaymentStatusSuccess?.length === 1
|
||||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||||
: ''}{' '}
|
: ''}{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -468,8 +468,8 @@ const PrintStyle5 = ({
|
||||||
style={{ textTransform: 'uppercase', textAlign: 'center' }}
|
style={{ textTransform: 'uppercase', textAlign: 'center' }}
|
||||||
>
|
>
|
||||||
Estimate{' '}
|
Estimate{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -482,7 +482,13 @@ const PrintStyle5 = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
<div> {GlobaldummyData ? formattedDate : Date1} </div>{' '}
|
<div> {GlobaldummyData ? formattedDate : Date1}
|
||||||
|
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
</div>{' '}
|
||||||
<div>
|
<div>
|
||||||
{' '}
|
{' '}
|
||||||
Bill No :
|
Bill No :
|
||||||
|
|
@ -676,15 +682,15 @@ const PrintStyle5 = ({
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
{ UomPrint?.SettingValue === 'Y' &&
|
{UomPrint?.SettingValue === 'Y' &&
|
||||||
<div>
|
<div>
|
||||||
{item?.Size +
|
{item?.Size +
|
||||||
item?.UomName +
|
item?.UomName +
|
||||||
'-' +
|
'-' +
|
||||||
(GlobaldummyData
|
(GlobaldummyData
|
||||||
? GlobalQuantity && item?.SalesQty
|
? GlobalQuantity && item?.SalesQty
|
||||||
: item?.SalesQty)}
|
: item?.SalesQty)}
|
||||||
</div>}
|
</div>}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -700,85 +706,107 @@ const PrintStyle5 = ({
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
{(() => {
|
||||||
{PackageDetails?.filter(
|
const identifiers = item?.ProductIdentifierDtls ?? [];
|
||||||
(pkg) => pkg.ProdId === item.ProdId
|
|
||||||
).length > 0 ? (
|
const packageList = (PackageDetails ?? []).filter(
|
||||||
<div>
|
pkg => pkg.ProdId === item.ProdId
|
||||||
{PackageDetails?.filter(
|
);
|
||||||
(pkg) => pkg.ProdId === item.ProdId
|
|
||||||
)?.map((item, index) => (
|
return (
|
||||||
<span
|
<>
|
||||||
key={index}
|
{/* 🏷 Product Name */}
|
||||||
style={{ display: 'block' }}
|
<div>{item?.ProdName}</div>
|
||||||
>
|
|
||||||
{item.ParcelCount} PCS {item.ParcelQty}{' '}
|
{packageList.length > 0 ? (
|
||||||
PACK ({item.ParcelType})
|
// ================= PACKAGE EXISTS =================
|
||||||
</span>
|
<div>
|
||||||
))}
|
|
||||||
{(item?.ProductIdentifierDtls?.filter(
|
{/* 📦 Package Details */}
|
||||||
(items) =>
|
{packageList.map((pkg, index) => (
|
||||||
items.SerialNumber &&
|
<div key={index}>
|
||||||
items.SerialNumber !== ''
|
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||||
)?.map((a, index) => (
|
</div>
|
||||||
<div key={`serial-${index}`}>
|
))}
|
||||||
{a.SerialNumber}
|
|
||||||
</div>
|
{/* 🔢 Identifiers (Serial / IMEI / Description) */}
|
||||||
)) || '') +
|
{identifiers.map((d, i) => {
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
const serial = d.SerialNumber;
|
||||||
(item1) => item1.IMEI1 || item1.IMEI2
|
const imei = [d.IMEI1, d.IMEI2].filter(Boolean).join(", ");
|
||||||
)?.map((item2, index) => {
|
const description = d.Description;
|
||||||
const imei1 = item2.IMEI1 || '';
|
|
||||||
const imei2 = item2.IMEI2 || '';
|
if (!serial && !imei && !description) return null;
|
||||||
return (
|
|
||||||
<div key={`imei-${index}`}>
|
return (
|
||||||
{[imei1, imei2]
|
<div key={i}>
|
||||||
.filter(Boolean)
|
{serial && <div>{serial}</div>}
|
||||||
.join(',')}
|
{imei && <div>{imei}</div>}
|
||||||
|
{description && <div>{description}</div>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
|
||||||
|
{/* 🔢 Quantity */}
|
||||||
|
<div>
|
||||||
|
{GlobaldummyData
|
||||||
|
? GlobalQuantity && item?.SalesQty
|
||||||
|
: item?.SalesQty}
|
||||||
</div>
|
</div>
|
||||||
);
|
|
||||||
}) || '') +
|
|
||||||
(GlobaldummyData
|
|
||||||
? GlobalQuantity && item?.SalesQty
|
|
||||||
: item?.SalesQty)}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
{UomPrint?.SettingValue === 'Y' ?((item?.Size || '1') +
|
|
||||||
(item?.SinglePc === 'Y'
|
|
||||||
? 'PCS'
|
|
||||||
: item?.Type !== 'C'
|
|
||||||
? item?.UomName
|
|
||||||
: 'COMBO')) :"" +
|
|
||||||
(item?.BrandName || '') +
|
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
|
||||||
(items) =>
|
|
||||||
items.SerialNumber &&
|
|
||||||
items.SerialNumber !== ''
|
|
||||||
)?.map((a, index) => (
|
|
||||||
<div key={`serial-${index}`}>
|
|
||||||
{a.SerialNumber}
|
|
||||||
</div>
|
</div>
|
||||||
)) || '') +
|
) : (
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
// ================= NO PACKAGE =================
|
||||||
(item1) => item1.IMEI1 || item1.IMEI2
|
<div>
|
||||||
)?.map((item2, index) => {
|
|
||||||
const imei1 = item2.IMEI1 || '';
|
{/* 📏 Size + UOM */}
|
||||||
const imei2 = item2.IMEI2 || '';
|
<div>
|
||||||
return (
|
{UomPrint?.SettingValue === 'Y' && (
|
||||||
<div key={`imei-${index}`}>
|
<>
|
||||||
{[imei1, imei2]
|
{(item?.Size || "1")}{" "}
|
||||||
.filter(Boolean)
|
{item?.SinglePc === "Y"
|
||||||
.join(',')}
|
? "PCS"
|
||||||
|
: item?.Type !== "C"
|
||||||
|
? item?.UomName
|
||||||
|
: "COMBO"}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
|
||||||
}) || '') +
|
{/* 🏷 Brand */}
|
||||||
'-' +
|
{item?.BrandName && (
|
||||||
(GlobaldummyData
|
<div>{item.BrandName}</div>
|
||||||
? GlobalQuantity && item?.SalesQty
|
)}
|
||||||
: item?.SalesQty)}
|
|
||||||
</div>
|
{/* 🔢 Identifiers (Serial / IMEI / Description) */}
|
||||||
)}
|
{identifiers.map((d, i) => {
|
||||||
|
const serial = d.SerialNumber;
|
||||||
|
const imei = [d.IMEI1, d.IMEI2].filter(Boolean).join(", ");
|
||||||
|
const description = d.Description;
|
||||||
|
|
||||||
|
if (!serial && !imei && !description) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div key={i}>
|
||||||
|
{serial && <div>{serial}</div>}
|
||||||
|
{imei && <div>{imei}</div>}
|
||||||
|
{description && <div>{description}</div>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
|
||||||
|
{/* 🔢 Quantity */}
|
||||||
|
<div>
|
||||||
|
-
|
||||||
|
{GlobaldummyData
|
||||||
|
? GlobalQuantity && item?.SalesQty
|
||||||
|
: item?.SalesQty}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1056,16 +1084,16 @@ const PrintStyle5 = ({
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
{ UomPrint?.SettingValue === 'Y' &&
|
{UomPrint?.SettingValue === 'Y' &&
|
||||||
<div>
|
<div>
|
||||||
{item?.Size +
|
{item?.Size +
|
||||||
item?.UomName +
|
item?.UomName +
|
||||||
'-' +
|
'-' +
|
||||||
(GlobaldummyData
|
(GlobaldummyData
|
||||||
? GlobalQuantity && item?.SalesQty
|
? GlobalQuantity && item?.SalesQty
|
||||||
: item?.SalesQty)}
|
: item?.SalesQty)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1083,19 +1111,19 @@ const PrintStyle5 = ({
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
{UomPrint?.SettingValue === 'Y' &&
|
{UomPrint?.SettingValue === 'Y' &&
|
||||||
<div>
|
<div>
|
||||||
{(item?.Size ? item?.Size : '1') +
|
{(item?.Size ? item?.Size : '1') +
|
||||||
(item?.SinglePc == 'Y'
|
(item?.SinglePc == 'Y'
|
||||||
? 'PCS'
|
? 'PCS'
|
||||||
: item?.Type != 'C'
|
: item?.Type != 'C'
|
||||||
? item?.UomName
|
? item?.UomName
|
||||||
: 'COMBO') +
|
: 'COMBO') +
|
||||||
'-' +
|
'-' +
|
||||||
(GlobaldummyData
|
(GlobaldummyData
|
||||||
? GlobalQuantity && item?.SalesQty
|
? GlobalQuantity && item?.SalesQty
|
||||||
: item?.SalesQty)}
|
: item?.SalesQty)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2737,8 +2765,8 @@ const PrintStyle5 = ({
|
||||||
{table2Data?.OrderType === 'E' && estimateTitle && (
|
{table2Data?.OrderType === 'E' && estimateTitle && (
|
||||||
<div style={{ textTransform: 'uppercase' }}>
|
<div style={{ textTransform: 'uppercase' }}>
|
||||||
Estimate{' '}
|
Estimate{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{table2Data?.OrderType === 'E' ? (
|
{table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -2754,8 +2782,8 @@ const PrintStyle5 = ({
|
||||||
: PaymentStatusSuccess?.length === 1
|
: PaymentStatusSuccess?.length === 1
|
||||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||||
: ''}{' '}
|
: ''}{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -2765,8 +2793,8 @@ const PrintStyle5 = ({
|
||||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
|
||||||
<div style={{ textTransform: 'uppercase', textAlign: 'center' }}>
|
<div style={{ textTransform: 'uppercase', textAlign: 'center' }}>
|
||||||
Estimate{' '}
|
Estimate{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -2780,7 +2808,12 @@ const PrintStyle5 = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
<div> {GlobaldummyData ? formattedDate : Date1} </div>{' '}
|
<div> {GlobaldummyData ? formattedDate : Date1}
|
||||||
|
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
</div>}
|
||||||
|
</div>{' '}
|
||||||
<div>
|
<div>
|
||||||
{' '}
|
{' '}
|
||||||
Bill No :
|
Bill No :
|
||||||
|
|
@ -2964,15 +2997,15 @@ const PrintStyle5 = ({
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
{UomPrint?.SettingValue === 'Y' && (
|
{UomPrint?.SettingValue === 'Y' && (
|
||||||
<div>
|
<div>
|
||||||
{item?.Size +
|
{item?.Size +
|
||||||
item?.UomName +
|
item?.UomName +
|
||||||
'-' +
|
'-' +
|
||||||
(GlobaldummyData
|
(GlobaldummyData
|
||||||
? GlobalQuantity && item?.SalesQty
|
? GlobalQuantity && item?.SalesQty
|
||||||
: item?.SalesQty)}
|
: item?.SalesQty)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2988,88 +3021,110 @@ const PrintStyle5 = ({
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
{/* 🏷 Product Name */}
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
{PackageDetails?.filter(
|
|
||||||
(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})
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
|
|
||||||
{(item?.BrandName || '') +
|
{(() => {
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
const packages =
|
||||||
(items) =>
|
(PackageDetails ?? []).filter(pkg => pkg.ProdId === item.ProdId);
|
||||||
items.SerialNumber &&
|
|
||||||
items.SerialNumber !== ''
|
const identifiers = item?.ProductIdentifierDtls ?? [];
|
||||||
)?.map((a, index) => (
|
|
||||||
<div key={`serial-${index}`}>
|
return packages.length > 0 ? (
|
||||||
{a.SerialNumber}
|
// ================= PACKAGE EXISTS =================
|
||||||
</div>
|
<div>
|
||||||
)) || '') +
|
{/* 📦 Package Details */}
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
{packages.map((pkg, index) => (
|
||||||
(item1) => item1.IMEI1 || item1.IMEI2
|
<span key={index} style={{ display: "block" }}>
|
||||||
)?.map((item2, index) => {
|
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||||
const imei1 = item2.IMEI1 || '';
|
</span>
|
||||||
const imei2 = item2.IMEI2 || '';
|
))}
|
||||||
|
|
||||||
|
{/* 🏷 Brand */}
|
||||||
|
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||||
|
|
||||||
|
{/* 🔢 Serial / IMEI / Description */}
|
||||||
|
{identifiers.map((d, i) => {
|
||||||
|
const values = [
|
||||||
|
d.SerialNumber,
|
||||||
|
d.IMEI1,
|
||||||
|
d.IMEI2,
|
||||||
|
d.Description
|
||||||
|
].filter(Boolean);
|
||||||
|
|
||||||
|
if (values.length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={`imei-${index}`}>
|
<div key={i}>
|
||||||
{[imei1, imei2]
|
{values.join(", ")}
|
||||||
.filter(Boolean)
|
|
||||||
.join(',')}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}) || '') +
|
})}
|
||||||
'-' +
|
|
||||||
(GlobaldummyData
|
{/* 🧪 Debug / Extra Text */}
|
||||||
? GlobalQuantity && item?.SalesQty
|
<div>ssd3</div>
|
||||||
: item?.SalesQty)}
|
|
||||||
</div>
|
{/* 🔢 Quantity */}
|
||||||
) : (
|
<div>
|
||||||
<div>
|
-
|
||||||
{UomPrint?.SettingValue === 'Y' ?((item?.Size || '1') +
|
{GlobaldummyData
|
||||||
(item?.SinglePc === 'Y'
|
? GlobalQuantity && item?.SalesQty
|
||||||
? 'PCS'
|
: item?.SalesQty}
|
||||||
: item?.Type !== 'C'
|
</div>
|
||||||
? item?.UomName
|
</div>
|
||||||
: 'COMBO')):"" +
|
) : (
|
||||||
(item?.BrandName || '') +
|
// ================= NO PACKAGE =================
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
<div>
|
||||||
(items) =>
|
{/* 📏 Size + UOM */}
|
||||||
items.SerialNumber &&
|
<div>
|
||||||
items.SerialNumber !== ''
|
|
||||||
)?.map((a, index) => (
|
{UomPrint?.SettingValue === 'Y' && (
|
||||||
<div key={`serial-${index}`}>
|
<>
|
||||||
{a.SerialNumber}
|
{item?.Size || "1"}{" "}
|
||||||
|
{item?.SinglePc === "Y"
|
||||||
|
? "PCS"
|
||||||
|
: item?.Type !== "C"
|
||||||
|
? item?.UomName
|
||||||
|
: "COMBO"}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)) || '') +
|
|
||||||
(item?.ProductIdentifierDtls?.filter(
|
|
||||||
(item1) => item1.IMEI1 || item1.IMEI2
|
{/* 🏷 Brand */}
|
||||||
)?.map((item2, index) => {
|
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||||
const imei1 = item2.IMEI1 || '';
|
|
||||||
const imei2 = item2.IMEI2 || '';
|
{/* 🔢 Serial / IMEI / Description */}
|
||||||
|
{identifiers.map((d, i) => {
|
||||||
|
const values = [
|
||||||
|
d.SerialNumber,
|
||||||
|
d.IMEI1,
|
||||||
|
d.IMEI2,
|
||||||
|
d.Description
|
||||||
|
].filter(Boolean);
|
||||||
|
|
||||||
|
if (values.length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={`imei-${index}`}>
|
<div key={i}>
|
||||||
{[imei1, imei2]
|
{values.join(", ")}
|
||||||
.filter(Boolean)
|
|
||||||
.join(',')}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}) || '') +
|
})}
|
||||||
'-' +
|
|
||||||
(GlobaldummyData
|
{/* 🧪 Debug / Extra Text */}
|
||||||
? GlobalQuantity && item?.SalesQty
|
<div>ssd4</div>
|
||||||
: item?.SalesQty)}
|
|
||||||
</div>
|
{/* 🔢 Quantity */}
|
||||||
)}
|
<div>
|
||||||
|
-
|
||||||
|
{GlobaldummyData
|
||||||
|
? GlobalQuantity && item?.SalesQty
|
||||||
|
: item?.SalesQty}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -3317,16 +3372,16 @@ const PrintStyle5 = ({
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
{UomPrint?.SettingValue === 'Y'&&
|
{UomPrint?.SettingValue === 'Y' &&
|
||||||
<div>
|
<div>
|
||||||
{item?.Size +
|
{item?.Size +
|
||||||
item?.UomName +
|
item?.UomName +
|
||||||
'-' +
|
'-' +
|
||||||
(GlobaldummyData
|
(GlobaldummyData
|
||||||
? GlobalQuantity && item?.SalesQty
|
? GlobalQuantity && item?.SalesQty
|
||||||
: item?.SalesQty)}
|
: item?.SalesQty)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -3344,16 +3399,16 @@ const PrintStyle5 = ({
|
||||||
<>
|
<>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
<div>
|
<div>
|
||||||
{UomPrint?.SettingValue === 'Y'? ((item?.Size ? item?.Size : '1') +
|
{UomPrint?.SettingValue === 'Y' ? ((item?.Size ? item?.Size : '1') +
|
||||||
(item?.SinglePc == 'Y'
|
(item?.SinglePc == 'Y'
|
||||||
? 'PCS'
|
? 'PCS'
|
||||||
: item?.Type != 'C'
|
: item?.Type != 'C'
|
||||||
? item?.UomName
|
? item?.UomName
|
||||||
: 'COMBO') ):""+
|
: 'COMBO')) : "" +
|
||||||
'-' +
|
'-' +
|
||||||
(GlobaldummyData
|
(GlobaldummyData
|
||||||
? GlobalQuantity && item?.SalesQty
|
? GlobalQuantity && item?.SalesQty
|
||||||
: item?.SalesQty)}
|
: item?.SalesQty)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue