Merge pull request 'removefromcartbugfixing' (#173) from bugfixing into main
Reviewed-on: Pozomind/pozo-retail-app#173
This commit is contained in:
commit
6c23498eea
|
|
@ -156,8 +156,8 @@ const BSBillingTable1 = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
|
||||
const OldtableDataDinein = tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||
|
|
@ -165,8 +165,8 @@ const BSBillingTable1 = () => {
|
|||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
const [OpenEditTotalAmt, setOpenEditTotalAmt] = useState(false);
|
||||
const [OpenImeiDetail, setOpenImeiDetail] = useState(false);
|
||||
|
|
@ -1115,9 +1115,9 @@ const BSBillingTable1 = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1217,6 +1217,7 @@ const BSBillingTable1 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
OrderRate: isPaidproduct?.OrderRate,
|
||||
Offer: 0,
|
||||
});
|
||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||
|
|
@ -1390,6 +1391,7 @@ const BSBillingTable1 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -1468,6 +1470,7 @@ const BSBillingTable1 = () => {
|
|||
OrderQty: isPaidproduct?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate:item?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
|
|
@ -1503,6 +1506,7 @@ const BSBillingTable1 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate,
|
||||
});
|
||||
await ChangeOfferAppliedProdsFn({
|
||||
inwardDtlId: item?.InwardDtlId,
|
||||
|
|
@ -1532,6 +1536,7 @@ const BSBillingTable1 = () => {
|
|||
OrderQty: isPaidProductAvailableInCart?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||
OrderRate:isPaidProductAvailableInCart?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
});
|
||||
|
|
@ -1617,6 +1622,7 @@ const BSBillingTable1 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1643,6 +1649,7 @@ const BSBillingTable1 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1975,6 +1982,7 @@ const BSBillingTable1 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
OrderRate:item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -1993,6 +2001,7 @@ const BSBillingTable1 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
OrderRate:item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -2135,7 +2144,7 @@ const BSBillingTable1 = () => {
|
|||
OpenEditTotalAmount();
|
||||
}
|
||||
}}
|
||||
// onClick={tableData?.length>0? OpenEditTotalAmount :""}
|
||||
// onClick={tableData?.length>0? OpenEditTotalAmount :""}
|
||||
>
|
||||
{!isMobile ? (
|
||||
<Tooltip title="Quantity">Qty</Tooltip>
|
||||
|
|
@ -2243,11 +2252,10 @@ const BSBillingTable1 = () => {
|
|||
{OldtableDataTakeAway?.map((item, index) => (
|
||||
<tr
|
||||
key={index}
|
||||
className={`${
|
||||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2258,17 +2266,17 @@ const BSBillingTable1 = () => {
|
|||
? item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
? 'wheat'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2276,18 +2284,18 @@ const BSBillingTable1 = () => {
|
|||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: index % 2 === 0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6',
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
|
|
@ -2340,7 +2348,7 @@ const BSBillingTable1 = () => {
|
|||
}}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2391,21 +2399,21 @@ const BSBillingTable1 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2500,11 +2508,11 @@ const BSBillingTable1 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
|
||||
|
|
@ -2539,11 +2547,10 @@ const BSBillingTable1 = () => {
|
|||
{OldtableDataDinein?.map((item, index) => (
|
||||
<tr
|
||||
key={OldtableDataTakeAway?.length + index}
|
||||
className={`${
|
||||
item?.SalesId
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
className={`${item?.SalesId
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2554,28 +2561,28 @@ const BSBillingTable1 = () => {
|
|||
? item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2683,21 +2690,21 @@ const BSBillingTable1 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2792,11 +2799,11 @@ const BSBillingTable1 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
|
||||
|
|
@ -2836,11 +2843,10 @@ const BSBillingTable1 = () => {
|
|||
OldtableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2851,44 +2857,44 @@ const BSBillingTable1 = () => {
|
|||
? BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2897,30 +2903,30 @@ const BSBillingTable1 = () => {
|
|||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6',
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -2971,7 +2977,7 @@ const BSBillingTable1 = () => {
|
|||
}}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2992,8 +2998,8 @@ const BSBillingTable1 = () => {
|
|||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && (
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
{item?.Size}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
|
|
@ -3028,21 +3034,21 @@ const BSBillingTable1 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -3137,11 +3143,11 @@ const BSBillingTable1 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
|
||||
|
|
@ -3182,11 +3188,10 @@ const BSBillingTable1 = () => {
|
|||
tableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'Billing-Table1-row-disabled'
|
||||
: 'Billing-Table1-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -3199,61 +3204,61 @@ const BSBillingTable1 = () => {
|
|||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background:
|
||||
BookingType === 'Dine In' &&
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6',
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3355,21 +3360,21 @@ const BSBillingTable1 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -3464,11 +3469,11 @@ const BSBillingTable1 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,16 +190,16 @@ const BSBillingTable4 = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataDinein = tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -1003,9 +1003,9 @@ const BSBillingTable4 = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1124,6 +1124,7 @@ const BSBillingTable4 = () => {
|
|||
BookedDate: isPaidproduct?.BookedDate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
OrderRate: isPaidproduct?.OrderRate,
|
||||
});
|
||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||
// Just Decrease Paid Qty
|
||||
|
|
@ -1302,6 +1303,7 @@ const BSBillingTable4 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BookedDate: item?.BookedDate,
|
||||
BuyInwardDtlId: null,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -1381,6 +1383,7 @@ const BSBillingTable4 = () => {
|
|||
OrderQty: isPaidproduct?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
BookedDate: item?.BookedDate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
|
|
@ -1415,6 +1418,7 @@ const BSBillingTable4 = () => {
|
|||
OrderQty: item?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
BookedDate: item?.BookedDate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
|
|
@ -1448,6 +1452,7 @@ const BSBillingTable4 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||
BookedDate: isPaidProductAvailableInCart?.BookedDate,
|
||||
OrderRate: isPaidProductAvailableInCart?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
});
|
||||
|
|
@ -1536,6 +1541,7 @@ const BSBillingTable4 = () => {
|
|||
BookedDate: item?.BookedDate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1561,6 +1567,7 @@ const BSBillingTable4 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BookedDate: item?.BookedDate,
|
||||
OrderRate: item?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
|
|
@ -1612,6 +1619,7 @@ const BSBillingTable4 = () => {
|
|||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate,
|
||||
|
||||
});
|
||||
} else {
|
||||
const isCheck = GlobalOfferAppliedProductsData?.find(
|
||||
|
|
@ -1919,6 +1927,7 @@ const BSBillingTable4 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
BookedDate: item?.BookedDate,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -1938,6 +1947,7 @@ const BSBillingTable4 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
BookedDate: item?.BookedDate,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -2023,9 +2033,9 @@ const BSBillingTable4 = () => {
|
|||
AppId: AppId,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||
|
|
@ -2037,9 +2047,9 @@ const BSBillingTable4 = () => {
|
|||
ProdSubCat: ProdSubCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2050,9 +2060,9 @@ const BSBillingTable4 = () => {
|
|||
prodCat: prodCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2175,7 +2185,7 @@ const BSBillingTable4 = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Suspense fallback={<BillingTableSkeleton />}>
|
||||
<Suspense fallback={<BillingTableSkeleton />}>
|
||||
<div
|
||||
className={
|
||||
isMobile ? 'BSBilling4-tablediv-mobile' : 'BSBilling4-tablediv'
|
||||
|
|
@ -2286,7 +2296,7 @@ const BSBillingTable4 = () => {
|
|||
OpenEditTotalAmount();
|
||||
}
|
||||
}}
|
||||
// onClick={tableData?.length>0? OpenEditTotalAmount :""}
|
||||
// onClick={tableData?.length>0? OpenEditTotalAmount :""}
|
||||
>
|
||||
{!isMobile ? (
|
||||
<Tooltip title="Quantity">Qty</Tooltip>
|
||||
|
|
@ -2390,11 +2400,10 @@ const BSBillingTable4 = () => {
|
|||
{OldtableDataTakeAway?.map((item, index) => (
|
||||
<tr
|
||||
key={index}
|
||||
className={`${
|
||||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2404,18 +2413,18 @@ const BSBillingTable4 = () => {
|
|||
? item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2423,9 +2432,9 @@ const BSBillingTable4 = () => {
|
|||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: index % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2476,7 +2485,7 @@ const BSBillingTable4 = () => {
|
|||
style={{ fontFamily: 'Poppins' }}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2538,21 +2547,21 @@ const BSBillingTable4 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2665,11 +2674,10 @@ const BSBillingTable4 = () => {
|
|||
{OldtableDataDinein?.map((item, index) => (
|
||||
<tr
|
||||
key={OldtableDataTakeAway?.length + index}
|
||||
className={`${
|
||||
item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2679,26 +2687,26 @@ const BSBillingTable4 = () => {
|
|||
? item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2810,21 +2818,21 @@ const BSBillingTable4 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2941,11 +2949,10 @@ const BSBillingTable4 = () => {
|
|||
OldtableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2955,41 +2962,41 @@ const BSBillingTable4 = () => {
|
|||
? BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2999,15 +3006,15 @@ const BSBillingTable4 = () => {
|
|||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3016,9 +3023,9 @@ const BSBillingTable4 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3062,7 +3069,7 @@ const BSBillingTable4 = () => {
|
|||
style={{ fontFamily: 'Poppins' }}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item, index)
|
||||
}
|
||||
|
|
@ -3135,21 +3142,21 @@ const BSBillingTable4 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -3267,11 +3274,10 @@ const BSBillingTable4 = () => {
|
|||
OldtableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${
|
||||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -3283,44 +3289,44 @@ const BSBillingTable4 = () => {
|
|||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background:
|
||||
BookingType === 'Dine In' &&
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3329,10 +3335,10 @@ const BSBillingTable4 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3438,21 +3444,21 @@ const BSBillingTable4 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
|
|||
|
|
@ -167,16 +167,16 @@ const BSBillingTable6 = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataDinein = tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
const [OpenEditTotalAmt, setOpenEditTotalAmt] = useState(false);
|
||||
useEffect(() => {
|
||||
|
|
@ -1061,9 +1061,9 @@ const BSBillingTable6 = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1164,6 +1164,7 @@ const BSBillingTable6 = () => {
|
|||
OrderQty: isPaidproduct?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||
OrderRate: isPaidproduct?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
});
|
||||
|
|
@ -1337,6 +1338,7 @@ const BSBillingTable6 = () => {
|
|||
OrderQty: isPaidproduct?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
|
|
@ -1416,6 +1418,7 @@ const BSBillingTable6 = () => {
|
|||
OrderQty: isPaidproduct?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
|
|
@ -1449,6 +1452,7 @@ const BSBillingTable6 = () => {
|
|||
OrderQty: item?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
|
|
@ -1481,6 +1485,7 @@ const BSBillingTable6 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
OrderRate:isPaidProductAvailableInCart?.OrderRate,
|
||||
Offer: 0,
|
||||
});
|
||||
} else if (
|
||||
|
|
@ -1565,6 +1570,7 @@ const BSBillingTable6 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1591,6 +1597,7 @@ const BSBillingTable6 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1638,6 +1645,7 @@ const BSBillingTable6 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate,
|
||||
});
|
||||
} else {
|
||||
const isCheck = GlobalOfferAppliedProductsData?.find(
|
||||
|
|
@ -1914,6 +1922,7 @@ const BSBillingTable6 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -1932,6 +1941,7 @@ const BSBillingTable6 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -2224,16 +2234,16 @@ const BSBillingTable6 = () => {
|
|||
? item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2241,9 +2251,9 @@ const BSBillingTable6 = () => {
|
|||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: index % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2295,7 +2305,7 @@ const BSBillingTable6 = () => {
|
|||
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2342,21 +2352,21 @@ const BSBillingTable6 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2481,26 +2491,26 @@ const BSBillingTable6 = () => {
|
|||
? item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2597,21 +2607,21 @@ const BSBillingTable6 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2740,41 +2750,41 @@ const BSBillingTable6 = () => {
|
|||
? BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2783,15 +2793,15 @@ const BSBillingTable6 = () => {
|
|||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2800,9 +2810,9 @@ const BSBillingTable6 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -2846,7 +2856,7 @@ const BSBillingTable6 = () => {
|
|||
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2898,21 +2908,21 @@ const BSBillingTable6 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -3043,44 +3053,44 @@ const BSBillingTable6 = () => {
|
|||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background:
|
||||
BookingType === 'Dine In' &&
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3089,10 +3099,10 @@ const BSBillingTable6 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3182,21 +3192,21 @@ const BSBillingTable6 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
|
|||
|
|
@ -139,16 +139,16 @@ const BSBillingTable7 = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataDinein = tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
const productBasedExtraCharges = GlobalExtraCharge.filter(
|
||||
(obj) => 'ProdName' in obj
|
||||
|
|
@ -941,9 +941,9 @@ const BSBillingTable7 = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1044,6 +1044,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
OrderRate: isPaidproduct?.OrderRate
|
||||
});
|
||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||
// Just Decrease Paid Qty
|
||||
|
|
@ -1217,6 +1218,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||
|
|
@ -1294,6 +1296,7 @@ const BSBillingTable7 = () => {
|
|||
OrderQty: isPaidproduct?.OrderQty,
|
||||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
|
|
@ -1326,6 +1329,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeOfferAppliedProdsFn({
|
||||
inwardDtlId: item?.InwardDtlId,
|
||||
|
|
@ -1357,6 +1361,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
OrderRate: isPaidProductAvailableInCart?.OrderRate
|
||||
});
|
||||
} else if (
|
||||
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
||||
|
|
@ -1440,6 +1445,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1466,6 +1472,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1792,6 +1799,7 @@ const BSBillingTable7 = () => {
|
|||
CompleteRemove: true,
|
||||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
OrderRate: item?.OrderRate,
|
||||
Offer: item?.Offer,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
|
|
@ -1811,6 +1819,7 @@ const BSBillingTable7 = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: item?.OrderQty,
|
||||
|
|
@ -2130,16 +2139,16 @@ const BSBillingTable7 = () => {
|
|||
? item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2147,9 +2156,9 @@ const BSBillingTable7 = () => {
|
|||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: index % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2174,15 +2183,14 @@ const BSBillingTable7 = () => {
|
|||
? () => handleEditQuantity(item)
|
||||
: editdelete === 'Delete'
|
||||
? () => removeFromCart(item)
|
||||
: () => {}
|
||||
: () => { }
|
||||
}
|
||||
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
|
||||
|
||||
className={`${
|
||||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
|
||||
`}
|
||||
>
|
||||
|
|
@ -2266,21 +2274,21 @@ const BSBillingTable7 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2359,27 +2367,27 @@ const BSBillingTable7 = () => {
|
|||
? item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2404,15 +2412,14 @@ const BSBillingTable7 = () => {
|
|||
? () => handleEditQuantity(item)
|
||||
: editdelete === 'Delete'
|
||||
? () => removeFromCart(item)
|
||||
: () => {}
|
||||
: () => { }
|
||||
}
|
||||
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
|
||||
|
||||
className={`${
|
||||
item?.SalesId
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
className={`${item?.SalesId
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
|
||||
`}
|
||||
>
|
||||
|
|
@ -2492,21 +2499,21 @@ const BSBillingTable7 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2585,43 +2592,43 @@ const BSBillingTable7 = () => {
|
|||
? BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2630,15 +2637,15 @@ const BSBillingTable7 = () => {
|
|||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2647,9 +2654,9 @@ const BSBillingTable7 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -2666,22 +2673,21 @@ const BSBillingTable7 = () => {
|
|||
onClick={
|
||||
editdelete === 'Edit'
|
||||
? () =>
|
||||
item.Type == 'P' || item.Type == 'C'
|
||||
item.Type == 'P' || item.Type == 'C'
|
||||
? handleEditQuantity(item)
|
||||
: item.ServiceType == 'G'
|
||||
? handleEditQuantity(item)
|
||||
: item.ServiceType == 'G'
|
||||
? handleEditQuantity(item)
|
||||
: ''
|
||||
: ''
|
||||
: editdelete === 'Delete'
|
||||
? () => removeFromCart(item)
|
||||
: () => {}
|
||||
: () => { }
|
||||
}
|
||||
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
|
||||
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
|
||||
`}
|
||||
>
|
||||
|
|
@ -2741,8 +2747,8 @@ const BSBillingTable7 = () => {
|
|||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && (
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
{item?.Size}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
|
|
@ -2776,21 +2782,21 @@ const BSBillingTable7 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
@ -2871,45 +2877,45 @@ const BSBillingTable7 = () => {
|
|||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background:
|
||||
BookingType === 'Dine In' &&
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -2918,10 +2924,10 @@ const BSBillingTable7 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -2941,15 +2947,14 @@ const BSBillingTable7 = () => {
|
|||
? () => handleEditQuantity(item)
|
||||
: editdelete === 'Delete'
|
||||
? () => removeFromCart(item)
|
||||
: () => {}
|
||||
: () => { }
|
||||
}
|
||||
// onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""}
|
||||
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table7-content-disabled'
|
||||
: 'BSBill-Table7-content'
|
||||
}
|
||||
|
||||
`}
|
||||
>
|
||||
|
|
@ -3033,21 +3038,21 @@ const BSBillingTable7 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
{tableitem.OptionName == 'MRP' && (
|
||||
|
|
|
|||
|
|
@ -158,13 +158,13 @@ const ComboSalesBillTable = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
|
||||
const [EditQuantity, setEditQuantity] = useState(false);
|
||||
|
|
@ -321,7 +321,7 @@ const ComboSalesBillTable = () => {
|
|||
};
|
||||
}, [GetCustId, tableData]);
|
||||
|
||||
useEffect(() => {
|
||||
useEffect(() => {
|
||||
const getSelectedItem = () => {
|
||||
const getItem = (data = []) => {
|
||||
if (!data.length) return null;
|
||||
|
|
@ -1232,9 +1232,9 @@ const ComboSalesBillTable = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1349,6 +1349,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
OrderRate:isPaidproduct?.OrderRate
|
||||
});
|
||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||
// Just Decrease Paid Qty
|
||||
|
|
@ -1520,6 +1521,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||
|
|
@ -1598,6 +1600,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||
|
|
@ -1631,6 +1634,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate:item?.OrderRate
|
||||
});
|
||||
await ChangeOfferAppliedProdsFn({
|
||||
inwardDtlId: item?.InwardDtlId,
|
||||
|
|
@ -1662,6 +1666,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
OrderRate:isPaidProductAvailableInCart?.OrderRate
|
||||
});
|
||||
} else if (
|
||||
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
||||
|
|
@ -1745,6 +1750,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1771,6 +1777,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -2107,6 +2114,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
|
||||
|
|
@ -2125,6 +2133,7 @@ const ComboSalesBillTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
Offer: item?.Offer,
|
||||
OrderRate: item?.OrderRate
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: item?.OrderQty,
|
||||
|
|
@ -2470,11 +2479,11 @@ const ComboSalesBillTable = () => {
|
|||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2482,9 +2491,9 @@ const ComboSalesBillTable = () => {
|
|||
row?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2527,44 +2536,44 @@ const ComboSalesBillTable = () => {
|
|||
{/* Product Name / Item */}
|
||||
{(item.OptionName === 'Item' ||
|
||||
item.OptionName === 'Product Name') && (
|
||||
<td
|
||||
key={`prod-${index}`}
|
||||
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||
onClick={() =>
|
||||
row.FullProductIdentifierDtls?.length > 0 ||
|
||||
row.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(row)
|
||||
: editField && handleEditQuantity(row)
|
||||
}
|
||||
>
|
||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||
{row?.Type !== 'C' && (
|
||||
<p
|
||||
// className="Tbl3-Variant"
|
||||
className={
|
||||
isActiveCell
|
||||
? 'Tbl3VariantActve'
|
||||
: 'Tbl3-Variant'
|
||||
}
|
||||
>
|
||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||
(
|
||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && <span>{row?.ProdVariantName} </span>}
|
||||
{row?.Size}
|
||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||
</p>
|
||||
)}
|
||||
{row?.Type === 'C' &&
|
||||
row.ProdDetail?.map((prod, idx) => (
|
||||
<p key={idx}>
|
||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||
<td
|
||||
key={`prod-${index}`}
|
||||
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||
onClick={() =>
|
||||
row.FullProductIdentifierDtls?.length > 0 ||
|
||||
row.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(row)
|
||||
: editField && handleEditQuantity(row)
|
||||
}
|
||||
>
|
||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||
{row?.Type !== 'C' && (
|
||||
<p
|
||||
// className="Tbl3-Variant"
|
||||
className={
|
||||
isActiveCell
|
||||
? 'Tbl3VariantActve'
|
||||
: 'Tbl3-Variant'
|
||||
}
|
||||
>
|
||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||
(
|
||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && <span>{row?.ProdVariantName} </span>}
|
||||
{row?.Size}
|
||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||
</p>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
)}
|
||||
{row?.Type === 'C' &&
|
||||
row.ProdDetail?.map((prod, idx) => (
|
||||
<p key={idx}>
|
||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||
</p>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* Barcode */}
|
||||
{item.OptionName === 'Barcode' && (
|
||||
|
|
@ -2591,11 +2600,10 @@ const ComboSalesBillTable = () => {
|
|||
}}
|
||||
key={`qty-${index}`}
|
||||
tabIndex={0}
|
||||
className={`${
|
||||
EditQtyCombo && row?.localId === Index
|
||||
className={`${EditQtyCombo && row?.localId === Index
|
||||
? 'EditQTYcomboTD'
|
||||
: 'qtyTd'
|
||||
} ${isActiveCell ? 'active-cell' : ''}`}
|
||||
} ${isActiveCell ? 'active-cell' : ''}`}
|
||||
onClick={() =>
|
||||
editField && handleEditQuantityCombo(row)
|
||||
}
|
||||
|
|
@ -2658,9 +2666,9 @@ const ComboSalesBillTable = () => {
|
|||
>
|
||||
{row?.Offer > 0
|
||||
? `${(
|
||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||
100
|
||||
).toFixed(2)}%`
|
||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||
100
|
||||
).toFixed(2)}%`
|
||||
: '-'}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -2692,8 +2700,8 @@ const ComboSalesBillTable = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(row.TotalAmt - (row?.Offer || 0)).toFixed(
|
||||
2
|
||||
)
|
||||
2
|
||||
)
|
||||
: Number(row.TotalAmt - (row?.Offer || 0))}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -2736,7 +2744,7 @@ const ComboSalesBillTable = () => {
|
|||
<td
|
||||
key={`delete-${index}`}
|
||||
className={`deleteTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||
// className=""
|
||||
// className=""
|
||||
>
|
||||
<AiOutlineClose
|
||||
onClick={() => removeFromCart(row)}
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@ const StandardTable = () => {
|
|||
OrderType === 'Hold'
|
||||
? OrderCardDetail?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: OrderCardDetail?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
console.log('HoldOrderDtl', OrderCardDetail);
|
||||
const OldtableDataDinein = OrderCardDetail?.filter(
|
||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||
|
|
@ -170,8 +170,8 @@ const StandardTable = () => {
|
|||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? OrderCardDetail?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
|
||||
const [EditQuantity, setEditQuantity] = useState(false);
|
||||
|
|
@ -304,9 +304,9 @@ const StandardTable = () => {
|
|||
AppId: AppId,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||
|
|
@ -318,9 +318,9 @@ const StandardTable = () => {
|
|||
ProdSubCat: ProdSubCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -331,9 +331,9 @@ const StandardTable = () => {
|
|||
prodCat: prodCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -1133,9 +1133,9 @@ const StandardTable = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1237,6 +1237,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
localid: isPaidproduct?.localid
|
||||
});
|
||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||
// Just Decrease Paid Qty
|
||||
|
|
@ -1410,6 +1411,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localid
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||
|
|
@ -1489,6 +1491,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localid
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||
|
|
@ -1522,6 +1525,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localid,
|
||||
});
|
||||
await ChangeOfferAppliedProdsFn({
|
||||
inwardDtlId: item?.InwardDtlId,
|
||||
|
|
@ -1553,6 +1557,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: 0,
|
||||
localid: isPaidProductAvailableInCart?.localId,
|
||||
});
|
||||
} else if (
|
||||
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
||||
|
|
@ -1636,6 +1641,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localId,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1662,6 +1668,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: null,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localId,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||
|
|
@ -1997,6 +2004,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localId,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
|
||||
|
|
@ -2015,6 +2023,7 @@ const StandardTable = () => {
|
|||
InwardDtlId: item?.InwardDtlId,
|
||||
BuyInwardDtlId: item?.InwardDtlId,
|
||||
Offer: item?.Offer,
|
||||
localid: item?.localId,
|
||||
});
|
||||
await ChangeFreeprodlistFn({
|
||||
OverAllFreeQty: item?.OrderQty,
|
||||
|
|
@ -2379,11 +2388,10 @@ const StandardTable = () => {
|
|||
{OldtableDataTakeAway?.map((item, index) => (
|
||||
<tr
|
||||
key={index}
|
||||
className={`${
|
||||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}`}
|
||||
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}`}
|
||||
style={{
|
||||
fontFamily:
|
||||
"'Inter', ui-sans-serif, system-ui, sans-serif",
|
||||
|
|
@ -2393,17 +2401,17 @@ const StandardTable = () => {
|
|||
? item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
? 'wheat'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2411,18 +2419,18 @@ const StandardTable = () => {
|
|||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: index % 2 === 0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6',
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
|
|
@ -2480,7 +2488,7 @@ const StandardTable = () => {
|
|||
}}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2503,8 +2511,8 @@ const StandardTable = () => {
|
|||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && (
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
{AvailableDate ? (
|
||||
<>
|
||||
{' '}
|
||||
|
|
@ -2553,21 +2561,21 @@ const StandardTable = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -2711,11 +2719,10 @@ const StandardTable = () => {
|
|||
{OldtableDataDinein?.map((item, index) => (
|
||||
<tr
|
||||
key={OldtableDataTakeAway?.length + index}
|
||||
className={`${
|
||||
item?.SalesId
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}
|
||||
className={`${item?.SalesId
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2727,28 +2734,28 @@ const StandardTable = () => {
|
|||
? item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2829,8 +2836,8 @@ const StandardTable = () => {
|
|||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && (
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
{AvailableDate ? (
|
||||
<>
|
||||
{' '}
|
||||
|
|
@ -2879,21 +2886,21 @@ const StandardTable = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -3041,11 +3048,10 @@ const StandardTable = () => {
|
|||
OldtableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -3054,44 +3060,44 @@ const StandardTable = () => {
|
|||
? BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3100,30 +3106,30 @@ const StandardTable = () => {
|
|||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6',
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3176,7 +3182,7 @@ const StandardTable = () => {
|
|||
}}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -3202,10 +3208,10 @@ const StandardTable = () => {
|
|||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && (
|
||||
<span>
|
||||
{item?.ProdVariantName}{' '}
|
||||
</span>
|
||||
)}
|
||||
<span>
|
||||
{item?.ProdVariantName}{' '}
|
||||
</span>
|
||||
)}
|
||||
{AvailableDate ? (
|
||||
<>
|
||||
{' '}
|
||||
|
|
@ -3256,21 +3262,21 @@ const StandardTable = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -3419,11 +3425,10 @@ const StandardTable = () => {
|
|||
tableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'booking-billing-table-row-disabled'
|
||||
: 'booking-billing-table-row'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -3434,61 +3439,61 @@ const StandardTable = () => {
|
|||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >=
|
||||
PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background:
|
||||
BookingType === 'Dine In' &&
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId +
|
||||
' ' +
|
||||
item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.[
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
'OverallBackgroundColor'
|
||||
]
|
||||
: '#d6d6d6',
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3564,8 +3569,8 @@ const StandardTable = () => {
|
|||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && (
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
<span>{item?.ProdVariantName} </span>
|
||||
)}
|
||||
{AvailableDate ? (
|
||||
<>
|
||||
{' '}
|
||||
|
|
@ -3614,21 +3619,21 @@ const StandardTable = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue