Private
Tracker *Bug Feature Support Testing
Subject *
Description Edit Code Location: stockBatch-model.js vs nursery.product.js:L94 & VariantBatchModal.tsx *What is happening in code:* The system has two completely separate batch systems that do not talk to each other: System A: The standalone StockBatch collection (used by Vendor Invoices and FIFO stock deduction). System B: An embedded array called inventoryBatches inside each variant in the product document (used by the Inventory Batch UI modal). *Real-Life Example:* You receive a vendor invoice for 100 units of Organic Rose Food (Batch #LOT-999). An invoice record is created in System A (StockBatch collection). FIFO uses this to deduct stock when sales occur. Your warehouse manager opens the Product Inventory Management Screen and clicks "View Batches" ( VariantBatchModal.tsx ). What breaks: The modal reads System B (product.variants.inventoryBatches), which is empty! Business Impact: Warehouse staff believe no batches exist for this product and create a duplicate manual batch, causing inventory duplication and confusion. *Simple Fix:* Eliminate System B. Point VariantBatchModal.tsx to fetch and manage data from the single source of truth: the StockBatch collection via /api/vendor-invoices/batches.
Status Resolved
Priority *Low Normal High Immediate
Assignee Ajit ABindu DandaChandra SekharDivya InapakurthiKarthik PalakondaPavan Kumar MuralaRavi Shankar PalleRavindra AtthotaSai MahanandaSai Priyatham SadineniSowjanya atthotaSravani RangannapalemTeja Sriram SanganiYalavarthi Thriveni
Target version Sprint (10/05/2026- 10/09/2026) sprint (10/12/2026 - 10/31/2026) Backlog
Parent task
Start date
Due date
Estimated time Hours
% Done0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 %