Fix #262 Print style changes

This commit is contained in:
karthikalakshmi 2026-03-09 12:45:29 +05:30
parent 7e068a8286
commit cc7a002f18
18 changed files with 2119 additions and 2054 deletions

View File

@ -142,24 +142,30 @@ const BSImeiDetails = (props) => {
}, []); }, []);
const AddDeviceDetails = () => { const AddDeviceDetails = () => {
console.log( console.log(
formRef?.current?.getFieldsValue, SerialNumberList.length, IMEINumberList.length,"SerialNumberList, IMEINumberList"
'formRef?.current?.getFieldsValue' );
); const description = formRef.current?.getFieldsValue()?.description || '';
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
// Create the new object array const maxLength = Math.max(
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => { SerialNumberList.length,
const serial = SerialNumberList[index] || ''; // Use serial number or default to empty IMEINumberList.length,
const imeiPair = IMEINumberList[index] description ? 1 : 0
? IMEINumberList[index].split(',') );
: ['', '']; // Split IMEI numbers or default to empty strings
return { const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
SerialNumber: serial, const serial = SerialNumberList[index] || '';
IMEI1: imeiPair[0] || '', // First IMEI number const imeiPair = IMEINumberList[index]
IMEI2: imeiPair[1] || '', // Second IMEI number ? IMEINumberList[index].split(',')
MacId: '', // Default empty macid : ['', ''];
Description: formRef.current?.getFieldsValue()?.description || '',
}; return {
}); SerialNumber: serial,
IMEI1: imeiPair[0] || '',
IMEI2: imeiPair[1] || '',
MacId: '',
Description: description || '',
};
});
console.log(IdentifyDetails, 'IdentifyDetails'); console.log(IdentifyDetails, 'IdentifyDetails');
// const isItemInCart = CartOrderDetails?.find((cartItem) => (cartItem.ProdId === ProductDetail.ProdId) && (cartItem.InwardDtlId === ProductDetail.InwardDtlId)&& (cartItem?.OrderRate ===ProductDetail?.OrderRate) && (cartItem?.BookingTypeName === ProductDetail?.BookingTypeName) ) // const isItemInCart = CartOrderDetails?.find((cartItem) => (cartItem.ProdId === ProductDetail.ProdId) && (cartItem.InwardDtlId === ProductDetail.InwardDtlId)&& (cartItem?.OrderRate ===ProductDetail?.OrderRate) && (cartItem?.BookingTypeName === ProductDetail?.BookingTypeName) )
dispatch( dispatch(
@ -410,10 +416,10 @@ const BSImeiDetails = (props) => {
<div style={{ display: 'flex', marginTop: '10px' }}> <div style={{ display: 'flex', marginTop: '10px' }}>
<Form.Item name="description"> <Form.Item name="description">
<TextAreaInput <TextAreaInput
disabled={ // disabled={
IMEINumberList?.length === 0 && // IMEINumberList?.length === 0 &&
SerialNumberList?.length === 0 // SerialNumberList?.length === 0
} // }
autoComplete="off" autoComplete="off"
label={<label>Description..</label>} label={<label>Description..</label>}
defaultValue="" defaultValue=""

View File

@ -4422,7 +4422,7 @@ const BSC1Payment = (props) => {
</> </>
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch') {(SelCustId && BSComboData?.BookingBilling?.[1]?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && ( .length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}

View File

@ -1061,12 +1061,10 @@ const InvoiceTemplate = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + : ' Bill')}
' Bill'
: ''}
</div> </div>
)} )}
</div> </div>
@ -2861,11 +2859,10 @@ const InvoiceTemplate = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}
: ''}
</div> </div>
)} )}
</div> </div>

View File

@ -522,11 +522,10 @@ const PrintA4Style11 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}
: ''}
</div> </div>
<div <div
style={{ style={{
@ -874,14 +873,13 @@ const PrintA4Style11 = ({
})} })}
{/* Description */} {/* Description */}
{item?.ProductIdentifierDtls?.map((id, index) => ( {
(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
id?.Description && ( id?.Description && (
<div key={`desc-${index}`}> <div key={`desc-${index}`}>
{id.Description} {id.Description}
</div> </div>
) )
))} }
</td> </td>
) )

View File

@ -517,11 +517,10 @@ const PrintA5Style11 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}
: ''}
</div> </div>
<div <div
style={{ style={{
@ -847,7 +846,7 @@ const PrintA5Style11 = ({
)} )}
{/* Description */} {/* Description */}
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) && {
id?.Description && ( id?.Description && (
<div>{id.Description}</div> <div>{id.Description}</div>
)} )}

View File

