Update src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
This commit is contained in:
parent
754170fb6f
commit
fb09fc5382
|
|
@ -90,6 +90,7 @@ const Printstyle4 = ({
|
|||
const GlobalHsnCode = useSelector(GlobalprintHsnCode);
|
||||
const GlobalQrcodet = useSelector(GlobalprintQrcodet);
|
||||
const GlobaldummyData = useSelector(GlobalPritdummyData);
|
||||
console.log(GlobaldummyData, "GlobaldummyData")
|
||||
const GlobalSignature = useSelector(GlobalprintSignature);
|
||||
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
|
||||
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
|
||||
|
|
@ -199,6 +200,7 @@ const Printstyle4 = ({
|
|||
const TakeawayData = table2Data?.productDetails?.filter(
|
||||
(item) => item.BookingTypeName?.toLowerCase() === 'takeaway'
|
||||
);
|
||||
console.log(TakeawayData, "TakeawayData")
|
||||
const DineInData = table2Data?.productDetails?.filter(
|
||||
(item) => item.BookingTypeName?.toLowerCase() === 'dine in'
|
||||
);
|
||||
|
|
@ -345,6 +347,8 @@ const Printstyle4 = ({
|
|||
? paginatedChunks[paginatedChunks.length - 1].length
|
||||
: 0;
|
||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
|
||||
|
||||
console.log(paginatedChunks, 'paginatedChunks')
|
||||
return (
|
||||
<>
|
||||
{FormatTheme ? (
|
||||
|
|
@ -489,7 +493,14 @@ const Printstyle4 = ({
|
|||
>
|
||||
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
||||
Dt: {GlobaldummyData ? formattedDate : Date1}
|
||||
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
||||
Bill No :
|
||||
{GlobaldummyData
|
||||
|
|
@ -509,8 +520,8 @@ const Printstyle4 = ({
|
|||
style={{ textTransform: 'uppercase', fontSize: '12px' }}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -528,8 +539,8 @@ const Printstyle4 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<hr className="PrintStyle4-print-dottline" />
|
||||
|
|
@ -698,194 +709,137 @@ const Printstyle4 = ({
|
|||
</thead>
|
||||
<tbody>
|
||||
{dataChunk?.map((item, index) => {
|
||||
|
||||
const identifiers = item?.ProductIdentifierDtls ?? [];
|
||||
|
||||
const serials = identifiers
|
||||
.filter(d => d.SerialNumber)
|
||||
.map(d => d.SerialNumber);
|
||||
|
||||
const imeis = identifiers
|
||||
.filter(d => d.IMEI1 || d.IMEI2)
|
||||
.map(d => [d.IMEI1, d.IMEI2].filter(Boolean).join(", "));
|
||||
|
||||
const descriptions = identifiers
|
||||
.filter(d => d.Description)
|
||||
.map(d => d.Description);
|
||||
|
||||
const packageList = PackageDetails?.filter(
|
||||
pkg => pkg.ProdId === item.ProdId
|
||||
) ?? [];
|
||||
|
||||
return (
|
||||
<tr key={index}>
|
||||
|
||||
{/* SL NO */}
|
||||
{GlobaldummyData
|
||||
? GlobalSlNo && <td>{index + 1}</td>
|
||||
: SLNO && (
|
||||
<td>
|
||||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
: SLNO && <td>{chunkIndex * chunkSize + index + 1}</td>
|
||||
}
|
||||
|
||||
{/* ITEM COLUMN */}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
padding: "10px 5px"
|
||||
}}
|
||||
>
|
||||
{/* Product Name */}
|
||||
<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?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) =>
|
||||
items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2, index) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
{/* Package OR Size */}
|
||||
{packageList.length > 0 ? (
|
||||
<div>
|
||||
{packageList.map((pkg, i) => (
|
||||
<div key={i}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{(
|
||||
(UomPrint?.SettingValue === 'Y'
|
||||
{(UomPrint?.SettingValue === 'Y'
|
||||
? (item?.Size || '1') +
|
||||
(item?.SinglePc === 'Y'
|
||||
? ' PCS'
|
||||
: item?.Type !== 'C'
|
||||
? ` ${item?.UomName}`
|
||||
: ' COMBO')
|
||||
: '') +
|
||||
(item?.BrandName
|
||||
? ` ${item?.BrandName}`
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) =>
|
||||
items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2, index) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
: '')}
|
||||
{item?.BrandName || ""}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.SalesQty}
|
||||
</td>
|
||||
)
|
||||
: Quantity && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.SalesQty}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.HSN}
|
||||
</td>
|
||||
)
|
||||
: HsnCode && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.HSN}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalMRP && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.MRP}
|
||||
</td>
|
||||
)
|
||||
: MRP && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.SinglePc === 'Y'
|
||||
? item?.Rate
|
||||
: item?.MRP}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalDiscount && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item.discount}
|
||||
</td>
|
||||
)
|
||||
: Discount && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.Type != 'C'
|
||||
? item?.OfferAmt || 0
|
||||
: item?.OfferValue || 0}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{GlobaldummyData
|
||||
? GlobalRate && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.Rate}
|
||||
{/* Serials */}
|
||||
{serials.map((s, i) => (
|
||||
<div key={`serial-${i}`}>{s}</div>
|
||||
))}
|
||||
|
||||
{/* IMEIs */}
|
||||
{imeis.map((iVal, i) => (
|
||||
<div key={`imei-${i}`}>{iVal}</div>
|
||||
))}
|
||||
|
||||
{/* Description - Always New Line */}
|
||||
|
||||
|
||||
{descriptions.map((d, i) => (
|
||||
<div key={`desc-${i}`}>{d}</div>
|
||||
))}
|
||||
</td>
|
||||
)
|
||||
: Rate && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.Rate}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalAmount && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.TotalAmt}
|
||||
</td>
|
||||
)
|
||||
: Amount && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{' '}
|
||||
{item?.Type != 'C'
|
||||
? item?.TotalAmt - item?.OfferAmt || 0
|
||||
: item?.TotalAmt - item?.OfferValue ||
|
||||
0}
|
||||
</td>
|
||||
)}
|
||||
}
|
||||
|
||||
{/* Quantity */}
|
||||
{(GlobaldummyData ? GlobalQuantity : Quantity) && (
|
||||
<td style={{ textAlign: "right" }}>
|
||||
{item?.SalesQty}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* HSN */}
|
||||
{(GlobaldummyData ? GlobalHsnCode : HsnCode) && (
|
||||
<td style={{ textAlign: "right" }}>
|
||||
{item?.HSN}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* MRP */}
|
||||
{(GlobaldummyData ? GlobalMRP : MRP) && (
|
||||
<td style={{ textAlign: "right" }}>
|
||||
{item?.SinglePc === "Y" ? item?.Rate : item?.MRP}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* Discount */}
|
||||
{(GlobaldummyData ? GlobalDiscount : Discount) && (
|
||||
<td style={{ textAlign: "right" }}>
|
||||
{item?.Type !== "C"
|
||||
? item?.OfferAmt || 0
|
||||
: item?.OfferValue || 0}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* Rate */}
|
||||
{(GlobaldummyData ? GlobalRate : Rate) && (
|
||||
<td style={{ textAlign: "right" }}>
|
||||
{item?.Rate}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* Amount */}
|
||||
{(GlobaldummyData ? GlobalAmount : Amount) && (
|
||||
<td style={{ textAlign: "right" }}>
|
||||
{item?.Type !== "C"
|
||||
? (item?.TotalAmt || 0) - (item?.OfferAmt || 0)
|
||||
: (item?.TotalAmt || 0) - (item?.OfferValue || 0)}
|
||||
</td>
|
||||
)}
|
||||
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
|
|
@ -3195,7 +3149,16 @@ const Printstyle4 = ({
|
|||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<div>Dt: {GlobaldummyData ? formattedDate : Date1}</div>
|
||||
<div>
|
||||
Dt: {GlobaldummyData ? formattedDate : Date1}
|
||||
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
<div >
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Bill No :
|
||||
{GlobaldummyData
|
||||
|
|
@ -3214,8 +3177,8 @@ const Printstyle4 = ({
|
|||
style={{ textTransform: 'uppercase', fontSize: '12px' }}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3235,8 +3198,8 @@ const Printstyle4 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<hr className="PrintStyle4-print-dottline" />
|
||||
|
|
@ -3370,203 +3333,101 @@ const Printstyle4 = ({
|
|||
: Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
<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?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) => items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2, index) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
{/* Serial Numbers */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.SerialNumber)
|
||||
?.map((d, i) => (
|
||||
<div key={`serial-${i}`}>
|
||||
{d.SerialNumber}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{(
|
||||
(UomPrint?.SettingValue === 'Y'
|
||||
? (item?.Size || '1') +
|
||||
(item?.SinglePc === 'Y'
|
||||
? ' PCS'
|
||||
: item?.Type !== 'C'
|
||||
? ` ${item?.UomName}`
|
||||
: ' COMBO')
|
||||
: '') +
|
||||
(item?.BrandName
|
||||
? ` ${item?.BrandName}`
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) => items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2, index) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
))}
|
||||
|
||||
{/* IMEI Numbers */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.IMEI1 || d.IMEI2)
|
||||
?.map((d, i) => (
|
||||
<div key={`imei-${i}`}>
|
||||
{[d.IMEI1, d.IMEI2].filter(Boolean).join(", ")}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* ✅ Description ALWAYS NEW LINE */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.Description)
|
||||
?.map((d, i) => (
|
||||
<div key={`desc-${i}`}>
|
||||
{d.Description}
|
||||
</div>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.SalesQty}
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
{/* Package Details */}
|
||||
{PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId).length > 0 ? (
|
||||
<div>
|
||||
{PackageDetails
|
||||
?.filter(pkg => pkg.ProdId === item.ProdId)
|
||||
?.map((pkg, index) => (
|
||||
<div key={index}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* Serial */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.SerialNumber)
|
||||
?.map((d, i) => (
|
||||
<div key={`serial-${i}`}>
|
||||
{d.SerialNumber}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* IMEI */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.IMEI1 || d.IMEI2)
|
||||
?.map((d, i) => (
|
||||
<div key={`imei-${i}`}>
|
||||
{[d.IMEI1, d.IMEI2].filter(Boolean).join(', ')}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* ✅ Description NEW LINE */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.Description)
|
||||
?.map((d, i) => (
|
||||
<div key={`desc-${i}`}>
|
||||
{d.Description}
|
||||
</div>
|
||||
))}
|
||||
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{UomPrint?.SettingValue === 'Y' && (
|
||||
<>({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'} </>
|
||||
)}
|
||||
{item?.BrandName || ""}
|
||||
</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
)
|
||||
: Quantity && (
|
||||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.SalesQty}
|
||||
{/* <div style={{ whiteSpace: 'nowrap' }}>
|
||||
{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?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) => items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2, index) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{(
|
||||
(item?.Size || '1') +
|
||||
(item?.SinglePc === 'Y'
|
||||
? ' PCS'
|
||||
: item?.Type !== 'C'
|
||||
? ` ${item?.UomName}`
|
||||
: ' COMBO') +
|
||||
(item?.BrandName
|
||||
? ` ${item?.BrandName}`
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) => items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2, index) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
</div>
|
||||
)}
|
||||
</div> */}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -3689,6 +3550,7 @@ const Printstyle4 = ({
|
|||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{DineInData?.length > 0 && (
|
||||
<>
|
||||
<div
|
||||
|
|
@ -3819,6 +3681,46 @@ const Printstyle4 = ({
|
|||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
{(
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(items) => items.SerialNumber
|
||||
)
|
||||
.map(
|
||||
(a, index) =>
|
||||
` ${a.SerialNumber}`
|
||||
)
|
||||
.join('')
|
||||
: '') +
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2
|
||||
)
|
||||
.map((item2) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
+
|
||||
(item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 || item1.IMEI2 || item1.SerialNumber
|
||||
)
|
||||
.map((item2) => {
|
||||
return ` ${item2?.Description}`;
|
||||
})
|
||||
.join('')
|
||||
: '')
|
||||
).trim()}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -3840,15 +3742,15 @@ const Printstyle4 = ({
|
|||
<td style={{ textAlign: 'right' }}>
|
||||
{item?.SalesQty}
|
||||
{UomPrint?.SettingValue === 'Y' &&
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
)
|
||||
</div>
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
)
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -3946,6 +3848,7 @@ const Printstyle4 = ({
|
|||
</>
|
||||
)}
|
||||
<div className="PrintStyle4-ThirdDivMaster">
|
||||
|
||||
<div
|
||||
className="print2subTotal"
|
||||
style={{
|
||||
|
|
@ -3967,6 +3870,59 @@ const Printstyle4 = ({
|
|||
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||
</div>
|
||||
</div>
|
||||
{/* <div
|
||||
className="print2subTotal"
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
fontSize: '8px',
|
||||
fontWeight: 400,
|
||||
fontFamily: 'Poppins',
|
||||
borderBottom: '1px dashed #000',
|
||||
borderTop: '1px dashed #000',
|
||||
padding: '5px 0',
|
||||
}}
|
||||
>
|
||||
<div>OVER ALL QTY</div>
|
||||
<div>
|
||||
{GlobaldummyData
|
||||
? '1,066'
|
||||
: Number(productsData?.reduce((a, b) => a + b.SalesQty, 0))}
|
||||
</div>
|
||||
</div> */}
|
||||
<div
|
||||
className="print2subTotal"
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
fontSize: '8px',
|
||||
fontWeight: 400,
|
||||
fontFamily: 'Poppins',
|
||||
borderBottom: '1px dashed #000',
|
||||
borderTop: '1px dashed #000',
|
||||
padding: '5px 40px',
|
||||
}}
|
||||
>
|
||||
<div style={{ display: "flex", gap: "10px" }}>
|
||||
<div> ITEM :</div>
|
||||
<div>
|
||||
{GlobaldummyData
|
||||
? '1,066'
|
||||
: productsData?.length}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: "flex", gap: "10px" }}>
|
||||
<div> QTY :</div>
|
||||
<div>
|
||||
{GlobaldummyData
|
||||
? '1,066'
|
||||
: Number(productsData?.reduce((a, b) => a + b.SalesQty, 0))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/* <div className="PrintStyle4-ThirdP">
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue