Bug fix in ExportSalesInvoice and converted more code over to repository and service pattern

This commit is contained in:
2025-07-07 15:22:21 +01:00
parent 5900a6e6e4
commit 5cd653d700
64 changed files with 2623 additions and 2517 deletions

View File

@@ -8,7 +8,7 @@ using System.Transactions;
namespace bnhtrade.Core.Logic.Account
{
public class Journal
public class Journal : UnitOfWorkBase
{
public int AccountJournalInsert(int journalTypeId, DateTime entryDate, string currencyCode,
decimal amount, int debitAccountId = 0, int creditAccountId = 0, bool lockEntry = false)
@@ -19,7 +19,12 @@ namespace bnhtrade.Core.Logic.Account
public bool AccountJournalDelete(int accountJournalId)
{
return new Data.Database.Account.DeleteJournal().AccountJournalDelete(accountJournalId);
return WithUnitOfWork(uow =>
{
bool result = uow.JournalRepository.DeleteJournal(accountJournalId);
CommitIfOwned(uow);
return result;
});
}
}
}