Merge pull request 'Fix #262 Print style changes' (#263) from March-3-deployment into main

Reviewed-on: Pozomind/pozo-retail-app#263
This commit is contained in:
karthikalakshmi 2026-03-09 12:48:09 +05:30
commit f564bd3d1b
18 changed files with 2119 additions and 2054 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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