private DateMoneyDto GeneratePredictionByDate(DateTime date, Money currentAmount) { var incomes = GetIncomesByDate(date); var expenses = GetExpensesByDate(date); return(new DateMoneyDto { Date = date.Date, Money = new Money(currentAmount.AddAmount(incomes).SubtractAmount(expenses)) }); }
private Money AddShortTimeExpensesMoney(IEnumerable <ShortTermExpense> shortTimeExpenses) { var money = new Money(0, Currency.PLN); foreach (var sti in shortTimeExpenses) { money.AddAmount(sti.GetMoney()); } return(money); }
private Money AddLongTimeExpensesMoney(IEnumerable <LongTermExpense> longTimeExpenses) { var money = new Money(0, Currency.PLN); foreach (var lti in longTimeExpenses) { money.AddAmount(lti.GetMoney()); } return(money); }