#183 Uom display based preference

This commit is contained in:
karthikalakshmi 2026-02-26 11:44:46 +05:30
parent bc8dafa167
commit aeb86992c7
14 changed files with 7738 additions and 7396 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -128,6 +128,10 @@ const PrintStyle1 = ({
(setting) => (setting) =>
setting?.SettingIdName?.toLowerCase() === 'estimatetitle' setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
)?.SettingValue === 'Y'; )?.SettingValue === 'Y';
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const keysLength = Object.keys(table2Data ?? {}).length; const keysLength = Object.keys(table2Data ?? {}).length;
const paymentTypeUPI = PaymentStatus?.find( const paymentTypeUPI = PaymentStatus?.find(
@ -772,6 +776,7 @@ const PrintStyle1 = ({
))} ))}
</div> </div>
) : ( ) : (
UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1032,6 +1037,7 @@ const PrintStyle1 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1041,6 +1047,7 @@ const PrintStyle1 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
{sportsAppPreference && {sportsAppPreference &&
`${item?.BookingDate?.trim() `${item?.BookingDate?.trim()
? `(${dateFormatChange(item.BookingDate)})` ? `(${dateFormatChange(item.BookingDate)})`
@ -3982,6 +3989,7 @@ const PrintStyle1 = ({
))} ))}
</div> </div>
) : ( ) : (
UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -4223,6 +4231,7 @@ const PrintStyle1 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -4232,6 +4241,7 @@ const PrintStyle1 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
{sportsAppPreference && {sportsAppPreference &&
`${item?.BookingDate?.trim() `${item?.BookingDate?.trim()
? `(${dateFormatChange(item.BookingDate)})` ? `(${dateFormatChange(item.BookingDate)})`

View File

@ -105,6 +105,9 @@ const PrintStyle11 = ({
const GlobalLogo = useSelector(GlobalprintLogo); const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit); const GlobalCredit = useSelector(GlobalprintCredit);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -717,13 +720,16 @@ const PrintStyle11 = ({
</div> </div>
) : ( ) : (
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} {UomPrint?.SettingValue === 'Y'
{item?.SinglePc == 'Y' ? `${item?.Size || '1'} ${
? 'PCS' item?.SinglePc === 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type !== 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'
}`
: ''
}
{item?.BrandName !== null {item?.BrandName !== null
? item?.BrandName ? item?.BrandName
: ''} : ''}
@ -1014,6 +1020,8 @@ const PrintStyle11 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1023,6 +1031,7 @@ const PrintStyle11 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -3328,13 +3337,16 @@ const PrintStyle11 = ({
</div> </div>
) : ( ) : (
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} {UomPrint?.SettingValue === 'Y'
{item?.SinglePc == 'Y' ? `${item?.Size || '1'} ${
? 'PCS' item?.SinglePc === 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type !== 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'
}`
: ''
}
{item?.BrandName !== null {item?.BrandName !== null
? item?.BrandName ? item?.BrandName
: ''} : ''}
@ -3588,6 +3600,8 @@ const PrintStyle11 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -3597,6 +3611,7 @@ const PrintStyle11 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData

View File

@ -104,6 +104,9 @@ const Printstyle12 = ({
const GlobalCredit = useSelector(GlobalprintCredit); const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData); const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -880,13 +883,16 @@ const Printstyle12 = ({
</div> </div>
) : ( ) : (
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} {UomPrint?.SettingValue === 'Y'
{item?.SinglePc == 'Y' ? `${item?.Size || '1'} ${
? 'PCS' item?.SinglePc === 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type !== 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'
}`
: ''
}
{item?.BrandName !== null {item?.BrandName !== null
? item?.BrandName ? item?.BrandName
: ''} : ''}
@ -1127,6 +1133,8 @@ const Printstyle12 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1136,6 +1144,7 @@ const Printstyle12 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -3510,13 +3519,16 @@ const Printstyle12 = ({
</div> </div>
) : ( ) : (
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} {UomPrint?.SettingValue === 'Y'
{item?.SinglePc == 'Y' ? `${item?.Size || '1'} ${
? 'PCS' item?.SinglePc === 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type !== 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'
}`
: ''
}
{item?.BrandName !== null {item?.BrandName !== null
? item?.BrandName ? item?.BrandName
: ''} : ''}
@ -3739,6 +3751,8 @@ const Printstyle12 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y'
&&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -3748,6 +3762,7 @@ const Printstyle12 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData

View File

@ -107,6 +107,9 @@ const Printstyle2 = ({
const GlobalLogo = useSelector(GlobalprintLogo); const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit); const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData); const SettingData = useSelector(PreferenceData);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -706,7 +709,8 @@ const Printstyle2 = ({
</span> </span>
))} ))}
</div> </div>
) : ( ) : UomPrint?.SettingValue === 'Y' && (
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1045,6 +1049,7 @@ const Printstyle2 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1054,6 +1059,7 @@ const Printstyle2 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -3292,7 +3298,7 @@ const Printstyle2 = ({
</span> </span>
))} ))}
</div> </div>
) : ( ) : UomPrint?.SettingValue === 'Y' && (
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -3592,6 +3598,7 @@ const Printstyle2 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -3601,6 +3608,7 @@ const Printstyle2 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData

View File

@ -80,6 +80,9 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const GlobalLogo = useSelector(GlobalprintLogo); const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit); const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData); const SettingData = useSelector(PreferenceData);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y'; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y';
const estimateTitle = const estimateTitle =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
@ -279,7 +282,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
</span> </span>
))} ))}
</div> </div>
: <div> : UomPrint?.SettingValue === 'Y' &&<div>
({item?.Size ? item?.Size : "1"}{" "} ({item?.Size ? item?.Size : "1"}{" "}
{item?.SinglePc == "Y" {item?.SinglePc == "Y"
? "PCS" ? "PCS"
@ -333,7 +336,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item && {GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item &&
<div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}> <div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
<div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</div> {UomPrint?.SettingValue === 'Y' && <div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</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>} {GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
{GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right', }}>{item?.MRP}</div> : MRP && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</div>} {GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right', }}>{item?.MRP}</div> : MRP && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</div>}
@ -1200,7 +1203,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
</span> </span>
))} ))}
</div> </div>
: <div> : UomPrint?.SettingValue === 'Y' && <div>
({item?.Size ? item?.Size : "1"}{" "} ({item?.Size ? item?.Size : "1"}{" "}
{item?.SinglePc == "Y" {item?.SinglePc == "Y"
? "PCS" ? "PCS"
@ -1254,7 +1257,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item && {GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item &&
<div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}> <div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
<div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</div> { UomPrint?.SettingValue === 'Y' &&<div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</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>} {GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
{GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right', }}>{item?.MRP}</div> : MRP && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</div>} {GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right', }}>{item?.MRP}</div> : MRP && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</div>}

View File

@ -114,6 +114,9 @@ const Printstyle4 = ({
), ),
]; ];
console.log(table2Data, 'table2Data'); console.log(table2Data, 'table2Data');
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -765,12 +768,14 @@ const Printstyle4 = ({
) : ( ) : (
<div> <div>
{( {(
(item?.Size || '1') + (UomPrint?.SettingValue === 'Y'
(item?.SinglePc === 'Y' ? (item?.Size || '1') +
? ' PCS' (item?.SinglePc === 'Y'
: item?.Type !== 'C' ? ' PCS'
: item?.Type !== 'C'
? ` ${item?.UomName}` ? ` ${item?.UomName}`
: ' COMBO') + : ' COMBO')
: '') +
(item?.BrandName (item?.BrandName
? ` ${item?.BrandName}` ? ` ${item?.BrandName}`
: '') + : '') +
@ -1062,6 +1067,7 @@ const Printstyle4 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -1071,6 +1077,7 @@ const Printstyle4 = ({
: 'COMBO'} : 'COMBO'}
) )
</div> </div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -3368,13 +3375,7 @@ const Printstyle4 = ({
}} }}
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
</td> <div>
)}
{GlobaldummyData
? GlobalQuantity && (
<td style={{ textAlign: 'right' }}>
{item?.SalesQty}
<div>
{PackageDetails?.filter( {PackageDetails?.filter(
(pkg) => pkg.ProdId === item.ProdId (pkg) => pkg.ProdId === item.ProdId
).length > 0 ? ( ).length > 0 ? (
@ -3424,12 +3425,14 @@ const Printstyle4 = ({
) : ( ) : (
<div> <div>
{( {(
(item?.Size || '1') + (UomPrint?.SettingValue === 'Y'
(item?.SinglePc === 'Y' ? (item?.Size || '1') +
? ' PCS' (item?.SinglePc === 'Y'
: item?.Type !== 'C' ? ' PCS'
: item?.Type !== 'C'
? ` ${item?.UomName}` ? ` ${item?.UomName}`
: ' COMBO') + : ' COMBO')
: '') +
(item?.BrandName (item?.BrandName
? ` ${item?.BrandName}` ? ` ${item?.BrandName}`
: '') + : '') +
@ -3464,6 +3467,13 @@ const Printstyle4 = ({
)} )}
</div> </div>
</td> </td>
)}
{GlobaldummyData
? GlobalQuantity && (
<td style={{ textAlign: 'right' }}>
{item?.SalesQty}
</td>
) )
: Quantity && ( : Quantity && (
<td style={{ textAlign: 'right' }}> <td style={{ textAlign: 'right' }}>
@ -3829,15 +3839,17 @@ const Printstyle4 = ({
: Quantity && ( : Quantity && (
<td style={{ textAlign: 'right' }}> <td style={{ textAlign: 'right' }}>
{item?.SalesQty} {item?.SalesQty}
<div> {UomPrint?.SettingValue === 'Y' &&
({item?.Size ? item?.Size : '1'}{' '} <div>
{item?.SinglePc == 'Y' ({item?.Size ? item?.Size : '1'}{' '}
? 'PCS' {item?.SinglePc == 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type != 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'}
</div> )
</div>
}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData

View File

@ -103,6 +103,9 @@ const PrintStyle5 = ({
const GlobalCashierName = useSelector(GlobalprintCashierName); const GlobalCashierName = useSelector(GlobalprintCashierName);
const GlobalLogo = useSelector(GlobalprintLogo); const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit); const GlobalCredit = useSelector(GlobalprintCredit);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -673,6 +676,7 @@ const PrintStyle5 = ({
) : ( ) : (
<> <>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{ UomPrint?.SettingValue === 'Y' &&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -680,7 +684,7 @@ const PrintStyle5 = ({
(GlobaldummyData (GlobaldummyData
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty)} : item?.SalesQty)}
</div> </div>}
</> </>
)} )}
</div> </div>
@ -740,12 +744,12 @@ const PrintStyle5 = ({
</div> </div>
) : ( ) : (
<div> <div>
{(item?.Size || '1') + {UomPrint?.SettingValue === 'Y' ?((item?.Size || '1') +
(item?.SinglePc === 'Y' (item?.SinglePc === 'Y'
? 'PCS' ? 'PCS'
: item?.Type !== 'C' : item?.Type !== 'C'
? item?.UomName ? item?.UomName
: 'COMBO') + : 'COMBO')) :"" +
(item?.BrandName || '') + (item?.BrandName || '') +
(item?.ProductIdentifierDtls?.filter( (item?.ProductIdentifierDtls?.filter(
(items) => (items) =>
@ -1052,6 +1056,7 @@ const PrintStyle5 = ({
) : ( ) : (
<> <>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{ UomPrint?.SettingValue === 'Y' &&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -1060,6 +1065,7 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty)} : item?.SalesQty)}
</div> </div>
}
</> </>
)} )}
</div> </div>
@ -1076,6 +1082,7 @@ const PrintStyle5 = ({
) : ( ) : (
<> <>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
{(item?.Size ? item?.Size : '1') + {(item?.Size ? item?.Size : '1') +
(item?.SinglePc == 'Y' (item?.SinglePc == 'Y'
@ -1088,6 +1095,7 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty)} : item?.SalesQty)}
</div> </div>
}
</> </>
)} )}
</div> </div>
@ -2955,6 +2963,7 @@ const PrintStyle5 = ({
) : ( ) : (
<> <>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' && (
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -2963,6 +2972,7 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty)} : item?.SalesQty)}
</div> </div>
)}
</> </>
)} )}
</div> </div>
@ -3025,12 +3035,12 @@ const PrintStyle5 = ({
</div> </div>
) : ( ) : (
<div> <div>
{(item?.Size || '1') + {UomPrint?.SettingValue === 'Y' ?((item?.Size || '1') +
(item?.SinglePc === 'Y' (item?.SinglePc === 'Y'
? 'PCS' ? 'PCS'
: item?.Type !== 'C' : item?.Type !== 'C'
? item?.UomName ? item?.UomName
: 'COMBO') + : 'COMBO')):"" +
(item?.BrandName || '') + (item?.BrandName || '') +
(item?.ProductIdentifierDtls?.filter( (item?.ProductIdentifierDtls?.filter(
(items) => (items) =>
@ -3307,6 +3317,7 @@ const PrintStyle5 = ({
) : ( ) : (
<> <>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y'&&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -3315,6 +3326,7 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty)} : item?.SalesQty)}
</div> </div>
}
</> </>
)} )}
</div> </div>
@ -3332,12 +3344,12 @@ const PrintStyle5 = ({
<> <>
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
<div> <div>
{(item?.Size ? item?.Size : '1') + {UomPrint?.SettingValue === 'Y'? ((item?.Size ? item?.Size : '1') +
(item?.SinglePc == 'Y' (item?.SinglePc == 'Y'
? 'PCS' ? 'PCS'
: item?.Type != 'C' : item?.Type != 'C'
? item?.UomName ? item?.UomName
: 'COMBO') + : 'COMBO') ):""+
'-' + '-' +
(GlobaldummyData (GlobaldummyData
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty

View File

@ -105,6 +105,9 @@ const Printstyle6 = ({
const SettingData = useSelector(PreferenceData); const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
console.log(CashierNameField, "GlobaldummyData") console.log(CashierNameField, "GlobaldummyData")
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -730,6 +733,7 @@ const Printstyle6 = ({
) : ( ) : (
<> <>
<div> {item?.ProdName} </div> <div> {item?.ProdName} </div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -738,6 +742,7 @@ const Printstyle6 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty} : item?.SalesQty}
</div> </div>
}
</> </>
)} )}
</td> </td>
@ -779,6 +784,7 @@ const Printstyle6 = ({
</div> </div>
)) ))
) : ( ) : (
UomPrint?.SettingValue === 'Y' &&
<span> <span>
({item?.Size ? item?.Size : '1'} ({item?.Size ? item?.Size : '1'}
{item?.SinglePc === 'Y' {item?.SinglePc === 'Y'
@ -1096,6 +1102,7 @@ const Printstyle6 = ({
) : ( ) : (
<> <>
<div> {item?.ProdName} </div> <div> {item?.ProdName} </div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -1104,6 +1111,7 @@ const Printstyle6 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty} : item?.SalesQty}
</div> </div>
}
</> </>
)} )}
</td> </td>
@ -1119,7 +1127,7 @@ const Printstyle6 = ({
`(${item?.Size + item?.UomName})` `(${item?.Size + item?.UomName})`
: Item && : Item &&
item?.ProdName + item?.ProdName +
`(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})`) + UomPrint?.SettingValue === 'Y' ? `(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})` : '' ) +
item?.BrandName !== item?.BrandName !==
null null
? item?.BrandName ? item?.BrandName
@ -3514,6 +3522,7 @@ const Printstyle6 = ({
) : ( ) : (
<> <>
<div> {item?.ProdName} </div> <div> {item?.ProdName} </div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -3522,6 +3531,7 @@ const Printstyle6 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty} : item?.SalesQty}
</div> </div>
}
</> </>
)} )}
</td> </td>
@ -3559,6 +3569,7 @@ const Printstyle6 = ({
</div> </div>
)) ))
) : ( ) : (
UomPrint?.SettingValue === 'Y' &&
<span> <span>
({item?.Size ? item?.Size : '1'} ({item?.Size ? item?.Size : '1'}
{item?.SinglePc === 'Y' {item?.SinglePc === 'Y'
@ -3807,6 +3818,7 @@ const Printstyle6 = ({
) : ( ) : (
<> <>
<div> {item?.ProdName} </div> <div> {item?.ProdName} </div>
{UomPrint?.SettingValue === 'Y' &&
<div> <div>
{item?.Size + {item?.Size +
item?.UomName + item?.UomName +
@ -3815,6 +3827,7 @@ const Printstyle6 = ({
? GlobalQuantity && item?.SalesQty ? GlobalQuantity && item?.SalesQty
: item?.SalesQty} : item?.SalesQty}
</div> </div>
}
</> </>
)} )}
</td> </td>
@ -3830,7 +3843,7 @@ const Printstyle6 = ({
`(${item?.Size + item?.UomName})` `(${item?.Size + item?.UomName})`
: Item && : Item &&
item?.ProdName + item?.ProdName +
`(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})`) + UomPrint?.SettingValue === 'Y' ? `(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})` : '' ) +
item?.BrandName !== item?.BrandName !==
null null
? item?.BrandName ? item?.BrandName

View File

@ -100,6 +100,9 @@ const PrintStyle7 = ({
const GlobalCredit = useSelector(GlobalprintCredit); const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData); const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader = const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => (setting) =>
@ -687,6 +690,7 @@ const PrintStyle7 = ({
))} ))}
</div> </div>
) : ( ) : (
UomPrint?.SettingValue === 'Y' &&
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} ({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y' {item?.SinglePc == 'Y'
@ -909,13 +913,16 @@ const PrintStyle7 = ({
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} {UomPrint?.SettingValue === 'Y'
{item?.SinglePc == 'Y' ? `${item?.Size || '1'} ${
? 'PCS' item?.SinglePc === 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type !== 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'
}`
: ''
}
{item?.BrandName !== null {item?.BrandName !== null
? item?.BrandName ? item?.BrandName
: ''} : ''}
@ -3122,15 +3129,16 @@ const PrintStyle7 = ({
))} ))}
</div> </div>
) : ( ) : (
<div> UomPrint?.SettingValue === 'Y' &&
({item?.Size ? item?.Size : '1'}{' '} <div>
{item?.SinglePc == 'Y' ({item?.Size ? item?.Size : '1'}{' '}
? 'PCS' {item?.SinglePc == 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type != 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'}
</div> )
</div>
)} )}
</td> </td>
)} )}
@ -3331,13 +3339,16 @@ const PrintStyle7 = ({
> >
<div>{item?.ProdName}</div> <div>{item?.ProdName}</div>
<div> <div>
({item?.Size ? item?.Size : '1'}{' '} {UomPrint?.SettingValue === 'Y'
{item?.SinglePc == 'Y' ? `${item?.Size || '1'} ${
? 'PCS' item?.SinglePc === 'Y'
: item?.Type != 'C' ? 'PCS'
? item?.UomName : item?.Type !== 'C'
: 'COMBO'} ? item?.UomName
) : 'COMBO'
}`
: ''
}
{item?.BrandName !== null {item?.BrandName !== null
? item?.BrandName ? item?.BrandName
: ''} : ''}