diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx index 75188ca..b5584e9 100644 --- a/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx @@ -747,7 +747,8 @@ const BSC1Payment = (props) => { useEffect(() => { if (!preOrder) { const totalSum = OrderCardDetail?.reduce( - (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0), + // (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0), + (acc, card) => acc + parseFloat(card.TotalAmt || 0), 0 ); @@ -839,7 +840,7 @@ const BSC1Payment = (props) => { ? (Number(withdiscTotal) + Number(globalTipAmount)).toFixed(2) : (Number(Total) + Number(globalTipAmount)).toFixed(2) ); - +console.log(currentOrderNetAmount,totalSum,"currentOrderNetAmount") setTotalAmount( salesBillEdit ? currentOrderNetAmount > previousNetAmount @@ -2238,6 +2239,9 @@ const BSC1Payment = (props) => { ModelNumber: a.ModelNumber, BatchRef: a.BatchRef, PackageDtl: a.PackageDtl, + ...(a?.DiscountValue && { DiscountValue: a.DiscountValue }), + ...(a?.DiscountType && { DiscountType: a.DiscountType }), + ...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt }) })); const NotSlectedTypeFind = temporderdetail?.find( (a) => a?.BookingType != SelectedBookingType diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx index 8ead879..415d771 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx @@ -380,7 +380,7 @@ const Printstyle4 = ({ } else if (DineInData?.length > 0) { dataSource = DineInData; } -console.log(dataSource, 'dataSource'); + console.log(dataSource, 'dataSource'); // Paginate the data const paginatedChunks = []; for (let i = 0; i < dataSource.length; i += chunkSize) { @@ -843,7 +843,11 @@ console.log(dataSource, 'dataSource'); const descriptions = identifiers .filter((d) => d.Description) .map((d) => d.Description); - console.log(descriptions,identifiers,'descriptions') + console.log( + descriptions, + identifiers, + 'descriptions' + ); const packageList = PackageDetails?.filter( (pkg) => pkg.ProdId === item.ProdId @@ -3595,6 +3599,7 @@ console.log(dataSource, 'dataSource'); ...tableHeaderStyle, width: '10px', textAlign: 'right', + paddingLeft: '4px', }} > Rate @@ -3606,6 +3611,7 @@ console.log(dataSource, 'dataSource'); ...tableHeaderStyle, width: '10px', textAlign: 'right', + paddingLeft: '4px', }} > Rate @@ -3689,10 +3695,16 @@ console.log(dataSource, 'dataSource'); ))} {/* Description from first identifier */} - {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&& - ( -
{item.ProductIdentifierDtls?.[0]?.Description}
- )} + {item?.ProductIdentifierDtls?.length > 0 && + item.ProductIdentifierDtls?.[0] + ?.Description && ( +
+ { + item.ProductIdentifierDtls?.[0] + ?.Description + } +
+ )} )} {GlobaldummyData @@ -3737,10 +3749,18 @@ console.log(dataSource, 'dataSource'); ))} {/* Description from first identifier */} - {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&& - ( -
{item.ProductIdentifierDtls?.[0]?.Description}
- )} + {item?.ProductIdentifierDtls?.length > + 0 && + item.ProductIdentifierDtls?.[0] + ?.Description && ( +
+ { + item + .ProductIdentifierDtls?.[0] + ?.Description + } +
+ )} ) : (
@@ -4041,22 +4061,29 @@ console.log(dataSource, 'dataSource'); ) .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}
- ) + (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 + } +
+ ) ).trim()} )}