Update src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx

This commit is contained in:
karthikalakshmi 2026-03-03 09:59:38 +05:30
parent 38a0494c6c
commit ee5a7f723b
1 changed files with 97 additions and 72 deletions

View File

@ -67,7 +67,7 @@ const PrintStyle1 = ({
const FieldDetails = useSelector(GloabalFieldDetails);
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
console.log(Item, 'Item');
console.log(Item, 'PrintStyle1PrintStyle1');
const MRP = FieldDetails?.['MRP'];
const Discount = FieldDetails?.['Discount'];
const Tax = FieldDetails?.['Tax'];
@ -499,8 +499,8 @@ const PrintStyle1 = ({
}}
>
Estimate{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */}
</div>
)}
{table2Data?.OrderType === 'E' ? (
@ -524,8 +524,8 @@ const PrintStyle1 = ({
? PaymentStatusSuccess?.[0]?.PaymentTypeName +
' Bill'
: ''}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */}
</div>
)}
</div>
@ -542,8 +542,8 @@ const PrintStyle1 = ({
}}
>
Estimate{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */}
</div>
)}
<hr className="PrintStyle1-print-dottline" />
@ -609,6 +609,12 @@ const PrintStyle1 = ({
{' '}
Date : {GlobaldummyData ? formattedDate : Date1}{' '}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
</div>
</div>
@ -752,7 +758,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{PackageDetails?.filter(
@ -792,36 +798,48 @@ const PrintStyle1 = ({
&nbsp;{' '}
{item?.BrandName !== null
? <div>{item?.BrandName}</div>
: ''}
: ''}
&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: "2px", flexDirection: "column" }}>
{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>
);
})
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.map((a, i) => (
<div key={i}>{a.Description}</div>
))
: ''}
</div>
</td>
)}
{GlobaldummyData
@ -1028,6 +1046,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
@ -3743,8 +3762,8 @@ const PrintStyle1 = ({
}}
>
Estimate{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */}
</div>
)}
{table2Data?.OrderType === 'E' ? (
@ -3785,8 +3804,8 @@ const PrintStyle1 = ({
}}
>
Estimate{' '}
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */}
</div>
)}
<hr className="PrintStyle1-print-dottline" />
@ -3958,7 +3977,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{PackageDetails?.filter(
@ -3999,35 +4018,41 @@ const PrintStyle1 = ({
{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>
);
})
: ''}
&nbsp;
<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>
</td>
)}
{GlobaldummyData
@ -4215,7 +4240,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&