Design and bsc1 issue

This commit is contained in:
karthikalakshmi 2026-03-09 17:13:55 +05:30
parent 6a07094d7f
commit a2537cbc21
2 changed files with 59 additions and 28 deletions

View File

@ -747,7 +747,8 @@ const BSC1Payment = (props) => {
useEffect(() => { useEffect(() => {
if (!preOrder) { if (!preOrder) {
const totalSum = OrderCardDetail?.reduce( 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 0
); );
@ -839,7 +840,7 @@ const BSC1Payment = (props) => {
? (Number(withdiscTotal) + Number(globalTipAmount)).toFixed(2) ? (Number(withdiscTotal) + Number(globalTipAmount)).toFixed(2)
: (Number(Total) + Number(globalTipAmount)).toFixed(2) : (Number(Total) + Number(globalTipAmount)).toFixed(2)
); );
console.log(currentOrderNetAmount,totalSum,"currentOrderNetAmount")
setTotalAmount( setTotalAmount(
salesBillEdit salesBillEdit
? currentOrderNetAmount > previousNetAmount ? currentOrderNetAmount > previousNetAmount
@ -2238,6 +2239,9 @@ const BSC1Payment = (props) => {
ModelNumber: a.ModelNumber, ModelNumber: a.ModelNumber,
BatchRef: a.BatchRef, BatchRef: a.BatchRef,
PackageDtl: a.PackageDtl, PackageDtl: a.PackageDtl,
...(a?.DiscountValue && { DiscountValue: a.DiscountValue }),
...(a?.DiscountType && { DiscountType: a.DiscountType }),
...(a?.DiscountAmt && { DiscountAmt: a.DiscountAmt })
})); }));
const NotSlectedTypeFind = temporderdetail?.find( const NotSlectedTypeFind = temporderdetail?.find(
(a) => a?.BookingType != SelectedBookingType (a) => a?.BookingType != SelectedBookingType

View File

@ -380,7 +380,7 @@ const Printstyle4 = ({
} else if (DineInData?.length > 0) { } else if (DineInData?.length > 0) {
dataSource = DineInData; dataSource = DineInData;
} }
console.log(dataSource, 'dataSource'); console.log(dataSource, 'dataSource');
// Paginate the data // Paginate the data
const paginatedChunks = []; const paginatedChunks = [];
for (let i = 0; i < dataSource.length; i += chunkSize) { for (let i = 0; i < dataSource.length; i += chunkSize) {
@ -843,7 +843,11 @@ console.log(dataSource, 'dataSource');
const descriptions = identifiers const descriptions = identifiers
.filter((d) => d.Description) .filter((d) => d.Description)
.map((d) => d.Description); .map((d) => d.Description);
console.log(descriptions,identifiers,'descriptions') console.log(
descriptions,
identifiers,
'descriptions'
);
const packageList = const packageList =
PackageDetails?.filter( PackageDetails?.filter(
(pkg) => pkg.ProdId === item.ProdId (pkg) => pkg.ProdId === item.ProdId
@ -3595,6 +3599,7 @@ console.log(dataSource, 'dataSource');
...tableHeaderStyle, ...tableHeaderStyle,
width: '10px', width: '10px',
textAlign: 'right', textAlign: 'right',
paddingLeft: '4px',
}} }}
> >
Rate Rate
@ -3606,6 +3611,7 @@ console.log(dataSource, 'dataSource');
...tableHeaderStyle, ...tableHeaderStyle,
width: '10px', width: '10px',
textAlign: 'right', textAlign: 'right',
paddingLeft: '4px',
}} }}
> >
Rate Rate
@ -3689,9 +3695,15 @@ console.log(dataSource, 'dataSource');
))} ))}
{/* Description from first identifier */} {/* Description from first identifier */}
{(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&& {item?.ProductIdentifierDtls?.length > 0 &&
( item.ProductIdentifierDtls?.[0]
<div>{item.ProductIdentifierDtls?.[0]?.Description}</div> ?.Description && (
<div>
{
item.ProductIdentifierDtls?.[0]
?.Description
}
</div>
)} )}
</td> </td>
)} )}
@ -3737,9 +3749,17 @@ console.log(dataSource, 'dataSource');
))} ))}
{/* Description from first identifier */} {/* Description from first identifier */}
{(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&& {item?.ProductIdentifierDtls?.length >
( 0 &&
<div>{item.ProductIdentifierDtls?.[0]?.Description}</div> item.ProductIdentifierDtls?.[0]
?.Description && (
<div>
{
item
.ProductIdentifierDtls?.[0]
?.Description
}
</div>
)} )}
</div> </div>
) : ( ) : (
@ -4053,9 +4073,16 @@ console.log(dataSource, 'dataSource');
}) })
.join('') .join('')
: '') + : '') +
(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&& (item?.ProductIdentifierDtls?.length >
( 0 &&
<div>{item.ProductIdentifierDtls?.[0]?.Description}</div> item.ProductIdentifierDtls?.[0]
?.Description) && (
<div>
{
item.ProductIdentifierDtls?.[0]
?.Description
}
</div>
) )
).trim()} ).trim()}
</td> </td>