Update src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
This commit is contained in:
parent
e5c2577237
commit
533dbbab1b
|
|
@ -471,8 +471,8 @@ const PrintStyle7 = ({
|
|||
>
|
||||
{' '}
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -492,8 +492,8 @@ const PrintStyle7 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -509,8 +509,8 @@ const PrintStyle7 = ({
|
|||
>
|
||||
{' '}
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<hr className="PrintStyle7-print-dottline" />
|
||||
|
|
@ -530,6 +530,10 @@ const PrintStyle7 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
<div className="PrintStyle7-SecondDiv2">
|
||||
<div
|
||||
|
|
@ -690,17 +694,39 @@ const PrintStyle7 = ({
|
|||
))}
|
||||
</div>
|
||||
) : (
|
||||
UomPrint?.SettingValue === 'Y' &&
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
)
|
||||
{UomPrint?.SettingValue === 'Y' && (
|
||||
<>({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'} </>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: "3px" }}>
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(items => items.SerialNumber)
|
||||
.map((a, i) => (
|
||||
<div key={`serial-${i}`}>
|
||||
{a.SerialNumber}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(id => id.IMEI1 || id.IMEI2)
|
||||
.map((id, i) => (
|
||||
<div key={`imei-${i}`}>
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(items => items.SerialNumber || items.IMEI1 || items.IMEI2)
|
||||
.map((a, i) =>
|
||||
a.Description ? (
|
||||
<div key={`desc-${i}`}>
|
||||
{a.Description}
|
||||
</div>
|
||||
) : null
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -902,65 +928,54 @@ const PrintStyle7 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.ProdName}</td>
|
||||
) : (
|
||||
Item === true && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
{/* 🏷 Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* 📦 Size + Brand */}
|
||||
<div>
|
||||
{UomPrint?.SettingValue === 'Y'
|
||||
? `${item?.Size || '1'} ${
|
||||
item?.SinglePc === 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type !== 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'
|
||||
}`
|
||||
: ''
|
||||
}
|
||||
{item?.BrandName !== null
|
||||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{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 || '';
|
||||
{UomPrint?.SettingValue === 'Y' && (
|
||||
<>({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'} </>
|
||||
)}
|
||||
{item?.BrandName ? ` ${item.BrandName}` : ""}
|
||||
</div>
|
||||
|
||||
{/* 🔢 Identifiers */}
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: "3px" }}>
|
||||
{(item?.ProductIdentifierDtls ?? []).map((data, i) => {
|
||||
const hasSerial = data.SerialNumber;
|
||||
const hasIMEI = data.IMEI1 || data.IMEI2;
|
||||
|
||||
return (
|
||||
<div key={i}>
|
||||
{hasSerial && <div>{data.SerialNumber}</div>}
|
||||
|
||||
{hasIMEI && (
|
||||
<div>
|
||||
{[imei1, imei2]
|
||||
{[data.IMEI1, data.IMEI2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
.join(",")}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(hasSerial || hasIMEI) && data.Description && (
|
||||
<div>{data.Description}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
})}
|
||||
</div>
|
||||
</td>
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
|
|
@ -2930,8 +2945,8 @@ const PrintStyle7 = ({
|
|||
>
|
||||
{' '}
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -2953,8 +2968,8 @@ const PrintStyle7 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -2970,8 +2985,8 @@ const PrintStyle7 = ({
|
|||
>
|
||||
{' '}
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<hr className="PrintStyle7-print-dottline" />
|
||||
|
|
@ -2990,7 +3005,12 @@ const PrintStyle7 = ({
|
|||
table2Data?.OrderId,
|
||||
table2Data?.FYStatus
|
||||
)}
|
||||
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
<div className="PrintStyle7-SecondDiv2">
|
||||
<div
|
||||
|
|
@ -3129,17 +3149,37 @@ const PrintStyle7 = ({
|
|||
))}
|
||||
</div>
|
||||
) : (
|
||||
UomPrint?.SettingValue === 'Y' &&
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
)
|
||||
{UomPrint?.SettingValue === 'Y' && (
|
||||
<>({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'} </>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: "3px" }}>
|
||||
{(item?.ProductIdentifierDtls ?? []).filter(
|
||||
items => items.SerialNumber && items.SerialNumber !== ""
|
||||
).map((a, i) => (
|
||||
<div key={`serial-${i}`}>{a.SerialNumber}</div>
|
||||
))}
|
||||
|
||||
{(item?.ProductIdentifierDtls ?? []).filter(
|
||||
id => id.IMEI1 || id.IMEI2
|
||||
).map((id, i) => (
|
||||
<div key={`imei-${i}`}>
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{(item?.ProductIdentifierDtls ?? []).filter(
|
||||
items => items.SerialNumber || items.IMEI1 || items.IMEI2
|
||||
).map((a, i) => (
|
||||
a.Description && (
|
||||
<div key={`desc-${i}`}>
|
||||
{a.Description}
|
||||
</div>
|
||||
)
|
||||
))}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -3339,48 +3379,36 @@ const PrintStyle7 = ({
|
|||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
<div>
|
||||
{UomPrint?.SettingValue === 'Y'
|
||||
? `${item?.Size || '1'} ${
|
||||
item?.SinglePc === 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type !== 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'
|
||||
}`
|
||||
: ''
|
||||
}
|
||||
{UomPrint?.SettingValue === 'Y' && (
|
||||
<>({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'} </>
|
||||
)}
|
||||
{item?.BrandName !== null
|
||||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{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 style={{ display: "flex", flexDirection: "column", gap: "3px" }}>
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(items => items.SerialNumber)
|
||||
.map((a, i) => (
|
||||
<div key={`serial-${i}`}>{a.SerialNumber}</div>
|
||||
))}
|
||||
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(id => id.IMEI1 || id.IMEI2)
|
||||
.map((id, i) => (
|
||||
<div key={`imei-${i}`}>
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(items => items.SerialNumber || items.IMEI1 || items.IMEI2)
|
||||
.map((a, i) =>
|
||||
a.Description ? (
|
||||
<div key={`desc-${i}`}>{a.Description}</div>
|
||||
) : null
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue