diff --git a/src/Components/Skeleton/BillingTableSkeleton.jsx b/src/Components/Skeleton/BillingTableSkeleton.jsx new file mode 100644 index 0000000..d25fa46 --- /dev/null +++ b/src/Components/Skeleton/BillingTableSkeleton.jsx @@ -0,0 +1,53 @@ +import React from 'react'; +import './BillingTableSkeleton.scss'; + +const BillingTableSkeleton = () => { + return ( +
{OrderCardDetail?.length} items
-{OrderCardDetail?.length} items
+|
- {!isMobile ? (
- {''}
- )}
- |
- )}
- {item.OptionName == 'Sl.No' && (
-
- {!isMobile ? (
-
- Sl.No
-
- )}
- |
- )}
- {item.OptionName == 'Item' && (
-
- {!isMobile ? (
- Item
- )}
- |
- )}
- {item.OptionName == 'MRP' && (
-
- {!isMobile ? (
- MRP
- )}
- |
- )}
- {item.OptionName == 'Discount' && (
-
- {!isMobile ? (
- ₹/%
- )}
- |
- )}
- {item.OptionName == 'Quantity' && (
- 0 ? OpenEditTotalAmount : ""}
- onClick={() => {
- if (OrderCardDetail?.length > 0) {
- OpenEditTotalAmount();
- }
- }}
- >
- {!isMobile ? (
- Qty
- )}
- |
- )}
- {item.OptionName == 'Rate' && (
-
- {!isMobile ? (
- Rt
- )}
- |
- )}
- {item.OptionName == 'Amount' && (
-
- {!isMobile ? (
- Amt
- )}
- |
- )}
+
|---|
|
+ {!isMobile ? (
+ {''}
+ )}
+ |
+ )}
+ {item.OptionName == 'Sl.No' && (
+
+ {!isMobile ? (
+
+ Sl.No
+
+ )}
+ |
+ )}
+ {item.OptionName == 'Item' && (
+
+ {!isMobile ? (
+ Item
+ )}
+ |
+ )}
+ {item.OptionName == 'MRP' && (
+
+ {!isMobile ? (
+ MRP
+ )}
+ |
+ )}
+ {item.OptionName == 'Discount' && (
+
+ {!isMobile ? (
+ ₹/%
+ )}
+ |
+ )}
+ {item.OptionName == 'Quantity' && (
+ 0 ? OpenEditTotalAmount : ""}
+ onClick={() => {
+ if (OrderCardDetail?.length > 0) {
+ OpenEditTotalAmount();
+ }
+ }}
+ >
+ {!isMobile ? (
+ Qty
+ )}
+ |
+ )}
+ {item.OptionName == 'Rate' && (
+
+ {!isMobile ? (
+ Rt
+ )}
+ |
+ )}
+ {item.OptionName == 'Amount' && (
+
+ {!isMobile ? (
+ Amt
+ )}
+ |
+ )}
- {item.OptionName == 'Delete' && (
-
- {OrderCardDetail?.length > 0 ? (
- |
+ {OrderCardDetail?.length > 0 ? (
+ |
- )}
- >
- ))}
-
+ {' '}
+ {!isMobile ? (
+
+
+ {' '}
+
+ )}
+
- {' '}
{!isMobile ? (
-
-
- ) : (
-
@@ -2341,455 +2357,104 @@ const StandardTable = () => {
)}
- {!isMobile ? (
-
- )}
-
- {' '}
-
- )}
- | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {index + 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> -
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
- ? handleImeiDetails(item)
- : editField && handleEditQuantity(item)
- }
- >
- {item?.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- - ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom || item?.AvailableFrom)} - ${to12Hour(item?.VariantAvailableTo || item?.AvailableTo)}`} - ) - {item?.SinglePc == 'Y' && 'Single'} - > - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - > - )} - ) - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => (
-
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} - - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- >
- )}
- {tableitem.OptionName == 'MRP' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} - | - )} - {tableitem.OptionName == 'Delete' && ( -
- |
- )}
- >
- ))}
- |||||||
|
- |
- )}
+ : GlobEstBooking === 'ParEst' &&
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId +
+ ' ' +
+ item?.BookingTypeName
+ )
+ ? '#b2d1f7'
+ : index % 2 === 0
+ ? 'white'
+ : SelectedBillColor?.['OverallBackgroundColor']
+ ? SelectedBillColor?.[
+ 'OverallBackgroundColor'
+ ]
+ : '#d6d6d6',
+ animation:
+ BillOrderPre === 'Y' && !BookingTypeBoth
+ ? triggerAnimation &&
+ index === 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
+
+ |
+ )}
- {tableitem.OptionName == 'Sl.No' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {OldtableDataTakeAway?.length + index + 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> + {tableitem.OptionName == 'Sl.No' && ( {
}
}}
>
- {item?.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- + )} + {tableitem.OptionName == 'Item' && ( + <> + |
+ item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0
+ ? handleImeiDetails(item)
+ : editField && handleEditQuantity(item)
+ }
+ >
+ {item?.ProdName}
+ {' '}
+ {item?.BrandName !== null
+ ? item?.BrandName
+ : ''}
+ {item?.Type != 'C' && (
+ <>
+ + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom || item?.AvailableFrom)} - ${to12Hour(item?.VariantAvailableTo || item?.AvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + ) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} + + )} + > + )} + {item?.Type === 'C' && ( +
- (
- {!item?.ProdVariantName?.toLowerCase()?.includes(
- 'variant'
- ) && {item?.ProdVariantName} }
- {AvailableDate ? (
- <>
- {' '}
- (
- {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`}
- )
- {item?.SinglePc == 'Y' && 'Single'}
- >
- ) : (
- <>
- {item?.Size}
- {item?.SinglePc == 'Y'
- ? 'Single'
- : item?.UomName}
- >
- )}
- )
-
- {item?.OfferMessage &&
- !Array.isArray(item.OfferMessage) && (
-
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ - {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} + {item.ProdDetail?.map((prod, index) => ( + + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} - )} - > - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => (
-
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} - - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
+ ))}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 )} | - > - )} - {tableitem.OptionName == 'MRP' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} - | - )} + )} + {tableitem.OptionName == 'Delete' && ( +
+ |
+ )}
+ >
+ ))}
+
- |
- )}
- >
- ))}
-
- ))}
+ {!sportsAppPreference &&
+ EditQuantity &&
+ OldtableDataTakeAway?.length > 0 && (
+
|
+ |
+ )}
+
+ {tableitem.OptionName == 'Sl.No' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataTakeAway?.length + index + 1} + | + )} + {tableitem.OptionName == 'Item' && ( + <> + {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {item?.ProdName}
+ {' '}
+ {item?.BrandName !== null
+ ? item?.BrandName
+ : ''}
+ {item?.Type != 'C' && (
+ <>
+ + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + ) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} + + )} + > + )} + {item?.Type === 'C' && ( +
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + | + )} + + {tableitem.OptionName == 'Delete' && ( +
+ |
+ )}
+ >
+ ))}
+ |||||||
|
- |
- )}
-
- {tableitem.OptionName == 'Sl.No' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index + - 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> -
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
- ? handleImeiDetails(item)
- : editField && handleEditQuantity(item)
- }
- >
- {item?.Type !== 'OS'
- ? item.ProdName
- : item.ServiceName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- - {item?.Type !== 'OS' && ( - <> - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - {item?.ProdVariantName} - )} - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - ) - {item?.SinglePc == 'Y' && 'Single'} - > - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - > - )} - > - )} - - {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} - - )} - > - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => (
-
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} - - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
- |
- >
- )}
- {tableitem.OptionName == 'MRP' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - | - )} - - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} - | - )} - - {tableitem.OptionName == 'Delete' && ( -
- |
- )}
- >
- ))}
- |||||||
|
- |
- )}
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
+ ? 'splashAnimation 0.5s ease-in-out'
+ : 'none'
+ : 'none',
+ }}
+ >
+ {tableOptions?.map((tableitem) => (
+ <>
+ {BookingTypeBoth &&
+ index == 0 &&
+ tableitem.OptionName == 'Sl.No' && (
+
+ |
+ )}
- {tableitem.OptionName == 'Sl.No' && (
- { - if (editField) { - handleEditQuantity(item); - } - }} - > - {OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index + - 1} - | - )} - {tableitem.OptionName == 'Item' && ( - <> + {tableitem.OptionName == 'Sl.No' && ( {
}
}}
>
- {item?.ProdName}
- {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
- {item?.Type != 'C' && (
- <>
- + )} + {tableitem.OptionName == 'Item' && ( + <> + |
+ item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0
+ ? handleImeiDetails(item)
+ : editField && handleEditQuantity(item)
+ }
+ >
+ {item?.Type !== 'OS'
+ ? item.ProdName
+ : item.ServiceName}
+ {' '}
+ {item?.BrandName !== null
+ ? item?.BrandName
+ : ''}
+ {item?.Type != 'C' && (
+ <>
+ + {item?.Type !== 'OS' && ( + <> + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + + {item?.ProdVariantName}{' '} + + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + ) + {item?.SinglePc == 'Y' && + 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + > + )} + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} + + )} + > + )} + {item?.Type === 'C' && ( +
- (
- {!item?.ProdVariantName?.toLowerCase()?.includes(
- 'variant'
- ) && {item?.ProdVariantName} }
- {AvailableDate ? (
- <>
- {' '}
- (
- {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`}
- )
- {item?.SinglePc == 'Y' && 'Single'}
- >
- ) : (
- <>
- {item?.Size}
- {item?.SinglePc == 'Y'
- ? 'Single'
- : item?.UomName}
- >
- )}
- )
-
- {item?.OfferMessage &&
- !Array.isArray(item.OfferMessage) && (
-
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ - {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} + {item.ProdDetail?.map((prod, index) => ( + + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} - )} - > - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => (
-
- )}
- {productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- ) !== undefined && (
- - {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} - - ))} -
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
+ ))}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + | + )} + + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 )} | - > - )} - {tableitem.OptionName == 'MRP' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - | - )} - {tableitem.OptionName == 'Discount' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - | - )} - {tableitem.OptionName == 'Quantity' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - | - )} - {tableitem.OptionName == 'Rate' && ( -{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - | - )} - {tableitem.OptionName == 'Amount' && ( -{ - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 + )} + + {tableitem.OptionName == 'Delete' && ( + |
+ |
+ )}
+ >
+ ))}
+
|
+ |
)}
-
- )}
- {tableitem.OptionName == 'Delete' && (
-
- |
- )}
- >
- ))}
- { + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index + + 1} + | + )} + {tableitem.OptionName == 'Item' && ( + <> + {
+ if (editField) {
+ handleEditQuantity(item);
+ }
+ }}
+ >
+ {item?.ProdName}
+ {' '}
+ {item?.BrandName !== null
+ ? item?.BrandName
+ : ''}
+ {item?.Type != 'C' && (
+ <>
+ + ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + ) + {item?.SinglePc == 'Y' && 'Single'} + > + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + > + )} + ) + + {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( ++ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} + + )} + > + )} + {item?.Type === 'C' && ( +
+ {item.ProdDetail?.map((prod, index) => (
+
+ )}
+ {productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ ) !== undefined && (
+ + {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} + + ))} +
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
+ |
+ >
+ )}
+ {tableitem.OptionName == 'MRP' && (
+ { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + | + )} + {tableitem.OptionName == 'Discount' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + | + )} + {tableitem.OptionName == 'Quantity' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + | + )} + {tableitem.OptionName == 'Rate' && ( +{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + | + )} + {tableitem.OptionName == 'Amount' && ( +{ + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + | + )} + + {tableitem.OptionName == 'Delete' && ( +
+ |
+ )}
+ >
+ ))}
+
+ ))}
+
+ {!sportsAppPreference &&
+ tableDataDinein?.length > 0 &&
+ EditQuantity && (
+