示例#1
0
        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))
            });
        }
示例#2
0
        private Money AddShortTimeExpensesMoney(IEnumerable <ShortTermExpense> shortTimeExpenses)
        {
            var money = new Money(0, Currency.PLN);

            foreach (var sti in shortTimeExpenses)
            {
                money.AddAmount(sti.GetMoney());
            }

            return(money);
        }
示例#3
0
        private Money AddLongTimeExpensesMoney(IEnumerable <LongTermExpense> longTimeExpenses)
        {
            var money = new Money(0, Currency.PLN);

            foreach (var lti in longTimeExpenses)
            {
                money.AddAmount(lti.GetMoney());
            }

            return(money);
        }