mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-20 06:57:15 +00:00
wip
This commit is contained in:
@@ -21,15 +21,14 @@ namespace bnhtrade.Core.Logic.Inventory
|
||||
{
|
||||
throw new ArgumentException("Stock journal ID must be greater than zero", nameof(stockJournalId));
|
||||
}
|
||||
bool result = uow.StockJournalRepository.DeleteStockJournal(stockJournalId);
|
||||
uow.StockJournalRepository.StockJournalDelete(stockJournalId);
|
||||
CommitIfOwned(uow);
|
||||
if (!result)
|
||||
{
|
||||
throw new InvalidOperationException($"Failed to delete stock journal with ID {stockJournalId}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// can be used before commiting an sql insert, update or delete to the stock journal to ensure a status does not fall below 0
|
||||
// (unless the status is enabled to do so)
|
||||
// set empty list or statusIdEffected to null to check entier stock entries for consistency
|
||||
public bool WIP_StockJournalConsistencyCheck(int stockId, List<int> statusIdEffected = null)
|
||||
{
|
||||
return WithUnitOfWork(uow =>
|
||||
|
||||
Reference in New Issue
Block a user