@ -944,11 +944,11 @@ const TaxInvoice = ({
{/* Description outside */} {/* Description outside */}
{item?.ProductIdentifierDtls {item?.ProductIdentifierDtls
?.find(d => d?.Description) ?.[0]
?.Description && ( ?.Description && (
<div style={{ marginTop: "3px", wordBreak: "break-word" }}> <div style={{ marginTop: "3px", wordBreak: "break-word" }}>
{item?.ProductIdentifierDtls {item?.ProductIdentifierDtls
?.find(d => d?.Description) ?.[0]
?.Description} ?.Description}
</div> </div>
)} )}

View File

@ -597,12 +597,10 @@ const PrintStyle1 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + : ' Bill')}
' Bill'
: ''}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */} `(${table2Data?.SalesMode})`} */}
</div> </div>
@ -922,15 +920,9 @@ const PrintStyle1 = ({
); );
}) })
: ''} : ''}
{item?.ProductIdentifierDtls?.length > 0 && {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
item?.ProductIdentifierDtls.find( (
(items) => <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.Description && (
<div>{item.ProductIdentifierDtls.find(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}</div>
)} )}
</div> </div>
@ -3911,11 +3903,10 @@ const PrintStyle1 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ''} : ' Bill')}
{SalesModePref?.SettingValue == 'Y' && {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} `(${table2Data?.SalesMode})`}
</div> </div>
@ -4185,16 +4176,10 @@ const PrintStyle1 = ({
); );
}) })
: ''} : ''}
{item?.ProductIdentifierDtls?.length > 0 && {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
item?.ProductIdentifierDtls.find( (
(items) => <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
items.SerialNumber || items.IMEI1 || items.IMEI2 )}
)?.Description && (
<div>{item.ProductIdentifierDtls.find(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}</div>
)}
</div> </div>
</td> </td>
)} )}

View File

@ -550,11 +550,10 @@ const PrintStyle10 = ({
<div style={{ textTransform: 'uppercase' }}> <div style={{ textTransform: 'uppercase' }}>
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -818,9 +817,9 @@ const PrintStyle10 = ({
)} )}
</div> </div>
))} ))}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>
) : ( ) : (
@ -840,9 +839,9 @@ const PrintStyle10 = ({
)} )}
</div> </div>
))} ))}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
)} )}
</td> </td>
@ -3195,11 +3194,10 @@ const PrintStyle10 = ({
<div style={{ textTransform: 'uppercase' }}> <div style={{ textTransform: 'uppercase' }}>
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -3404,8 +3402,8 @@ const PrintStyle10 = ({
{(id.IMEI1 || id.IMEI2) && <div>{[id.IMEI1, id.IMEI2].filter(Boolean).join(', ')}</div>} {(id.IMEI1 || id.IMEI2) && <div>{[id.IMEI1, id.IMEI2].filter(Boolean).join(', ')}</div>}
</div> </div>
))} ))}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
) : ( ) : (
@ -3450,9 +3448,9 @@ const PrintStyle10 = ({
)} )}
</div> </div>
))} ))}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>
)} )}

View File

