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