add Description

This commit is contained in:
Tamilselvan 2026-02-26 15:25:43 +05:30
parent bc8dafa167
commit 1c464221a2
11 changed files with 1102 additions and 1018 deletions

View File

@ -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 ? (
<Tooltip title="Quantity">Qty</Tooltip>
@ -2252,11 +2257,10 @@ const BSBillingTable1 = () => {
{OldtableDataTakeAway?.map((item, index) => (
<tr
key={index}
className={`${
item?.SalesId && OrderType !== 'Hold'
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
className={`${item?.SalesId && OrderType !== 'Hold'
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
`}
style={{
@ -2267,17 +2271,17 @@ const BSBillingTable1 = () => {
? item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: triggerAnimation &&
index === 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >=
PreviousdataLength
index === 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >=
PreviousdataLength
? 'wheat'
: triggerAnimation &&
index === 0 &&
tableDataTakeAway?.length >=
PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
index === 0 &&
tableDataTakeAway?.length >=
PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
? 'wheat'
: 'inherit'
: 'none',
@ -2285,18 +2289,18 @@ const BSBillingTable1 = () => {
item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
item?.InwardDtlId +
' ' +
item?.BookingTypeName
)
GlobProdwisedata?.includes(
item?.InwardDtlId +
' ' +
item?.BookingTypeName
)
? '#b2d1f7'
: index % 2 === 0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.[
'OverallBackgroundColor'
]
'OverallBackgroundColor'
]
: '#d6d6d6',
animation:
BillOrderPre === 'Y' && !BookingTypeBoth
@ -2348,8 +2352,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)
}
@ -2400,21 +2405,21 @@ const BSBillingTable1 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
)}
{tableitem.OptionName == 'MRP' && (
@ -2509,11 +2514,11 @@ const BSBillingTable1 = () => {
>
{allowDecimal
? Number(
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
: Number(
item?.TotalAmt - (item?.Offer || 0) || 0
)}
item?.TotalAmt - (item?.Offer || 0) || 0
)}
</td>
)}
@ -2548,11 +2553,10 @@ const BSBillingTable1 = () => {
{OldtableDataDinein?.map((item, index) => (
<tr
key={OldtableDataTakeAway?.length + index}
className={`${
item?.SalesId
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
className={`${item?.SalesId
? 'Billing-Table1-row-disabled'
: 'Billing-Table1-row'
}
`}
style={{
@ -2563,28 +2567,28 @@ const BSBillingTable1 = () => {
? item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength
triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
triggerAnimation &&
OldtableDataTakeAway?.length + index ===
0 &&
tableDataDinein?.length >=
PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
triggerAnimation &&
OldtableDataTakeAway?.length + index ===
0 &&
tableDataDinein?.length >=
PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background: item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
? '#b2d1f7'
: (OldtableDataTakeAway?.length + index) % 2 === 0
? 'white'
@ -2692,21 +2696,21 @@ const BSBillingTable1 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
)}
{tableitem.OptionName == 'MRP' && (
@ -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
)}
</td>
)}
@ -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'
) && (
<span>{item?.ProdVariantName} </span>
)}
<span>{item?.ProdVariantName} </span>
)}
{item?.Size}
{item?.SinglePc == 'Y'
? 'PCS'
@ -3037,21 +3041,21 @@ const BSBillingTable1 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
)}
{tableitem.OptionName == 'MRP' && (
@ -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
)}
</td>
)}
@ -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 && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
)}
{tableitem.OptionName == 'MRP' && (
@ -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
)}
</td>
)}

View File

@ -147,6 +147,11 @@ const BSBillingTable3 = () => {
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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}
>

View File

