Private
Tracker *Bug Feature Support Testing
Subject *
Description Edit *Code Location:* quotationStockAllocation.service.js:L78-L140 *What is happening in code:* When a sales quote is created for a large corporate customer (e.g. landscaping company), the system reserves stock by updating product.stockAllocations or product.reservedQuantity. However, it never reserves any specific StockBatch. *Real-Life Example:* You have 10 specialty palm trees in stock (all belonging to Batch #PALM-1, costing $100 each). A commercial client requests a quote for all 10 palm trees. You issue the quote, and the system reserves 10 palm trees. In the afternoon, a walk-in retail customer buys 4 palm trees at the POS counter. The POS register runs consumeStockBatchService, which doesn't check quotation allocations and consumes 4 trees from Batch #PALM-1. Next day, the commercial client accepts the quote and pays for 10 trees. What breaks: When warehouse staff go to fulfill the quote, only 6 trees are left. The reserved stock was sold out from under the client! Business Impact: You promised inventory to a client, took payment, and now cannot fulfill the order because the batch was sold at the counter. *Simple Fix:* When allocating quotation stock, also flag qtyReserved on the specific StockBatch documents. In consumeStockBatchService, ensure walk-in sales can only consume qtyRemaining - qtyReserved.
Status New
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 %