@ -538,11 +538,10 @@ const PrintStyle11 = ({
> >
{GlobaldummyData {GlobaldummyData
? 'CASH' ? 'CASH'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */} `(${table2Data?.SalesMode})`} */}
</div> </div>
@ -791,9 +790,9 @@ const PrintStyle11 = ({
</div> </div>
); );
})} })}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>
) : ( ) : (
@ -824,9 +823,9 @@ const PrintStyle11 = ({
); );
})} })}
</div> </div>
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
)} )}
@ -3191,11 +3190,10 @@ const PrintStyle11 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode})`} */} `(${table2Data?.SalesMode})`} */}
</div> </div>
@ -3399,9 +3397,9 @@ const PrintStyle11 = ({
</div> </div>
); );
})} })}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
) : ( ) : (
<div> <div>
@ -3460,9 +3458,9 @@ const PrintStyle11 = ({
</div> </div>
); );
})} })}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>
)} )}

View File

@ -663,12 +663,10 @@ const Printstyle12 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + : ' Bill')}
' Bill'
: ''}
</div> </div>
<div style={{ fontSize: 'clamp(0.75rem, 2.5vw, 1rem)' }}> <div style={{ fontSize: 'clamp(0.75rem, 2.5vw, 1rem)' }}>
{' '} {' '}
@ -944,9 +942,9 @@ const Printstyle12 = ({
</div> </div>
); );
})} })}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>
) : ( ) : (
@ -3658,8 +3656,8 @@ const Printstyle12 = ({
</div> </div>
); );
})} })}
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>

View File

@ -562,11 +562,10 @@ const Printstyle2 = ({
> >
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
&nbsp; Bill{' '} &nbsp; Bill{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
@ -853,16 +852,10 @@ const Printstyle2 = ({
); );
}) })
: ''} : ''}
{item?.ProductIdentifierDtls?.length > 0 && {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
item?.ProductIdentifierDtls.find( (
(items) => <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
items.SerialNumber || items.IMEI1 || items.IMEI2 )}
)?.Description && (
<div>{item.ProductIdentifierDtls.find(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}</div>
)}
</div> </div>
</div> </div>
@ -3235,11 +3228,10 @@ const Printstyle2 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ''}{' '} : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
</div> </div>
@ -3467,15 +3459,9 @@ const Printstyle2 = ({
); );
}) })
: ''} : ''}
{item?.ProductIdentifierDtls?.length > 0 && {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
item?.ProductIdentifierDtls.find( (
(items) => <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
items.SerialNumber || items.IMEI1 || items.IMEI2
)?.Description && (
<div>{item.ProductIdentifierDtls.find(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}</div>
)} )}
</div> </div>
</div> </div>

View File

@ -310,7 +310,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {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'})`} */} {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>} </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 : ""} {table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>
{GlobaldummyData ? 'Cash Bill' : BillName ||
(PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ' Bill')}
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>} </div>}
</div> </div>
@ -411,16 +415,10 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
); );
}) })
: ''} : ''}
{item?.ProductIdentifierDtls?.length > 0 && {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
item?.ProductIdentifierDtls.find( (
(items) => <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
items.SerialNumber || items.IMEI1 || items.IMEI2 )}
)?.Description && (
<div>{item.ProductIdentifierDtls.find(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}</div>
)}
</div> </div>
</div> </div>
</div>} </div>}
@ -1300,7 +1298,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {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'})`} */} {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>} </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' : ""} {table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>
{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ||
(PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: 'Bill')}
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div>} </div>}
</div> </div>
@ -1395,16 +1397,10 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
); );
}) })
: ''} : ''}
{item?.ProductIdentifierDtls?.length > 0 && {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
item?.ProductIdentifierDtls.find( (
(items) => <div>{item.ProductIdentifierDtls?.[0]?.Description}</div>
items.SerialNumber || items.IMEI1 || items.IMEI2 )}
)?.Description && (
<span>{item.ProductIdentifierDtls.find(
(items) =>
items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}</span>
)}
</div> </div>
</div> </div>
</div>} </div>}

View File

@ -523,11 +523,10 @@ const PrintStyle5 = ({
<div style={{ textTransform: 'uppercase' }}> <div style={{ textTransform: 'uppercase' }}>
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -825,8 +824,8 @@ const PrintStyle5 = ({
})} })}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
{/* 🔢 Quantity */} {/* 🔢 Quantity */}
@ -876,8 +875,8 @@ const PrintStyle5 = ({
})} })}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
{/* 🔢 Quantity */} {/* 🔢 Quantity */}
@ -2870,11 +2869,10 @@ const PrintStyle5 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -3161,13 +3159,11 @@ const PrintStyle5 = ({
})} })}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
{/* 🧪 Debug / Extra Text */}
<div>ssd3</div>
{/* 🔢 Quantity */} {/* 🔢 Quantity */}
<div> <div>
- -
@ -3216,12 +3212,10 @@ const PrintStyle5 = ({
})} })}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
{/* 🧪 Debug / Extra Text */}
<div>ssd4</div>
{/* 🔢 Quantity */} {/* 🔢 Quantity */}
<div> <div>

View File

@ -916,9 +916,9 @@ const Printstyle6 = ({
))} ))}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div> <div>
{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description} {item?.ProductIdentifierDtls?.[0]?.Description}
</div> </div>
)} )}
@ -1304,11 +1304,11 @@ const Printstyle6 = ({
</div> </div>
))} ))}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{(item?.ProductIdentifierDtls ?? []).find(d => d.IMEI1 || d.IMEI2 || d.SerialNumber)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div> <div>
{(item?.ProductIdentifierDtls ?? []).find(d => d.IMEI1 || d.IMEI2 || d.SerialNumber).Description} {item?.ProductIdentifierDtls?.[0]?.Description}
</div> </div>
)} )}
{/* 🔢 Quantity */} {/* 🔢 Quantity */}
<div> <div>
@ -3488,11 +3488,10 @@ const Printstyle6 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -4050,11 +4049,9 @@ const Printstyle6 = ({
))} ))}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div> <div>{identifiers?.[0]?.Description}</div>
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description} )}
</div>
)}
{/* 🔢 Quantity */} {/* 🔢 Quantity */}
<div> <div>

