Merge pull request 'Imei modal' (#207) from Imeimodal into main
Reviewed-on: Pozomind/pozo-retail-app#207
This commit is contained in:
commit
13940b3344
|
|
@ -106,6 +106,11 @@ const BSBillingTable1 = () => {
|
||||||
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
||||||
setting?.SettingValue === 'Y'
|
setting?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const BranchId = SessionData?.BranchId;
|
const BranchId = SessionData?.BranchId;
|
||||||
const AppId = SessionData?.AppId;
|
const AppId = SessionData?.AppId;
|
||||||
|
|
@ -156,8 +161,8 @@ const BSBillingTable1 = () => {
|
||||||
OrderType === 'Hold'
|
OrderType === 'Hold'
|
||||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||||
: tableData?.filter(
|
: tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||||
);
|
);
|
||||||
|
|
||||||
const OldtableDataDinein = tableData?.filter(
|
const OldtableDataDinein = tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||||
|
|
@ -165,8 +170,8 @@ const BSBillingTable1 = () => {
|
||||||
const OldtableDataTakeAway =
|
const OldtableDataTakeAway =
|
||||||
OrderType != 'Hold'
|
OrderType != 'Hold'
|
||||||
? tableData?.filter(
|
? tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
const [OpenEditTotalAmt, setOpenEditTotalAmt] = useState(false);
|
const [OpenEditTotalAmt, setOpenEditTotalAmt] = useState(false);
|
||||||
const [OpenImeiDetail, setOpenImeiDetail] = useState(false);
|
const [OpenImeiDetail, setOpenImeiDetail] = useState(false);
|
||||||
|
|
@ -1115,9 +1120,9 @@ const BSBillingTable1 = () => {
|
||||||
)?.map((item, idx) =>
|
)?.map((item, idx) =>
|
||||||
idx === 0
|
idx === 0
|
||||||
? {
|
? {
|
||||||
...item,
|
...item,
|
||||||
FreeQty,
|
FreeQty,
|
||||||
}
|
}
|
||||||
: item
|
: item
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
@ -2144,7 +2149,7 @@ const BSBillingTable1 = () => {
|
||||||
OpenEditTotalAmount();
|
OpenEditTotalAmount();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
// onClick={tableData?.length>0? OpenEditTotalAmount :""}
|
// onClick={tableData?.length>0? OpenEditTotalAmount :""}
|
||||||
>
|
>
|
||||||
{!isMobile ? (
|
{!isMobile ? (
|
||||||
<Tooltip title="Quantity">Qty</Tooltip>
|
<Tooltip title="Quantity">Qty</Tooltip>
|
||||||
|
|
@ -2252,11 +2257,10 @@ const BSBillingTable1 = () => {
|
||||||
{OldtableDataTakeAway?.map((item, index) => (
|
{OldtableDataTakeAway?.map((item, index) => (
|
||||||
<tr
|
<tr
|
||||||
key={index}
|
key={index}
|
||||||
className={`${
|
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||||
item?.SalesId && OrderType !== 'Hold'
|
? 'Billing-Table1-row-disabled'
|
||||||
? 'Billing-Table1-row-disabled'
|
: 'Billing-Table1-row'
|
||||||
: 'Billing-Table1-row'
|
}
|
||||||
}
|
|
||||||
|
|
||||||
`}
|
`}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -2267,17 +2271,17 @@ const BSBillingTable1 = () => {
|
||||||
? item?.SalesId && OrderType !== 'Hold'
|
? item?.SalesId && OrderType !== 'Hold'
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: triggerAnimation &&
|
: triggerAnimation &&
|
||||||
index === 0 &&
|
index === 0 &&
|
||||||
!item?.SalesId &&
|
!item?.SalesId &&
|
||||||
tableDataTakeAway?.length >=
|
tableDataTakeAway?.length >=
|
||||||
PreviousdataLength
|
PreviousdataLength
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: triggerAnimation &&
|
: triggerAnimation &&
|
||||||
index === 0 &&
|
index === 0 &&
|
||||||
tableDataTakeAway?.length >=
|
tableDataTakeAway?.length >=
|
||||||
PreviousdataLength &&
|
PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
!UnpaidData
|
!UnpaidData
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: 'inherit'
|
: 'inherit'
|
||||||
: 'none',
|
: 'none',
|
||||||
|
|
@ -2285,18 +2289,18 @@ const BSBillingTable1 = () => {
|
||||||
item?.SalesId && OrderType !== 'Hold'
|
item?.SalesId && OrderType !== 'Hold'
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: GlobEstBooking === 'ParEst' &&
|
: GlobEstBooking === 'ParEst' &&
|
||||||
GlobProdwisedata?.includes(
|
GlobProdwisedata?.includes(
|
||||||
item?.InwardDtlId +
|
item?.InwardDtlId +
|
||||||
' ' +
|
' ' +
|
||||||
item?.BookingTypeName
|
item?.BookingTypeName
|
||||||
)
|
)
|
||||||
? '#b2d1f7'
|
? '#b2d1f7'
|
||||||
: index % 2 === 0
|
: index % 2 === 0
|
||||||
? 'white'
|
? 'white'
|
||||||
: SelectedBillColor?.['OverallBackgroundColor']
|
: SelectedBillColor?.['OverallBackgroundColor']
|
||||||
? SelectedBillColor?.[
|
? SelectedBillColor?.[
|
||||||
'OverallBackgroundColor'
|
'OverallBackgroundColor'
|
||||||
]
|
]
|
||||||
: '#d6d6d6',
|
: '#d6d6d6',
|
||||||
animation:
|
animation:
|
||||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||||
|
|
@ -2348,8 +2352,9 @@ const BSBillingTable1 = () => {
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
|
||||||
item.ProductIdentifierDtls?.length > 0
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
@ -2400,21 +2405,21 @@ const BSBillingTable1 = () => {
|
||||||
{productBasedExtraCharges?.find(
|
{productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
) !== undefined && (
|
) !== undefined && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: '10px',
|
fontSize: '10px',
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Extra Charges :{' '}
|
Extra Charges :{' '}
|
||||||
{
|
{
|
||||||
productBasedExtraCharges?.find(
|
productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
)?.TotalAmt
|
)?.TotalAmt
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{tableitem.OptionName == 'MRP' && (
|
{tableitem.OptionName == 'MRP' && (
|
||||||
|
|
@ -2509,11 +2514,11 @@ const BSBillingTable1 = () => {
|
||||||
>
|
>
|
||||||
{allowDecimal
|
{allowDecimal
|
||||||
? Number(
|
? Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
: Number(
|
: Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -2548,11 +2553,10 @@ const BSBillingTable1 = () => {
|
||||||
{OldtableDataDinein?.map((item, index) => (
|
{OldtableDataDinein?.map((item, index) => (
|
||||||
<tr
|
<tr
|
||||||
key={OldtableDataTakeAway?.length + index}
|
key={OldtableDataTakeAway?.length + index}
|
||||||
className={`${
|
className={`${item?.SalesId
|
||||||
item?.SalesId
|
? 'Billing-Table1-row-disabled'
|
||||||
? 'Billing-Table1-row-disabled'
|
: 'Billing-Table1-row'
|
||||||
: 'Billing-Table1-row'
|
}
|
||||||
}
|
|
||||||
|
|
||||||
`}
|
`}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -2563,28 +2567,28 @@ const BSBillingTable1 = () => {
|
||||||
? item?.SalesId
|
? item?.SalesId
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: BookingType === 'Dine In' &&
|
: BookingType === 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length + index === 0 &&
|
OldtableDataTakeAway?.length + index === 0 &&
|
||||||
!item?.SalesId &&
|
!item?.SalesId &&
|
||||||
tableDataDinein?.length >= PreviousdataLength
|
tableDataDinein?.length >= PreviousdataLength
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: BookingType !== 'Dine In' &&
|
: BookingType !== 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length + index ===
|
OldtableDataTakeAway?.length + index ===
|
||||||
0 &&
|
0 &&
|
||||||
tableDataDinein?.length >=
|
tableDataDinein?.length >=
|
||||||
PreviousdataLength &&
|
PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
!UnpaidData
|
!UnpaidData
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: 'inherit'
|
: 'inherit'
|
||||||
: 'none',
|
: 'none',
|
||||||
background: item?.SalesId
|
background: item?.SalesId
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: GlobEstBooking === 'ParEst' &&
|
: GlobEstBooking === 'ParEst' &&
|
||||||
GlobProdwisedata?.includes(
|
GlobProdwisedata?.includes(
|
||||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||||
)
|
)
|
||||||
? '#b2d1f7'
|
? '#b2d1f7'
|
||||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||||
? 'white'
|
? 'white'
|
||||||
|
|
@ -2692,21 +2696,21 @@ const BSBillingTable1 = () => {
|
||||||
{productBasedExtraCharges?.find(
|
{productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
) !== undefined && (
|
) !== undefined && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: '10px',
|
fontSize: '10px',
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Extra Charges :{' '}
|
Extra Charges :{' '}
|
||||||
{
|
{
|
||||||
productBasedExtraCharges?.find(
|
productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
)?.TotalAmt
|
)?.TotalAmt
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{tableitem.OptionName == 'MRP' && (
|
{tableitem.OptionName == 'MRP' && (
|
||||||
|
|
@ -2801,11 +2805,11 @@ const BSBillingTable1 = () => {
|
||||||
>
|
>
|
||||||
{allowDecimal
|
{allowDecimal
|
||||||
? Number(
|
? Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
: Number(
|
: Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -2845,11 +2849,10 @@ const BSBillingTable1 = () => {
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index
|
index
|
||||||
}
|
}
|
||||||
className={`${
|
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||||
BookingType === 'Dine In' && item?.SalesId
|
? 'Billing-Table1-row-disabled'
|
||||||
? 'Billing-Table1-row-disabled'
|
: 'Billing-Table1-row'
|
||||||
: 'Billing-Table1-row'
|
}
|
||||||
}
|
|
||||||
|
|
||||||
`}
|
`}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -2860,44 +2863,44 @@ const BSBillingTable1 = () => {
|
||||||
? BookingType === 'Dine In' && item?.SalesId
|
? BookingType === 'Dine In' && item?.SalesId
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: BookingType === 'Dine In' &&
|
: BookingType === 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index ===
|
index ===
|
||||||
0 &&
|
0 &&
|
||||||
!item?.SalesId &&
|
!item?.SalesId &&
|
||||||
tableDataTakeAway?.length >=
|
tableDataTakeAway?.length >=
|
||||||
PreviousdataLength
|
PreviousdataLength
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: BookingType !== 'Dine In' &&
|
: BookingType !== 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index ===
|
index ===
|
||||||
0 &&
|
0 &&
|
||||||
tableDataTakeAway?.length >=
|
tableDataTakeAway?.length >=
|
||||||
PreviousdataLength &&
|
PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
!UnpaidData
|
!UnpaidData
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: (OldtableDataDinein?.length +
|
: (OldtableDataDinein?.length +
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index) %
|
index) %
|
||||||
2 ===
|
2 ===
|
||||||
0
|
0
|
||||||
? 'white'
|
? 'white'
|
||||||
: SelectedBillColor?.[
|
: SelectedBillColor?.[
|
||||||
'OverallBackgroundColor'
|
'OverallBackgroundColor'
|
||||||
]
|
]
|
||||||
? SelectedBillColor?.[
|
? SelectedBillColor?.[
|
||||||
'OverallBackgroundColor'
|
'OverallBackgroundColor'
|
||||||
]
|
]
|
||||||
: '#d6d6d6'
|
: '#d6d6d6'
|
||||||
: (OldtableDataDinein?.length +
|
: (OldtableDataDinein?.length +
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index) %
|
index) %
|
||||||
2 ===
|
2 ===
|
||||||
0
|
0
|
||||||
? 'white'
|
? 'white'
|
||||||
: SelectedBillColor?.['OverallBackgroundColor']
|
: SelectedBillColor?.['OverallBackgroundColor']
|
||||||
? SelectedBillColor?.['OverallBackgroundColor']
|
? SelectedBillColor?.['OverallBackgroundColor']
|
||||||
|
|
@ -2906,30 +2909,30 @@ const BSBillingTable1 = () => {
|
||||||
BookingType === 'Dine In' && item?.SalesId
|
BookingType === 'Dine In' && item?.SalesId
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: GlobEstBooking === 'ParEst' &&
|
: GlobEstBooking === 'ParEst' &&
|
||||||
GlobProdwisedata?.includes(
|
GlobProdwisedata?.includes(
|
||||||
item?.InwardDtlId +
|
item?.InwardDtlId +
|
||||||
' ' +
|
' ' +
|
||||||
item?.BookingTypeName
|
item?.BookingTypeName
|
||||||
)
|
)
|
||||||
? '#b2d1f7'
|
? '#b2d1f7'
|
||||||
: (OldtableDataDinein?.length +
|
: (OldtableDataDinein?.length +
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index) %
|
index) %
|
||||||
2 ===
|
2 ===
|
||||||
0
|
0
|
||||||
? 'white'
|
? 'white'
|
||||||
: SelectedBillColor?.['OverallBackgroundColor']
|
: SelectedBillColor?.['OverallBackgroundColor']
|
||||||
? SelectedBillColor?.[
|
? SelectedBillColor?.[
|
||||||
'OverallBackgroundColor'
|
'OverallBackgroundColor'
|
||||||
]
|
]
|
||||||
: '#d6d6d6',
|
: '#d6d6d6',
|
||||||
animation:
|
animation:
|
||||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||||
? triggerAnimation &&
|
? triggerAnimation &&
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index ===
|
index ===
|
||||||
0 &&
|
0 &&
|
||||||
!item?.SalesId &&
|
!item?.SalesId &&
|
||||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
|
|
@ -2979,8 +2982,9 @@ const BSBillingTable1 = () => {
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
|
||||||
item.ProductIdentifierDtls?.length > 0
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
@ -3001,8 +3005,8 @@ const BSBillingTable1 = () => {
|
||||||
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
{!item?.ProdVariantName?.toLowerCase()?.includes(
|
||||||
'variant'
|
'variant'
|
||||||
) && (
|
) && (
|
||||||
<span>{item?.ProdVariantName} </span>
|
<span>{item?.ProdVariantName} </span>
|
||||||
)}
|
)}
|
||||||
{item?.Size}
|
{item?.Size}
|
||||||
{item?.SinglePc == 'Y'
|
{item?.SinglePc == 'Y'
|
||||||
? 'PCS'
|
? 'PCS'
|
||||||
|
|
@ -3037,21 +3041,21 @@ const BSBillingTable1 = () => {
|
||||||
{productBasedExtraCharges?.find(
|
{productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
) !== undefined && (
|
) !== undefined && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: '10px',
|
fontSize: '10px',
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Extra Charges :{' '}
|
Extra Charges :{' '}
|
||||||
{
|
{
|
||||||
productBasedExtraCharges?.find(
|
productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
)?.TotalAmt
|
)?.TotalAmt
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{tableitem.OptionName == 'MRP' && (
|
{tableitem.OptionName == 'MRP' && (
|
||||||
|
|
@ -3146,11 +3150,11 @@ const BSBillingTable1 = () => {
|
||||||
>
|
>
|
||||||
{allowDecimal
|
{allowDecimal
|
||||||
? Number(
|
? Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
: Number(
|
: Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -3191,11 +3195,10 @@ const BSBillingTable1 = () => {
|
||||||
tableDataTakeAway?.length +
|
tableDataTakeAway?.length +
|
||||||
index
|
index
|
||||||
}
|
}
|
||||||
className={`${
|
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||||
BookingType === 'Dine In' && item?.SalesId
|
? 'Billing-Table1-row-disabled'
|
||||||
? 'Billing-Table1-row-disabled'
|
: 'Billing-Table1-row'
|
||||||
: 'Billing-Table1-row'
|
}
|
||||||
}
|
|
||||||
|
|
||||||
`}
|
`}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -3208,61 +3211,61 @@ const BSBillingTable1 = () => {
|
||||||
!BookingTypeBoth
|
!BookingTypeBoth
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: BookingType === 'Dine In' &&
|
: BookingType === 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
tableDataTakeAway?.length +
|
tableDataTakeAway?.length +
|
||||||
index ===
|
index ===
|
||||||
0 &&
|
0 &&
|
||||||
!item?.SalesId &&
|
!item?.SalesId &&
|
||||||
tableDataDinein?.length >= PreviousdataLength
|
tableDataDinein?.length >= PreviousdataLength
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: BookingType !== 'Dine In' &&
|
: BookingType !== 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
tableDataTakeAway?.length +
|
tableDataTakeAway?.length +
|
||||||
index ===
|
index ===
|
||||||
0 &&
|
0 &&
|
||||||
tableDataDinein?.length >=
|
tableDataDinein?.length >=
|
||||||
PreviousdataLength &&
|
PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
!UnpaidData
|
!UnpaidData
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: 'inherit'
|
: 'inherit'
|
||||||
: 'none',
|
: 'none',
|
||||||
background:
|
background:
|
||||||
BookingType === 'Dine In' &&
|
BookingType === 'Dine In' &&
|
||||||
item?.SalesId &&
|
item?.SalesId &&
|
||||||
!BookingTypeBoth
|
!BookingTypeBoth
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: GlobEstBooking === 'ParEst' &&
|
: GlobEstBooking === 'ParEst' &&
|
||||||
GlobProdwisedata?.includes(
|
GlobProdwisedata?.includes(
|
||||||
item?.InwardDtlId +
|
item?.InwardDtlId +
|
||||||
' ' +
|
' ' +
|
||||||
item?.BookingTypeName
|
item?.BookingTypeName
|
||||||
)
|
)
|
||||||
? '#b2d1f7'
|
? '#b2d1f7'
|
||||||
: (OldtableDataTakeAway?.length +
|
: (OldtableDataTakeAway?.length +
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
tableDataTakeAway?.length +
|
tableDataTakeAway?.length +
|
||||||
index) %
|
index) %
|
||||||
2 ===
|
2 ===
|
||||||
0
|
0
|
||||||
? 'white'
|
? 'white'
|
||||||
: SelectedBillColor?.['OverallBackgroundColor']
|
: SelectedBillColor?.['OverallBackgroundColor']
|
||||||
? SelectedBillColor?.[
|
? SelectedBillColor?.[
|
||||||
'OverallBackgroundColor'
|
'OverallBackgroundColor'
|
||||||
]
|
]
|
||||||
: '#d6d6d6',
|
: '#d6d6d6',
|
||||||
animation:
|
animation:
|
||||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||||
? triggerAnimation &&
|
? triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
OldtableDataDinein?.length +
|
OldtableDataDinein?.length +
|
||||||
tableDataTakeAway?.length +
|
tableDataTakeAway?.length +
|
||||||
index ===
|
index ===
|
||||||
0 &&
|
0 &&
|
||||||
!item?.SalesId &&
|
!item?.SalesId &&
|
||||||
tableDataDinein?.length >= PreviousdataLength &&
|
tableDataDinein?.length >= PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
|
|
@ -3364,21 +3367,21 @@ const BSBillingTable1 = () => {
|
||||||
{productBasedExtraCharges?.find(
|
{productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
) !== undefined && (
|
) !== undefined && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: '10px',
|
fontSize: '10px',
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Extra Charges :{' '}
|
Extra Charges :{' '}
|
||||||
{
|
{
|
||||||
productBasedExtraCharges?.find(
|
productBasedExtraCharges?.find(
|
||||||
(find) => find.ProdId === item.ProdId
|
(find) => find.ProdId === item.ProdId
|
||||||
)?.TotalAmt
|
)?.TotalAmt
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{tableitem.OptionName == 'MRP' && (
|
{tableitem.OptionName == 'MRP' && (
|
||||||
|
|
@ -3473,11 +3476,11 @@ const BSBillingTable1 = () => {
|
||||||
>
|
>
|
||||||
{allowDecimal
|
{allowDecimal
|
||||||
? Number(
|
? Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
: Number(
|
: Number(
|
||||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -147,6 +147,11 @@ const BSBillingTable3 = () => {
|
||||||
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
|
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
|
||||||
item.SettingValue === 'Y'
|
item.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
|
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
|
||||||
const tableDataDinein = tableData?.filter(
|
const tableDataDinein = tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'Dine In' && !a?.SalesId
|
(a, b) => a.BookingTypeName === 'Dine In' && !a?.SalesId
|
||||||
|
|
@ -2492,8 +2497,9 @@ const BSBillingTable3 = () => {
|
||||||
className="Table3-items for-combo"
|
className="Table3-items for-combo"
|
||||||
style={{ fontFamily: 'Poppins' }}
|
style={{ fontFamily: 'Poppins' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
|
||||||
item.ProductIdentifierDtls?.length > 0
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
@ -3086,8 +3092,9 @@ const BSBillingTable3 = () => {
|
||||||
className="Table3-items for-combo"
|
className="Table3-items for-combo"
|
||||||
style={{ fontFamily: 'Poppins' }}
|
style={{ fontFamily: 'Poppins' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
|
||||||
item.ProductIdentifierDtls?.length > 0
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item, index)
|
: editField && handleEditQuantity(item, index)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,11 @@ const BSBillingTable4 = () => {
|
||||||
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
||||||
(item) => item.SettingIdName === 'BillItemsOrder'
|
(item) => item.SettingIdName === 'BillItemsOrder'
|
||||||
)?.SettingValue;
|
)?.SettingValue;
|
||||||
|
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const BranchId = SessionData?.BranchId;
|
const BranchId = SessionData?.BranchId;
|
||||||
const AppId = SessionData?.AppId;
|
const AppId = SessionData?.AppId;
|
||||||
|
|
@ -2484,8 +2489,8 @@ const BSBillingTable4 = () => {
|
||||||
className="Table4-items for-combo"
|
className="Table4-items for-combo"
|
||||||
style={{ fontFamily: 'Poppins' }}
|
style={{ fontFamily: 'Poppins' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
item.ProductIdentifierDtls?.length > 0
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
@ -3068,8 +3073,8 @@ const BSBillingTable4 = () => {
|
||||||
className="Table4-items for-combo"
|
className="Table4-items for-combo"
|
||||||
style={{ fontFamily: 'Poppins' }}
|
style={{ fontFamily: 'Poppins' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
item.ProductIdentifierDtls?.length > 0
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item, index)
|
: editField && handleEditQuantity(item, index)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -137,6 +137,11 @@ const BSBillingTable6 = () => {
|
||||||
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
||||||
(item) => item.SettingIdName === 'BillItemsOrder'
|
(item) => item.SettingIdName === 'BillItemsOrder'
|
||||||
)?.SettingValue;
|
)?.SettingValue;
|
||||||
|
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
||||||
const OrderType = useSelector(GlobalOrderType);
|
const OrderType = useSelector(GlobalOrderType);
|
||||||
const GlobEstBooking = useSelector(GlobalEstimateBooking);
|
const GlobEstBooking = useSelector(GlobalEstimateBooking);
|
||||||
|
|
@ -1485,7 +1490,7 @@ const BSBillingTable6 = () => {
|
||||||
CompleteRemove: true,
|
CompleteRemove: true,
|
||||||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
OrderRate:isPaidProductAvailableInCart?.OrderRate,
|
OrderRate: isPaidProductAvailableInCart?.OrderRate,
|
||||||
Offer: 0,
|
Offer: 0,
|
||||||
});
|
});
|
||||||
} else if (
|
} else if (
|
||||||
|
|
@ -1570,7 +1575,7 @@ const BSBillingTable6 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate:item?.OrderRate,
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||||
|
|
@ -2304,8 +2309,8 @@ const BSBillingTable6 = () => {
|
||||||
className="BillingTable6-table-td for-combo"
|
className="BillingTable6-table-td for-combo"
|
||||||
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
|
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
item.ProductIdentifierDtls?.length > 0
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
@ -2855,8 +2860,8 @@ const BSBillingTable6 = () => {
|
||||||
className="BillingTable6-table-td for-combo"
|
className="BillingTable6-table-td for-combo"
|
||||||
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
|
style={{ fontFamily: 'Poppins', textAlign: 'left' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
item.ProductIdentifierDtls?.length > 0
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,11 @@ const BSBillingTable7 = () => {
|
||||||
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
|
setting?.SettingIdName?.toLowerCase() === 'shortcutkeys' &&
|
||||||
setting?.SettingValue === 'Y'
|
setting?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (SelectedFont) {
|
if (SelectedFont) {
|
||||||
WebFont.load({
|
WebFont.load({
|
||||||
|
|
@ -2729,8 +2734,8 @@ const BSBillingTable7 = () => {
|
||||||
padding: '8px',
|
padding: '8px',
|
||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
(item.FullProductIdentifierDtls?.length > 0 ||
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
item.ProductIdentifierDtls?.length > 0) &&
|
item.ProductIdentifierDtls?.length > 0 || imeiModal) &&
|
||||||
handleImeiDetails(item)
|
handleImeiDetails(item)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ import {
|
||||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { validateSafeInput } from '../../../../../Services/Others';
|
import { validateSafeInput } from '../../../../../Services/Others';
|
||||||
|
import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
|
||||||
|
import "../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss"
|
||||||
const BSImeiDetails = (props) => {
|
const BSImeiDetails = (props) => {
|
||||||
const formRef = useRef(null);
|
const formRef = useRef(null);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
@ -26,7 +28,7 @@ const BSImeiDetails = (props) => {
|
||||||
const [SerialNumberList, setSerialNumberList] = useState([]);
|
const [SerialNumberList, setSerialNumberList] = useState([]);
|
||||||
const [IMEINumberList, setIMEINumberList] = useState([]);
|
const [IMEINumberList, setIMEINumberList] = useState([]);
|
||||||
|
|
||||||
console.log(SerialNumberList, IMEINumberList, 'SerialNumberList');
|
console.log(props, 'propsprops');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let productidentifier = ProductDetail?.ProductIdentifierDtls
|
let productidentifier = ProductDetail?.ProductIdentifierDtls
|
||||||
? ProductDetail?.ProductIdentifierDtls
|
? ProductDetail?.ProductIdentifierDtls
|
||||||
|
|
@ -47,12 +49,17 @@ const BSImeiDetails = (props) => {
|
||||||
return [imei1, imei2].filter(Boolean).join(',');
|
return [imei1, imei2].filter(Boolean).join(',');
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
formRef?.current?.setFieldsValue({
|
||||||
|
description: productidentifier?.[0]?.Description || "",
|
||||||
|
})
|
||||||
}, []);
|
}, []);
|
||||||
const CloseDeviceDetailModal = () => {
|
const CloseDeviceDetailModal = () => {
|
||||||
props.handleDeviceDetailClose();
|
props.handleDeviceDetailClose();
|
||||||
};
|
};
|
||||||
const ChangeRadioOption = (data) => {
|
const ChangeRadioOption = (data) => {
|
||||||
setRadioBtnSelection(data);
|
setRadioBtnSelection(data);
|
||||||
|
formRef.current?.resetFields(['SerialNumber', 'SerialNumbertext', 'IMEINumber', 'IMEINumbertext']);
|
||||||
};
|
};
|
||||||
const SerialNumberOnchange = (e) => {
|
const SerialNumberOnchange = (e) => {
|
||||||
console.log(e, SerialNumberList, 'SerialNumberOnchange');
|
console.log(e, SerialNumberList, 'SerialNumberOnchange');
|
||||||
|
|
@ -65,7 +72,8 @@ const BSImeiDetails = (props) => {
|
||||||
} else {
|
} else {
|
||||||
setSerialNumberList([...SerialNumberList, e]);
|
setSerialNumberList([...SerialNumberList, e]);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Already Selected ');
|
setMessageData('Already Selected ');
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +91,7 @@ const BSImeiDetails = (props) => {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Already Selected');
|
setMessageData('you cant enter more than Order Qty');
|
||||||
}
|
}
|
||||||
|
|
||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
|
|
@ -115,7 +123,7 @@ const BSImeiDetails = (props) => {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Already Selected');
|
setMessageData('you cant enter more than Order Qty');
|
||||||
}
|
}
|
||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
};
|
};
|
||||||
|
|
@ -131,6 +139,8 @@ const BSImeiDetails = (props) => {
|
||||||
setMessageType(null);
|
setMessageType(null);
|
||||||
}, []);
|
}, []);
|
||||||
const AddDeviceDetails = () => {
|
const AddDeviceDetails = () => {
|
||||||
|
|
||||||
|
console.log(formRef?.current?.getFieldsValue, "formRef?.current?.getFieldsValue")
|
||||||
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
|
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
|
||||||
// Create the new object array
|
// Create the new object array
|
||||||
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
|
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
|
||||||
|
|
@ -143,6 +153,7 @@ const BSImeiDetails = (props) => {
|
||||||
IMEI1: imeiPair[0] || '', // First IMEI number
|
IMEI1: imeiPair[0] || '', // First IMEI number
|
||||||
IMEI2: imeiPair[1] || '', // Second IMEI number
|
IMEI2: imeiPair[1] || '', // Second IMEI number
|
||||||
MacId: '', // Default empty macid
|
MacId: '', // Default empty macid
|
||||||
|
Description: formRef.current?.getFieldsValue()?.description || '',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log(IdentifyDetails, 'IdentifyDetails');
|
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 // if the item is already in the cart, increase the quantity of the item
|
||||||
) =>
|
) =>
|
||||||
cartItem.ProdId === ProductDetail.ProdId &&
|
cartItem.ProdId === ProductDetail.ProdId &&
|
||||||
cartItem.InwardDtlId === ProductDetail.InwardDtlId &&
|
cartItem.InwardDtlId === ProductDetail.InwardDtlId &&
|
||||||
cartItem?.OrderRate === ProductDetail?.OrderRate &&
|
cartItem?.OrderRate === ProductDetail?.OrderRate &&
|
||||||
cartItem?.BookingTypeName === ProductDetail?.BookingTypeName
|
cartItem?.BookingTypeName === ProductDetail?.BookingTypeName
|
||||||
? { ...cartItem, ProductIdentifierDtls: IdentifyDetails }
|
? { ...cartItem, ProductIdentifierDtls: IdentifyDetails }
|
||||||
: cartItem // otherwise, return the cart item
|
: cartItem // otherwise, return the cart item
|
||||||
)
|
)
|
||||||
|
|
@ -226,32 +237,39 @@ const BSImeiDetails = (props) => {
|
||||||
{RadioBtnSelection == 'Serial' && (
|
{RadioBtnSelection == 'Serial' && (
|
||||||
<div>
|
<div>
|
||||||
<div className="SerialNumberColumn">
|
<div className="SerialNumberColumn">
|
||||||
<Form.Item name="SerialNumber">
|
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
|
||||||
<DropDowns
|
<Form.Item name="SerialNumber">
|
||||||
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
<DropDowns
|
||||||
(item) =>
|
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
||||||
!(
|
(item) =>
|
||||||
item.SerialNumber == '' ||
|
!(
|
||||||
item.SerialNumber == null
|
item.SerialNumber == '' ||
|
||||||
)
|
item.SerialNumber == null
|
||||||
)?.map((option) => ({
|
)
|
||||||
value: option.SerialNumber,
|
)?.map((option) => ({
|
||||||
label: option.SerialNumber,
|
value: option.SerialNumber,
|
||||||
disabled: SerialNumberList?.includes(
|
label: option.SerialNumber,
|
||||||
option.SerialNumber
|
disabled: SerialNumberList?.includes(
|
||||||
),
|
option.SerialNumber
|
||||||
}))}
|
),
|
||||||
label={'Serial Number'}
|
}))}
|
||||||
className="field-DropDown"
|
label={'Serial Number'}
|
||||||
onChangeFunction={(e) => SerialNumberOnchange(e)}
|
className="field-DropDown"
|
||||||
/>
|
onChangeFunction={(e) => SerialNumberOnchange(e)}
|
||||||
</Form.Item>
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="SerialNumbertext"
|
name="SerialNumbertext"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
validator: async (_, value) => {
|
validator: async (_, value) => {
|
||||||
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();
|
return Promise.resolve();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -260,13 +278,16 @@ const BSImeiDetails = (props) => {
|
||||||
<InputField
|
<InputField
|
||||||
field="SerialNumbertext"
|
field="SerialNumbertext"
|
||||||
name="SerialNumbertext"
|
name="SerialNumbertext"
|
||||||
// value={NewPrice1}
|
|
||||||
label="Serial Number"
|
label="Serial Number"
|
||||||
fieldState={true}
|
fieldState={true}
|
||||||
fieldApi={true}
|
fieldApi={true}
|
||||||
// id="error2"
|
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
type="number"
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (['e', 'E', '+', '-', '.'].includes(e.key)) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Buttons
|
<Buttons
|
||||||
|
|
@ -277,6 +298,7 @@ const BSImeiDetails = (props) => {
|
||||||
></Buttons>
|
></Buttons>
|
||||||
</div>
|
</div>
|
||||||
<div>Serial Number:</div>
|
<div>Serial Number:</div>
|
||||||
|
|
||||||
<div className="SerialNumber-Selected">
|
<div className="SerialNumber-Selected">
|
||||||
{SerialNumberList?.map((item, index) => (
|
{SerialNumberList?.map((item, index) => (
|
||||||
<div key={index}>
|
<div key={index}>
|
||||||
|
|
@ -292,38 +314,45 @@ const BSImeiDetails = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{RadioBtnSelection == 'IMEI' && (
|
{RadioBtnSelection == 'IMEI' && (
|
||||||
<div>
|
<div>
|
||||||
<div className="SerialNumberColumn">
|
<div className="SerialNumberColumn">
|
||||||
<Form.Item name="IMEINumber">
|
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
|
||||||
<DropDowns
|
<Form.Item name="IMEINumber">
|
||||||
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
<DropDowns
|
||||||
(item) => item.IMEI1 !== '' || item.IMEI2 !== ''
|
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
||||||
)?.map((option) => {
|
(item) => item.IMEI1 !== '' || item.IMEI2 !== ''
|
||||||
const imei1 = option.IMEI1 || '';
|
)?.map((option) => {
|
||||||
const imei2 = option.IMEI2 || '';
|
const imei1 = option.IMEI1 || '';
|
||||||
const valueLabel = [imei1, imei2]
|
const imei2 = option.IMEI2 || '';
|
||||||
?.filter(Boolean)
|
const valueLabel = [imei1, imei2]
|
||||||
?.join(',');
|
?.filter(Boolean)
|
||||||
const normalizedValueLabel = valueLabel?.trim();
|
?.join(',');
|
||||||
return {
|
const normalizedValueLabel = valueLabel?.trim();
|
||||||
value: valueLabel,
|
return {
|
||||||
label: valueLabel,
|
value: valueLabel,
|
||||||
disabled:
|
label: valueLabel,
|
||||||
IMEINumberList?.includes(normalizedValueLabel),
|
disabled:
|
||||||
};
|
IMEINumberList?.includes(normalizedValueLabel),
|
||||||
})}
|
};
|
||||||
label={'IMEI Number'}
|
})}
|
||||||
className="field-DropDown"
|
label={'IMEI Number'}
|
||||||
onChangeFunction={(e) => IMEINumberOnchange(e)}
|
className="field-DropDown"
|
||||||
/>
|
onChangeFunction={(e) => IMEINumberOnchange(e)}
|
||||||
</Form.Item>
|
/>
|
||||||
|
</Form.Item>}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="IMEINumbertext"
|
name="IMEINumbertext"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
validator: async (_, value) => {
|
validator: async (_, value) => {
|
||||||
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();
|
return Promise.resolve();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -335,9 +364,13 @@ const BSImeiDetails = (props) => {
|
||||||
label="IMEI Number"
|
label="IMEI Number"
|
||||||
fieldState={true}
|
fieldState={true}
|
||||||
fieldApi={true}
|
fieldApi={true}
|
||||||
// id="error2"
|
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
// OnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
type="number"
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (['e', 'E', '+', '-', '.'].includes(e.key)) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Buttons
|
<Buttons
|
||||||
|
|
@ -363,7 +396,24 @@ const BSImeiDetails = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<div style={{ display: "flex", marginTop: "10px" }}>
|
||||||
|
<Form.Item name="description">
|
||||||
|
<TextAreaInput
|
||||||
|
disabled={
|
||||||
|
(IMEINumberList?.length === 0) &&
|
||||||
|
(SerialNumberList?.length === 0)
|
||||||
|
}
|
||||||
|
autoComplete="off"
|
||||||
|
label={<label>Description..</label>}
|
||||||
|
defaultValue=""
|
||||||
|
isOnChange={true}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|
||||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
<Buttons
|
<Buttons
|
||||||
buttonText="Submit"
|
buttonText="Submit"
|
||||||
|
|
@ -372,11 +422,11 @@ const BSImeiDetails = (props) => {
|
||||||
icon={<ArrowRightOutlined />}
|
icon={<ArrowRightOutlined />}
|
||||||
></Buttons>
|
></Buttons>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div >
|
||||||
}
|
}
|
||||||
handleCancel={CloseDeviceDetailModal}
|
handleCancel={CloseDeviceDetailModal}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default BSImeiDetails;
|
export default BSImeiDetails;
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,9 @@ const ComboSalesBillTable = () => {
|
||||||
const removeProducts = useRemoveProducts();
|
const removeProducts = useRemoveProducts();
|
||||||
const applyOffer = useApplyOfferto_CardDetail();
|
const applyOffer = useApplyOfferto_CardDetail();
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
|
const UomPrint = preferenceDatas?.[0]?.SettingDtlDetails?.filter(
|
||||||
|
(i) => i.SettingIdName === 'PrintUom'
|
||||||
|
)?.[0];
|
||||||
const preferenceDetails = preferenceDatas?.[0]?.SettingDtlDetails;
|
const preferenceDetails = preferenceDatas?.[0]?.SettingDtlDetails;
|
||||||
const preferenceOffer =
|
const preferenceOffer =
|
||||||
preferenceDetails?.find((item) => item.SettingIdName === 'Offer')
|
preferenceDetails?.find((item) => item.SettingIdName === 'Offer')
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,11 @@ const StandardTable = () => {
|
||||||
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
||||||
setting?.SettingValue === 'Y'
|
setting?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
const imeiModal = preferenceDatas?.[0]?.SettingDtlDetails?.some(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'imeidetails' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const BranchId = SessionData?.BranchId;
|
const BranchId = SessionData?.BranchId;
|
||||||
const AppId = SessionData?.AppId;
|
const AppId = SessionData?.AppId;
|
||||||
|
|
@ -3181,8 +3186,8 @@ const StandardTable = () => {
|
||||||
"'Inter', ui-sans-serif, system-ui, sans-serif",
|
"'Inter', ui-sans-serif, system-ui, sans-serif",
|
||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
item.FullProductIdentifierDtls?.length > 0 ||
|
(item.FullProductIdentifierDtls?.length > 0 ||
|
||||||
item.ProductIdentifierDtls?.length > 0
|
item.ProductIdentifierDtls?.length > 0 || imeiModal)
|
||||||
? handleImeiDetails(item)
|
? handleImeiDetails(item)
|
||||||
: editField && handleEditQuantity(item)
|
: editField && handleEditQuantity(item)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ const PrintA5Style11 = ({
|
||||||
printDatas,
|
printDatas,
|
||||||
sportsAppPreference,
|
sportsAppPreference,
|
||||||
MembershipApplied = null,
|
MembershipApplied = null,
|
||||||
|
SalesModePref,
|
||||||
}) => {
|
}) => {
|
||||||
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
|
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
|
||||||
const GlobalSignature = useSelector(GlobalprintSignature);
|
const GlobalSignature = useSelector(GlobalprintSignature);
|
||||||
|
|
@ -427,6 +428,8 @@ const PrintA5Style11 = ({
|
||||||
table2Data?.OrderId,
|
table2Data?.OrderId,
|
||||||
table2Data?.FYStatus
|
table2Data?.FYStatus
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{GlobaldummyData && '685'}
|
{GlobaldummyData && '685'}
|
||||||
</div>
|
</div>
|
||||||
<div style={{ textAlign: 'center', width: '24vw' }}>
|
<div style={{ textAlign: 'center', width: '24vw' }}>
|
||||||
|
|
@ -446,10 +449,16 @@ const PrintA5Style11 = ({
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
padding: '0rem 1rem',
|
padding: '0rem 1rem',
|
||||||
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
|
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
|
||||||
|
flexDirection: 'column',
|
||||||
|
textAlign:'left'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
<div>{Date1}</div>{' '}
|
<div>{Date1}</div>{' '}
|
||||||
|
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -691,88 +700,71 @@ const PrintA5Style11 = ({
|
||||||
{chunkIndex * chunkSize + index + 1}
|
{chunkIndex * chunkSize + index + 1}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData ? (
|
||||||
? GlobalItem && <td>{item?.name}</td>
|
GlobalItem && <td>{item?.name}</td>
|
||||||
: Item == true && (
|
) : (
|
||||||
|
Item && (
|
||||||
<td
|
<td
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
flexDirection: 'column',
|
flexDirection: "column",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
|
|
||||||
{PackageDetails?.filter(
|
{PackageDetails?.filter(
|
||||||
(pkg) =>
|
(pkg) => pkg.ProdId === item.ProdId
|
||||||
pkg.ProdId === item.ProdId
|
|
||||||
).length > 0 ? (
|
).length > 0 ? (
|
||||||
<div>
|
<div>
|
||||||
{PackageDetails?.filter(
|
{PackageDetails
|
||||||
(pkg) =>
|
?.filter((pkg) => pkg.ProdId === item.ProdId)
|
||||||
pkg.ProdId === item.ProdId
|
?.map((pkg, index) => (
|
||||||
)?.map((item, index) => (
|
<span key={index} style={{ display: "block" }}>
|
||||||
<span
|
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||||
key={index}
|
</span>
|
||||||
style={{ display: 'block' }}
|
))}
|
||||||
>
|
|
||||||
{item.ParcelCount} PCS{' '}
|
|
||||||
{item.ParcelQty} PACK (
|
|
||||||
{item.ParcelType})
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
({item?.Size ? item?.Size : '1'}{' '}
|
({item?.Size || "1"}{" "}
|
||||||
{item?.SinglePc == 'Y'
|
{item?.SinglePc === "Y"
|
||||||
? 'PCS'
|
? "PCS"
|
||||||
: item?.Type != 'C'
|
: item?.Type !== "C"
|
||||||
? item?.UomName
|
? item?.UomName
|
||||||
: 'COMBO'}
|
: "COMBO"}
|
||||||
)
|
)
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{' '}
|
|
||||||
{item?.BrandName !== null
|
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||||
? item?.BrandName
|
|
||||||
: ''}
|
{/* Identifiers */}
|
||||||
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
{item?.ProductIdentifierDtls
|
? item.ProductIdentifierDtls.map((id, index) => (
|
||||||
?.length > 0
|
<div key={index}>
|
||||||
? item?.ProductIdentifierDtls?.filter(
|
|
||||||
(items) =>
|
{/* Serial */}
|
||||||
!(
|
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||||
items.SerialNumber ==
|
|
||||||
'' ||
|
{/* IMEI */}
|
||||||
items.SerialNumber == null
|
{(id?.IMEI1 || id?.IMEI2) && (
|
||||||
)
|
<div>
|
||||||
)?.map((a) => {
|
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||||
return (
|
</div>
|
||||||
<div>{a.SerialNumber}</div>
|
)}
|
||||||
);
|
|
||||||
})
|
{/* Description */}
|
||||||
: ''}{' '}
|
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
|
||||||
{item?.ProductIdentifierDtls
|
id?.Description && (
|
||||||
?.length > 0
|
<div>{id.Description}</div>
|
||||||
? item?.ProductIdentifierDtls.filter(
|
)}
|
||||||
(item1) =>
|
|
||||||
item1.IMEI1 !== '' ||
|
</div>
|
||||||
item1.IMEI2 !== ''
|
))
|
||||||
)?.map((item2) => {
|
: null}
|
||||||
const imei1 =
|
|
||||||
item2.IMEI1 || '';
|
|
||||||
const imei2 =
|
|
||||||
item2.IMEI2 || '';
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{[imei1, imei2]
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(',')}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: ''}
|
|
||||||
</td>
|
</td>
|
||||||
)}
|
)
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalHsnCode && (
|
? GlobalHsnCode && (
|
||||||
<td style={{ textAlign: 'center' }}>
|
<td style={{ textAlign: 'center' }}>
|
||||||
|
|
@ -1694,67 +1686,54 @@ const PrintA5Style11 = ({
|
||||||
{chunkIndex * chunkSize + index + 1}
|
{chunkIndex * chunkSize + index + 1}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData ? (
|
||||||
? GlobalItem && <td>{item?.ProdName}</td>
|
GlobalItem && <td>{item?.ProdName}</td>
|
||||||
: Item == true && (
|
) : (
|
||||||
|
Item && (
|
||||||
<td
|
<td
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
flexDirection: 'column',
|
flexDirection: "column",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div>{item?.ProdName}</div>
|
<div>{item?.ProdName}</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
({item?.Size ? item?.Size : '1'}{' '}
|
({item?.Size || "1"}{" "}
|
||||||
{item?.SinglePc == 'Y'
|
{item?.SinglePc === "Y"
|
||||||
? 'PCS'
|
? "PCS"
|
||||||
: item?.Type != 'C'
|
: item?.Type !== "C"
|
||||||
? item?.UomName
|
? item?.UomName
|
||||||
: 'COMBO'}
|
: "COMBO"}
|
||||||
)
|
)
|
||||||
</div>
|
</div>
|
||||||
{' '}
|
|
||||||
{item?.BrandName !== null
|
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||||
? item?.BrandName
|
|
||||||
: ''}
|
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||||
|
<div key={index}>
|
||||||
{item?.ProductIdentifierDtls
|
|
||||||
?.length > 0
|
{/* Serial Number */}
|
||||||
? item?.ProductIdentifierDtls?.filter(
|
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||||
(items) =>
|
|
||||||
!(
|
{/* IMEI */}
|
||||||
items.SerialNumber ==
|
{(id?.IMEI1 || id?.IMEI2) && (
|
||||||
'' ||
|
|
||||||
items.SerialNumber == null
|
|
||||||
)
|
|
||||||
)?.map((a) => {
|
|
||||||
return (
|
|
||||||
<div>{a.SerialNumber}</div>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: ''}{' '}
|
|
||||||
{item?.ProductIdentifierDtls
|
|
||||||
?.length > 0
|
|
||||||
? item?.ProductIdentifierDtls.filter(
|
|
||||||
(item1) =>
|
|
||||||
item1.IMEI1 !== '' ||
|
|
||||||
item1.IMEI2 !== ''
|
|
||||||
)?.map((item2) => {
|
|
||||||
const imei1 =
|
|
||||||
item2.IMEI1 || '';
|
|
||||||
const imei2 =
|
|
||||||
item2.IMEI2 || '';
|
|
||||||
return (
|
|
||||||
<div>
|
<div>
|
||||||
{[imei1, imei2]
|
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||||
.filter(Boolean)
|
|
||||||
.join(',')}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
)}
|
||||||
})
|
|
||||||
: ''}
|
{/* Description */}
|
||||||
|
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
|
||||||
|
id?.Description && (
|
||||||
|
<div>{id.Description}</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalHsnCode && (
|
? GlobalHsnCode && (
|
||||||
<td style={{ textAlign: 'center' }}>
|
<td style={{ textAlign: 'center' }}>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ const TaxInvoice = ({
|
||||||
ReprintType,
|
ReprintType,
|
||||||
printDatas,
|
printDatas,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
const GlobaldummyData = useSelector(GlobalPritdummyData);
|
const GlobaldummyData = useSelector(GlobalPritdummyData);
|
||||||
const SettingData = useSelector(PreferenceData);
|
const SettingData = useSelector(PreferenceData);
|
||||||
const estimatePrintHeader =
|
const estimatePrintHeader =
|
||||||
|
|
@ -833,27 +834,25 @@ const TaxInvoice = ({
|
||||||
{item.BrandName}{' '}
|
{item.BrandName}{' '}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
<div>
|
||||||
? item?.ProductIdentifierDtls.filter(
|
{item?.ProductIdentifierDtls?.map((id, i) => (
|
||||||
(items) =>
|
<div key={i}>
|
||||||
items.SerialNumber && items.SerialNumber !== ''
|
<div style={{ display: "flex", gap: "5px", flexWrap: "wrap" }}>
|
||||||
)?.map((a, i) => (
|
{id?.SerialNumber && <span>{id.SerialNumber}</span>}
|
||||||
<div key={i}>{a.SerialNumber}</div>
|
{(id?.IMEI1 || id?.IMEI2) && (
|
||||||
))
|
<span>{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}</span>
|
||||||
: ''}
|
)}
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
|
||||||
? item?.ProductIdentifierDtls.filter(
|
|
||||||
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
|
||||||
)?.map((id, i) => {
|
|
||||||
const imei1 = id.IMEI1 || '';
|
|
||||||
const imei2 = id.IMEI2 || '';
|
|
||||||
return (
|
|
||||||
<div key={i}>
|
|
||||||
{[imei1, imei2].filter(Boolean).join(',')}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
|
||||||
})
|
{id?.Description && (
|
||||||
: ''}
|
<div style={{ marginTop: "3px", wordBreak: "break-word" }}>
|
||||||
|
{id.Description}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
|
||||||
|
|
@ -469,8 +469,8 @@ const Printstyle2 = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Estimate Bill{' '}
|
Estimate Bill{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{table2Data?.OrderType === 'E' ? (
|
{table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -493,8 +493,8 @@ const Printstyle2 = ({
|
||||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
||||||
: ''}{' '}
|
: ''}{' '}
|
||||||
Bill{' '}
|
Bill{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -513,7 +513,13 @@ const Printstyle2 = ({
|
||||||
</div>
|
</div>
|
||||||
<div style={{ fontWeight: '600', fontSize: '10px' }}>
|
<div style={{ fontWeight: '600', fontSize: '10px' }}>
|
||||||
{GlobaldummyData ? formattedDate : Date1}
|
{GlobaldummyData ? formattedDate : Date1}
|
||||||
|
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
|
||||||
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<hr className="PrintStyle2-print-dottline" />
|
<hr className="PrintStyle2-print-dottline" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -726,38 +732,50 @@ const Printstyle2 = ({
|
||||||
? item?.BrandName
|
? item?.BrandName
|
||||||
: ''}
|
: ''}
|
||||||
|
|
||||||
{item?.ProductIdentifierDtls?.length >
|
<div style={{ display: "flex", gap: "3px" ,flexDirection:"column"}}>
|
||||||
0
|
{item?.ProductIdentifierDtls?.length >
|
||||||
? item?.ProductIdentifierDtls?.filter(
|
0
|
||||||
(items) =>
|
? item?.ProductIdentifierDtls?.filter(
|
||||||
!(
|
(items) =>
|
||||||
items.SerialNumber == '' ||
|
!(
|
||||||
items.SerialNumber == null
|
items.SerialNumber == '' ||
|
||||||
)
|
items.SerialNumber == null
|
||||||
)?.map((a) => {
|
)
|
||||||
return (
|
)?.map((a) => {
|
||||||
<div>{a.SerialNumber}</div>
|
return (
|
||||||
);
|
<div>{a.SerialNumber}</div>
|
||||||
})
|
);
|
||||||
: ''}{' '}
|
})
|
||||||
{item?.ProductIdentifierDtls?.length >
|
: ''}{' '}
|
||||||
0
|
{item?.ProductIdentifierDtls?.length >
|
||||||
? item?.ProductIdentifierDtls.filter(
|
0
|
||||||
(item1) =>
|
? item?.ProductIdentifierDtls.filter(
|
||||||
item1.IMEI1 !== '' ||
|
(item1) =>
|
||||||
item1.IMEI2 !== ''
|
item1.IMEI1 !== '' ||
|
||||||
)?.map((item2) => {
|
item1.IMEI2 !== ''
|
||||||
const imei1 = item2.IMEI1 || '';
|
)?.map((item2) => {
|
||||||
const imei2 = item2.IMEI2 || '';
|
const imei1 = item2.IMEI1 || '';
|
||||||
return (
|
const imei2 = item2.IMEI2 || '';
|
||||||
<div>
|
return (
|
||||||
{[imei1, imei2]
|
<div>
|
||||||
.filter(Boolean)
|
{[imei1, imei2]
|
||||||
.join(',')}
|
.filter(Boolean)
|
||||||
</div>
|
.join(',')}
|
||||||
);
|
</div>
|
||||||
})
|
);
|
||||||
: ''}
|
})
|
||||||
|
: ''}
|
||||||
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
|
? item?.ProductIdentifierDtls.filter(
|
||||||
|
(items) =>
|
||||||
|
items.SerialNumber || items.IMEI1 || items.IMEI2
|
||||||
|
)?.map((a, i) => (
|
||||||
|
<div key={i}>{a.Description}</div>
|
||||||
|
))
|
||||||
|
|
||||||
|
: ''}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
@ -3098,8 +3116,8 @@ const Printstyle2 = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Estimate Bill{' '}
|
Estimate Bill{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{table2Data?.OrderType === 'E' ? (
|
{table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -3123,8 +3141,8 @@ const Printstyle2 = ({
|
||||||
: PaymentStatusSuccess?.length === 1
|
: PaymentStatusSuccess?.length === 1
|
||||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||||
: ''}{' '}
|
: ''}{' '}
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}{' '} */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -3314,34 +3332,41 @@ const Printstyle2 = ({
|
||||||
? item?.BrandName
|
? item?.BrandName
|
||||||
: ''}
|
: ''}
|
||||||
|
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
<div style={{ display: 'flex', gap: "3px",flexDirection:"column" }}>
|
||||||
? item?.ProductIdentifierDtls?.filter(
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
(items) =>
|
? item?.ProductIdentifierDtls.filter(
|
||||||
!(
|
(items) =>
|
||||||
items.SerialNumber == '' ||
|
items.SerialNumber &&
|
||||||
items.SerialNumber == null
|
items.SerialNumber !== ''
|
||||||
)
|
).map((a, i) => (
|
||||||
)?.map((a) => {
|
<div key={i}>{a.SerialNumber}</div>
|
||||||
return <div>{a.SerialNumber}</div>;
|
))
|
||||||
})
|
: ''}
|
||||||
: ''}{' '}
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
? item?.ProductIdentifierDtls.filter(
|
||||||
? item?.ProductIdentifierDtls.filter(
|
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
||||||
(item1) =>
|
).map((id, i) => {
|
||||||
item1.IMEI1 !== '' ||
|
const imei1 = id.IMEI1 || '';
|
||||||
item1.IMEI2 !== ''
|
const imei2 = id.IMEI2 || '';
|
||||||
)?.map((item2) => {
|
return (
|
||||||
const imei1 = item2.IMEI1 || '';
|
<div key={i}>
|
||||||
const imei2 = item2.IMEI2 || '';
|
{[imei1, imei2]
|
||||||
return (
|
.filter(Boolean)
|
||||||
<div>
|
.join(',')}
|
||||||
{[imei1, imei2]
|
</div>
|
||||||
.filter(Boolean)
|
);
|
||||||
.join(',')}
|
})
|
||||||
</div>
|
: ''}
|
||||||
);
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
})
|
? item?.ProductIdentifierDtls.filter(
|
||||||
: ''}
|
(items) =>
|
||||||
|
items.SerialNumber || items.IMEI1 || items.IMEI2
|
||||||
|
)?.map((a, i) => (
|
||||||
|
<div key={i}>{a.Description}</div>
|
||||||
|
))
|
||||||
|
|
||||||
|
: ''}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -231,18 +231,28 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
||||||
|
|
||||||
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
|
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
|
||||||
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
|
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
|
||||||
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||||
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} </div>}
|
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
|
</div>}
|
||||||
|
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}
|
||||||
|
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>)}
|
</div>)}
|
||||||
|
|
||||||
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", textAlign: 'center', padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", textAlign: 'center', padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||||
|
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
|
</div>}
|
||||||
|
|
||||||
<hr className="PrintStyle3-print-dottline" />
|
<hr className="PrintStyle3-print-dottline" />
|
||||||
<div className="PrintStyle3-print-ordr-dtls">
|
<div className="PrintStyle3-print-ordr-dtls">
|
||||||
<div style={{ lineheight: '50px' }}>
|
<div style={{ lineheight: '50px' }}>
|
||||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
|
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
|
||||||
|
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
</div>}
|
||||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
|
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -292,14 +302,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
||||||
)
|
)
|
||||||
</div>)}
|
</div>)}
|
||||||
{item?.BrandName !== null ? item?.BrandName : ""}
|
{item?.BrandName !== null ? item?.BrandName : ""}
|
||||||
{item?.ProductIdentifierDtls?.length > 0 ? (item?.ProductIdentifierDtls?.filter((items) => !(items.SerialNumber == "" || items.SerialNumber == null))
|
<div style={{ display: 'flex', gap: "3px",flexDirection:"column"}}>
|
||||||
?.map(a => { return (<div>{a.SerialNumber}</div>) })) : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter((item1) => item1.IMEI1 !== "" || item1.IMEI2 !== "")
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
?.map(item2 => {
|
? item?.ProductIdentifierDtls.filter(
|
||||||
const imei1 = item2.IMEI1 || "";
|
(items) =>
|
||||||
const imei2 = item2.IMEI2 || "";
|
items.SerialNumber &&
|
||||||
return (<div>{[imei1, imei2].filter(Boolean).join(",")}</div>);
|
items.SerialNumber !== ''
|
||||||
}
|
).map((a, i) => (
|
||||||
) : ""}
|
<div key={i}>{a.SerialNumber}</div>
|
||||||
|
))
|
||||||
|
: ''}
|
||||||
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
|
? item?.ProductIdentifierDtls.filter(
|
||||||
|
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
||||||
|
).map((id, i) => {
|
||||||
|
const imei1 = id.IMEI1 || '';
|
||||||
|
const imei2 = id.IMEI2 || '';
|
||||||
|
return (
|
||||||
|
<div key={i}>
|
||||||
|
{[imei1, imei2]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(',')}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
: ''}
|
||||||
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
|
? item?.ProductIdentifierDtls.filter(
|
||||||
|
(items) =>
|
||||||
|
items.SerialNumber || items.IMEI1 || items.IMEI2
|
||||||
|
)?.map((a, i) => (
|
||||||
|
<div key={i}>{a.Description} </div>
|
||||||
|
))
|
||||||
|
|
||||||
|
: ''}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
|
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
|
||||||
|
|
@ -1158,16 +1195,27 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
||||||
|
|
||||||
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
|
{table2Data?.BrGSTIN && <div>GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},</div>}
|
||||||
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
|
<div style={{ fontWeight: '600' }}> Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}</div>
|
||||||
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
{table2Data?.OrderType === "E" && estimateTitle && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||||
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
|
</div>}
|
||||||
|
{table2Data?.OrderType === "E" ? "" : <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""}
|
||||||
|
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
</div>)}
|
</div>)}
|
||||||
|
|
||||||
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}</div>}
|
{(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) && <div style={{ fontSize: "14px", margin: "2px 0 0 0", padding: 0, fontWeight: 600 }}>Estimate Bill
|
||||||
|
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
||||||
|
</div>}
|
||||||
<hr className="PrintStyle3-print-dottline" />
|
<hr className="PrintStyle3-print-dottline" />
|
||||||
<div className="PrintStyle3-print-ordr-dtls">
|
<div className="PrintStyle3-print-ordr-dtls">
|
||||||
<div style={{ lineheight: '50px' }}>
|
<div style={{ lineheight: '50px' }}>
|
||||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
|
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
|
||||||
|
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
|
||||||
|
</div>}
|
||||||
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
|
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1213,14 +1261,41 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
|
||||||
)
|
)
|
||||||
</div>)}
|
</div>)}
|
||||||
{item?.BrandName !== null ? item?.BrandName : ""}
|
{item?.BrandName !== null ? item?.BrandName : ""}
|
||||||
{item?.ProductIdentifierDtls?.length > 0 ? (item?.ProductIdentifierDtls?.filter((items) => !(items.SerialNumber == "" || items.SerialNumber == null))
|
<div style={{ display: 'flex', gap: "3px",flexDirection:"column" }}>
|
||||||
?.map(a => { return (<div>{a.SerialNumber}</div>) })) : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter((item1) => item1.IMEI1 !== "" || item1.IMEI2 !== "")
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
?.map(item2 => {
|
? item?.ProductIdentifierDtls.filter(
|
||||||
const imei1 = item2.IMEI1 || "";
|
(items) =>
|
||||||
const imei2 = item2.IMEI2 || "";
|
items.SerialNumber &&
|
||||||
return (<div>{[imei1, imei2].filter(Boolean).join(",")}</div>);
|
items.SerialNumber !== ''
|
||||||
}
|
).map((a, i) => (
|
||||||
) : ""}
|
<div key={i}>{a.SerialNumber}</div>
|
||||||
|
))
|
||||||
|
: ''}
|
||||||
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
|
? item?.ProductIdentifierDtls.filter(
|
||||||
|
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
||||||
|
).map((id, i) => {
|
||||||
|
const imei1 = id.IMEI1 || '';
|
||||||
|
const imei2 = id.IMEI2 || '';
|
||||||
|
return (
|
||||||
|
<div key={i}>
|
||||||
|
{[imei1, imei2]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(',')}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
: ''}
|
||||||
|
{item?.ProductIdentifierDtls?.length > 0
|
||||||
|
? item?.ProductIdentifierDtls.filter(
|
||||||
|
(items) =>
|
||||||
|
items.SerialNumber || items.IMEI1 || items.IMEI2
|
||||||
|
)?.map((a, i) => (
|
||||||
|
<span key={i}>{a.Description}</span>
|
||||||
|
))
|
||||||
|
|
||||||
|
: ''}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
|
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ const PreferenceList = () => {
|
||||||
],
|
],
|
||||||
scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
|
scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
|
||||||
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
|
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
|
||||||
|
imeidetails:allSettingsMap['imeidetails']?.value === 'Y',
|
||||||
customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y',
|
customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y',
|
||||||
upiqr: allSettingsMap['upiqr']?.value === 'Y',
|
upiqr: allSettingsMap['upiqr']?.value === 'Y',
|
||||||
lowstockreport: allSettingsMap['lowstockreport']?.value === 'Y',
|
lowstockreport: allSettingsMap['lowstockreport']?.value === 'Y',
|
||||||
|
|
@ -322,6 +323,7 @@ const PreferenceList = () => {
|
||||||
mobilea4: values.mobilea4,
|
mobilea4: values.mobilea4,
|
||||||
scanlayout: values.scanlayout,
|
scanlayout: values.scanlayout,
|
||||||
verifyproduct: values.verifyproduct,
|
verifyproduct: values.verifyproduct,
|
||||||
|
imeidetails:values.imeidetails,
|
||||||
customisedbillnumber: values.customisedbillnumber,
|
customisedbillnumber: values.customisedbillnumber,
|
||||||
upiqr: values.upiqr,
|
upiqr: values.upiqr,
|
||||||
lowstockreport: values.lowstockreport,
|
lowstockreport: values.lowstockreport,
|
||||||
|
|
@ -714,6 +716,10 @@ const PreferenceList = () => {
|
||||||
'verifyproduct',
|
'verifyproduct',
|
||||||
'Do you Want Verify the Product?'
|
'Do you Want Verify the Product?'
|
||||||
)}
|
)}
|
||||||
|
{renderCheckbox(
|
||||||
|
'imeidetails',
|
||||||
|
'Do you want to open the IMEI model without IMEI details?'
|
||||||
|
)}
|
||||||
{renderCheckbox(
|
{renderCheckbox(
|
||||||
'customisedbillnumber',
|
'customisedbillnumber',
|
||||||
'Do you Want Customised Bill Number?'
|
'Do you Want Customised Bill Number?'
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ const PaymentPdfBooking = ({
|
||||||
const [BranchZip, setBranchZip] = useState();
|
const [BranchZip, setBranchZip] = useState();
|
||||||
const CashierName = getSession('userName');
|
const CashierName = getSession('userName');
|
||||||
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
|
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
|
||||||
console.log(printerTemplateStyle, 'printerTemplateStyle');
|
console.log(printerTemplateStyle, "printerTemplateStyle")
|
||||||
const appPreferences = useSelector(ApplicationPreferences);
|
const appPreferences = useSelector(ApplicationPreferences);
|
||||||
const SettingData = useSelector(PreferenceData);
|
const SettingData = useSelector(PreferenceData);
|
||||||
const estimatePrintHeader =
|
const estimatePrintHeader =
|
||||||
|
|
@ -423,7 +423,7 @@ const PaymentPdfBooking = ({
|
||||||
>
|
>
|
||||||
Estimate
|
Estimate
|
||||||
</p>
|
</p>
|
||||||
<p
|
{/* <p
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
|
|
@ -435,7 +435,7 @@ const PaymentPdfBooking = ({
|
||||||
>
|
>
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||||
</p>
|
</p> */}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
|
|
@ -457,7 +457,7 @@ const PaymentPdfBooking = ({
|
||||||
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
||||||
: 'Bill'}
|
: 'Bill'}
|
||||||
</p>
|
</p>
|
||||||
<p
|
{/* <p
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
|
|
@ -469,7 +469,7 @@ const PaymentPdfBooking = ({
|
||||||
>
|
>
|
||||||
{SalesModePref?.SettingValue == 'Y' &&
|
{SalesModePref?.SettingValue == 'Y' &&
|
||||||
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
|
||||||
</p>
|
</p> */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -483,6 +483,11 @@ const PaymentPdfBooking = ({
|
||||||
table2Data?.FYStatus
|
table2Data?.FYStatus
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{SalesModePref?.SettingValue == 'Y' &&
|
||||||
|
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
||||||
|
{' '}
|
||||||
|
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||||
|
</div>}
|
||||||
<div className="Re-print-bold1">Date:{Date1}</div>
|
<div className="Re-print-bold1">Date:{Date1}</div>
|
||||||
</div>
|
</div>
|
||||||
{TakeawayData?.length > 0 && (
|
{TakeawayData?.length > 0 && (
|
||||||
|
|
@ -529,92 +534,53 @@ const PaymentPdfBooking = ({
|
||||||
<td className="Re-print-body-Product">
|
<td className="Re-print-body-Product">
|
||||||
{item?.ProdName}
|
{item?.ProdName}
|
||||||
|
|
||||||
{PackageDetails?.filter(
|
{/* Package Details */}
|
||||||
(pkg) => pkg.ProdId === item.ProdId
|
{PackageDetails?.filter(pkg => pkg.ProdId === item.ProdId).length > 0 && (
|
||||||
).length > 0 ? (
|
|
||||||
<div>
|
<div>
|
||||||
{PackageDetails?.filter(
|
{PackageDetails
|
||||||
(pkg) => pkg.ProdId === item.ProdId
|
?.filter(pkg => pkg.ProdId === item.ProdId)
|
||||||
)?.map((pkg, index) => (
|
?.map((pkg, index) => (
|
||||||
<span key={index} style={{ display: 'block' }}>
|
<span key={index} style={{ display: "block" }}>
|
||||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK (
|
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||||
{pkg.ParcelType})
|
</span>
|
||||||
</span>
|
))}
|
||||||
))}
|
|
||||||
<span>
|
|
||||||
(
|
|
||||||
{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) => (
|
|
||||||
<div key={i}>{a.SerialNumber}</div>
|
|
||||||
))
|
|
||||||
: ''}
|
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
|
||||||
? item?.ProductIdentifierDtls.filter(
|
|
||||||
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
|
||||||
).map((id, i) => {
|
|
||||||
const imei1 = id.IMEI1 || '';
|
|
||||||
const imei2 = id.IMEI2 || '';
|
|
||||||
return (
|
|
||||||
<div key={i}>
|
|
||||||
{[imei1, imei2]
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(',')}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: ''}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<span>
|
|
||||||
({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) => (
|
|
||||||
<div key={i}>{a.SerialNumber}</div>
|
|
||||||
))
|
|
||||||
: ''}
|
|
||||||
{item?.ProductIdentifierDtls?.length > 0
|
|
||||||
? item?.ProductIdentifierDtls.filter(
|
|
||||||
(id) => id.IMEI1 !== '' || id.IMEI2 !== ''
|
|
||||||
).map((id, i) => {
|
|
||||||
const imei1 = id.IMEI1 || '';
|
|
||||||
const imei2 = id.IMEI2 || '';
|
|
||||||
return (
|
|
||||||
<div key={i}>
|
|
||||||
{[imei1, imei2].filter(Boolean).join(',')}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: ''}
|
|
||||||
</span>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Size, UOM, Brand */}
|
||||||
|
<div>
|
||||||
|
({item?.Size ?? '1'}{" "}
|
||||||
|
{item?.SinglePc === 'Y' ? "PCS" : item?.Type !== 'C' ? item?.UomName : "COMBO"}
|
||||||
|
) {item?.BrandName || ""}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 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 (
|
||||||
|
<div key={index} style={{ display: "flex", flexDirection: "column", gap: "2px" }}>
|
||||||
|
{/* Serial + IMEIs */}
|
||||||
|
{(serial || imeis) && (
|
||||||
|
<div style={{ display: "flex", gap: "3px" }}>
|
||||||
|
{serial && <div>{serial}</div>}
|
||||||
|
{imeis && <div>{imeis}</div>}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Description */}
|
||||||
|
{description && <div>{description}</div>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
|
||||||
|
{/* Available Time */}
|
||||||
{sportsAppPreference &&
|
{sportsAppPreference &&
|
||||||
`(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
|
`(${to12Hour(item?.AvailableFrom)} - ${to12Hour(item?.AvailableTo)})`}
|
||||||
</td>
|
</td>
|
||||||
<td className="Re-print-body-Rate">{item?.SalesQty}</td>
|
<td className="Re-print-body-Rate">{item?.SalesQty}</td>
|
||||||
<td className="Re-print-body-Rate">{item?.Rate}</td>
|
<td className="Re-print-body-Rate">{item?.Rate}</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue