} // AddTransaction public override string ToString() { var sb = new StringBuilder(); sb.AppendFormat("Id: {0}, Amount: {1}, Rate: {2}, Issued: {3:d}, Close date: {4}, Balance: {5}, Principal: {6}, Interest: {7}, Fees: {8}\n", Id, LoanAmount, InterestRate, Date, DateClosed, Balance, Principal, Interest, Fees); sb.AppendLine("Schedule:"); foreach (var item in _schedule) { sb.Append("\t"); sb.AppendLine(item.ToString()); } sb.AppendLine("Transactions:"); foreach (var item in TransactionsWithPaypointSuccesefull) { sb.Append("\t"); sb.AppendLine(item.ToString()); } sb.AppendLine("Rollovers:"); foreach (var item in Schedule.SelectMany(s => s.Rollovers).OrderBy(c => c.Created)) { sb.Append("\t"); sb.AppendLine(item.ToString()); } sb.AppendLine("Fees:"); foreach (var item in Charges.OrderBy(c => c.Date)) { sb.Append("\t"); sb.AppendLine(item.ToString()); } sb.AppendLine("RemovedOnReschedule:"); foreach (var item in RemovedOnReschedule) { sb.Append("\t"); sb.AppendLine(item.ToString()); } sb.AppendLine("InterestFreeze:"); foreach (var item in InterestFreeze) { sb.Append("\t"); sb.AppendLine(item.ToString()); } return(sb.ToString()); } // ToString