static internal AccountDto MapAccount(Account account) { var dto = new AccountDto(); FillAccountDescriptorDto(dto, account); dto.Description = account.Description; dto.StartDate = account.StartDate; dto.EndDate = account.EndDate; dto.AccountsChart = account.AccountsChart.MapToNamedEntity(); dto.AreaRules = account.AreaRules; dto.CurrencyRules = account.CurrencyRules; dto.SectorRules = account.SectorRules; dto.LedgerRules = LedgerMapper.MapLedgersRules(account.LedgerRules); dto.History = MapAccountHistory(account.GetHistory()); return(dto); }
static internal AccountsChartMasterDataDto Map(AccountsChartMasterData masterData) { return(new AccountsChartMasterDataDto { UID = masterData.AccountsChart.UID, Name = masterData.AccountsChart.Name, AccountsPattern = masterData.AccountsPattern, AccountNumberSeparator = masterData.AccountNumberSeparator, MaxAccountLevel = masterData.MaxAccountLevel, StartDate = masterData.StartDate, EndDate = masterData.EndDate, AccountRoles = masterData.AccountRoles, AccountTypes = masterData.AccountTypes.MapToNamedEntityList(), Currencies = CataloguesMapper.MapCurrencies(masterData.Currencies), Sectors = CataloguesMapper.MapSectors(masterData.Sectors), Ledgers = LedgerMapper.Map(masterData.Ledgers) }); }