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 FieldDetails = useSelector(GloabalFieldDetails);
const SLNO = FieldDetails?.['Sl.No']; const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item']; const Item = FieldDetails?.['Item'];
console.log(Item, 'Item'); console.log(Item, 'PrintStyle1PrintStyle1');
const MRP = FieldDetails?.['MRP']; const MRP = FieldDetails?.['MRP'];
const Discount = FieldDetails?.['Discount']; const Discount = FieldDetails?.['Discount'];
const Tax = FieldDetails?.['Tax']; const Tax = FieldDetails?.['Tax'];
@ -499,8 +499,8 @@ const PrintStyle1 = ({
}} }}
> >
Estimate{' '} Estimate{' '}
{SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} `(${table2Data?.SalesMode})`} */}
</div> </div>
)} )}
{table2Data?.OrderType === 'E' ? ( {table2Data?.OrderType === 'E' ? (
@ -524,8 +524,8 @@ const PrintStyle1 = ({
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ? PaymentStatusSuccess?.[0]?.PaymentTypeName +
' Bill' ' Bill'
: ''} : ''}
{SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} `(${table2Data?.SalesMode})`} */}
</div> </div>
)} )}
</div> </div>
@ -542,8 +542,8 @@ const PrintStyle1 = ({
}} }}
> >
Estimate{' '} Estimate{' '}
{SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} `(${table2Data?.SalesMode})`} */}
</div> </div>
)} )}
<hr className="PrintStyle1-print-dottline" /> <hr className="PrintStyle1-print-dottline" />
@ -609,6 +609,12 @@ const PrintStyle1 = ({
{' '} {' '}
Date : {GlobaldummyData ? formattedDate : Date1}{' '} Date : {GlobaldummyData ? formattedDate : Date1}{' '}
</div> </div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
</div> </div>
</div> </div>
@ -794,6 +800,7 @@ const PrintStyle1 = ({
? <div>{item?.BrandName}</div> ? <div>{item?.BrandName}</div>
: ''} : ''}
&nbsp; &nbsp;
<div style={{ display: "flex", gap: "2px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length > 0 {item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls?.filter( ? item?.ProductIdentifierDtls?.filter(
(items) => (items) =>
@ -822,6 +829,17 @@ const PrintStyle1 = ({
); );
}) })
: ''} : ''}
{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> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -1028,6 +1046,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td> ? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && ( : Item == true && (
<td <td
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' && {UomPrint?.SettingValue === 'Y' &&
@ -3743,8 +3762,8 @@ const PrintStyle1 = ({
}} }}
> >
Estimate{' '} Estimate{' '}
{SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} `(${table2Data?.SalesMode})`} */}
</div> </div>
)} )}
{table2Data?.OrderType === 'E' ? ( {table2Data?.OrderType === 'E' ? (
@ -3785,8 +3804,8 @@ const PrintStyle1 = ({
}} }}
> >
Estimate{' '} Estimate{' '}
{SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} `(${table2Data?.SalesMode})`} */}
</div> </div>
)} )}
<hr className="PrintStyle1-print-dottline" /> <hr className="PrintStyle1-print-dottline" />
@ -4000,27 +4019,24 @@ const PrintStyle1 = ({
? item?.BrandName ? item?.BrandName
: ''} : ''}
&nbsp; &nbsp;
{item?.ProductIdentifierDtls?.length > 0 <div style={{ display: 'flex', gap: "3px", flexDirection: "column" }}>
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
items.SerialNumber == '' ||
items.SerialNumber == null
)
)?.map((a) => {
return <div>{a.SerialNumber}</div>;
})
: ''}{' '}
{item?.ProductIdentifierDtls?.length > 0 {item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter( ? item?.ProductIdentifierDtls.filter(
(item1) => (items) =>
item1.IMEI1 !== '' || items.SerialNumber &&
item1.IMEI2 !== '' items.SerialNumber !== ''
)?.map((item2) => { ).map((a, i) => (
const imei1 = item2.IMEI1 || ''; <div key={i}>{a.SerialNumber}</div>
const imei2 = item2.IMEI2 || ''; ))
: ''}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
).map((id, i) => {
const imei1 = id.IMEI1 || '';
const imei2 = id.IMEI2 || '';
return ( return (
<div> <div key={i}>
{[imei1, imei2] {[imei1, imei2]
.filter(Boolean) .filter(Boolean)
.join(',')} .join(',')}
@ -4028,6 +4044,15 @@ const PrintStyle1 = ({
); );
}) })
: ''} : ''}
{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> </td>
)} )}
{GlobaldummyData {GlobaldummyData