add singlePc field

This commit is contained in:
unknown 2026-02-24 17:18:55 +05:30
parent f1e8442872
commit 8124100aba
7 changed files with 614 additions and 593 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1296,6 +1296,7 @@ const BSItemCard = (props) => {
OtherProduct: otherscarddata?.OtherProduct,
// 'ProdVariantName': otherscarddata?.ProdVariantName,
BookingTypeName: BookingType,
SinglePc: otherscarddata?.SinglePc,
CounterName: '', //sri
};
AddOrderDetails(data);

View File

@ -1365,6 +1365,7 @@ const BsBookingitemCard = (props) => {
OtherProduct: otherscarddata?.OtherProduct,
// 'ProdVariantName': otherscarddata?.ProdVariantName,
BookingTypeName: BookingType,
SinglePc: otherscarddata?.SinglePc,
CounterName: '', //sri
};
AddOrderDetails(data);
@ -2309,7 +2310,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdName === ProdName
);
@ -2510,7 +2511,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -2546,7 +2547,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -2632,7 +2633,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -2671,7 +2672,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -2763,7 +2764,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -2806,7 +2807,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -2890,7 +2891,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -2937,7 +2938,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -4874,7 +4875,7 @@ const BsBookingitemCard = (props) => {
className="BSItemCard-itemName"
>
{item?.ProdName}
{}
{ }
</p>
{cardFunction?.Price && (
<p
@ -6073,8 +6074,7 @@ const BsBookingitemCard = (props) => {
return (
<div
key={idx}
className={`slotTimingSelect ${
isBooked
className={`slotTimingSelect ${isBooked
? 'booked'
: isAlreadyAdded
? 'incart'