View File

@ -562,11 +562,10 @@ const PrintStyle7 = ({
> >
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -806,13 +805,11 @@ const PrintStyle7 = ({
</div> </div>
))} ))}
{(item?.ProductIdentifierDtls ?? []) {item?.ProductIdentifierDtls?.[0]?.Description && (
.find(items => items.SerialNumber || items.IMEI1 || items.IMEI2)?.Description && ( <div>
<div> {item?.ProductIdentifierDtls?.[0]?.Description}
{(item?.ProductIdentifierDtls ?? []) </div>
.find(items => items.SerialNumber || items.IMEI1 || items.IMEI2).Description} )}
</div>
)}
</div> </div>
</td> </td>
)} )}
@ -1072,11 +1069,11 @@ const PrintStyle7 = ({
})} })}
{/* 📝 Description from first identifier */} {/* 📝 Description from first identifier */}
{(item?.ProductIdentifierDtls ?? []).find(data => data.SerialNumber || data.IMEI1 || data.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div> <div>
{(item?.ProductIdentifierDtls ?? []).find(data => data.SerialNumber || data.IMEI1 || data.IMEI2).Description} {item?.ProductIdentifierDtls?.[0]?.Description}
</div> </div>
)} )}
</div> </div>
</td> </td>
) )
@ -3069,11 +3066,10 @@ const PrintStyle7 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -3288,15 +3284,11 @@ const PrintStyle7 = ({
</div> </div>
))} ))}
{(item?.ProductIdentifierDtls ?? []).find( {item?.ProductIdentifierDtls?.[0]?.Description && (
items => items.SerialNumber || items.IMEI1 || items.IMEI2 <div>
)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description}
<div> </div>
{(item?.ProductIdentifierDtls ?? []).find( )}
items => items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}
</div>
)}
</div> </div>
</td> </td>
)} )}
@ -3530,11 +3522,11 @@ const PrintStyle7 = ({
</div> </div>
))} ))}
{(item?.ProductIdentifierDtls ?? []).find(items => items.SerialNumber || items.IMEI1 || items.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div> <div>
{(item?.ProductIdentifierDtls ?? []).find(items => items.SerialNumber || items.IMEI1 || items.IMEI2).Description} {item?.ProductIdentifierDtls?.[0]?.Description}
</div> </div>
)} )}
</div> </div>
</div> </div>
</td> </td>

View File

@ -576,11 +576,10 @@ const Printstyle8 = ({
> >
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -910,9 +909,11 @@ const Printstyle8 = ({
}) })
: ''} : ''}
</div> </div>
{item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>
)} {item?.ProductIdentifierDtls?.[0]?.Description}
</div>
)}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -1277,9 +1278,11 @@ const Printstyle8 = ({
</div> </div>
))} ))}
</div> </div>
{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>
)} {item?.ProductIdentifierDtls?.[0]?.Description}
</div>
)}
</td> </td>
)} )}
{GlobaldummyData {GlobaldummyData
@ -3444,11 +3447,10 @@ const Printstyle8 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ''}{' '} : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -3926,9 +3928,11 @@ const Printstyle8 = ({
)} )}
</div> </div>
))} ))}
{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {item?.ProductIdentifierDtls?.[0]?.Description && (
<div>{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>
)} {item?.ProductIdentifierDtls?.[0]?.Description}
</div>
)}
</div> </div>
</td> </td>
) )

View File

@ -581,11 +581,10 @@ const PrintStyle9 = ({
> >
{GlobaldummyData {GlobaldummyData
? 'Cash' ? 'Cash'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -830,8 +829,8 @@ const PrintStyle9 = ({
)} )}
</div> </div>
))} ))}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
</div> </div>
</div> </div>
@ -863,9 +862,9 @@ const PrintStyle9 = ({
)} )}
</div> </div>
))} ))}
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
</div> </div>
); );
})()} })()}
@ -3316,11 +3315,10 @@ const PrintStyle9 = ({
? GlobalBilltext ? GlobalBilltext
? GlobalBilltext ? GlobalBilltext
: 'Cash' + ' Bill' : 'Cash' + ' Bill'
: BillName : BillName ||
? BillName (PaymentStatusSuccess?.length === 1
: PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ' Bill')}{' '}
: ''}{' '}
{/* {SalesModePref?.SettingValue == 'Y' && {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
</div> </div>
@ -3540,9 +3538,9 @@ const PrintStyle9 = ({
</div> </div>
))} ))}
{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && ( {identifiers?.[0]?.Description && (
<div>{(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}</div> <div>{identifiers?.[0]?.Description}</div>
)} )}
</div> </div>
</td> </td>
)} )}