@ -14,6 +14,7 @@ import {
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
import { useDispatch, useSelector } from 'react-redux';
import { validateSafeInput } from '../../../../../Services/Others';
import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
const BSImeiDetails = (props) => {
const formRef = useRef(null);
const dispatch = useDispatch();
@ -26,7 +27,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,6 +48,10 @@ const BSImeiDetails = (props) => {
return [imei1, imei2].filter(Boolean).join(',');
})
);
formRef?.current?.setFieldsValue({
description: productidentifier?.[0]?.Description || "",
})
}, []);
const CloseDeviceDetailModal = () => {
props.handleDeviceDetailClose();
@ -65,7 +70,8 @@ const BSImeiDetails = (props) => {
} else {
setSerialNumberList([...SerialNumberList, e]);
}
} else {
}
else {
setMessageType('error');
setMessageData('Already Selected ');
}
@ -83,7 +89,7 @@ const BSImeiDetails = (props) => {
}
} else {
setMessageType('error');
setMessageData('Already Selected');
setMessageData('you cant enter more than Order Qty');
}
formRef.current?.resetFields();
@ -115,7 +121,7 @@ const BSImeiDetails = (props) => {
}
} else {
setMessageType('error');
setMessageData('Already Selected');
setMessageData('you cant enter more than Order Qty');
}
formRef.current?.resetFields();
};
@ -131,6 +137,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 +151,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 +163,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
)
@ -175,7 +184,7 @@ const BSImeiDetails = (props) => {
<DefaultModal
title={
<div className="EditQuantity-title">
<FormHeader title={'Device Identifier'} />
<FormHeader title={'Device Identifieer'} />
</div>
}
open={DeviceDetailOpen}
@ -226,26 +235,30 @@ const BSImeiDetails = (props) => {
{RadioBtnSelection == 'Serial' && (
<div>
<div className="SerialNumberColumn">
<Form.Item name="SerialNumber">
<DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter(
(item) =>
!(
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)}
/>
</Form.Item>
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
<Form.Item name="SerialNumber">
<DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter(
(item) =>
!(
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)}
/>
</Form.Item>
}
<Form.Item
name="SerialNumbertext"
rules={[
@ -266,7 +279,7 @@ const BSImeiDetails = (props) => {
fieldApi={true}
// id="error2"
autocomplete="off"
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
/>
</Form.Item>
<Buttons
@ -277,6 +290,7 @@ const BSImeiDetails = (props) => {
></Buttons>
</div>
<div>Serial Number:</div>
<div className="SerialNumber-Selected">
{SerialNumberList?.map((item, index) => (
<div key={index}>
@ -292,32 +306,36 @@ const BSImeiDetails = (props) => {
</div>
</div>
)}
{RadioBtnSelection == 'IMEI' && (
<div>
<div className="SerialNumberColumn">
<Form.Item name="IMEINumber">
<DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter(
(item) => 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)}
/>
</Form.Item>
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
<Form.Item name="IMEINumber">
<DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter(
(item) => 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)}
/>
</Form.Item>}
<Form.Item
name="IMEINumbertext"
rules={[
@ -337,7 +355,7 @@ const BSImeiDetails = (props) => {
fieldApi={true}
// id="error2"
autocomplete="off"
// OnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
// OnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
/>
</Form.Item>
<Buttons
@ -363,7 +381,20 @@ const BSImeiDetails = (props) => {
</div>
</div>
)}
<div style={{ display: "flex", marginTop: "10px" }}>
<Form.Item name="description">
<TextAreaInput
autoComplete="off"
label={<label>Description..</label>}
defaultValue=""
isOnChange={true}
/>
</Form.Item>
</div>
</Form>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Buttons
buttonText="Submit"
@ -372,11 +403,11 @@ const BSImeiDetails = (props) => {
icon={<ArrowRightOutlined />}
></Buttons>
</div>
</div>
</div >
}
handleCancel={CloseDeviceDetailModal}
/>
</div>
</div >
);
};
export default BSImeiDetails;

View File

@ -105,6 +105,11 @@ const ComboSalesBillTable = () => {
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;
@ -1349,7 +1354,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: isPaidproduct?.InwardDtlId,
BuyInwardDtlId: null,
Offer: 0,
OrderRate:isPaidproduct?.OrderRate
OrderRate: isPaidproduct?.OrderRate
});
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
// Just Decrease Paid Qty
@ -1521,7 +1526,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate
OrderRate: item?.OrderRate
});
await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1600,7 +1605,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate
OrderRate: item?.OrderRate
});
await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1634,7 +1639,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate
OrderRate: item?.OrderRate
});
await ChangeOfferAppliedProdsFn({
inwardDtlId: item?.InwardDtlId,
@ -1666,7 +1671,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
BuyInwardDtlId: null,
Offer: 0,
OrderRate:isPaidProductAvailableInCart?.OrderRate
OrderRate: isPaidProductAvailableInCart?.OrderRate
});
} else if (
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
@ -2540,8 +2545,9 @@ const ComboSalesBillTable = () => {
key={`prod-${index}`}
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
onClick={() =>
row.FullProductIdentifierDtls?.length > 0 ||
row.ProductIdentifierDtls?.length > 0
(row.FullProductIdentifierDtls?.length > 0 ||
row.ProductIdentifierDtls?.length > 0 || imeiModal)
? handleImeiDetails(row)
: editField && handleEditQuantity(row)
}
@ -2601,8 +2607,8 @@ const ComboSalesBillTable = () => {
key={`qty-${index}`}
tabIndex={0}
className={`${EditQtyCombo && row?.localId === Index
? 'EditQTYcomboTD'
: 'qtyTd'
? 'EditQTYcomboTD'
: 'qtyTd'
} ${isActiveCell ? 'active-cell' : ''}`}
onClick={() =>
editField && handleEditQuantityCombo(row)

View File

@ -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)
}

View File

@ -108,6 +108,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',
@ -309,6 +310,7 @@ const PreferenceList = () => {
mobilea4: values.mobilea4,
scanlayout: values.scanlayout,
verifyproduct: values.verifyproduct,
imeidetails:values.imeidetails,
customisedbillnumber: values.customisedbillnumber,
upiqr: values.upiqr,
lowstockreport: values.lowstockreport,
@ -633,6 +635,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?'