Update src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx
This commit is contained in:
parent
38a0494c6c
commit
ee5a7f723b
|
|
@ -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>
|
||||||
|
|
||||||
|
|
@ -752,7 +758,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>
|
||||||
{PackageDetails?.filter(
|
{PackageDetails?.filter(
|
||||||
|
|
@ -792,36 +798,48 @@ const PrintStyle1 = ({
|
||||||
{' '}
|
{' '}
|
||||||
{item?.BrandName !== null
|
{item?.BrandName !== null
|
||||||
? <div>{item?.BrandName}</div>
|
? <div>{item?.BrandName}</div>
|
||||||
: ''}
|
: ''}
|
||||||
|
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
<div style={{ display: "flex", gap: "2px", flexDirection: "column" }}>
|
||||||
? item?.ProductIdentifierDtls?.filter(
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
(items) =>
|
? item?.ProductIdentifierDtls?.filter(
|
||||||
!(
|
(items) =>
|
||||||
items.SerialNumber == '' ||
|
!(
|
||||||
items.SerialNumber == null
|
items.SerialNumber == '' ||
|
||||||
)
|
items.SerialNumber == null
|
||||||
)?.map((a) => {
|
)
|
||||||
return <div>{a.SerialNumber}</div>;
|
)?.map((a) => {
|
||||||
})
|
return <div>{a.SerialNumber}</div>;
|
||||||
: ''}{' '}
|
})
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
: ''}{' '}
|
||||||
? item?.ProductIdentifierDtls.filter(
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
(item1) =>
|
? item?.ProductIdentifierDtls.filter(
|
||||||
item1.IMEI1 !== '' ||
|
(item1) =>
|
||||||
item1.IMEI2 !== ''
|
item1.IMEI1 !== '' ||
|
||||||
)?.map((item2) => {
|
item1.IMEI2 !== ''
|
||||||
const imei1 = item2.IMEI1 || '';
|
)?.map((item2) => {
|
||||||
const imei2 = item2.IMEI2 || '';
|
const imei1 = item2.IMEI1 || '';
|
||||||
return (
|
const imei2 = item2.IMEI2 || '';
|
||||||
<div>
|
return (
|
||||||
{[imei1, imei2]
|
<div>
|
||||||
.filter(Boolean)
|
{[imei1, imei2]
|
||||||
.join(',')}
|
.filter(Boolean)
|
||||||
</div>
|
.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>
|
</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" />
|
||||||
|
|
@ -3958,7 +3977,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>
|
||||||
{PackageDetails?.filter(
|
{PackageDetails?.filter(
|
||||||
|
|
@ -3999,35 +4018,41 @@ const PrintStyle1 = ({
|
||||||
{item?.BrandName !== null
|
{item?.BrandName !== null
|
||||||
? item?.BrandName
|
? item?.BrandName
|
||||||
: ''}
|
: ''}
|
||||||
|
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
<div style={{ display: 'flex', gap: "3px", flexDirection: "column" }}>
|
||||||
? item?.ProductIdentifierDtls?.filter(
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
(items) =>
|
? item?.ProductIdentifierDtls.filter(
|
||||||
!(
|
(items) =>
|
||||||
items.SerialNumber == '' ||
|
items.SerialNumber &&
|
||||||
items.SerialNumber == null
|
items.SerialNumber !== ''
|
||||||
)
|
).map((a, i) => (
|
||||||
)?.map((a) => {
|
<div key={i}>{a.SerialNumber}</div>
|
||||||
return <div>{a.SerialNumber}</div>;
|
))
|
||||||
})
|
: ''}
|
||||||
: ''}{' '}
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
? item?.ProductIdentifierDtls.filter(
|
||||||
? item?.ProductIdentifierDtls.filter(
|
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
||||||
(item1) =>
|
).map((id, i) => {
|
||||||
item1.IMEI1 !== '' ||
|
const imei1 = id.IMEI1 || '';
|
||||||
item1.IMEI2 !== ''
|
const imei2 = id.IMEI2 || '';
|
||||||
)?.map((item2) => {
|
return (
|
||||||
const imei1 = item2.IMEI1 || '';
|
<div key={i}>
|
||||||
const imei2 = item2.IMEI2 || '';
|
{[imei1, imei2]
|
||||||
return (
|
.filter(Boolean)
|
||||||
<div>
|
.join(',')}
|
||||||
{[imei1, imei2]
|
</div>
|
||||||
.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>
|
</td>
|
||||||
)}
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -4215,7 +4240,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' &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue