diff --git a/src/Pages/Product/ProductForm.jsx b/src/Pages/Product/ProductForm.jsx index 5d2393a..9a3add1 100644 --- a/src/Pages/Product/ProductForm.jsx +++ b/src/Pages/Product/ProductForm.jsx @@ -4035,7 +4035,7 @@ const ProductForm = ({ formType }) => { )} -
{text ? text : 'Enter Wholesale Price'}
- ), - width: 120, - }, - ] + { + title: 'New Wholesale Price', + dataIndex: 'CurrentWhAmt', + key: 'CurrentWhAmt', + align: 'center', + with: '4rem', + editable: true, + render: (text, record) => ( +{text ? text : 'Enter Wholesale Price'}
+ ), + width: 120, + }, + ] : []), ]; @@ -1478,9 +1477,9 @@ const StockPriceUpdate = () => { isStockVariantBased === 'Yes' ? BulkProductData || [] : (BulkProductData || [])?.filter( - (item, index, self) => - index === self.findIndex((p) => p.ProdId === item.ProdId) - ); + (item, index, self) => + index === self.findIndex((p) => p.ProdId === item.ProdId) + ); if (!uniqueBulkProductData?.length) { setMessageType('error'); @@ -1593,9 +1592,9 @@ const StockPriceUpdate = () => { cell.border = isHiddenCol ? undefined : { - right: { style: 'thin', color: { argb: 'FF000000' } }, - bottom: { style: 'thin', color: { argb: 'FF000000' } }, - }; + right: { style: 'thin', color: { argb: 'FF000000' } }, + bottom: { style: 'thin', color: { argb: 'FF000000' } }, + }; }); /* ---------------- ADD DATA ---------------- */ @@ -1777,7 +1776,7 @@ const StockPriceUpdate = () => { Number(current.MRP) !== Number(uploaded.NewMRP) || Number(current.SellPrice) !== Number(uploaded.NewSellPrice) || Number(current.WhSalePrice || 0) !== - Number(uploaded.NewWholeSalePrice || 0); + Number(uploaded.NewWholeSalePrice || 0); return { ...uploaded, @@ -1965,13 +1964,11 @@ const StockPriceUpdate = () => { const hasWholesale = !!data?.NewWholeSalePrice; const isModified = data?.isModified === true; - // valid cases if (hasMRP && hasSell && isModified) return true; // ✅ Case 2: Only Wholesale changed - if (!hasMRP && !hasSell && hasWholesale && isModified) return true;; - + if (!hasMRP && !hasSell && hasWholesale && isModified) return true; return false; }) @@ -1999,7 +1996,6 @@ const StockPriceUpdate = () => { return; } - const res = await dispatch(bulkPriceUpdate(putData))?.unwrap(); if (res?.data?.statusCode === 1) { @@ -2092,7 +2088,7 @@ const StockPriceUpdate = () => { onComplete={onComplete} /> -