Feature #11231
openModify existing low stock products display by variant wise also in dashboard which already showed by product wise not variant wise as in warehouse dashboard & picker , vendoru sourcing manager dashboards
100%
Subtasks
Related issues
Updated by Yalavarthi Thriveni 28 days ago
- Assignee changed from Pavan Kumar Murala to Yalavarthi Thriveni
- Target version changed from Sprint (09/28/2026 - 10/02/2026) to Sprint (10/05/2026- 10/09/2026)
- Estimated time set to 4:00 h
Updated by Yalavarthi Thriveni 24 days ago
- Subject changed from Modify existing low stock products display by variant wise also to Modify existing low stock products display by variant wise also in dashboard which already showed by product wise not variant wise
- Assignee changed from Yalavarthi Thriveni to Ajit A
- Estimated time changed from 4:00 h to 2:00 h
Updated by Yalavarthi Thriveni 24 days ago
- Target version changed from Sprint (10/05/2026- 10/09/2026) to sprint (10/12/2026 - 10/31/2026)
Updated by Yalavarthi Thriveni 24 days ago
- Subject changed from Modify existing low stock products display by variant wise also in dashboard which already showed by product wise not variant wise to Modify existing low stock products display by variant wise also in dashboard which already showed by product wise not variant wise as in warehouse dashboard & picker , vendoru sourcing manager dashboards
Updated by Ajit A 17 days ago
- Due date set to 10/16/2026
- Status changed from In Progress to Resolved
- Start date changed from 10/01/2026 to 10/16/2026
- % Done changed from 0 to 100
- Estimated time changed from 2:00 h to 4:00 h
1. Repository: evergreen_pos_be (Backend)
Key Modifications & Features
Variant-Wise Restock Alerts (product.service.js):
getProductsNearRestockLevel:
Removed { $gt: 0 } filters that previously excluded out-of-stock items (0 stock) from alerts.
Implemented a tiered fallback for reorder thresholds: $$\text{Variant Level} \rightarrow \text{Variant Reorder Level} \rightarrow \text{Parent Restock Level} \rightarrow \text{Parent Reorder Level} \rightarrow 1$$
Mapped lowStockVariants array on each product including _id, sku, title, variantAttributes, variantAttributeLabels, stockQuantity, restock_level, and reorder_level.
Raised default query limit from 10 to 50 (or dynamic request limit).
getUnderRestockLevel:
Upgraded query to match variant-inclusive restock criteria.
Added isDeleted: { $ne: true } safeguard and populated catId and subCatId.
Attached structured lowStockVariants to each returned product document.
Warehouse Location Service & Controller (locationService.js, locationController.js):
Enriched getWarehouseOrders to evaluate variant-level stock alongside simple products.
Added support for variant attributes extraction, SKU formatting, and dynamic restock/reorder thresholds.
Forwarded query parameters (cardFilter, stockFilter, tab) for fine-grained alert filtering.
2. Repository: evergreen_pos_fe (POS Frontend)
Key Modifications & Features
Main Dashboard Stock Alerts (AlertsDashboard.tsx):
Expanded StockAlertsTab to fetch with limit: 100.
Added flattenedAlerts to break out parent products into variant-level rows with variant title badges (e.g. [Charcoal / XXL]) and monospace SKU badges.
Added interactive quick-filter pill buttons: All Alerts, Variant-wise, Simple Products, Out of Stock, and Low Stock.
Enhanced status badges (Out of stock, Almost out, Getting low) with status dots and priority tags (Urgent, High, Normal).
Product Management Parent/Variant Stock Sync (CreateProduct.tsx):
Auto-calculates parent Stock (Quantity) from the sum of all active variant stock quantities when multi-variant mode is enabled.
Disabled and marked the parent stock field as read-only with a visual "Auto from Variants" tag and helper tooltip, preventing invalid inventory discrepancies.
Synchronizes payload.quantity automatically during both submission and draft preparation.
Vendor Sourcing Dashboard (VendorSourcingDashboard.tsx):
Integrated Low Stock & Restock Alerts tab connecting to /location/all/orders.
Displays variant-level alerts with SKU, vendor, onHand vs reorder level, stockout warnings, and a "Create PO" direct action.
Warehouse Manager Dashboard (WarehouseManagerDashboard.tsx):
Added dedicated alert filter strip (All Alerts, Critical (0 Stock), Low Stock Warnings) with badge counters.
Added pagination slicing to the alerts table.
Rendered variant title badges next to parent product names.
Picker Dashboard (PickerDashboard.tsx):
Integrated stock alert correlation into the shelf pick queue to highlight bin-depleted (0 Stock Left) and low-stock line items.
Added a "Low Stock Line Items" filter toggle for warehouse pickers.
3. Repository: evergreenpos_E-commerce_new (E-Commerce Frontend)
Key Modifications & Features
Product Card Stock Accuracy (ProductCard.tsx, PremiumProductCard.tsx):
Added variant stock validation: If a product has variants, isOutOfStock evaluates whether any active, non-deleted variant has stockQuantity > 0.
Resolves the issue where a product with parent quantity > 0 but 0 stock on all variants incorrectly showed as "In Stock".
Catalog & Detail Stock Alignment (ProductUnifiedCard.tsx, catlogproducts.tsx, productdetailsui.tsx):
Clamped available catalog stock to the sum of active variant stocks.
Updated hasStock() on the product detail page to ensure at least one variant has available inventory before enabling purchase actions.