Add Stock Tracking endpoint to Inventory

Adds GET /client/inventory/stock-movements, a unified read-only ledger
flattening every GRN line, sale line and return across all products
into one shape for the new Stock Tracking tab's table.
This commit is contained in:
2026-10-09 14:22:08 +05:30
parent 2eb88b058e
commit 1a502767ba
4 changed files with 91 additions and 0 deletions
+7
View File
@@ -170,5 +170,12 @@ namespace Fitness_core_BE.Controllers
notes = request.Notes,
returnedAt = request.ReturnedAt?.ToString("o")
}, HttpContext));
[CustomMiddleware]
[TenantResolution]
[RequiresPermission("inventory")]
[HttpGet("stock-movements")]
public async Task<ActionResult<ApiResponse<object>>> GetStockMovements()
=> Response(await _inventoryService.GetStockMovements(new { }, HttpContext));
}
}