public static IList<IJournalEntryLine> GetJournalEntriesToExport(IDalSession session, ExactEntryGrouping grouping) { string query = "B4F.TotalGiro.Communicator.Exact.SubledgerEntry.GetJournalEntriesToExport"; Hashtable parameters = new Hashtable(); parameters.Add("exactJournalID", grouping.Key); parameters.Add("transactionDate", grouping.TransactionDate); IList<IJournalEntryLine> lines = session.GetTypedListByNamedQuery<IJournalEntryLine>(query, parameters); return lines; }
private static void CreateLedgerEntry(IDalSession session, ExactEntryGrouping grouping, DateTime dateUntil) { IExactJournal exactJournal = ExactJournalMapper.GetExactJournal(session, grouping.Key); ILedgerType ledgerType = exactJournal.LedgerType; string nextBookingNumber = LedgerEntryMapper.GetNextLedgerEntryNumber(session, exactJournal.JournalNumber); ILedgerEntry newEntry = new LedgerEntry(ledgerType, exactJournal.JournalNumber, nextBookingNumber, grouping.TransactionDate, 0m, "B", false); IList<IJournalEntryLine> groupOfLines; groupOfLines = SubledgerEntryMapper.GetJournalEntriesToExport(session, grouping); CreateSubLedgerEntries(session, newEntry, groupOfLines); LedgerEntryMapper.Update(session, newEntry); }