public static AccountingTransactionTempDto GetUnpostedVoucherByNo(int voucherNo) { try { var table = AccountingDataProvider.GetUnpostedVoucherByNo(voucherNo); var model = new AccountingTransactionTempDto { CompanyId = table.CompanyId, CreditAccount = table.CreditAccount, CreditAccountName = AccountingDataProvider.GetAccountByCode(table.CompanyId, table.CreditAccount).AccountName, DebitAccount = table.DebitAccount, DebitAccountName = AccountingDataProvider.GetAccountByCode(table.CompanyId, table.DebitAccount).AccountName, AccountingYearId = table.AccountingYearId, VoucherNo = table.VoucherNo, CurrencyCode = table.Currency, LineId = table.LineId, Total = table.Total, UserId = table.UserId, ValueTotal = table.ValueTotal, VoucherDate = table.VoucherDate }; return(model); } catch (Exception exception) { throw new Exception(exception.Message); } }