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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user