Add GetNextSerialSequence functionality to Stock services and repository

This commit is contained in:
2026-10-08 12:42:50 +05:30
parent 55aa35308a
commit 702efba62e
4 changed files with 34 additions and 0 deletions
@@ -96,6 +96,10 @@ public class StockService(
b.Quantity, b.Item.ReorderLevel!.Value)).ToList();
}
/// <summary>The next unused sequence number for generating serials like "&lt;prefix&gt;0001" for an item.</summary>
public Task<int> GetNextSerialSequenceAsync(Guid itemId, string prefix) =>
repo.GetNextSerialSequenceAsync(itemId, prefix ?? string.Empty);
public async Task<StockTotalResponse?> GetItemTotalAsync(Guid itemId)
{
var item = await itemRepo.GetByIdAsync(itemId);