Merge pull request 'others add bugfixing' (#171) from bugfixing into main
Reviewed-on: Pozomind/pozo-retail-app#171
This commit is contained in:
commit
5b2720a7cd
|
|
@ -1176,6 +1176,7 @@ const BSBillingTable3 = () => {
|
||||||
CompleteRemove: true,
|
CompleteRemove: true,
|
||||||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
|
OrderRate: isPaidproduct?.OrderRate,
|
||||||
Offer: 0,
|
Offer: 0,
|
||||||
});
|
});
|
||||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||||
|
|
@ -1350,6 +1351,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||||
|
|
@ -1429,6 +1431,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||||
|
|
@ -1462,6 +1465,8 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate,
|
||||||
|
|
||||||
});
|
});
|
||||||
await ChangeOfferAppliedProdsFn({
|
await ChangeOfferAppliedProdsFn({
|
||||||
inwardDtlId: item?.InwardDtlId,
|
inwardDtlId: item?.InwardDtlId,
|
||||||
|
|
@ -1493,6 +1498,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: 0,
|
Offer: 0,
|
||||||
|
OrderRate: isPaidProductAvailableInCart?.OrderRate,
|
||||||
});
|
});
|
||||||
} else if (
|
} else if (
|
||||||
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
||||||
|
|
@ -1576,6 +1582,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||||
|
|
@ -1602,6 +1609,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||||
|
|
@ -1649,7 +1657,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate: item?.OrderRate,
|
OrderRate: item?.OrderRate
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const isCheck = GlobalOfferAppliedProductsData?.find(
|
const isCheck = GlobalOfferAppliedProductsData?.find(
|
||||||
|
|
@ -1951,6 +1959,7 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: item?.InwardDtlId,
|
BuyInwardDtlId: item?.InwardDtlId,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
|
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
|
||||||
|
|
@ -1969,6 +1978,8 @@ const BSBillingTable3 = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: item?.InwardDtlId,
|
BuyInwardDtlId: item?.InwardDtlId,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
|
OrderRate: item?.OrderRate,
|
||||||
|
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: item?.OrderQty,
|
OverAllFreeQty: item?.OrderQty,
|
||||||
|
|
@ -2394,8 +2405,7 @@ const BSBillingTable3 = () => {
|
||||||
{OldtableDataTakeAway?.map((item, index) => (
|
{OldtableDataTakeAway?.map((item, index) => (
|
||||||
<tr
|
<tr
|
||||||
key={index}
|
key={index}
|
||||||
className={`${
|
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||||
item?.SalesId && OrderType !== 'Hold'
|
|
||||||
? 'BSBill-Table3-content-Disabled'
|
? 'BSBill-Table3-content-Disabled'
|
||||||
: 'BSBill-Table3-content'
|
: 'BSBill-Table3-content'
|
||||||
}
|
}
|
||||||
|
|
@ -2673,8 +2683,7 @@ const BSBillingTable3 = () => {
|
||||||
{OldtableDataDinein?.map((item, index) => (
|
{OldtableDataDinein?.map((item, index) => (
|
||||||
<tr
|
<tr
|
||||||
key={OldtableDataTakeAway?.length + index}
|
key={OldtableDataTakeAway?.length + index}
|
||||||
className={`${
|
className={`${item?.SalesId
|
||||||
item?.SalesId
|
|
||||||
? 'BSBill-Table3-content-Disabled'
|
? 'BSBill-Table3-content-Disabled'
|
||||||
: 'BSBill-Table3-content'
|
: 'BSBill-Table3-content'
|
||||||
}
|
}
|
||||||
|
|
@ -2956,8 +2965,7 @@ const BSBillingTable3 = () => {
|
||||||
OldtableDataTakeAway?.length +
|
OldtableDataTakeAway?.length +
|
||||||
index
|
index
|
||||||
}
|
}
|
||||||
className={`${
|
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||||
BookingType === 'Dine In' && item?.SalesId
|
|
||||||
? 'BSBill-Table3-content-Disabled'
|
? 'BSBill-Table3-content-Disabled'
|
||||||
: 'BSBill-Table3-content'
|
: 'BSBill-Table3-content'
|
||||||
}
|
}
|
||||||
|
|
@ -3282,8 +3290,7 @@ const BSBillingTable3 = () => {
|
||||||
tableDataTakeAway?.length +
|
tableDataTakeAway?.length +
|
||||||
index
|
index
|
||||||
}
|
}
|
||||||
className={`${
|
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||||
BookingType === 'Dine In' && item?.SalesId
|
|
||||||
? 'BSBill-Table3-content-Disabled'
|
? 'BSBill-Table3-content-Disabled'
|
||||||
: 'BSBill-Table3-content'
|
: 'BSBill-Table3-content'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -819,12 +819,15 @@ function BSCategoryHorizontal(props) {
|
||||||
postData['Size'] = values.Size;
|
postData['Size'] = values.Size;
|
||||||
postData['MRP'] = values.MRP;
|
postData['MRP'] = values.MRP;
|
||||||
postData['TaxId'] = values.TaxId;
|
postData['TaxId'] = values.TaxId;
|
||||||
|
postData['SinglePc'] = 'N';
|
||||||
if (EditState) {
|
if (EditState) {
|
||||||
const updatedData = {
|
const updatedData = {
|
||||||
...EditState,
|
...EditState,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
SellPrice: values.MRP,
|
SellPrice: values.MRP,
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
|
|
@ -838,6 +841,7 @@ function BSCategoryHorizontal(props) {
|
||||||
...othersdata,
|
...othersdata,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -674,12 +674,14 @@ function BSCategoryVertical(props) {
|
||||||
postData['Size'] = values.Size;
|
postData['Size'] = values.Size;
|
||||||
postData['MRP'] = values.MRP;
|
postData['MRP'] = values.MRP;
|
||||||
postData['TaxId'] = values.TaxId;
|
postData['TaxId'] = values.TaxId;
|
||||||
|
postData['SinglePc'] = 'N';
|
||||||
if (EditState) {
|
if (EditState) {
|
||||||
const updatedData = {
|
const updatedData = {
|
||||||
...EditState,
|
...EditState,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
SellPrice: values.MRP,
|
SellPrice: values.MRP,
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
setEditState();
|
setEditState();
|
||||||
|
|
@ -692,6 +694,7 @@ function BSCategoryVertical(props) {
|
||||||
...othersdata,
|
...othersdata,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -684,12 +684,14 @@ function BSOtherServicesHorizontalcat(props) {
|
||||||
postData['Size'] = values.Size;
|
postData['Size'] = values.Size;
|
||||||
postData['MRP'] = values.MRP;
|
postData['MRP'] = values.MRP;
|
||||||
postData['TaxId'] = values.TaxId;
|
postData['TaxId'] = values.TaxId;
|
||||||
|
postData['SinglePc'] = 'N';
|
||||||
if (EditState) {
|
if (EditState) {
|
||||||
const updatedData = {
|
const updatedData = {
|
||||||
...EditState,
|
...EditState,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
SellPrice: values.MRP,
|
SellPrice: values.MRP,
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
|
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
|
|
@ -703,6 +705,7 @@ function BSOtherServicesHorizontalcat(props) {
|
||||||
...othersdata,
|
...othersdata,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -585,12 +585,14 @@ function BSOtherServicesVerticalcat(props) {
|
||||||
postData['Size'] = values.Size;
|
postData['Size'] = values.Size;
|
||||||
postData['MRP'] = values.MRP;
|
postData['MRP'] = values.MRP;
|
||||||
postData['TaxId'] = values.TaxId;
|
postData['TaxId'] = values.TaxId;
|
||||||
|
postData['SinglePc'] = 'N';
|
||||||
if (EditState) {
|
if (EditState) {
|
||||||
const updatedData = {
|
const updatedData = {
|
||||||
...EditState,
|
...EditState,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
SellPrice: values.MRP,
|
SellPrice: values.MRP,
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
setEditState();
|
setEditState();
|
||||||
|
|
@ -603,6 +605,7 @@ function BSOtherServicesVerticalcat(props) {
|
||||||
...othersdata,
|
...othersdata,
|
||||||
Quantity: parseInt(values.Quantity),
|
Quantity: parseInt(values.Quantity),
|
||||||
OtherProduct: 'Others',
|
OtherProduct: 'Others',
|
||||||
|
SinglePc: 'N',
|
||||||
};
|
};
|
||||||
dispatch(changeothersdata(updatedData));
|
dispatch(changeothersdata(updatedData));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1296,9 +1296,10 @@ const BSItemCard = (props) => {
|
||||||
OtherProduct: otherscarddata?.OtherProduct,
|
OtherProduct: otherscarddata?.OtherProduct,
|
||||||
// 'ProdVariantName': otherscarddata?.ProdVariantName,
|
// 'ProdVariantName': otherscarddata?.ProdVariantName,
|
||||||
BookingTypeName: BookingType,
|
BookingTypeName: BookingType,
|
||||||
|
SinglePc: otherscarddata?.SinglePc,
|
||||||
CounterName: '', //sri
|
CounterName: '', //sri
|
||||||
};
|
};
|
||||||
AddOrderDetails(data);
|
AddOrderDetails(data,otherscarddata?.Quantity);
|
||||||
}
|
}
|
||||||
// data["OrderRate"] = otherscarddata?.SellPrice
|
// data["OrderRate"] = otherscarddata?.SellPrice
|
||||||
}, [otherscarddata]);
|
}, [otherscarddata]);
|
||||||
|
|
@ -2079,12 +2080,11 @@ const BSItemCard = (props) => {
|
||||||
return dateVal;
|
return dateVal;
|
||||||
};
|
};
|
||||||
|
|
||||||
const AddOrderDetails = async (item) => {
|
const AddOrderDetails = async (item,Qty=1) => {
|
||||||
|
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
if (overAllLimitPreferenece) {
|
if (overAllLimitPreferenece) {
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails);
|
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails);
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + Qty) > maxQtyLimit) {
|
||||||
setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
|
setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
setMessageType('warning');
|
setMessageType('warning');
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1365,6 +1365,7 @@ const BsBookingitemCard = (props) => {
|
||||||
OtherProduct: otherscarddata?.OtherProduct,
|
OtherProduct: otherscarddata?.OtherProduct,
|
||||||
// 'ProdVariantName': otherscarddata?.ProdVariantName,
|
// 'ProdVariantName': otherscarddata?.ProdVariantName,
|
||||||
BookingTypeName: BookingType,
|
BookingTypeName: BookingType,
|
||||||
|
SinglePc: otherscarddata?.SinglePc,
|
||||||
CounterName: '', //sri
|
CounterName: '', //sri
|
||||||
};
|
};
|
||||||
AddOrderDetails(data);
|
AddOrderDetails(data);
|
||||||
|
|
@ -6073,8 +6074,7 @@ const BsBookingitemCard = (props) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={idx}
|
key={idx}
|
||||||
className={`slotTimingSelect ${
|
className={`slotTimingSelect ${isBooked
|
||||||
isBooked
|
|
||||||
? 'booked'
|
? 'booked'
|
||||||
: isAlreadyAdded
|
: isAlreadyAdded
|
||||||
? 'incart'
|
? 'incart'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue