diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx
index b9d4a12..23f7bcb 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx
@@ -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) => {
Description..}
defaultValue=""
diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx
index b45815a..75188ca 100644
--- a/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx
+++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx
@@ -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) && (
{' '}
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx
index 785f47e..bd6b9b0 100644
--- a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx
@@ -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')}
)}
@@ -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')}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx
index fda0440..5da0f4a 100644
--- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx
@@ -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')}
(
- (id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
+ {
id?.Description && (
{id.Description}
)
- ))}
+ }
)
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx
index 6c0d041..1e27f96 100644
--- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx
@@ -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')}
{id.Description}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx
index 3fe85e2..7c90d68 100644
--- a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx
@@ -944,11 +944,11 @@ const TaxInvoice = ({
{/* Description outside */}
{item?.ProductIdentifierDtls
- ?.find(d => d?.Description)
+ ?.[0]
?.Description && (
{item?.ProductIdentifierDtls
- ?.find(d => d?.Description)
+ ?.[0]
?.Description}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx
index 6a3cbae..2e1c8e3 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx
@@ -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})`} */}
@@ -922,15 +920,9 @@ const PrintStyle1 = ({
);
})
: ''}
- {item?.ProductIdentifierDtls?.length > 0 &&
- item?.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- )?.Description && (
- {item.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
)}
@@ -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})`}
@@ -4185,16 +4176,10 @@ const PrintStyle1 = ({
);
})
: ''}
- {item?.ProductIdentifierDtls?.length > 0 &&
- item?.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- )?.Description && (
- {item.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
- )}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx
index 517df0e..b86c3fa 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx
@@ -550,11 +550,10 @@ const PrintStyle10 = ({
{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'})`} */}
@@ -818,9 +817,9 @@ const PrintStyle10 = ({
)}
))}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
) : (
@@ -840,9 +839,9 @@ const PrintStyle10 = ({
)}
))}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
)}
@@ -3195,11 +3194,10 @@ const PrintStyle10 = ({
{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'})`} */}
@@ -3404,8 +3402,8 @@ const PrintStyle10 = ({
{(id.IMEI1 || id.IMEI2) && {[id.IMEI1, id.IMEI2].filter(Boolean).join(', ')}
}
))}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
)}
) : (
@@ -3450,9 +3448,9 @@ const PrintStyle10 = ({
)}
))}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx
index 91f4201..3a095a5 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx
@@ -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})`} */}
@@ -791,9 +790,9 @@ const PrintStyle11 = ({
);
})}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
) : (
@@ -824,9 +823,9 @@ const PrintStyle11 = ({
);
})}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
)}
@@ -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})`} */}
@@ -3399,9 +3397,9 @@ const PrintStyle11 = ({
);
})}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
) : (
@@ -3460,9 +3458,9 @@ const PrintStyle11 = ({
);
})}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
index 69d2ad1..94d16a8 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
@@ -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')}
{' '}
@@ -944,9 +942,9 @@ const Printstyle12 = ({
);
})}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
) : (
@@ -3658,8 +3656,8 @@ const Printstyle12 = ({
);
})}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+ {item.ProductIdentifierDtls?.[0]?.Description}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx
index 89a80c6..198c366 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx
@@ -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')}{' '}
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 && (
- {item.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
- )}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
@@ -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'})`}{' '} */}
@@ -3467,15 +3459,9 @@ const Printstyle2 = ({
);
})
: ''}
- {item?.ProductIdentifierDtls?.length > 0 &&
- item?.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- )?.Description && (
- {item.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
index 2bd5174..4212984 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
@@ -310,7 +310,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.OrderType === "E" && estimateTitle && Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
}
- {table2Data?.OrderType === "E" ? "" : {GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}
+ {table2Data?.OrderType === "E" ? "" :
+ {GlobaldummyData ? 'Cash Bill' : BillName ||
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : ' Bill')}
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
}
@@ -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 && (
- {item.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
- )}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
}
@@ -1300,7 +1298,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.OrderType === "E" && estimateTitle && Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
}
- {table2Data?.OrderType === "E" ? "" : {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""}
+ {table2Data?.OrderType === "E" ? "" :
+ {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ||
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : 'Bill')}
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
}
@@ -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 && (
- {item.ProductIdentifierDtls.find(
- (items) =>
- items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
- )}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
index a7e5778..8ead879 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
@@ -112,16 +112,26 @@ const Printstyle4 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedHeaderFontColor = useSelector(
+ GlobalSelectedPrintHeaderFontColor
+ );
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableHeaderFontColor = useSelector(
+ GlobalSelectedTableHeaderFontColor
+ );
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedTableBodyFontColor = useSelector(
+ GlobalSelectedTableBodyFontColor
+ );
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedTableFooterFontColor = useSelector(
+ GlobalSelectedFooterFontColor
+ );
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ const SelectedNetAmountFontColor = useSelector(
+ GlobalSelectedNetAmountFontColor
+ );
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
@@ -172,11 +182,15 @@ const Printstyle4 = ({
);
let printColors = printDatas?.PrintColors;
- const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
- const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
- const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
- const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
- const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
+ const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
+ const tableHeaderColor = printColors?.find(
+ (obj) => obj.tableHeaderColor
+ )?.tableHeaderColor;
+ const tableBodyColor = printColors?.find(
+ (obj) => obj.tableBodyColor
+ )?.tableBodyColor;
+ const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
+ const netAmtColor = printColors?.find((obj) => obj.netAmtColor)?.netAmtColor;
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
@@ -366,7 +380,7 @@ const Printstyle4 = ({
} else if (DineInData?.length > 0) {
dataSource = DineInData;
}
-
+console.log(dataSource, 'dataSource');
// Paginate the data
const paginatedChunks = [];
for (let i = 0; i < dataSource.length; i += chunkSize) {
@@ -378,16 +392,14 @@ const Printstyle4 = ({
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
- console.log(paginatedChunks, 'paginatedChunks')
+ console.log(paginatedChunks, 'paginatedChunks');
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
- color: GlobaldummyData
- ? SelectedHeaderFontColor
- : headerColor?.font,
- }
+ color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
+ };
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
@@ -396,34 +408,30 @@ const Printstyle4 = ({
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
- }
+ };
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
- color: GlobaldummyData
- ? SelectedTableBodyFontColor
- : tableBodyColor?.font,
- }
- const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
+ color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
+ };
+ const rowtypeStyle = GlobaldummyData
+ ? SelectedRowType
+ : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
- color: GlobaldummyData
- ? SelectedTableFooterFontColor
- : footerColor?.font,
- }
+ color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
+ };
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
- color: GlobaldummyData
- ? SelectedNetAmountFontColor
- : netAmtColor?.font,
- }
+ color: GlobaldummyData ? SelectedNetAmountFontColor : netAmtColor?.font,
+ };
return (
<>
{FormatTheme ? (
@@ -450,8 +458,8 @@ const Printstyle4 = ({
flexDirection: 'column',
justifyContent:
chunkIndex === paginatedChunks.length - 1 &&
- !shouldFooterBeOnNewPage &&
- FormatTheme
+ !shouldFooterBeOnNewPage &&
+ FormatTheme
? 'space-between'
: '',
height: isMobile
@@ -501,7 +509,7 @@ const Printstyle4 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -567,11 +575,15 @@ const Printstyle4 = ({
>
Dt: {GlobaldummyData ? formattedDate : Date1}
- {SalesModePref?.SettingValue == 'Y' &&
- {' '}
- Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
-
-
}
+ {SalesModePref?.SettingValue == 'Y' && (
+
+ {' '}
+ Name :{' '}
+ {table2Data?.SalesMode == 'R'
+ ? Retailshortname?.Comments
+ : Wholesaleshortname?.Comments}{' '}
+
+ )}
@@ -579,10 +591,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
{/*
{GlobaldummyData ? formattedDate : Date1}
*/}
@@ -607,11 +619,10 @@ const Printstyle4 = ({
>
{GlobaldummyData
? 'Cash Bill'
- : 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'})`} */}
@@ -646,150 +657,172 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- | # |
- )
- : SLNO && # | }
+
+ #
+ |
+ )
+ : SLNO && (
+
+ #
+ |
+ )}
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && (
+ Item |
+ )
+ : Item && (
+ Item |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- {WeightasKg ? 'Qty/Kg' : 'Qty'}
- |
- )}
+
+ {WeightasKg ? 'Qty/Kg' : 'Qty'}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -810,108 +843,109 @@ const Printstyle4 = ({
const descriptions = identifiers
.filter((d) => d.Description)
.map((d) => d.Description);
-
+ console.log(descriptions,identifiers,'descriptions')
const packageList =
PackageDetails?.filter(
(pkg) => pkg.ProdId === item.ProdId
) ?? [];
return (
-
-
+ }
+ >
{/* SL NO */}
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{/* ITEM COLUMN */}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {/* Product Name */}
- {item?.ProdName}
+ |
+ {/* Product Name */}
+ {item?.ProdName}
- {/* Package OR Size */}
- {packageList.length > 0 ? (
-
- {packageList.map((pkg, i) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y'
- ? (item?.Size || '1') +
- (item?.SinglePc === 'Y'
- ? ' PCS'
- : item?.Type !== 'C'
- ? ` ${item?.UomName}`
- : ' COMBO')
- : ''}
- {item?.BrandName || ''}
-
- )}
+ {/* Package OR Size */}
+ {packageList.length > 0 ? (
+
+ {packageList.map((pkg, i) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+
+ ))}
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y'
+ ? (item?.Size || '1') +
+ (item?.SinglePc === 'Y'
+ ? ' PCS'
+ : item?.Type !== 'C'
+ ? ` ${item?.UomName}`
+ : ' COMBO')
+ : ''}
+ {item?.BrandName || ''}
+
+ )}
- {/* Serials */}
- {serials.map((s, i) => (
- {s}
- ))}
+ {/* Serials */}
+ {serials.map((s, i) => (
+ {s}
+ ))}
- {/* IMEIs */}
- {imeis.map((iVal, i) => (
- {iVal}
- ))}
+ {/* IMEIs */}
+ {imeis.map((iVal, i) => (
+ {iVal}
+ ))}
- {/* Description from first identifier */}
- {descriptions[0] && (
- {descriptions[0]}
- )}
- |
- )}
+ {/* Description from first identifier */}
+ {descriptions[0] && (
+ {descriptions[0]}
+ )}
+
+ )}
{/* Quantity */}
{(GlobaldummyData
? GlobalQuantity
: Quantity) && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{/* HSN */}
{(GlobaldummyData
? GlobalHsnCode
: HsnCode) && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{/* MRP */}
{(GlobaldummyData ? GlobalMRP : MRP) && (
@@ -926,12 +960,14 @@ const Printstyle4 = ({
{(GlobaldummyData
? GlobalDiscount
: Discount) && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || item?.DiscountAmt || 0)
- : (item?.OfferValue || item?.DiscountAmt || 0)}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt || item?.DiscountAmt || 0
+ : item?.OfferValue ||
+ item?.DiscountAmt ||
+ 0}
+ |
+ )}
{/* Rate */}
{(GlobaldummyData ? GlobalRate : Rate) && (
@@ -945,9 +981,9 @@ const Printstyle4 = ({
{item?.Type !== 'C'
? (item?.TotalAmt || 0) -
- (item?.OfferAmt || 0)
+ (item?.OfferAmt || 0)
: (item?.TotalAmt || 0) -
- (item?.OfferValue || 0)}
+ (item?.OfferValue || 0)}
|
)}
@@ -976,282 +1012,310 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- | # |
- )
- : SLNO && # | }
+
+ #
+ |
+ )
+ : SLNO && (
+
+ #
+ |
+ )}
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && (
+ Item |
+ )
+ : Item && (
+ Item |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
{dataChunk?.map((item, index) => {
return (
-
+ }
+ >
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {UomPrint?.SettingValue === 'Y' && (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- )}
- |
- )}
+
+ {item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+ |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
- |
- )
+
+ {item?.SalesQty}
+ |
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || item?.DiscountAmt || 0)
- : (item?.OfferValue || item?.DiscountAmt || 0)}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt -
+ (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
})}
@@ -1291,7 +1355,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
- ...netAmountStyle
+ ...netAmountStyle,
}}
>
{' '}
@@ -1328,11 +1392,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -1422,7 +1486,6 @@ const Printstyle4 = ({
fontWeight: '600',
borderTop: '1px dashed #000',
borderBottom: '1px dashed #000',
- // color: '#e30c0c',
color: '#000',
marginTop: '10px',
padding: '4px 0',
@@ -1497,17 +1560,17 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' +
- ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' +
+ ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -1778,7 +1841,7 @@ const Printstyle4 = ({
: '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -1804,83 +1867,83 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
items.push({
label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(
+ 2
+ ),
});
}
- }
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(
- 2
- ),
- });
- }
-
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{/*
*/}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -1889,59 +1952,59 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
- Scan to Pay{' '}
+
+

+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
- Scan to Pay{' '}
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
-
- )}
+ )}
)}
@@ -2042,7 +2105,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle,
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2051,28 +2114,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -2092,137 +2155,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving
- the counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving
+ the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+

+
+ )}
)}
@@ -2283,7 +2346,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
- ...netAmountStyle
+ ...netAmountStyle,
}}
>
Sub Total
@@ -2319,11 +2382,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -2488,16 +2551,16 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -2768,7 +2831,7 @@ const Printstyle4 = ({
: '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -2792,81 +2855,81 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
items.push({
label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
});
}
- }
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2875,55 +2938,55 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
- Scan to Pay{' '}
+
+

+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
- Scan to Pay{' '}
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
-
- )}
+ )}
)}
@@ -3019,7 +3082,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle,
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -3028,28 +3091,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -3069,137 +3132,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving the
- counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+

+
+ )}
)}
@@ -3246,7 +3309,7 @@ const Printstyle4 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -3321,11 +3383,15 @@ const Printstyle4 = ({
>
Dt: {GlobaldummyData ? formattedDate : Date1}
- {SalesModePref?.SettingValue == 'Y' &&
- {' '}
- Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
-
-
}
+ {SalesModePref?.SettingValue == 'Y' && (
+
+ {' '}
+ Name :{' '}
+ {table2Data?.SalesMode == 'R'
+ ? Retailshortname?.Comments
+ : Wholesaleshortname?.Comments}{' '}
+
+ )}
@@ -3333,10 +3399,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
@@ -3362,11 +3428,10 @@ const Printstyle4 = ({
? 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'})`} */}
@@ -3394,55 +3459,113 @@ const Printstyle4 = ({
{GlobaldummyData
- ? GlobalSlNo && | # |
- : SLNO && # | }
+ ? GlobalSlNo && (
+
+ #
+ |
+ )
+ : SLNO && (
+
+ #
+ |
+ )}
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && (
+ Item |
+ )
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Amt
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
-
+ }
+ >
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
+ |
+ {item?.ProdName}
- {/* Serial Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
-
- {/* IMEI Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
-
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.find(
- (d) =>
- d.SerialNumber || d.IMEI1 || d.IMEI2
- )?.Description && (
-
- {
- item.ProductIdentifierDtls.find(
- (d) =>
- d.SerialNumber ||
- d.IMEI1 ||
- d.IMEI2
- ).Description
- }
+ {/* Serial Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
- )}
- |
- )}
+ ))}
+
+ {/* IMEI Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
+
+ {/* Description from first identifier */}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
+ )}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
+ |
+ {item?.SalesQty}
-
- {/* Package Details */}
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- ).length > 0 ? (
-
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- )?.map((pkg, index) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- {/* Serial */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
-
- {/* IMEI */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
-
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.find(
- (d) =>
- d.SerialNumber ||
- d.IMEI1 ||
- d.IMEI2
- )?.Description && (
-
- {
- item.ProductIdentifierDtls.find(
- (d) =>
- d.SerialNumber ||
- d.IMEI1 ||
- d.IMEI2
- ).Description
- }
+
+ {/* Package Details */}
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ ).length > 0 ? (
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ )?.map((pkg, index) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
- )}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y' && (
- <>
- ({item?.Size || '1'}){' '}
- {item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'}{' '}
- >
+ ))}
+
+ {/* Serial */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
+
+ ))}
+
+ {/* IMEI */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
+
+ {/* Description from first identifier */}
+ {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
)}
- {item?.BrandName || ''}
-
- )}
-
- |
- )
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y' && (
+ <>
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}{' '}
+ >
+ )}
+ {item?.BrandName || ''}
+
+ )}
+
+
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- {GlobaldummyData
- ? GlobalTax && (
- |
- {/* */}
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )
- : Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {/* */}
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )}
-
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ {GlobaldummyData
+ ? GlobalTax && (
+ |
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {/* */}
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || item?.DiscountAmt || 0)
- : (item?.OfferValue || item?.DiscountAmt || 0)}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt || item?.DiscountAmt || 0
+ : item?.OfferValue ||
+ item?.DiscountAmt ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
}
@@ -3785,48 +3912,48 @@ const Printstyle4 = ({
: Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
-
+ }
+ >
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {(
- (item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) => items.SerialNumber
- )
- .map(
- (a, index) => ` ${a.SerialNumber}`
+ |
+ {item?.ProdName}
+ {(
+ (item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) => items.SerialNumber
+ )
+ .map(
+ (a, index) => ` ${a.SerialNumber}`
+ )
+ .join('')
+ : '') +
+ (item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (item1) =>
+ item1.IMEI1 || item1.IMEI2
+ )
+ .map((item2) => {
+ const imei1 = item2.IMEI1 || '';
+ const imei2 = item2.IMEI2 || '';
+ return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
+ })
+ .join('')
+ : '') +
+ (item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
+ (
+ {item.ProductIdentifierDtls?.[0]?.Description}
)
- .join('')
- : '') +
- (item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (item1) =>
- item1.IMEI1 || item1.IMEI2
- )
- .map((item2) => {
- const imei1 = item2.IMEI1 || '';
- const imei2 = item2.IMEI2 || '';
- return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
- })
- .join('')
- : '') +
- (item?.ProductIdentifierDtls?.length >
- 0 &&
- item?.ProductIdentifierDtls.find(
- (item1) =>
- item1.IMEI1 ||
- item1.IMEI2 ||
- item1.SerialNumber
- )?.Description
- ? ` ${item.ProductIdentifierDtls.find(
- (item1) =>
- item1.IMEI1 ||
- item1.IMEI2 ||
- item1.SerialNumber
- ).Description
- }`
- : '')
- ).trim()}
- |
- )}
+ ).trim()}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- |
- )
- : Quantity && (
-
- {item?.SalesQty}
- {UomPrint?.SettingValue === 'Y' && (
+ |
+ {item?.SalesQty}
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@@ -3971,83 +4073,101 @@ const Printstyle4 = ({
: 'COMBO'}
)
- )}
- |
- )}
+
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || item?.DiscountAmt || 0)
- : (item?.OfferValue || item?.DiscountAmt || 0)}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt || item?.DiscountAmt || 0
+ : item?.OfferValue ||
+ item?.DiscountAmt ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
}
@@ -4080,7 +4200,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
- ...netAmountStyle
+ ...netAmountStyle,
}}
>
Sub Total
@@ -4197,7 +4317,6 @@ const Printstyle4 = ({
fontWeight: '600',
borderTop: '1px dashed #000',
borderBottom: '1px dashed #000',
- // color: '#e30c0c',
color: '#000',
marginTop: '10px',
padding: '4px 0',
@@ -4205,7 +4324,7 @@ const Printstyle4 = ({
>
Total Amount
-
+
₹
{Number(table2Data?.NetAmount).toFixed(2)}
@@ -4270,14 +4389,14 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor((num % 100) / 10)
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor((num % 100) / 10)
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -4537,7 +4656,7 @@ const Printstyle4 = ({
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -4560,79 +4679,79 @@ const Printstyle4 = ({
)}
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
items.push({
label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
});
}
- }
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
- {i.label}
- :
- {i.value}
-
- ));
- })()}
-
- )}
+ return items.map((i, idx) => (
+
+ {i.label}
+ :
+ {i.value}
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -4641,51 +4760,51 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
+
+

+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- )}
+ )}
)}
@@ -4771,7 +4890,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle,
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -4780,21 +4899,21 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
+ )}
)}
@@ -4814,136 +4933,136 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not exchangeable or
- refundable.
-
- -
- Please check the product before leaving the counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not exchangeable or
+ refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+

