diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx
index e632fa5..e83c74b 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx
@@ -106,6 +106,11 @@ const BSBillingTable1 = () => {
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y'
);
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId;
@@ -156,8 +161,8 @@ const BSBillingTable1 = () => {
OrderType === 'Hold'
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
: tableData?.filter(
- (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
- );
+ (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
+ );
const OldtableDataDinein = tableData?.filter(
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
@@ -165,8 +170,8 @@ const BSBillingTable1 = () => {
const OldtableDataTakeAway =
OrderType != 'Hold'
? tableData?.filter(
- (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
- )
+ (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
+ )
: [];
const [OpenEditTotalAmt, setOpenEditTotalAmt] = useState(false);
const [OpenImeiDetail, setOpenImeiDetail] = useState(false);
@@ -1115,9 +1120,9 @@ const BSBillingTable1 = () => {
)?.map((item, idx) =>
idx === 0
? {
- ...item,
- FreeQty,
- }
+ ...item,
+ FreeQty,
+ }
: item
),
};
@@ -2144,7 +2149,7 @@ const BSBillingTable1 = () => {
OpenEditTotalAmount();
}
}}
- // onClick={tableData?.length>0? OpenEditTotalAmount :""}
+ // onClick={tableData?.length>0? OpenEditTotalAmount :""}
>
{!isMobile ? (
Qty
@@ -2252,11 +2257,10 @@ const BSBillingTable1 = () => {
{OldtableDataTakeAway?.map((item, index) => (
{
? item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length + index === 0 &&
- !item?.SalesId &&
- tableDataDinein?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length + index ===
- 0 &&
- tableDataDinein?.length >=
- PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataTakeAway?.length + index ===
+ 0 &&
+ tableDataDinein?.length >=
+ PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background: item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataTakeAway?.length + index) % 2 === 0
? 'white'
@@ -2692,21 +2696,21 @@ const BSBillingTable1 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
)}
{tableitem.OptionName == 'MRP' && (
@@ -2801,11 +2805,11 @@ const BSBillingTable1 = () => {
>
{allowDecimal
? Number(
- item?.TotalAmt - (item?.Offer || 0) || 0
- ).toFixed(2)
+ item?.TotalAmt - (item?.Offer || 0) || 0
+ ).toFixed(2)
: Number(
- item?.TotalAmt - (item?.Offer || 0) || 0
- )}
+ item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
)}
@@ -2845,11 +2849,10 @@ const BSBillingTable1 = () => {
OldtableDataTakeAway?.length +
index
}
- className={`${
- BookingType === 'Dine In' && item?.SalesId
- ? 'Billing-Table1-row-disabled'
- : 'Billing-Table1-row'
- }
+ className={`${BookingType === 'Dine In' && item?.SalesId
+ ? 'Billing-Table1-row-disabled'
+ : 'Billing-Table1-row'
+ }
`}
style={{
@@ -2860,44 +2863,44 @@ const BSBillingTable1 = () => {
? BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
- !item?.SalesId &&
- tableDataTakeAway?.length >=
- PreviousdataLength
+ triggerAnimation &&
+ OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >=
+ PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
- tableDataTakeAway?.length >=
- PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
+ tableDataTakeAway?.length >=
+ PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.[
- 'OverallBackgroundColor'
- ]
+ 'OverallBackgroundColor'
+ ]
? SelectedBillColor?.[
- 'OverallBackgroundColor'
- ]
+ 'OverallBackgroundColor'
+ ]
: '#d6d6d6'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -2906,30 +2909,30 @@ const BSBillingTable1 = () => {
BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId +
- ' ' +
- item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId +
+ ' ' +
+ item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[
- 'OverallBackgroundColor'
- ]
+ 'OverallBackgroundColor'
+ ]
: '#d6d6d6',
animation:
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@@ -2979,8 +2982,9 @@ const BSBillingTable1 = () => {
textAlign: 'left',
}}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@@ -3001,8 +3005,8 @@ const BSBillingTable1 = () => {
{!item?.ProdVariantName?.toLowerCase()?.includes(
'variant'
) && (
- {item?.ProdVariantName}
- )}
+ {item?.ProdVariantName}
+ )}
{item?.Size}
{item?.SinglePc == 'Y'
? 'PCS'
@@ -3037,21 +3041,21 @@ const BSBillingTable1 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
)}
{tableitem.OptionName == 'MRP' && (
@@ -3146,11 +3150,11 @@ const BSBillingTable1 = () => {
>
{allowDecimal
? Number(
- item?.TotalAmt - (item?.Offer || 0) || 0
- ).toFixed(2)
+ item?.TotalAmt - (item?.Offer || 0) || 0
+ ).toFixed(2)
: Number(
- item?.TotalAmt - (item?.Offer || 0) || 0
- )}
+ item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
)}
@@ -3191,11 +3195,10 @@ const BSBillingTable1 = () => {
tableDataTakeAway?.length +
index
}
- className={`${
- BookingType === 'Dine In' && item?.SalesId
- ? 'Billing-Table1-row-disabled'
- : 'Billing-Table1-row'
- }
+ className={`${BookingType === 'Dine In' && item?.SalesId
+ ? 'Billing-Table1-row-disabled'
+ : 'Billing-Table1-row'
+ }
`}
style={{
@@ -3208,61 +3211,61 @@ const BSBillingTable1 = () => {
!BookingTypeBoth
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
- !item?.SalesId &&
- tableDataDinein?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
- tableDataDinein?.length >=
- PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
+ tableDataDinein?.length >=
+ PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background:
BookingType === 'Dine In' &&
- item?.SalesId &&
- !BookingTypeBoth
+ item?.SalesId &&
+ !BookingTypeBoth
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId +
- ' ' +
- item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId +
+ ' ' +
+ item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[
- 'OverallBackgroundColor'
- ]
+ 'OverallBackgroundColor'
+ ]
: '#d6d6d6',
animation:
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@@ -3364,21 +3367,21 @@ const BSBillingTable1 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
)}
{tableitem.OptionName == 'MRP' && (
@@ -3473,11 +3476,11 @@ const BSBillingTable1 = () => {
>
{allowDecimal
? Number(
- item?.TotalAmt - (item?.Offer || 0) || 0
- ).toFixed(2)
+ item?.TotalAmt - (item?.Offer || 0) || 0
+ ).toFixed(2)
: Number(
- item?.TotalAmt - (item?.Offer || 0) || 0
- )}
+ item?.TotalAmt - (item?.Offer || 0) || 0
+ )}
)}
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx
index 9b77ed9..d66d9f2 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx
@@ -91,6 +91,12 @@ const BsBill2 = () => {
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
setting?.SettingValue === 'Y'
);
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
+ console.log(imeiModal, "imeiModalimeiModal")
const [count, setCount] = useState(1);
const ReorderProductData = useSelector(GlobalReorderProductDetails);
const CartOrderDetails = useSelector(GlobalOrderCardDetails);
@@ -156,16 +162,16 @@ const BsBill2 = () => {
OrderType === 'Hold'
? CartOrderDetails?.filter((a, b) => a.BookingTypeName === 'TakeAway')
: CartOrderDetails?.filter(
- (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
- );
+ (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
+ );
const OldtableDataDinein = CartOrderDetails?.filter(
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
);
const OldtableDataTakeAway =
OrderType != 'Hold'
? CartOrderDetails?.filter(
- (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
- )
+ (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
+ )
: [];
useEffect(() => {
@@ -359,26 +365,26 @@ const BsBill2 = () => {
if (isItemInCart && BookingTypeProd != 'Dine In' && OrderType != 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -389,26 +395,26 @@ const BsBill2 = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -427,26 +433,26 @@ const BsBill2 = () => {
) {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -457,26 +463,26 @@ const BsBill2 = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -489,27 +495,27 @@ const BsBill2 = () => {
} else if (isItemInCartHold && OrderType === 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty + 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty + 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty + 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty + 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty + 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
UpdatedCartItem,
@@ -523,27 +529,27 @@ const BsBill2 = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty + 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty + 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty + 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty + 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty + 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
...OtherorderDataforNormalWithoutSalesId,
@@ -708,27 +714,27 @@ const BsBill2 = () => {
) {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -739,27 +745,27 @@ const BsBill2 = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -778,27 +784,27 @@ const BsBill2 = () => {
) {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -809,27 +815,27 @@ const BsBill2 = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -842,29 +848,29 @@ const BsBill2 = () => {
} else if (isItemInCartHold && OrderType === 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty - 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty - 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
UpdatedCartItem,
@@ -878,29 +884,29 @@ const BsBill2 = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty - 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty - 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
...OtherorderDataforNormalWithoutSalesId,
@@ -1303,8 +1309,8 @@ const BsBill2 = () => {
>
{index ===
Math.floor((OldtableDataTakeAway.length - 1) / 2) && (
-
- )}
+
+ )}
)}
{
? item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: triggerAnimation &&
- index === 0 &&
- !item?.SalesId &&
- tableDataTakeAway?.length >= PreviousdataLength
+ index === 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength
? 'wheat'
: triggerAnimation &&
- index === 0 &&
- tableDataTakeAway?.length >=
- PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ index === 0 &&
+ tableDataTakeAway?.length >=
+ PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
@@ -1338,9 +1344,9 @@ const BsBill2 = () => {
item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: index % 2 === 0
? 'white'
@@ -1367,8 +1373,8 @@ const BsBill2 = () => {
loading="lazy"
src={
item?.ProdLogo &&
- item?.ProdLogo != null &&
- item?.ProdLogo != undefined
+ item?.ProdLogo != null &&
+ item?.ProdLogo != undefined
? item?.ProdLogo
: defaultimage
}
@@ -1379,7 +1385,7 @@ const BsBill2 = () => {
style={{ fontFamily: SelectedFont }}
onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0) &&
+ item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
handleImeiDetails(item)
}
>
@@ -1430,21 +1436,21 @@ const BsBill2 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
{
>
{index ==
Math.round(OldtableDataDinein?.length / 2 - 0.1) && (
-
- )}
+
+ )}
)}
{
? item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length + index === 0 &&
- !item?.SalesId &&
- tableDataDinein?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length + index === 0 &&
- tableDataDinein?.length >= PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background: item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataTakeAway?.length + index) % 2 === 0
? 'white'
@@ -1587,8 +1593,8 @@ const BsBill2 = () => {
loading="lazy"
src={
item?.ProdLogo &&
- item?.ProdLogo != null &&
- item?.ProdLogo != undefined
+ item?.ProdLogo != null &&
+ item?.ProdLogo != undefined
? item?.ProdLogo
: defaultimage
}
@@ -1645,21 +1651,21 @@ const BsBill2 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
{
>
{index ==
Math.round(tableDataTakeAway?.length / 2 - 0.1) && (
-
- )}
+
+ )}
)}
{
? BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
- !item?.SalesId &&
- tableDataTakeAway?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
- tableDataTakeAway?.length >=
- PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
+ tableDataTakeAway?.length >=
+ PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[
- 'OverallBackgroundColor'
- ]
+ 'OverallBackgroundColor'
+ ]
: '#d6d6d6'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -1800,15 +1806,15 @@ const BsBill2 = () => {
BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -1817,9 +1823,9 @@ const BsBill2 = () => {
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@@ -1836,8 +1842,8 @@ const BsBill2 = () => {
loading="lazy"
src={
item?.ProdLogo &&
- item?.ProdLogo != null &&
- item?.ProdLogo != undefined
+ item?.ProdLogo != null &&
+ item?.ProdLogo != undefined
? item?.ProdLogo
: defaultimage
}
@@ -1848,7 +1854,7 @@ const BsBill2 = () => {
style={{ fontFamily: SelectedFont }}
onClick={() =>
(item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0) &&
+ item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
handleImeiDetails(item)
}
>
@@ -1892,21 +1898,21 @@ const BsBill2 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
{
!BookingTypeBoth
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
- !item?.SalesId &&
- tableDataDinein?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
- tableDataDinein?.length >= PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background:
BookingType === 'Dine In' &&
- item?.SalesId &&
- !BookingTypeBoth
+ item?.SalesId &&
+ !BookingTypeBoth
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -2070,10 +2076,10 @@ const BsBill2 = () => {
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@@ -2090,8 +2096,8 @@ const BsBill2 = () => {
loading="lazy"
src={
item?.ProdLogo &&
- item?.ProdLogo != null &&
- item?.ProdLogo != undefined
+ item?.ProdLogo != null &&
+ item?.ProdLogo != undefined
? item?.ProdLogo
: defaultimage
}
@@ -2148,21 +2154,21 @@ const BsBill2 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
{
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
const tableDataDinein = tableData?.filter(
(a, b) => a.BookingTypeName === 'Dine In' && !a?.SalesId
@@ -2492,8 +2497,9 @@ const BSBillingTable3 = () => {
className="Table3-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@@ -3086,8 +3092,9 @@ const BSBillingTable3 = () => {
className="Table3-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item, index)
}
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.jsx
index d75bb94..403861e 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.jsx
@@ -104,6 +104,11 @@ const BSBillingTable4 = () => {
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(item) => item.SettingIdName === 'BillItemsOrder'
)?.SettingValue;
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId;
@@ -2484,8 +2489,8 @@ const BSBillingTable4 = () => {
className="Table4-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@@ -3068,8 +3073,8 @@ const BSBillingTable4 = () => {
className="Table4-items for-combo"
style={{ fontFamily: 'Poppins' }}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item, index)
}
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx
index de07fcd..63268a0 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx
@@ -109,6 +109,11 @@ const BsBill = () => {
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
setting?.SettingValue === 'Y'
);
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
const [count, setCount] = useState(1);
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
@@ -174,16 +179,16 @@ const BsBill = () => {
OrderType === 'Hold'
? TableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
: TableData?.filter(
- (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
- );
+ (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
+ );
const OldtableDataDinein = TableData?.filter(
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
);
const OldtableDataTakeAway =
OrderType != 'Hold'
? TableData?.filter(
- (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
- )
+ (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
+ )
: [];
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(item) => item.SettingIdName === 'BillItemsOrder'
@@ -838,9 +843,9 @@ const BsBill = () => {
)?.map((item, idx) =>
idx === 0
? {
- ...item,
- FreeQty,
- }
+ ...item,
+ FreeQty,
+ }
: item
),
};
@@ -2218,26 +2223,26 @@ const BsBill = () => {
if (isItemInCart && BookingTypeProd != 'Dine In' && OrderType != 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -2248,26 +2253,26 @@ const BsBill = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -2286,26 +2291,26 @@ const BsBill = () => {
) {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -2316,26 +2321,26 @@ const BsBill = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty + 1,
- TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty + 1,
+ TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty + 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty + 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty + 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -2348,27 +2353,27 @@ const BsBill = () => {
} else if (isItemInCartHold && OrderType === 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty + 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty + 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty + 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty + 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty + 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
UpdatedCartItem,
@@ -2382,27 +2387,27 @@ const BsBill = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty + 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty + 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty + 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty + 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty + 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
...OtherorderDataforNormalWithoutSalesId,
@@ -2594,27 +2599,27 @@ const BsBill = () => {
) {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
@@ -2625,27 +2630,27 @@ const BsBill = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -2664,27 +2669,27 @@ const BsBill = () => {
) {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal];
if (OfferCheckedInSetup && preferenceOffer) {
@@ -2694,27 +2699,27 @@ const BsBill = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCart,
- OrderQty: isItemInCart?.OrderQty - 1,
- TotalAmt:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCart,
+ OrderQty: isItemInCart?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
+ TaxAmt: (
+ ((isItemInCart?.OrderQty - 1) *
+ isItemInCart?.OrderRate *
+ isItemInCart?.TaxPercentage) /
+ (100 + isItemInCart?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
+ (
((isItemInCart?.OrderQty - 1) *
isItemInCart?.OrderRate *
isItemInCart?.TaxPercentage) /
(100 + isItemInCart?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
- (
- ((isItemInCart?.OrderQty - 1) *
- isItemInCart?.OrderRate *
- isItemInCart?.TaxPercentage) /
- (100 + isItemInCart?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem];
@@ -2727,29 +2732,29 @@ const BsBill = () => {
} else if (isItemInCartHold && OrderType === 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty - 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty - 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
UpdatedCartItem,
@@ -2763,29 +2768,29 @@ const BsBill = () => {
}
} else {
const UpdatedCartItem =
- // if the item is already in the cart, increase the quantity of the item
- {
- ...isItemInCartHold,
- OrderQty: isItemInCartHold?.OrderQty - 1,
- TotalAmt:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate,
- TaxAmt: (
+ // if the item is already in the cart, increase the quantity of the item
+ {
+ ...isItemInCartHold,
+ OrderQty: isItemInCartHold?.OrderQty - 1,
+ TotalAmt:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate,
+ TaxAmt: (
+ ((isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate *
+ isItemInCartHold?.TaxPercentage) /
+ (100 + isItemInCartHold?.TaxPercentage)
+ ).toFixed(2),
+ WithoutTaxRate:
+ (isItemInCartHold?.OrderQty - 1) *
+ isItemInCartHold?.OrderRate -
+ (
((isItemInCartHold?.OrderQty - 1) *
isItemInCartHold?.OrderRate *
isItemInCartHold?.TaxPercentage) /
(100 + isItemInCartHold?.TaxPercentage)
).toFixed(2),
- WithoutTaxRate:
- (isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate -
- (
- ((isItemInCartHold?.OrderQty - 1) *
- isItemInCartHold?.OrderRate *
- isItemInCartHold?.TaxPercentage) /
- (100 + isItemInCartHold?.TaxPercentage)
- ).toFixed(2),
- };
+ };
const UpdatedData = [
...OtherorderDataforNormalWithoutSalesId,
@@ -3319,15 +3324,15 @@ const BsBill = () => {
? item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: triggerAnimation &&
- index === 0 &&
- !item?.SalesId &&
- tableDataTakeAway?.length >= PreviousdataLength
+ index === 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength
? 'wheat'
: triggerAnimation &&
- index === 0 &&
- tableDataTakeAway?.length >= PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ index === 0 &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
@@ -3335,9 +3340,9 @@ const BsBill = () => {
item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: index % 2 === 0
? 'white'
@@ -3375,7 +3380,7 @@ const BsBill = () => {
{
|
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@@ -3454,21 +3459,21 @@ const BsBill = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
|
)}
{tableitem.OptionName == 'MRP' && (
@@ -3639,26 +3644,26 @@ const BsBill = () => {
? item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length + index === 0 &&
- !item?.SalesId &&
- tableDataDinein?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length + index === 0 &&
- tableDataDinein?.length >= PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataTakeAway?.length + index === 0 &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background: item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataTakeAway?.length + index) % 2 === 0
? 'white'
@@ -3696,7 +3701,7 @@ const BsBill = () => {
{
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
|
)}
{tableitem.OptionName == 'MRP' && (
@@ -3956,38 +3961,38 @@ const BsBill = () => {
? BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
- !item?.SalesId &&
- tableDataTakeAway?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataTakeAway?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
- tableDataTakeAway?.length >= PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataDinein?.length +
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
+ tableDataTakeAway?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
: '#d6d6d6'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -3996,15 +4001,15 @@ const BsBill = () => {
BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -4013,9 +4018,9 @@ const BsBill = () => {
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataDinein?.length +
- OldtableDataTakeAway?.length +
- index ===
- 0 &&
+ OldtableDataTakeAway?.length +
+ index ===
+ 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@@ -4043,7 +4048,7 @@ const BsBill = () => {
{
|
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@@ -4087,8 +4092,8 @@ const BsBill = () => {
{!item?.ProdVariantName?.toLowerCase()?.includes(
'variant'
) && (
- {item?.ProdVariantName}
- )}
+ {item?.ProdVariantName}
+ )}
{item?.Size}
{item?.SinglePc == 'Y'
? 'PCS'
@@ -4126,21 +4131,21 @@ const BsBill = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
|
)}
{tableitem.OptionName == 'MRP' && (
@@ -4325,44 +4330,44 @@ const BsBill = () => {
!BookingTypeBoth
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
- !item?.SalesId &&
- tableDataDinein?.length >= PreviousdataLength
+ triggerAnimation &&
+ OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
+ !item?.SalesId &&
+ tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
- triggerAnimation &&
- OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
- tableDataDinein?.length >= PreviousdataLength &&
- !HoldOrderDtl &&
- !UnpaidData
+ triggerAnimation &&
+ OldtableDataTakeAway?.length +
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
+ tableDataDinein?.length >= PreviousdataLength &&
+ !HoldOrderDtl &&
+ !UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background:
BookingType === 'Dine In' &&
- item?.SalesId &&
- !BookingTypeBoth
+ item?.SalesId &&
+ !BookingTypeBoth
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
- GlobProdwisedata?.includes(
- item?.InwardDtlId + ' ' + item?.BookingTypeName
- )
+ GlobProdwisedata?.includes(
+ item?.InwardDtlId + ' ' + item?.BookingTypeName
+ )
? '#b2d1f7'
: (OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index) %
- 2 ===
- 0
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index) %
+ 2 ===
+ 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@@ -4371,10 +4376,10 @@ const BsBill = () => {
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataTakeAway?.length +
- OldtableDataDinein?.length +
- tableDataTakeAway?.length +
- index ===
- 0 &&
+ OldtableDataDinein?.length +
+ tableDataTakeAway?.length +
+ index ===
+ 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@@ -4402,7 +4407,7 @@ const BsBill = () => {
{
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
-
- Extra Charges :{' '}
- {
- productBasedExtraCharges?.find(
- (find) => find.ProdId === item.ProdId
- )?.TotalAmt
- }
-
- )}
+
+ Extra Charges :{' '}
+ {
+ productBasedExtraCharges?.find(
+ (find) => find.ProdId === item.ProdId
+ )?.TotalAmt
+ }
+
+ )}
|
)}
{tableitem.OptionName == 'MRP' && (
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.jsx
index 1223a5b..ba0b56a 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.jsx
@@ -137,6 +137,11 @@ const BSBillingTable6 = () => {
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(item) => item.SettingIdName === 'BillItemsOrder'
)?.SettingValue;
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
const OrderType = useSelector(GlobalOrderType);
const GlobEstBooking = useSelector(GlobalEstimateBooking);
@@ -1485,7 +1490,7 @@ const BSBillingTable6 = () => {
CompleteRemove: true,
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
BuyInwardDtlId: null,
- OrderRate:isPaidProductAvailableInCart?.OrderRate,
+ OrderRate: isPaidProductAvailableInCart?.OrderRate,
Offer: 0,
});
} else if (
@@ -1570,7 +1575,7 @@ const BSBillingTable6 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
- OrderRate:item?.OrderRate,
+ OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: freeProdList?.OverAllFreeQty,
@@ -2304,8 +2309,8 @@ const BSBillingTable6 = () => {
className="BillingTable6-table-td for-combo"
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@@ -2855,8 +2860,8 @@ const BSBillingTable6 = () => {
className="BillingTable6-table-td for-combo"
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx
index dd19d42..a019ea4 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx
@@ -158,6 +158,11 @@ const BSBillingTable7 = () => {
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
setting?.SettingValue === 'Y'
);
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
useEffect(() => {
if (SelectedFont) {
WebFont.load({
@@ -2729,8 +2734,8 @@ const BSBillingTable7 = () => {
padding: '8px',
}}
onClick={() =>
- (item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0) &&
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
handleImeiDetails(item)
}
>
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx
index d26cba8..dd93d42 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSImeiDetails/BSImeiDetails.jsx
@@ -14,6 +14,8 @@ import {
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
import { useDispatch, useSelector } from 'react-redux';
import { validateSafeInput } from '../../../../../Services/Others';
+import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
+import "../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss"
const BSImeiDetails = (props) => {
const formRef = useRef(null);
const dispatch = useDispatch();
@@ -26,7 +28,7 @@ const BSImeiDetails = (props) => {
const [SerialNumberList, setSerialNumberList] = useState([]);
const [IMEINumberList, setIMEINumberList] = useState([]);
- console.log(SerialNumberList, IMEINumberList, 'SerialNumberList');
+ console.log(props, 'propsprops');
useEffect(() => {
let productidentifier = ProductDetail?.ProductIdentifierDtls
? ProductDetail?.ProductIdentifierDtls
@@ -47,12 +49,17 @@ const BSImeiDetails = (props) => {
return [imei1, imei2].filter(Boolean).join(',');
})
);
+
+ formRef?.current?.setFieldsValue({
+ description: productidentifier?.[0]?.Description || "",
+ })
}, []);
const CloseDeviceDetailModal = () => {
props.handleDeviceDetailClose();
};
const ChangeRadioOption = (data) => {
setRadioBtnSelection(data);
+ formRef.current?.resetFields(['SerialNumber', 'SerialNumbertext', 'IMEINumber', 'IMEINumbertext']);
};
const SerialNumberOnchange = (e) => {
console.log(e, SerialNumberList, 'SerialNumberOnchange');
@@ -65,7 +72,8 @@ const BSImeiDetails = (props) => {
} else {
setSerialNumberList([...SerialNumberList, e]);
}
- } else {
+ }
+ else {
setMessageType('error');
setMessageData('Already Selected ');
}
@@ -83,7 +91,7 @@ const BSImeiDetails = (props) => {
}
} else {
setMessageType('error');
- setMessageData('Already Selected');
+ setMessageData('you cant enter more than Order Qty');
}
formRef.current?.resetFields();
@@ -115,7 +123,7 @@ const BSImeiDetails = (props) => {
}
} else {
setMessageType('error');
- setMessageData('Already Selected');
+ setMessageData('you cant enter more than Order Qty');
}
formRef.current?.resetFields();
};
@@ -131,6 +139,8 @@ const BSImeiDetails = (props) => {
setMessageType(null);
}, []);
const AddDeviceDetails = () => {
+
+ console.log(formRef?.current?.getFieldsValue, "formRef?.current?.getFieldsValue")
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
// Create the new object array
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
@@ -143,6 +153,7 @@ const BSImeiDetails = (props) => {
IMEI1: imeiPair[0] || '', // First IMEI number
IMEI2: imeiPair[1] || '', // Second IMEI number
MacId: '', // Default empty macid
+ Description: formRef.current?.getFieldsValue()?.description || '',
};
});
console.log(IdentifyDetails, 'IdentifyDetails');
@@ -154,9 +165,9 @@ const BSImeiDetails = (props) => {
cartItem // if the item is already in the cart, increase the quantity of the item
) =>
cartItem.ProdId === ProductDetail.ProdId &&
- cartItem.InwardDtlId === ProductDetail.InwardDtlId &&
- cartItem?.OrderRate === ProductDetail?.OrderRate &&
- cartItem?.BookingTypeName === ProductDetail?.BookingTypeName
+ cartItem.InwardDtlId === ProductDetail.InwardDtlId &&
+ cartItem?.OrderRate === ProductDetail?.OrderRate &&
+ cartItem?.BookingTypeName === ProductDetail?.BookingTypeName
? { ...cartItem, ProductIdentifierDtls: IdentifyDetails }
: cartItem // otherwise, return the cart item
)
@@ -226,32 +237,39 @@ const BSImeiDetails = (props) => {
{RadioBtnSelection == 'Serial' && (
-
-
- !(
- item.SerialNumber == '' ||
- item.SerialNumber == null
- )
- )?.map((option) => ({
- value: option.SerialNumber,
- label: option.SerialNumber,
- disabled: SerialNumberList?.includes(
- option.SerialNumber
- ),
- }))}
- label={'Serial Number'}
- className="field-DropDown"
- onChangeFunction={(e) => SerialNumberOnchange(e)}
- />
-
+ {ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
+
+
+ !(
+ item.SerialNumber == '' ||
+ item.SerialNumber == null
+ )
+ )?.map((option) => ({
+ value: option.SerialNumber,
+ label: option.SerialNumber,
+ disabled: SerialNumberList?.includes(
+ option.SerialNumber
+ ),
+ }))}
+ label={'Serial Number'}
+ className="field-DropDown"
+ onChangeFunction={(e) => SerialNumberOnchange(e)}
+ />
+
+
+ }
+
{
- await validateSafeInput(value); // To block HTML tags & SQL keywords
+ if (value && !/^\d+$/.test(value)) {
+ return Promise.reject('Please enter only numbers');
+ }
+ await validateSafeInput(value);
return Promise.resolve();
},
},
@@ -260,13 +278,16 @@ const BSImeiDetails = (props) => {
{
+ if (['e', 'E', '+', '-', '.'].includes(e.key)) {
+ e.preventDefault();
+ }
+ }}
/>
{
>
Serial Number:
+
{SerialNumberList?.map((item, index) => (
@@ -292,38 +314,45 @@ const BSImeiDetails = (props) => {
)}
+
+
{RadioBtnSelection == 'IMEI' && (
-
- item.IMEI1 !== '' || item.IMEI2 !== ''
- )?.map((option) => {
- const imei1 = option.IMEI1 || '';
- const imei2 = option.IMEI2 || '';
- const valueLabel = [imei1, imei2]
- ?.filter(Boolean)
- ?.join(',');
- const normalizedValueLabel = valueLabel?.trim();
- return {
- value: valueLabel,
- label: valueLabel,
- disabled:
- IMEINumberList?.includes(normalizedValueLabel),
- };
- })}
- label={'IMEI Number'}
- className="field-DropDown"
- onChangeFunction={(e) => IMEINumberOnchange(e)}
- />
-
+ {ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
+
+ item.IMEI1 !== '' || item.IMEI2 !== ''
+ )?.map((option) => {
+ const imei1 = option.IMEI1 || '';
+ const imei2 = option.IMEI2 || '';
+ const valueLabel = [imei1, imei2]
+ ?.filter(Boolean)
+ ?.join(',');
+ const normalizedValueLabel = valueLabel?.trim();
+ return {
+ value: valueLabel,
+ label: valueLabel,
+ disabled:
+ IMEINumberList?.includes(normalizedValueLabel),
+ };
+ })}
+ label={'IMEI Number'}
+ className="field-DropDown"
+ onChangeFunction={(e) => IMEINumberOnchange(e)}
+ />
+ }
+
{
- await validateSafeInput(value); // To block HTML tags & SQL keywords
+ if (value && !/^\d+$/.test(value)) {
+ return Promise.reject('Please enter only numbers');
+ }
+ await validateSafeInput(value);
return Promise.resolve();
},
},
@@ -335,9 +364,13 @@ const BSImeiDetails = (props) => {
label="IMEI Number"
fieldState={true}
fieldApi={true}
- // id="error2"
autocomplete="off"
- // OnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
+ type="number"
+ onKeyDown={(e) => {
+ if (['e', 'E', '+', '-', '.'].includes(e.key)) {
+ e.preventDefault();
+ }
+ }}
/>
{
)}
+
+
+
+ Description..}
+ defaultValue=""
+ isOnChange={true}
+ />
+
+
+
+
-
+
}
handleCancel={CloseDeviceDetailModal}
/>
-
+
);
};
export default BSImeiDetails;
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx
index 443c9b0..b2a4850 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx
@@ -94,6 +94,9 @@ const ComboSalesBillTable = () => {
const removeProducts = useRemoveProducts();
const applyOffer = useApplyOfferto_CardDetail();
const preferenceDatas = useSelector(PreferenceData);
+ const UomPrint = preferenceDatas?.[0]?.SettingDtlDetails?.filter(
+ (i) => i.SettingIdName === 'PrintUom'
+ )?.[0];
const preferenceDetails = preferenceDatas?.[0]?.SettingDtlDetails;
const preferenceOffer =
preferenceDetails?.find((item) => item.SettingIdName === 'Offer')
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.jsx
index 4a764cd..87ff635 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.jsx
@@ -111,6 +111,11 @@ const StandardTable = () => {
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y'
);
+ const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
+ setting?.SettingValue === 'Y'
+ );
const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId;
@@ -3181,8 +3186,8 @@ const StandardTable = () => {
"'Inter', ui-sans-serif, system-ui, sans-serif",
}}
onClick={() =>
- item.FullProductIdentifierDtls?.length > 0 ||
- item.ProductIdentifierDtls?.length > 0
+ (item.FullProductIdentifierDtls?.length > 0 ||
+ item.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx
index dddd6a9..45b20ac 100644
--- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx
@@ -60,6 +60,7 @@ const PrintA5Style11 = ({
printDatas,
sportsAppPreference,
MembershipApplied = null,
+ SalesModePref,
}) => {
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
const GlobalSignature = useSelector(GlobalprintSignature);
@@ -427,6 +428,8 @@ const PrintA5Style11 = ({
table2Data?.OrderId,
table2Data?.FYStatus
)}
+
+
{GlobaldummyData && '685'}
@@ -446,10 +449,16 @@ const PrintA5Style11 = ({
justifyContent: 'space-between',
padding: '0rem 1rem',
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
+ flexDirection: 'column',
+ textAlign:'left'
}}
>
{' '}
{Date1}
{' '}
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+
}
@@ -691,88 +700,71 @@ const PrintA5Style11 = ({
{chunkIndex * chunkSize + index + 1}
)}
- {GlobaldummyData
- ? GlobalItem && {item?.name} |
- : Item == true && (
+ {GlobaldummyData ? (
+ GlobalItem && {item?.name} |
+ ) : (
+ Item && (
{item?.ProdName}
+
{PackageDetails?.filter(
- (pkg) =>
- pkg.ProdId === item.ProdId
+ (pkg) => pkg.ProdId === item.ProdId
).length > 0 ? (
- {PackageDetails?.filter(
- (pkg) =>
- pkg.ProdId === item.ProdId
- )?.map((item, index) => (
-
- {item.ParcelCount} PCS{' '}
- {item.ParcelQty} PACK (
- {item.ParcelType})
-
- ))}
+ {PackageDetails
+ ?.filter((pkg) => pkg.ProdId === item.ProdId)
+ ?.map((pkg, index) => (
+
+ {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
+
+ ))}
) : (
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
+ ({item?.Size || "1"}{" "}
+ {item?.SinglePc === "Y"
+ ? "PCS"
+ : item?.Type !== "C"
? item?.UomName
- : 'COMBO'}
+ : "COMBO"}
)
)}
- {' '}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
-
- {item?.ProductIdentifierDtls
- ?.length > 0
- ? item?.ProductIdentifierDtls?.filter(
- (items) =>
- !(
- items.SerialNumber ==
- '' ||
- items.SerialNumber == null
- )
- )?.map((a) => {
- return (
- {a.SerialNumber}
- );
- })
- : ''}{' '}
- {item?.ProductIdentifierDtls
- ?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (item1) =>
- item1.IMEI1 !== '' ||
- item1.IMEI2 !== ''
- )?.map((item2) => {
- const imei1 =
- item2.IMEI1 || '';
- const imei2 =
- item2.IMEI2 || '';
- return (
-
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
-
- );
- })
- : ''}
+
+ {item?.BrandName && {item.BrandName} }
+
+ {/* Identifiers */}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item.ProductIdentifierDtls.map((id, index) => (
+
+
+ {/* Serial */}
+ {id?.SerialNumber && {id.SerialNumber} }
+
+ {/* IMEI */}
+ {(id?.IMEI1 || id?.IMEI2) && (
+
+ {[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
+
+ )}
+
+ {/* Description */}
+ {(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
+ id?.Description && (
+ {id.Description}
+ )}
+
+
+ ))
+ : null}
|
- )}
+ )
+ )}
{GlobaldummyData
? GlobalHsnCode && (
@@ -1694,67 +1686,54 @@ const PrintA5Style11 = ({
{chunkIndex * chunkSize + index + 1}
|
)}
- {GlobaldummyData
- ? GlobalItem && {item?.ProdName} |
- : Item == true && (
+ {GlobaldummyData ? (
+ GlobalItem && {item?.ProdName} |
+ ) : (
+ Item && (
{item?.ProdName}
+
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
+ ({item?.Size || "1"}{" "}
+ {item?.SinglePc === "Y"
+ ? "PCS"
+ : item?.Type !== "C"
? item?.UomName
- : 'COMBO'}
+ : "COMBO"}
)
- {' '}
- {item?.BrandName !== null
- ? item?.BrandName
- : ''}
-
- {item?.ProductIdentifierDtls
- ?.length > 0
- ? item?.ProductIdentifierDtls?.filter(
- (items) =>
- !(
- items.SerialNumber ==
- '' ||
- items.SerialNumber == null
- )
- )?.map((a) => {
- return (
- {a.SerialNumber}
- );
- })
- : ''}{' '}
- {item?.ProductIdentifierDtls
- ?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (item1) =>
- item1.IMEI1 !== '' ||
- item1.IMEI2 !== ''
- )?.map((item2) => {
- const imei1 =
- item2.IMEI1 || '';
- const imei2 =
- item2.IMEI2 || '';
- return (
+
+ {item?.BrandName && {item.BrandName} }
+
+ {item?.ProductIdentifierDtls?.map((id, index) => (
+
+
+ {/* Serial Number */}
+ {id?.SerialNumber && {id.SerialNumber} }
+
+ {/* IMEI */}
+ {(id?.IMEI1 || id?.IMEI2) && (
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
+ {[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
- );
- })
- : ''}
+ )}
+
+ {/* Description */}
+ {(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
+ id?.Description && (
+ {id.Description}
+ )}
+
+
+ ))}
|
- )}
+ )
+ )}
{GlobaldummyData
? GlobalHsnCode && (
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx
index be3057c..6f9dd20 100644
--- a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx
@@ -23,6 +23,7 @@ const TaxInvoice = ({
ReprintType,
printDatas,
}) => {
+
const GlobaldummyData = useSelector(GlobalPritdummyData);
const SettingData = useSelector(PreferenceData);
const estimatePrintHeader =
@@ -833,27 +834,25 @@ const TaxInvoice = ({
{item.BrandName}{' '}
)}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) =>
- items.SerialNumber && items.SerialNumber !== ''
- )?.map((a, i) => (
- {a.SerialNumber}
- ))
- : ''}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
- )?.map((id, i) => {
- const imei1 = id.IMEI1 || '';
- const imei2 = id.IMEI2 || '';
- return (
-
- {[imei1, imei2].filter(Boolean).join(',')}
+
+ {item?.ProductIdentifierDtls?.map((id, i) => (
+
+
+ {id?.SerialNumber && {id.SerialNumber}}
+ {(id?.IMEI1 || id?.IMEI2) && (
+ {[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
+ )}
- );
- })
- : ''}
+
+ {id?.Description && (
+
+ {id.Description}
+
+ )}
+
+ ))}
+
+
Estimate Bill{' '}
- {SalesModePref?.SettingValue == 'Y' &&
- `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
+ {/* {SalesModePref?.SettingValue == 'Y' &&
+ `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
)}
{table2Data?.OrderType === 'E' ? (
@@ -493,8 +493,8 @@ const Printstyle2 = ({
? PaymentStatusSuccess?.[0]?.PaymentTypeName
: ''}{' '}
Bill{' '}
- {SalesModePref?.SettingValue == 'Y' &&
- `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
+ {/* {SalesModePref?.SettingValue == 'Y' &&
+ `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
)}
@@ -513,7 +513,13 @@ const Printstyle2 = ({
{GlobaldummyData ? formattedDate : Date1}
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+
+ }
+
@@ -726,38 +732,50 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
- {item?.ProductIdentifierDtls?.length >
- 0
- ? item?.ProductIdentifierDtls?.filter(
- (items) =>
- !(
- items.SerialNumber == '' ||
- items.SerialNumber == null
- )
- )?.map((a) => {
- return (
- {a.SerialNumber}
- );
- })
- : ''}{' '}
- {item?.ProductIdentifierDtls?.length >
- 0
- ? item?.ProductIdentifierDtls.filter(
- (item1) =>
- item1.IMEI1 !== '' ||
- item1.IMEI2 !== ''
- )?.map((item2) => {
- const imei1 = item2.IMEI1 || '';
- const imei2 = item2.IMEI2 || '';
- return (
-
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
-
- );
- })
- : ''}
+
+ {item?.ProductIdentifierDtls?.length >
+ 0
+ ? item?.ProductIdentifierDtls?.filter(
+ (items) =>
+ !(
+ items.SerialNumber == '' ||
+ items.SerialNumber == null
+ )
+ )?.map((a) => {
+ return (
+ {a.SerialNumber}
+ );
+ })
+ : ''}{' '}
+ {item?.ProductIdentifierDtls?.length >
+ 0
+ ? item?.ProductIdentifierDtls.filter(
+ (item1) =>
+ item1.IMEI1 !== '' ||
+ item1.IMEI2 !== ''
+ )?.map((item2) => {
+ const imei1 = item2.IMEI1 || '';
+ const imei2 = item2.IMEI2 || '';
+ return (
+
+ {[imei1, imei2]
+ .filter(Boolean)
+ .join(',')}
+
+ );
+ })
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber || items.IMEI1 || items.IMEI2
+ )?.map((a, i) => (
+ {a.Description}
+ ))
+
+ : ''}
+
+
|
)}
@@ -3098,8 +3116,8 @@ const Printstyle2 = ({
}}
>
Estimate Bill{' '}
- {SalesModePref?.SettingValue == 'Y' &&
- `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
+ {/* {SalesModePref?.SettingValue == 'Y' &&
+ `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
)}
{table2Data?.OrderType === 'E' ? (
@@ -3123,8 +3141,8 @@ const Printstyle2 = ({
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ''}{' '}
- {SalesModePref?.SettingValue == 'Y' &&
- `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
+ {/* {SalesModePref?.SettingValue == 'Y' &&
+ `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
)}
@@ -3314,34 +3332,41 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls?.filter(
- (items) =>
- !(
- items.SerialNumber == '' ||
- items.SerialNumber == null
- )
- )?.map((a) => {
- return {a.SerialNumber}
;
- })
- : ''}{' '}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (item1) =>
- item1.IMEI1 !== '' ||
- item1.IMEI2 !== ''
- )?.map((item2) => {
- const imei1 = item2.IMEI1 || '';
- const imei2 = item2.IMEI2 || '';
- return (
-
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
-
- );
- })
- : ''}
+
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber &&
+ items.SerialNumber !== ''
+ ).map((a, i) => (
+
{a.SerialNumber}
+ ))
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
+ ).map((id, i) => {
+ const imei1 = id.IMEI1 || '';
+ const imei2 = id.IMEI2 || '';
+ return (
+
+ {[imei1, imei2]
+ .filter(Boolean)
+ .join(',')}
+
+ );
+ })
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber || items.IMEI1 || items.IMEI2
+ )?.map((a, i) => (
+
{a.Description}
+ ))
+
+ : ''}
+
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
index b238d59..6d4f91d 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
@@ -231,18 +231,28 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.BrGSTIN && GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},
}
Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === "E" && estimateTitle && Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
- {table2Data?.OrderType === "E" ? "" : {GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
+ {table2Data?.OrderType === "E" && estimateTitle && Estimate Bill
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
}
+ {table2Data?.OrderType === "E" ? "" : {GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
}
)}
- {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
+ {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && Estimate Bill
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
}
BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+
}
{GlobaldummyData ? formattedDate : Date1}
@@ -292,14 +302,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
)
)}
{item?.BrandName !== null ? item?.BrandName : ""}
- {item?.ProductIdentifierDtls?.length > 0 ? (item?.ProductIdentifierDtls?.filter((items) => !(items.SerialNumber == "" || items.SerialNumber == null))
- ?.map(a => { return ({a.SerialNumber}
) })) : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter((item1) => item1.IMEI1 !== "" || item1.IMEI2 !== "")
- ?.map(item2 => {
- const imei1 = item2.IMEI1 || "";
- const imei2 = item2.IMEI2 || "";
- return ({[imei1, imei2].filter(Boolean).join(",")}
);
- }
- ) : ""}
+
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber &&
+ items.SerialNumber !== ''
+ ).map((a, i) => (
+
{a.SerialNumber}
+ ))
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
+ ).map((id, i) => {
+ const imei1 = id.IMEI1 || '';
+ const imei2 = id.IMEI2 || '';
+ return (
+
+ {[imei1, imei2]
+ .filter(Boolean)
+ .join(',')}
+
+ );
+ })
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber || items.IMEI1 || items.IMEI2
+ )?.map((a, i) => (
+
{a.Description}
+ ))
+
+ : ''}
+
}
{GlobaldummyData ? GlobalHsnCode && {item?.HSN}
: HsnCode && {item?.HSN}
}
@@ -1158,16 +1195,27 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{table2Data?.BrGSTIN && GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},
}
Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === "E" && estimateTitle && Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
- {table2Data?.OrderType === "E" ? "" : {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
+ {table2Data?.OrderType === "E" && estimateTitle && Estimate Bill
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
}
+ {table2Data?.OrderType === "E" ? "" : {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""}
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
}
)}
- {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
+ {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && Estimate Bill
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
}
BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+
+
}
{GlobaldummyData ? formattedDate : Date1}
@@ -1213,14 +1261,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
)
)}
{item?.BrandName !== null ? item?.BrandName : ""}
- {item?.ProductIdentifierDtls?.length > 0 ? (item?.ProductIdentifierDtls?.filter((items) => !(items.SerialNumber == "" || items.SerialNumber == null))
- ?.map(a => { return ({a.SerialNumber}
) })) : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter((item1) => item1.IMEI1 !== "" || item1.IMEI2 !== "")
- ?.map(item2 => {
- const imei1 = item2.IMEI1 || "";
- const imei2 = item2.IMEI2 || "";
- return ({[imei1, imei2].filter(Boolean).join(",")}
);
- }
- ) : ""}
+
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber &&
+ items.SerialNumber !== ''
+ ).map((a, i) => (
+
{a.SerialNumber}
+ ))
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
+ ).map((id, i) => {
+ const imei1 = id.IMEI1 || '';
+ const imei2 = id.IMEI2 || '';
+ return (
+
+ {[imei1, imei2]
+ .filter(Boolean)
+ .join(',')}
+
+ );
+ })
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber || items.IMEI1 || items.IMEI2
+ )?.map((a, i) => (
+
{a.Description}
+ ))
+
+ : ''}
+
}
{GlobaldummyData ? GlobalHsnCode && {item?.HSN}
: HsnCode && {item?.HSN}
}
diff --git a/src/Pages/Preference/PreferenceList.jsx b/src/Pages/Preference/PreferenceList.jsx
index 00b2137..25a14aa 100644
--- a/src/Pages/Preference/PreferenceList.jsx
+++ b/src/Pages/Preference/PreferenceList.jsx
@@ -119,6 +119,7 @@ const PreferenceList = () => {
],
scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
+ imeidetails:allSettingsMap['imeidetails']?.value === 'Y',
customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y',
upiqr: allSettingsMap['upiqr']?.value === 'Y',
lowstockreport: allSettingsMap['lowstockreport']?.value === 'Y',
@@ -322,6 +323,7 @@ const PreferenceList = () => {
mobilea4: values.mobilea4,
scanlayout: values.scanlayout,
verifyproduct: values.verifyproduct,
+ imeidetails:values.imeidetails,
customisedbillnumber: values.customisedbillnumber,
upiqr: values.upiqr,
lowstockreport: values.lowstockreport,
@@ -714,6 +716,10 @@ const PreferenceList = () => {
'verifyproduct',
'Do you Want Verify the Product?'
)}
+ {renderCheckbox(
+ 'imeidetails',
+ 'Do you want to open the IMEI model without IMEI details?'
+ )}
{renderCheckbox(
'customisedbillnumber',
'Do you Want Customised Bill Number?'
diff --git a/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx b/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx
index 7cf6df3..f6a99e2 100644
--- a/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx
+++ b/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx
@@ -92,7 +92,7 @@ const PaymentPdfBooking = ({
const [BranchZip, setBranchZip] = useState();
const CashierName = getSession('userName');
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
- console.log(printerTemplateStyle, 'printerTemplateStyle');
+ console.log(printerTemplateStyle, "printerTemplateStyle")
const appPreferences = useSelector(ApplicationPreferences);
const SettingData = useSelector(PreferenceData);
const estimatePrintHeader =
@@ -423,7 +423,7 @@ const PaymentPdfBooking = ({
>
Estimate
-
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
-
+ */}
) : (
-
{SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
-
+ */}
)}
@@ -483,6 +483,11 @@ const PaymentPdfBooking = ({
table2Data?.FYStatus
)}
+ {SalesModePref?.SettingValue == 'Y' &&
+
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+
}
Date:{Date1}
{TakeawayData?.length > 0 && (
@@ -529,92 +534,53 @@ const PaymentPdfBooking = ({
{item?.ProdName}
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- ).length > 0 ? (
+ {/* Package Details */}
+ {PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId).length > 0 && (
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- )?.map((pkg, index) => (
-
- {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- (
- {item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'}
- ) {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
-
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) =>
- items.SerialNumber &&
- items.SerialNumber !== ''
- ).map((a, i) => (
- {a.SerialNumber}
- ))
- : ''}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
- ).map((id, i) => {
- const imei1 = id.IMEI1 || '';
- const imei2 = id.IMEI2 || '';
- return (
-
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
-
- );
- })
- : ''}
-
+ {PackageDetails
+ ?.filter(pkg => pkg.ProdId === item.ProdId)
+ ?.map((pkg, index) => (
+
+ {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
+
+ ))}
- ) : (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'}
- ) {' '}
- {item?.BrandName !== null ? item?.BrandName : ''}
-
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) =>
- items.SerialNumber &&
- items.SerialNumber !== ''
- ).map((a, i) => (
- {a.SerialNumber}
- ))
- : ''}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
- ).map((id, i) => {
- const imei1 = id.IMEI1 || '';
- const imei2 = id.IMEI2 || '';
- return (
-
- {[imei1, imei2].filter(Boolean).join(',')}
-
- );
- })
- : ''}
-
)}
+ {/* Size, UOM, Brand */}
+
+ ({item?.Size ?? '1'}{" "}
+ {item?.SinglePc === 'Y' ? "PCS" : item?.Type !== 'C' ? item?.UomName : "COMBO"}
+ ) {item?.BrandName || ""}
+
+
+ {/* Product Identifiers */}
+ {item?.ProductIdentifierDtls?.map((detail, index) => {
+ const serial = detail.SerialNumber?.trim();
+ const imeis = [detail.IMEI1, detail.IMEI2].filter(Boolean).join(", ");
+ const description = detail.Description?.trim();
+
+ if (!serial && !imeis && !description) return null;
+
+ return (
+
+ {/* Serial + IMEIs */}
+ {(serial || imeis) && (
+
+ {serial && {serial} }
+ {imeis && {imeis} }
+
+ )}
+
+ {/* Description */}
+ {description && {description} }
+
+ );
+ })}
+
+ {/* Available Time */}
{sportsAppPreference &&
- `(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
+ `(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
|
{item?.SalesQty} |
{item?.Rate} |