diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
index 0082adf..70edad0 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
@@ -104,9 +104,6 @@ const Printstyle12 = ({
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
- (i) => i.SettingIdName === 'PrintUom'
- )?.[0];
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@@ -841,62 +838,46 @@ const Printstyle12 = ({
{item.ParcelType})
))}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
-
- {item?.ProductIdentifierDtls
- ?.length > 0
- ? item?.ProductIdentifierDtls?.filter(
- (items) =>
- !(
- items.SerialNumber ==
- '' ||
- items.SerialNumber == null
- )
- )?.map((a) => {
+ {item?.BrandName &&
{item.BrandName}
}
+
+ {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 (
-
{a.SerialNumber}
- );
- })
- : ''}{' '}
- {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(',')}
+
+ {/* Serial + IMEIs on the same row */}
+ {(serial || imeis) && (
+
+ {serial &&
{serial}
}
+ {imeis &&
{imeis}
}
+
+ )}
+
+ {/* Description on new line */}
+ {description &&
{description}
}
);
- })
- : ''}
+ })}
+
) : (
- {UomPrint?.SettingValue === 'Y'
- ? `${item?.Size || '1'} ${
- item?.SinglePc === 'Y'
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
? 'PCS'
: item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'
- }`
- : ''
- }
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
-
+ ? item?.UomName
+ : 'COMBO'}
+
+ )}
+ {item?.BrandName &&
{item.BrandName}
}
{item?.ProductIdentifierDtls
?.length > 0
? item?.ProductIdentifierDtls?.filter(
@@ -1133,18 +1114,16 @@ const Printstyle12 = ({
}}
>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
-
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- }
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}
+
+ )}
)}
{GlobaldummyData
@@ -3482,10 +3461,7 @@ const Printstyle12 = ({
{item.ParcelType})
))}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
-
+ {item?.BrandName &&
{item.BrandName}
}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
@@ -3519,21 +3495,18 @@ const Printstyle12 = ({
) : (
- {UomPrint?.SettingValue === 'Y'
- ? `${item?.Size || '1'} ${
- item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'
- }`
- : ''
- }
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
-
- {item?.ProductIdentifierDtls?.length > 0
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}
+
+ )}
+ {item?.BrandName &&
{item.BrandName}
}
+ {/* {item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
@@ -3562,7 +3535,32 @@ const Printstyle12 = ({
);
})
- : ''}
+ : ''} */}
+
+ {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 (
+
+ {/* Serial + IMEIs in one row */}
+ {(serial || imeis) && (
+
+ {serial &&
{serial}
}
+ {imeis &&
{imeis}
}
+
+ )}
+
+ {/* Description on new line */}
+ {description &&
{description}
}
+
+ );
+ })}
+
)}
@@ -3751,18 +3749,16 @@ const Printstyle12 = ({
}}
>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y'
- &&
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- }
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}
+
+ )}
)}
{GlobaldummyData