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