Project

General

Profile

Edit Copy Actions

Feature #5400

open

Feature #5398: Implement Vendor-wise Stock Batches for Product Inventory

API for Consuming Stock (Sales / Allocation)

Added by Yalavarthi Thriveni 11 days ago. Updated 11 days ago.

Status:
New
Priority:
High
Target version:
Start date:
11/29/2025
Due date:
11/29/2025 (9 days late)
% Done:

0%

Estimated time:

Description

Description:
When a sale/order is created, quantity should be allocated from the correct batch using FIFO.

API Work:

Endpoint: POST /api/products/:id/stock/consume

FIFO allocation logic

Reduce batch.qtyRemaining

Create StockMovement record

Acceptance Criteria

Outgoing qty deducted from oldest batch
Returns allocation breakdown:
Product.totalQty decremented correctly

Add

Subtasks


Add

Related issues

Actions #1

Updated by Yalavarthi Thriveni 11 days ago

  • Description updated (diff)
Edit Copy Actions

Also available in: Atom PDF