+
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
index b6424ae..3eddc2b 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
@@ -523,11 +523,10 @@ const PrintStyle5 = ({
{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'})`} */}
@@ -825,8 +824,8 @@ const PrintStyle5 = ({
})}
{/* 📝 Description from first identifier */}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
+ {identifiers?.[0]?.Description && (
+ {identifiers?.[0]?.Description}
)}
{/* 🔢 Quantity */}
@@ -876,8 +875,8 @@ const PrintStyle5 = ({
})}
{/* 📝 Description from first identifier */}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
+ {identifiers?.[0]?.Description && (
+ {identifiers?.[0]?.Description}
)}
{/* 🔢 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'})`} */}
@@ -3161,13 +3159,11 @@ const PrintStyle5 = ({
})}
{/* 📝 Description from first identifier */}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
-
- {/* 🧪 Debug / Extra Text */}
- ssd3
+ {identifiers?.[0]?.Description && (
+ {identifiers?.[0]?.Description}
+ )}
+
{/* 🔢 Quantity */}
-
@@ -3216,12 +3212,10 @@ const PrintStyle5 = ({
})}
{/* 📝 Description from first identifier */}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
-
{identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {identifiers?.[0]?.Description && (
+
{identifiers?.[0]?.Description}
+ )}
- {/* 🧪 Debug / Extra Text */}
-
ssd4
{/* 🔢 Quantity */}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
index 6c0fed0..20906fe 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
@@ -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 && (
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
+ {item?.ProductIdentifierDtls?.[0]?.Description}
)}
@@ -1304,11 +1304,11 @@ const Printstyle6 = ({
))}
{/* 📝 Description from first identifier */}
- {(item?.ProductIdentifierDtls ?? []).find(d => d.IMEI1 || d.IMEI2 || d.SerialNumber)?.Description && (
-
- {(item?.ProductIdentifierDtls ?? []).find(d => d.IMEI1 || d.IMEI2 || d.SerialNumber).Description}
-
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
{/* 🔢 Quantity */}
@@ -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'})`} */}
@@ -4050,11 +4049,9 @@ const Printstyle6 = ({
))}
{/* 📝 Description from first identifier */}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
-
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
-
- )}
+ {identifiers?.[0]?.Description && (
+
{identifiers?.[0]?.Description}
+ )}
{/* 🔢 Quantity */}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
index 14620ab..1020c5c 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
@@ -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'})`} */}
@@ -806,13 +805,11 @@ const PrintStyle7 = ({
))}
- {(item?.ProductIdentifierDtls ?? [])
- .find(items => items.SerialNumber || items.IMEI1 || items.IMEI2)?.Description && (
-
- {(item?.ProductIdentifierDtls ?? [])
- .find(items => items.SerialNumber || items.IMEI1 || items.IMEI2).Description}
-
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
)}
@@ -1072,11 +1069,11 @@ const PrintStyle7 = ({
})}
{/* 📝 Description from first identifier */}
- {(item?.ProductIdentifierDtls ?? []).find(data => data.SerialNumber || data.IMEI1 || data.IMEI2)?.Description && (
-
- {(item?.ProductIdentifierDtls ?? []).find(data => data.SerialNumber || data.IMEI1 || data.IMEI2).Description}
-
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
)
@@ -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'})`} */}
@@ -3288,15 +3284,11 @@ const PrintStyle7 = ({
))}
- {(item?.ProductIdentifierDtls ?? []).find(
- items => items.SerialNumber || items.IMEI1 || items.IMEI2
- )?.Description && (
-
- {(item?.ProductIdentifierDtls ?? []).find(
- items => items.SerialNumber || items.IMEI1 || items.IMEI2
- ).Description}
-
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
)}
@@ -3530,11 +3522,11 @@ const PrintStyle7 = ({
))}
- {(item?.ProductIdentifierDtls ?? []).find(items => items.SerialNumber || items.IMEI1 || items.IMEI2)?.Description && (
-
- {(item?.ProductIdentifierDtls ?? []).find(items => items.SerialNumber || items.IMEI1 || items.IMEI2).Description}
-
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
index b48a079..aee8d46 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
@@ -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'})`} */}
@@ -910,9 +909,11 @@ const Printstyle8 = ({
})
: ''}
- {item?.ProductIdentifierDtls?.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {item.ProductIdentifierDtls.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
)}
{GlobaldummyData
@@ -1277,9 +1278,11 @@ const Printstyle8 = ({
))}
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
)}
{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'})`} */}
@@ -3926,9 +3928,11 @@ const Printstyle8 = ({
)}
))}
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {item?.ProductIdentifierDtls?.[0]?.Description && (
+
+ {item?.ProductIdentifierDtls?.[0]?.Description}
+
+ )}
)
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
index 469482c..102e926 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
@@ -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'})`} */}
@@ -830,8 +829,8 @@ const PrintStyle9 = ({
)}
))}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
+ {identifiers?.[0]?.Description && (
+ {identifiers?.[0]?.Description}
)}
@@ -863,9 +862,9 @@ const PrintStyle9 = ({
)}
))}
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {identifiers.find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {identifiers?.[0]?.Description && (
+ {identifiers?.[0]?.Description}
+ )}
);
})()}
@@ -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'})`} */}
@@ -3540,9 +3538,9 @@ const PrintStyle9 = ({
))}
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2)?.Description && (
- {(item?.ProductIdentifierDtls ?? []).find(d => d.SerialNumber || d.IMEI1 || d.IMEI2).Description}
- )}
+ {identifiers?.[0]?.Description && (
+ {identifiers?.[0]?.Description}
+ )}
)}