add description
This commit is contained in:
parent
5786040e3d
commit
c19ba07c44
|
|
@ -57,6 +57,7 @@ const InvoiceTemplate = ({
|
|||
isPdf,
|
||||
sportsAppPreference,
|
||||
MembershipApplied = null,
|
||||
SalesModePref,
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const GlobalUpiID = useSelector(GlobalUpiIDprint);
|
||||
|
|
@ -944,6 +945,10 @@ const InvoiceTemplate = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0rem', fontWeight: '600' }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -1261,76 +1266,66 @@ const InvoiceTemplate = ({
|
|||
<td
|
||||
className="table-header-cell"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
fontFamily: 'sans-serif',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
fontFamily: "sans-serif",
|
||||
}}
|
||||
>
|
||||
{/* 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>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
)
|
||||
</div>
|
||||
)}
|
||||
{' '}
|
||||
{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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
|
||||
{(() => {
|
||||
const packages =
|
||||
PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId) || [];
|
||||
|
||||
const identifiers = item?.ProductIdentifierDtls || [];
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* Package OR Size */}
|
||||
{packages.length > 0 ? (
|
||||
<div>
|
||||
{packages.map((pkg, index) => (
|
||||
<span key={index} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Identifiers */}
|
||||
{identifiers.map((id, i) => (
|
||||
<div key={i} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
{/* Serial + IMEIs in one line */}
|
||||
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) && (
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
{(id?.IMEI1 || id?.IMEI2) && (
|
||||
<div>{[id.IMEI1, id.IMEI2].filter(Boolean).join(", ")}</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Description on new line */}
|
||||
{id?.Description && <div>{id.Description}</div>}
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
})()}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -2994,54 +2989,44 @@ const InvoiceTemplate = ({
|
|||
: Item == true && (
|
||||
<td
|
||||
className="table-header-cell"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
style={{ display: "flex", flexDirection: "column" }}
|
||||
>
|
||||
{/* Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* Size + UOM */}
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
{' '}
|
||||
{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(',')}
|
||||
|
||||
{/* Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Identifiers */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
<div key={index} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
|
||||
{/* Serial + IMEIs in one row */}
|
||||
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) && (
|
||||
<div style={{ display: 'flex', gap: '4px' }}>
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
{(id?.IMEI1 || id?.IMEI2) && (
|
||||
<div>{[id.IMEI1, id.IMEI2].filter(Boolean).join(", ")}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
)}
|
||||
|
||||
{/* Description on new line */}
|
||||
{id?.Description && <div>{id.Description}</div>}
|
||||
|
||||
</div>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ const PrintA4Style11 = ({
|
|||
printDatas,
|
||||
sportsAppPreference,
|
||||
MembershipApplied = null,
|
||||
SalesModePref,
|
||||
}) => {
|
||||
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
|
||||
const GlobalSignature = useSelector(GlobalprintSignature);
|
||||
|
|
@ -426,6 +427,10 @@ const PrintA4Style11 = ({
|
|||
table2Data?.OrderId,
|
||||
table2Data?.FYStatus
|
||||
)}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
{GlobaldummyData && '685'}
|
||||
</div>
|
||||
<div style={{ textAlign: 'center', width: '24vw' }}>
|
||||
|
|
@ -445,10 +450,16 @@ const PrintA4Style11 = ({
|
|||
justifyContent: 'space-between',
|
||||
padding: '0rem 1rem',
|
||||
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
|
||||
flexDirection: 'column',
|
||||
textAlign: 'left'
|
||||
}}
|
||||
>
|
||||
{' '}
|
||||
<div>{Date1}</div>{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -689,88 +700,78 @@ const PrintA4Style11 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.name}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.name}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{PackageDetails?.filter(
|
||||
(pkg) =>
|
||||
pkg.ProdId === item.ProdId
|
||||
(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>
|
||||
))}
|
||||
{PackageDetails
|
||||
?.filter((pkg) => pkg.ProdId === item.ProdId)
|
||||
?.map((pkg, index) => (
|
||||
<span key={index} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
)}
|
||||
{' '}
|
||||
{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(',')}
|
||||
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Serial Numbers */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
<div key={`serial-${index}`}>
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* IMEI */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => {
|
||||
const imei1 = id?.IMEI1 || "";
|
||||
const imei2 = id?.IMEI2 || "";
|
||||
|
||||
return (
|
||||
(imei1 || imei2) && (
|
||||
<div key={`imei-${index}`}>
|
||||
{[imei1, imei2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
)
|
||||
);
|
||||
})}
|
||||
|
||||
{/* Description */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
|
||||
id?.Description && (
|
||||
<div key={`desc-${index}`}>
|
||||
{id.Description}
|
||||
</div>
|
||||
)
|
||||
))}
|
||||
|
||||
</td>
|
||||
)}
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
<td style={{ textAlign: 'center' }}>
|
||||
|
|
@ -1755,67 +1756,57 @@ const PrintA4Style11 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.ProdName}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
{/* Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* Size + UOM */}
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
{' '}
|
||||
{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 (
|
||||
|
||||
{/* Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Identifiers */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
<div key={index}>
|
||||
|
||||
{/* Serial Number */}
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
|
||||
{/* IMEI */}
|
||||
{(id?.IMEI1 || id?.IMEI2) && (
|
||||
<div>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
)}
|
||||
|
||||
{/* Description */}
|
||||
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) && id?.Description && (
|
||||
<div>{id.Description}</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
<td style={{ textAlign: 'center' }}>
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ const PrintA5Style11 = ({
|
|||
printDatas,
|
||||
sportsAppPreference,
|
||||
MembershipApplied = null,
|
||||
SalesModePref,
|
||||
}) => {
|
||||
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
|
||||
const GlobalSignature = useSelector(GlobalprintSignature);
|
||||
|
|
@ -427,6 +428,8 @@ const PrintA5Style11 = ({
|
|||
table2Data?.OrderId,
|
||||
table2Data?.FYStatus
|
||||
)}
|
||||
|
||||
|
||||
{GlobaldummyData && '685'}
|
||||
</div>
|
||||
<div style={{ textAlign: 'center', width: '24vw' }}>
|
||||
|
|
@ -446,10 +449,16 @@ const PrintA5Style11 = ({
|
|||
justifyContent: 'space-between',
|
||||
padding: '0rem 1rem',
|
||||
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
|
||||
flexDirection: 'column',
|
||||
textAlign:'left'
|
||||
}}
|
||||
>
|
||||
{' '}
|
||||
<div>{Date1}</div>{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -691,88 +700,71 @@ const PrintA5Style11 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.name}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.name}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{PackageDetails?.filter(
|
||||
(pkg) =>
|
||||
pkg.ProdId === item.ProdId
|
||||
(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>
|
||||
))}
|
||||
{PackageDetails
|
||||
?.filter((pkg) => pkg.ProdId === item.ProdId)
|
||||
?.map((pkg, index) => (
|
||||
<span key={index} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
)}
|
||||
{' '}
|
||||
{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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Identifiers */}
|
||||
{item?.ProductIdentifierDtls?.length > 0
|
||||
? item.ProductIdentifierDtls.map((id, index) => (
|
||||
<div key={index}>
|
||||
|
||||
{/* Serial */}
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
|
||||
{/* IMEI */}
|
||||
{(id?.IMEI1 || id?.IMEI2) && (
|
||||
<div>
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Description */}
|
||||
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
|
||||
id?.Description && (
|
||||
<div>{id.Description}</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
))
|
||||
: null}
|
||||
</td>
|
||||
)}
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
<td style={{ textAlign: 'center' }}>
|
||||
|
|
@ -1694,67 +1686,54 @@ const PrintA5Style11 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.ProdName}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
{' '}
|
||||
{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 (
|
||||
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
<div key={index}>
|
||||
|
||||
{/* Serial Number */}
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
|
||||
{/* IMEI */}
|
||||
{(id?.IMEI1 || id?.IMEI2) && (
|
||||
<div>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
)}
|
||||
|
||||
{/* Description */}
|
||||
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
|
||||
id?.Description && (
|
||||
<div>{id.Description}</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
<td style={{ textAlign: 'center' }}>
|
||||
|
|
|
|||
|
|
@ -464,8 +464,8 @@ const PrintStyle11 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`} */}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -484,6 +484,10 @@ const PrintStyle11 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
)}
|
||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
|
||||
|
|
@ -491,8 +495,8 @@ const PrintStyle11 = ({
|
|||
style={{ textTransform: 'uppercase', textAlign: 'center' }}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`} */}
|
||||
</div>
|
||||
)}
|
||||
<hr className="PrintStyle11-print-dottline" />
|
||||
|
|
@ -682,38 +686,30 @@ const PrintStyle11 = ({
|
|||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls?.length >
|
||||
0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
items.SerialNumber == '' ||
|
||||
items.SerialNumber == null
|
||||
)
|
||||
)?.map((a) => {
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>
|
||||
{item?.ProductIdentifierDtls?.map((detail, index) => {
|
||||
const serial = detail.SerialNumber?.trim();
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(', ');
|
||||
const description = detail.Description?.trim();
|
||||
|
||||
// Skip if nothing exists
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
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 key={index} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
{/* Serial + IMEI in one line */}
|
||||
{(serial || imeis) && (
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imei && <div>{imeis}</div>}
|
||||
</div>
|
||||
)}
|
||||
{/* Description on new line */}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
|
|
@ -728,38 +724,27 @@ const PrintStyle11 = ({
|
|||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls?.length >
|
||||
0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
items.SerialNumber == '' ||
|
||||
items.SerialNumber == null
|
||||
)
|
||||
)?.map((a) => {
|
||||
<div style={{ display: 'flex', gap: "3px", flexWrap: 'wrap' }}>
|
||||
{item?.ProductIdentifierDtls?.map((detail, index) => {
|
||||
const serial = detail.SerialNumber;
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(',');
|
||||
const description = detail.Description;
|
||||
|
||||
// Only render if at least one value exists
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
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 key={index} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imeis && <div>{imeis}</div>}
|
||||
</div>
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
})}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
|
|
@ -3115,8 +3100,8 @@ const PrintStyle11 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`} */}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -3135,13 +3120,17 @@ const PrintStyle11 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
)}
|
||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
|
||||
<div style={{ textTransform: 'uppercase', textAlign: 'center' }}>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3279,52 +3268,39 @@ const PrintStyle11 = ({
|
|||
(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})
|
||||
{/* Package Details */}
|
||||
{PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId)?.map((pkg, idx) => (
|
||||
<span key={idx} style={{ display: 'block' }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
{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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
|
||||
{/* Brand Name */}
|
||||
{item?.BrandName && <span>{item.BrandName}</span>}
|
||||
|
||||
{/* Product Identifiers */}
|
||||
{item?.ProductIdentifierDtls?.map((detail, idx) => {
|
||||
const serial = detail.SerialNumber?.trim();
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(', ');
|
||||
const description = detail.Description?.trim();
|
||||
|
||||
// Skip if nothing exists
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
return (
|
||||
<div key={idx} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
{/* Serial + IMEIs on one line */}
|
||||
{(serial || imeis) && (
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imeis && <div>{imeis}</div>}
|
||||
</div>
|
||||
)}
|
||||
{/* Description on new line */}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
|
|
@ -3339,7 +3315,7 @@ const PrintStyle11 = ({
|
|||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls?.length > 0
|
||||
{/* {item?.ProductIdentifierDtls?.length > 0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
|
|
@ -3368,7 +3344,31 @@ const PrintStyle11 = ({
|
|||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
: ''} */}
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
|
||||
{item?.ProductIdentifierDtls?.map((detail, index) => {
|
||||
const serial = detail.SerialNumber?.trim();
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(', ');
|
||||
const description = detail.Description?.trim();
|
||||
|
||||
// Skip if nothing exists
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
return (
|
||||
<div key={index} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
{/* Serial + IMEIs on one line */}
|
||||
{(serial || imeis) && (
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imeis && <div>{imeis}</div>}
|
||||
</div>
|
||||
)}
|
||||
{/* Description on new line */}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -842,41 +842,31 @@ const Printstyle12 = ({
|
|||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
items.SerialNumber ==
|
||||
'' ||
|
||||
items.SerialNumber == null
|
||||
)
|
||||
)?.map((a) => {
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
|
||||
{item?.ProductIdentifierDtls?.map((detail, index) => {
|
||||
const serial = detail.SerialNumber?.trim();
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(', ');
|
||||
const description = detail.Description?.trim();
|
||||
|
||||
// Skip if all are empty
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
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 key={index} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
{/* Serial + IMEIs on the same row */}
|
||||
{(serial || imeis) && (
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imeis && <div>{imeis}</div>}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Description on new line */}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
|
|
@ -3521,7 +3511,7 @@ const Printstyle12 = ({
|
|||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls?.length > 0
|
||||
{/* {item?.ProductIdentifierDtls?.length > 0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
|
|
@ -3550,7 +3540,32 @@ const Printstyle12 = ({
|
|||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
: ''} */}
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
|
||||
{item?.ProductIdentifierDtls?.map((detail, index) => {
|
||||
const serial = detail.SerialNumber?.trim();
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(', ');
|
||||
const description = detail.Description?.trim();
|
||||
|
||||
// Skip empty entries
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
return (
|
||||
<div key={index} style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
||||
{/* Serial + IMEIs in one row */}
|
||||
{(serial || imeis) && (
|
||||
<div style={{ display: 'flex', gap: '3px' }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imeis && <div>{imeis}</div>}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Description on new line */}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -466,8 +466,8 @@ const Printstyle2 = ({
|
|||
}}
|
||||
>
|
||||
Estimate Bill{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -490,8 +490,8 @@ const Printstyle2 = ({
|
|||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
Bill{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -510,7 +510,13 @@ const Printstyle2 = ({
|
|||
</div>
|
||||
<div style={{ fontWeight: '600', fontSize: '10px' }}>
|
||||
{GlobaldummyData ? formattedDate : Date1}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr className="PrintStyle2-print-dottline" />
|
||||
</div>
|
||||
|
|
@ -722,38 +728,50 @@ const Printstyle2 = ({
|
|||
? 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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
<div style={{ display: "flex", gap: "3px" ,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) => (
|
||||
<span key={i}>{a.Description}</span>
|
||||
))
|
||||
|
||||
: ''}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -3092,8 +3110,8 @@ const Printstyle2 = ({
|
|||
}}
|
||||
>
|
||||
Estimate Bill{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -3117,8 +3135,8 @@ const Printstyle2 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3308,34 +3326,41 @@ const Printstyle2 = ({
|
|||
? 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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
<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) => (
|
||||
<span key={i}>{a.Description}</span>
|
||||
))
|
||||
|
||||
: ''}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -228,18 +228,28 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
|||
|
||||
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
|
||||
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
|
||||
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
||||
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} </div>}
|
||||
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>}
|
||||
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
</div>)}
|
||||
|
||||
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", textAlign: 'center', padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
||||
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", textAlign: 'center', padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>}
|
||||
|
||||
<hr className="PrintStyle3-print-dottline" />
|
||||
<div className="PrintStyle3-print-ordr-dtls">
|
||||
<div style={{ lineheight: '50px' }}>
|
||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -289,14 +299,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
|||
)
|
||||
</div>)}
|
||||
{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>);
|
||||
}
|
||||
) : ""}
|
||||
<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) => (
|
||||
<span key={i}>{a.Description} </span>
|
||||
))
|
||||
|
||||
: ''}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
|
||||
|
|
@ -1155,16 +1192,27 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
|||
|
||||
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
|
||||
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
|
||||
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
||||
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
||||
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>}
|
||||
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>}
|
||||
</div>
|
||||
</div>)}
|
||||
|
||||
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
||||
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>}
|
||||
<hr className="PrintStyle3-print-dottline" />
|
||||
<div className="PrintStyle3-print-ordr-dtls">
|
||||
<div style={{ lineheight: '50px' }}>
|
||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
|
||||
</div>}
|
||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1210,14 +1258,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
|||
)
|
||||
</div>)}
|
||||
{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>);
|
||||
}
|
||||
) : ""}
|
||||
<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) => (
|
||||
<span key={i}>{a.Description}</span>
|
||||
))
|
||||
|
||||
: ''}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -113,7 +114,7 @@ const Printstyle4 = ({
|
|||
{}
|
||||
),
|
||||
];
|
||||
console.log(table2Data, 'table2Data');
|
||||
console.log(table2Data, 'eeeeeeeeeeeeeeee');
|
||||
const estimatePrintHeader =
|
||||
SettingData?.[0]?.SettingDtlDetails?.find(
|
||||
(setting) =>
|
||||
|
|
@ -196,6 +197,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'
|
||||
);
|
||||
|
|
@ -342,6 +344,8 @@ const Printstyle4 = ({
|
|||
? paginatedChunks[paginatedChunks.length - 1].length
|
||||
: 0;
|
||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
|
||||
|
||||
console.log(paginatedChunks, 'paginatedChunks')
|
||||
return (
|
||||
<>
|
||||
{FormatTheme ? (
|
||||
|
|
@ -486,7 +490,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
|
||||
|
|
@ -506,8 +517,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>
|
||||
)}
|
||||
|
||||
|
|
@ -525,8 +536,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" />
|
||||
|
|
@ -695,192 +706,135 @@ 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>
|
||||
{(
|
||||
(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?.Size || "1")}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"}{" "}
|
||||
{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>
|
||||
);
|
||||
})}
|
||||
|
|
@ -3188,7 +3142,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
|
||||
|
|
@ -3207,8 +3170,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>
|
||||
)}
|
||||
|
||||
|
|
@ -3228,8 +3191,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" />
|
||||
|
|
@ -3363,200 +3326,104 @@ const Printstyle4 = ({
|
|||
: Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* Serial Numbers */}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.filter(d => d.SerialNumber)
|
||||
?.map((d, i) => (
|
||||
<div key={`serial-${i}`}>
|
||||
{d.SerialNumber}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 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>
|
||||
))}
|
||||
|
||||
{/* ✅ 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>
|
||||
{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>
|
||||
|
||||
{/* 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>
|
||||
{(
|
||||
(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?.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
|
||||
|
|
@ -3679,6 +3546,7 @@ const Printstyle4 = ({
|
|||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{DineInData?.length > 0 && (
|
||||
<>
|
||||
<div
|
||||
|
|
@ -3809,6 +3677,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
|
||||
|
|
@ -3934,6 +3842,7 @@ const Printstyle4 = ({
|
|||
</>
|
||||
)}
|
||||
<div className="PrintStyle4-ThirdDivMaster">
|
||||
|
||||
<div
|
||||
className="print2subTotal"
|
||||
style={{
|
||||
|
|
@ -3955,6 +3864,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>
|
||||
|
|
|
|||
|
|
@ -437,8 +437,8 @@ const PrintStyle5 = ({
|
|||
{table2Data?.OrderType === 'E' && estimateTitle && (
|
||||
<div style={{ textTransform: 'uppercase' }}>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -452,8 +452,8 @@ const PrintStyle5 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -465,8 +465,8 @@ const PrintStyle5 = ({
|
|||
style={{ textTransform: 'uppercase', textAlign: 'center' }}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -479,7 +479,13 @@ const PrintStyle5 = ({
|
|||
}}
|
||||
>
|
||||
{' '}
|
||||
<div> {GlobaldummyData ? formattedDate : Date1} </div>{' '}
|
||||
<div> {GlobaldummyData ? formattedDate : Date1}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
|
||||
</div>{' '}
|
||||
<div>
|
||||
{' '}
|
||||
Bill No :
|
||||
|
|
@ -696,85 +702,103 @@ const PrintStyle5 = ({
|
|||
)
|
||||
) : (
|
||||
<>
|
||||
<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?.filter(
|
||||
(items) =>
|
||||
items.SerialNumber &&
|
||||
items.SerialNumber !== ''
|
||||
)?.map((a, index) => (
|
||||
<div key={`serial-${index}`}>
|
||||
{a.SerialNumber}
|
||||
</div>
|
||||
)) || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(item1) => item1.IMEI1 || item1.IMEI2
|
||||
)?.map((item2, index) => {
|
||||
const imei1 = item2.IMEI1 || '';
|
||||
const imei2 = item2.IMEI2 || '';
|
||||
return (
|
||||
<div key={`imei-${index}`}>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
{(() => {
|
||||
const identifiers = item?.ProductIdentifierDtls ?? [];
|
||||
|
||||
const packageList = (PackageDetails ?? []).filter(
|
||||
pkg => pkg.ProdId === item.ProdId
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* 🏷 Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{packageList.length > 0 ? (
|
||||
// ================= PACKAGE EXISTS =================
|
||||
<div>
|
||||
|
||||
{/* 📦 Package Details */}
|
||||
{packageList.map((pkg, index) => (
|
||||
<div key={index}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 🔢 Identifiers (Serial / IMEI / Description) */}
|
||||
{identifiers.map((d, i) => {
|
||||
const serial = d.SerialNumber;
|
||||
const imei = [d.IMEI1, d.IMEI2].filter(Boolean).join(", ");
|
||||
const description = d.Description;
|
||||
|
||||
if (!serial && !imei && !description) return null;
|
||||
|
||||
return (
|
||||
<div key={i}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imei && <div>{imei}</div>}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty}
|
||||
</div>
|
||||
);
|
||||
}) || '') +
|
||||
(GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty)}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{(item?.Size || '1') +
|
||||
(item?.SinglePc === 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type !== 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO') +
|
||||
(item?.BrandName || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
items.SerialNumber &&
|
||||
items.SerialNumber !== ''
|
||||
)?.map((a, index) => (
|
||||
<div key={`serial-${index}`}>
|
||||
{a.SerialNumber}
|
||||
|
||||
</div>
|
||||
)) || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(item1) => item1.IMEI1 || item1.IMEI2
|
||||
)?.map((item2, index) => {
|
||||
const imei1 = item2.IMEI1 || '';
|
||||
const imei2 = item2.IMEI2 || '';
|
||||
return (
|
||||
<div key={`imei-${index}`}>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
) : (
|
||||
// ================= NO PACKAGE =================
|
||||
<div>
|
||||
|
||||
{/* 📏 Size + UOM */}
|
||||
<div>
|
||||
{(item?.Size || "1")}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"}
|
||||
</div>
|
||||
);
|
||||
}) || '') +
|
||||
'-' +
|
||||
(GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 🏷 Brand */}
|
||||
{item?.BrandName && (
|
||||
<div>{item.BrandName}</div>
|
||||
)}
|
||||
|
||||
{/* 🔢 Identifiers (Serial / IMEI / Description) */}
|
||||
{identifiers.map((d, i) => {
|
||||
const serial = d.SerialNumber;
|
||||
const imei = [d.IMEI1, d.IMEI2].filter(Boolean).join(", ");
|
||||
const description = d.Description;
|
||||
|
||||
if (!serial && !imei && !description) return null;
|
||||
|
||||
return (
|
||||
<div key={i}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imei && <div>{imei}</div>}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
-
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
})()}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -2729,8 +2753,8 @@ const PrintStyle5 = ({
|
|||
{table2Data?.OrderType === 'E' && estimateTitle && (
|
||||
<div style={{ textTransform: 'uppercase' }}>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -2746,8 +2770,8 @@ const PrintStyle5 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -2757,8 +2781,8 @@ const PrintStyle5 = ({
|
|||
{!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
|
||||
<div style={{ textTransform: 'uppercase', textAlign: 'center' }}>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -2772,7 +2796,12 @@ const PrintStyle5 = ({
|
|||
}}
|
||||
>
|
||||
{' '}
|
||||
<div> {GlobaldummyData ? formattedDate : Date1} </div>{' '}
|
||||
<div> {GlobaldummyData ? formattedDate : Date1}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>{' '}
|
||||
<div>
|
||||
{' '}
|
||||
Bill No :
|
||||
|
|
@ -2978,88 +3007,104 @@ const PrintStyle5 = ({
|
|||
)
|
||||
) : (
|
||||
<>
|
||||
{/* 🏷 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?.BrandName || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
items.SerialNumber &&
|
||||
items.SerialNumber !== ''
|
||||
)?.map((a, index) => (
|
||||
<div key={`serial-${index}`}>
|
||||
{a.SerialNumber}
|
||||
</div>
|
||||
)) || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(item1) => item1.IMEI1 || item1.IMEI2
|
||||
)?.map((item2, index) => {
|
||||
const imei1 = item2.IMEI1 || '';
|
||||
const imei2 = item2.IMEI2 || '';
|
||||
{(() => {
|
||||
const packages =
|
||||
(PackageDetails ?? []).filter(pkg => pkg.ProdId === item.ProdId);
|
||||
|
||||
const identifiers = item?.ProductIdentifierDtls ?? [];
|
||||
|
||||
return packages.length > 0 ? (
|
||||
// ================= PACKAGE EXISTS =================
|
||||
<div>
|
||||
{/* 📦 Package Details */}
|
||||
{packages.map((pkg, index) => (
|
||||
<span key={index} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
|
||||
{/* 🏷 Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* 🔢 Serial / IMEI / Description */}
|
||||
{identifiers.map((d, i) => {
|
||||
const values = [
|
||||
d.SerialNumber,
|
||||
d.IMEI1,
|
||||
d.IMEI2,
|
||||
d.Description
|
||||
].filter(Boolean);
|
||||
|
||||
if (values.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div key={`imei-${index}`}>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
<div key={i}>
|
||||
{values.join(", ")}
|
||||
</div>
|
||||
);
|
||||
}) || '') +
|
||||
'-' +
|
||||
(GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty)}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{(item?.Size || '1') +
|
||||
(item?.SinglePc === 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type !== 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO') +
|
||||
(item?.BrandName || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
items.SerialNumber &&
|
||||
items.SerialNumber !== ''
|
||||
)?.map((a, index) => (
|
||||
<div key={`serial-${index}`}>
|
||||
{a.SerialNumber}
|
||||
</div>
|
||||
)) || '') +
|
||||
(item?.ProductIdentifierDtls?.filter(
|
||||
(item1) => item1.IMEI1 || item1.IMEI2
|
||||
)?.map((item2, index) => {
|
||||
const imei1 = item2.IMEI1 || '';
|
||||
const imei2 = item2.IMEI2 || '';
|
||||
})}
|
||||
|
||||
{/* 🧪 Debug / Extra Text */}
|
||||
<div>ssd3</div>
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
-
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
// ================= NO PACKAGE =================
|
||||
<div>
|
||||
{/* 📏 Size + UOM */}
|
||||
<div>
|
||||
{(item?.Size || "1")}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"}
|
||||
</div>
|
||||
|
||||
{/* 🏷 Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* 🔢 Serial / IMEI / Description */}
|
||||
{identifiers.map((d, i) => {
|
||||
const values = [
|
||||
d.SerialNumber,
|
||||
d.IMEI1,
|
||||
d.IMEI2,
|
||||
d.Description
|
||||
].filter(Boolean);
|
||||
|
||||
if (values.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div key={`imei-${index}`}>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
<div key={i}>
|
||||
{values.join(", ")}
|
||||
</div>
|
||||
);
|
||||
}) || '') +
|
||||
'-' +
|
||||
(GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty)}
|
||||
</div>
|
||||
)}
|
||||
})}
|
||||
|
||||
{/* 🧪 Debug / Extra Text */}
|
||||
<div>ssd4</div>
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
-
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: item?.SalesQty}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})()}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const Printstyle6 = ({
|
|||
sportsAppPreference,
|
||||
MembershipApplied = null,
|
||||
}) => {
|
||||
console.log(table2Data, 'table2Data');
|
||||
console.log(table2Data, 'table2Data22222222222222');
|
||||
const dispatch = useDispatch();
|
||||
const GlobalUpiID = useSelector(GlobalUpiIDprint);
|
||||
const FieldDetails = useSelector(GloabalFieldDetails);
|
||||
|
|
@ -455,8 +455,8 @@ const Printstyle6 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -477,8 +477,8 @@ const Printstyle6 = ({
|
|||
: PaymentStatus?.length === 1
|
||||
? PaymentStatus?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -493,8 +493,8 @@ const Printstyle6 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
|
|
@ -514,6 +514,10 @@ const Printstyle6 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
|
||||
<div style={{ fontSize: '12px' }}>{Date1}</div>
|
||||
<hr className="PrintStyle6-HrLine" />
|
||||
|
|
@ -763,34 +767,67 @@ const Printstyle6 = ({
|
|||
<>
|
||||
{Item && (
|
||||
<>
|
||||
{item?.ProdName}
|
||||
{PackageDetails?.filter(
|
||||
(pkg) =>
|
||||
pkg.ProdId === item.ProdId
|
||||
).length > 0 ? (
|
||||
PackageDetails?.filter(
|
||||
(pkg) =>
|
||||
pkg.ProdId === item.ProdId
|
||||
)?.map((pkg, index) => (
|
||||
<div key={index}>
|
||||
{pkg.ParcelCount} PCS{' '}
|
||||
{pkg.ParcelQty} PACK (
|
||||
{pkg.ParcelType})
|
||||
{/* 🏷 Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* 📦 Package OR Size */}
|
||||
{(() => {
|
||||
const packageList = (PackageDetails ?? []).filter(
|
||||
pkg => pkg.ProdId === item.ProdId
|
||||
);
|
||||
|
||||
if (packageList.length > 0) {
|
||||
return packageList.map((pkg, index) => (
|
||||
<div key={index}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</div>
|
||||
));
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
({item?.Size || "1"}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<span>
|
||||
({item?.Size ? item?.Size : '1'}
|
||||
{item?.SinglePc === 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type !== 'C'
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
)
|
||||
</span>
|
||||
)}
|
||||
{' - '}
|
||||
{Quantity && item?.SalesQty}
|
||||
);
|
||||
})()}
|
||||
|
||||
{/* 🔢 Serial Numbers */}
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(d => d.SerialNumber)
|
||||
.map((d, i) => (
|
||||
<div key={`serial-${i}`}>
|
||||
{d.SerialNumber}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 📱 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>
|
||||
))}
|
||||
|
||||
{/* 📝 Description (Always New Line) */}
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(d => d.SerialNumber || d.IMEI1 || d.IMEI2 || d.Description)
|
||||
.map((d, i) => (
|
||||
<div key={`description-${i}`}>
|
||||
{d.Description}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
- {Quantity && item?.SalesQty}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
|
@ -1111,55 +1148,53 @@ const Printstyle6 = ({
|
|||
) : (
|
||||
<td
|
||||
className="Re-print-body-Rate"
|
||||
style={{ textAlign: 'left' }}
|
||||
style={{ textAlign: "left" }}
|
||||
>
|
||||
{(GlobaldummyData
|
||||
? GlobalItem &&
|
||||
item?.ProdName +
|
||||
`(${item?.Size + item?.UomName})`
|
||||
: Item &&
|
||||
item?.ProdName +
|
||||
`(${item?.Size ? 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>
|
||||
);
|
||||
})
|
||||
: '' +
|
||||
'-' +
|
||||
(GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: Quantity && item?.SalesQty)}
|
||||
{/* 🏷 Product Name + Size */}
|
||||
<div>
|
||||
{GlobaldummyData
|
||||
? GlobalItem &&
|
||||
`${item?.ProdName} (${item?.Size}${item?.UomName})`
|
||||
: Item &&
|
||||
`${item?.ProdName} (${item?.Size ? item.Size : "1"}${item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"
|
||||
})`}
|
||||
</div>
|
||||
|
||||
{/* 🏷 Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* 🔢 Serial Numbers */}
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(d => d.SerialNumber)
|
||||
.map((d, i) => (
|
||||
<div key={`serial-${i}`}>{d.SerialNumber}</div>
|
||||
))}
|
||||
|
||||
{/* 📱 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>
|
||||
))}
|
||||
{(item?.ProductIdentifierDtls ?? [])
|
||||
.filter(d => d.IMEI1 || d.IMEI2 || d.SerialNumber)
|
||||
.map((d, i) => (
|
||||
<div key={`description-${i}`}>{d.Description}</div>
|
||||
))}
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
-
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: Quantity && item?.SalesQty}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -3311,8 +3346,8 @@ const Printstyle6 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3335,8 +3370,8 @@ const Printstyle6 = ({
|
|||
: 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>
|
||||
|
|
@ -3352,8 +3387,8 @@ const Printstyle6 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
|
|
@ -3373,6 +3408,10 @@ const Printstyle6 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
|
||||
<div style={{ fontSize: '12px' }}>{Date1}</div>
|
||||
<hr className="PrintStyle6-HrLine" />
|
||||
|
|
@ -3822,50 +3861,69 @@ const Printstyle6 = ({
|
|||
) : (
|
||||
<td
|
||||
className="Re-print-body-Rate"
|
||||
style={{ textAlign: 'left' }}
|
||||
style={{ textAlign: "left" }}
|
||||
>
|
||||
{(GlobaldummyData
|
||||
? GlobalItem &&
|
||||
item?.ProdName +
|
||||
`(${item?.Size + item?.UomName})`
|
||||
: Item &&
|
||||
item?.ProdName +
|
||||
`(${item?.Size ? 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(',')}
|
||||
{(() => {
|
||||
const identifiers = item?.ProductIdentifierDtls ?? [];
|
||||
|
||||
const sizeText = GlobaldummyData
|
||||
? GlobalItem &&
|
||||
`${item?.ProdName} (${item?.Size}${item?.UomName})`
|
||||
: Item &&
|
||||
`${item?.ProdName} (${item?.Size || "1"}${item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"
|
||||
})`;
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* 🏷 Product Name + Size */}
|
||||
<div>{sizeText}</div>
|
||||
|
||||
{/* 🏷 Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* 🔢 Serial Numbers */}
|
||||
{identifiers
|
||||
.filter(d => d.SerialNumber)
|
||||
.map((d, i) => (
|
||||
<div key={`serial-${i}`}>
|
||||
{d.SerialNumber}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: '' +
|
||||
'-' +
|
||||
(GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: Quantity && item?.SalesQty)}
|
||||
))}
|
||||
|
||||
{/* 📱 IMEI Numbers */}
|
||||
{identifiers
|
||||
.filter(d => d.IMEI1 || d.IMEI2)
|
||||
.map((d, i) => (
|
||||
<div key={`imei-${i}`}>
|
||||
{[d.IMEI1, d.IMEI2].filter(Boolean).join(", ")}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 📝 Description (only if Serial or IMEI exists) */}
|
||||
{identifiers
|
||||
.filter(d => d.SerialNumber || d.IMEI1 || d.IMEI2 || d.Description)
|
||||
.map((d, i) =>
|
||||
d.Description ? (
|
||||
<div key={`description-${i}`}>
|
||||
{d.Description}
|
||||
</div>
|
||||
) : null
|
||||
)}
|
||||
|
||||
{/* 🔢 Quantity */}
|
||||
<div>
|
||||
-
|
||||
{GlobaldummyData
|
||||
? GlobalQuantity && item?.SalesQty
|
||||
: Quantity && item?.SalesQty}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
})()}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
|
|||
|
|
@ -468,8 +468,8 @@ const PrintStyle7 = ({
|
|||
>
|
||||
{' '}
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -489,8 +489,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>
|
||||
|
|
@ -506,8 +506,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" />
|
||||
|
|
@ -527,6 +527,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
|
||||
|
|
@ -697,6 +701,33 @@ const PrintStyle7 = ({
|
|||
)
|
||||
</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
|
||||
|
|
@ -898,63 +929,59 @@ 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>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
{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>
|
||||
{[data.IMEI1, data.IMEI2]
|
||||
.filter(Boolean)
|
||||
.join(",")}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(hasSerial || hasIMEI) && data.Description && (
|
||||
<div>{data.Description}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
<td style={{ textAlign: 'center' }}>
|
||||
|
|
@ -2923,8 +2950,8 @@ const PrintStyle7 = ({
|
|||
>
|
||||
{' '}
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
{table2Data?.OrderType === 'E' ? (
|
||||
|
|
@ -2946,8 +2973,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>
|
||||
|
|
@ -2963,8 +2990,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" />
|
||||
|
|
@ -2983,7 +3010,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
|
||||
|
|
@ -3132,6 +3164,31 @@ const PrintStyle7 = ({
|
|||
)
|
||||
</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
|
||||
|
|
@ -3342,34 +3399,29 @@ const PrintStyle7 = ({
|
|||
? 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>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -484,8 +484,8 @@ const Printstyle8 = ({
|
|||
style={{ textTransform: 'uppercase', fontWeight: '600' }}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -503,8 +503,8 @@ const Printstyle8 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -519,7 +519,11 @@ const Printstyle8 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
<div style={{ fontSize: 'clamp(0.63rem, 2.5vw, 1.2rem)' }}>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
<div style={{ fontSize: "10px" }}>
|
||||
{GlobaldummyData ? formattedDate : Date1}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -779,6 +783,41 @@ const Printstyle8 = ({
|
|||
)
|
||||
</div>
|
||||
)}
|
||||
<div style={{ display: 'flex', gap: "3px" }}>
|
||||
{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 || id.IMEI2
|
||||
)?.map((a, i) => (
|
||||
<span key={i}>{a.Description}</span>
|
||||
))
|
||||
|
||||
: ''}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -1106,38 +1145,33 @@ const Printstyle8 = ({
|
|||
? 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>
|
||||
)}
|
||||
|
|
@ -3287,8 +3321,8 @@ const Printstyle8 = ({
|
|||
style={{ textTransform: 'uppercase', fontWeight: '600' }}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3308,8 +3342,8 @@ const Printstyle8 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3324,7 +3358,11 @@ const Printstyle8 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
<div style={{ fontSize: 'clamp(0.63rem, 2.5vw, 1.2rem)' }}>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
<div style={{ fontSize: "10px" }}>
|
||||
{GlobaldummyData ? formattedDate : Date1}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -3727,59 +3765,63 @@ const Printstyle8 = ({
|
|||
{index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.ProdName}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
{/* 🏷 Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* 📦 Size */}
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
</div>
|
||||
|
||||
{/* 🏷 Brand */}
|
||||
{item?.BrandName && (
|
||||
<div>{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>
|
||||
{[data.IMEI1, data.IMEI2]
|
||||
.filter(Boolean)
|
||||
.join(",")}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(hasSerial || hasIMEI) && data.Description && (
|
||||
<div>{data.Description}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && <td>{item?.HSN}</td>
|
||||
: HsnCode && <td>{item?.HSN}</td>}
|
||||
|
|
|
|||
|
|
@ -485,8 +485,8 @@ const PrintStyle9 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -508,8 +508,8 @@ const PrintStyle9 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
|
|
@ -524,6 +524,10 @@ const PrintStyle9 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
<div style={{ fontSize: '12px', fontWeight: '400' }}>
|
||||
{' '}
|
||||
{GlobaldummyData ? formattedDate : Date1}{' '}
|
||||
|
|
@ -543,8 +547,8 @@ const PrintStyle9 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<div className="straight-line9"></div>
|
||||
|
|
@ -705,113 +709,75 @@ const PrintStyle9 = ({
|
|||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
<td style={{ display: "flex", flexDirection: "column" }}>
|
||||
|
||||
<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?.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(',')}
|
||||
|
||||
{(() => {
|
||||
const packages =
|
||||
PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId) || [];
|
||||
|
||||
const identifiers = item?.ProductIdentifierDtls || [];
|
||||
|
||||
return packages.length > 0 ? (
|
||||
<div>
|
||||
{/* Package Details */}
|
||||
{packages.map((pkg, i) => (
|
||||
<span key={i} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
|
||||
{item?.BrandName || ""}
|
||||
|
||||
{/* Identifiers */}
|
||||
<div style={{ display: "flex", gap: "3px", flexWrap: "wrap", flexDirection: "column" }}>
|
||||
{identifiers.map((id, i) => (
|
||||
<div key={i} style={{ display: "flex", gap: "4px", flexWrap: "wrap", flexDirection: "column" }}>
|
||||
{id.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
{(id.IMEI1 || id.IMEI2) && (
|
||||
<div>{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}</div>
|
||||
)}
|
||||
{(id.SerialNumber || id.IMEI1 || id.IMEI2) && id.Description && (
|
||||
<div>{id.Description}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
({item?.Size ? 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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
</div>
|
||||
)}
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{/* Size + UOM */}
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: "COMBO"}
|
||||
)
|
||||
|
||||
{item?.BrandName || ""}
|
||||
|
||||
{/* Identifiers */}
|
||||
{identifiers.map((id, i) => (
|
||||
<div key={i} style={{ display: "flex", gap: "4px", flexWrap: "wrap", flexDirection: "column" }}>
|
||||
{id.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
|
||||
{(id.IMEI1 || id.IMEI2) && (
|
||||
<div>
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(id.SerialNumber || id.IMEI1 || id.IMEI2) &&
|
||||
id.Description && (
|
||||
<div>{id.Description}</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
})()}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
|
|
@ -3226,8 +3192,8 @@ const PrintStyle9 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3251,8 +3217,8 @@ const PrintStyle9 = ({
|
|||
: PaymentStatusSuccess?.length === 1
|
||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||
: ''}{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
@ -3273,6 +3239,10 @@ const PrintStyle9 = ({
|
|||
table2Data?.FYStatus
|
||||
)}
|
||||
</div>
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
<div style={{ fontSize: '12px', fontWeight: '400' }}>
|
||||
{' '}
|
||||
{GlobaldummyData ? formattedDate : Date1}{' '}
|
||||
|
|
@ -3292,8 +3262,8 @@ const PrintStyle9 = ({
|
|||
}}
|
||||
>
|
||||
Estimate{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||
</div>
|
||||
)}
|
||||
<div className="straight-line9"></div>
|
||||
|
|
@ -3438,34 +3408,33 @@ const PrintStyle9 = ({
|
|||
? 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>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ const PaymentPdfBooking = ({
|
|||
const [BranchZip, setBranchZip] = useState();
|
||||
const CashierName = getSession('userName');
|
||||
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
|
||||
console.log(printerTemplateStyle, 'printerTemplateStyle');
|
||||
console.log(printerTemplateStyle, "printerTemplateStyle")
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const SettingData = useSelector(PreferenceData);
|
||||
const estimatePrintHeader =
|
||||
|
|
@ -562,92 +562,53 @@ const PaymentPdfBooking = ({
|
|||
<td className="Re-print-body-Product">
|
||||
{item?.ProdName}
|
||||
|
||||
{PackageDetails?.filter(
|
||||
(pkg) => pkg.ProdId === item.ProdId
|
||||
).length > 0 ? (
|
||||
{/* Package Details */}
|
||||
{PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId).length > 0 && (
|
||||
<div>
|
||||
{PackageDetails?.filter(
|
||||
(pkg) => pkg.ProdId === item.ProdId
|
||||
)?.map((pkg, index) => (
|
||||
<span key={index} style={{ display: 'block' }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK (
|
||||
{pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
<span>
|
||||
(
|
||||
{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 !== ''
|
||||
).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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
</span>
|
||||
{PackageDetails
|
||||
?.filter(pkg => pkg.ProdId === item.ProdId)
|
||||
?.map((pkg, index) => (
|
||||
<span key={index} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<span>
|
||||
({item?.Size ? 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 !== ''
|
||||
).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>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* Size, UOM, Brand */}
|
||||
<div>
|
||||
({item?.Size ?? '1'}{" "}
|
||||
{item?.SinglePc === 'Y' ? "PCS" : item?.Type !== 'C' ? item?.UomName : "COMBO"}
|
||||
) {item?.BrandName || ""}
|
||||
</div>
|
||||
|
||||
{/* Product Identifiers */}
|
||||
{item?.ProductIdentifierDtls?.map((detail, index) => {
|
||||
const serial = detail.SerialNumber?.trim();
|
||||
const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(", ");
|
||||
const description = detail.Description?.trim();
|
||||
|
||||
if (!serial && !imeis && !description) return null;
|
||||
|
||||
return (
|
||||
<div key={index} style={{ display: "flex", flexDirection: "column", gap: "2px" }}>
|
||||
{/* Serial + IMEIs */}
|
||||
{(serial || imeis) && (
|
||||
<div style={{ display: "flex", gap: "3px" }}>
|
||||
{serial && <div>{serial}</div>}
|
||||
{imeis && <div>{imeis}</div>}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Description */}
|
||||
{description && <div>{description}</div>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
{/* Available Time */}
|
||||
{sportsAppPreference &&
|
||||
`(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
|
||||
`(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
|
||||
</td>
|
||||
<td className="Re-print-body-Rate">{item?.SalesQty}</td>
|
||||
<td className="Re-print-body-Rate">{item?.Rate}</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue