mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-25 17:17:15 +00:00
Bug fix in ExportSalesInvoice and converted more code over to repository and service pattern
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user