diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx index be3057c..6f9dd20 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx @@ -23,6 +23,7 @@ const TaxInvoice = ({ ReprintType, printDatas, }) => { + const GlobaldummyData = useSelector(GlobalPritdummyData); const SettingData = useSelector(PreferenceData); const estimatePrintHeader = @@ -833,27 +834,25 @@ const TaxInvoice = ({ {item.BrandName}{' '} )} - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (items) => - items.SerialNumber && items.SerialNumber !== '' - )?.map((a, i) => ( -
{a.SerialNumber}
- )) - : ''} - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (id) => id.IMEI1 !== '' || id.IMEI2 !== '' - )?.map((id, i) => { - const imei1 = id.IMEI1 || ''; - const imei2 = id.IMEI2 || ''; - return ( -
- {[imei1, imei2].filter(Boolean).join(',')} +
+ {item?.ProductIdentifierDtls?.map((id, i) => ( +
+
+ {id?.SerialNumber && {id.SerialNumber}} + {(id?.IMEI1 || id?.IMEI2) && ( + {[id.IMEI1, id.IMEI2].filter(Boolean).join(",")} + )}
- ); - }) - : ''} + + {id?.Description && ( +
+ {id.Description} +
+ )} +
+ ))} +
+
Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} */}
)} {table2Data?.OrderType === 'E' ? ( @@ -520,8 +520,8 @@ const PrintStyle1 = ({ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ''} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} */} )} @@ -538,8 +538,8 @@ const PrintStyle1 = ({ }} > Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} */} )}
@@ -605,6 +605,12 @@ const PrintStyle1 = ({ {' '} Date : {GlobaldummyData ? formattedDate : Date1}{' '} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} + +
} + @@ -748,10 +754,7 @@ const PrintStyle1 = ({ ? GlobalItem && {item?.ProdName} : Item == true && (
{item?.ProdName}
{PackageDetails?.filter( @@ -789,37 +792,49 @@ const PrintStyle1 = ({ } (${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}  {' '} {item?.BrandName !== null - ? item?.BrandName - : ''} + ?
{item?.BrandName}
+ : ''}   - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls?.filter( - (items) => - !( - items.SerialNumber == '' || - items.SerialNumber == null - ) - )?.map((a) => { - 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(',')} -
- ); - }) - : ''} +
+ {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == '' || + items.SerialNumber == null + ) + )?.map((a) => { + 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(',')} +
+ ); + }) + : ''} + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (items) => + items.SerialNumber || items.IMEI1 || items.IMEI2 + )?.map((a, i) => ( + {a.Description} + )) + + : ''} +
+ )} {GlobaldummyData @@ -1026,10 +1041,7 @@ const PrintStyle1 = ({ ? GlobalItem && {item?.ProdName} : Item == true && (
{item?.ProdName}
@@ -3743,8 +3755,8 @@ const PrintStyle1 = ({ }} > Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} */}
)} {table2Data?.OrderType === 'E' ? ( @@ -3785,8 +3797,8 @@ const PrintStyle1 = ({ }} > Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} */} )}
@@ -3958,10 +3970,7 @@ const PrintStyle1 = ({ ? GlobalItem && {item?.ProdName} : Item == true && (
{item?.ProdName}
{PackageDetails?.filter( @@ -3999,9 +4008,10 @@ const PrintStyle1 = ({ } (${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}  {' '} {item?.BrandName !== null - ? item?.BrandName + ?
{item?.BrandName}
: ''}   + {/* {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls?.filter( (items) => @@ -4029,7 +4039,41 @@ const PrintStyle1 = ({ ); }) - : ''} + : ''} */} +
+ {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (items) => + items.SerialNumber && + items.SerialNumber !== '' + ).map((a, i) => ( +
{a.SerialNumber}
+ )) + : ''} + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (id) => id.IMEI1 !== '' || id.IMEI2 !== '' + ).map((id, i) => { + const imei1 = id.IMEI1 || ''; + const imei2 = id.IMEI2 || ''; + return ( +
+ {[imei1, imei2] + .filter(Boolean) + .join(',')} +
+ ); + }) + : ''} + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (items) => + items.SerialNumber || items.IMEI1 || items.IMEI2 + )?.map((a, i) => ( + {a.Description} + )) + : ''} +
)} {GlobaldummyData @@ -4217,10 +4261,7 @@ const PrintStyle1 = ({ ? GlobalItem && {item?.ProdName} : Item == true && (
{item?.ProdName}