Add GetNextSerialSequence functionality to Stock services and repository
This commit is contained in:
@@ -37,6 +37,14 @@ public class StockController(StockService service, ICurrentUserService currentUs
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>Next free number for auto-generated serials (e.g. after ...-0005 the answer is 6).</summary>
|
||||
[HttpGet("serials/next-sequence")]
|
||||
public async Task<IActionResult> GetNextSerialSequence([FromQuery] Guid itemId, [FromQuery] string prefix = "")
|
||||
{
|
||||
var next = await service.GetNextSerialSequenceAsync(itemId, prefix);
|
||||
return Ok(new { next });
|
||||
}
|
||||
|
||||
[HttpGet("movements")]
|
||||
public async Task<IActionResult> GetMovements(
|
||||
[FromQuery] Guid? locationId,
|
||||
|
||||
Reference in New Issue
Block a user