public BudgetCategoryReport(BudgetCategory category, DateTime startDate, DateTime endDate) { Category = category; Budget = category.Budget; StartDate = startDate; EndDate = endDate; }
public void SetBudgetCategory(BudgetCategory budgetCategory) { if (budgetCategory == default) { throw new BusinessException(Localization.For(() => ErrorMessages.BudgetCategoryEmpty)); } BudgetCategoryId = budgetCategory.BudgetCategoryId; }
internal static BudgetedAmount Create(BudgetCategory budgetCategory, MoneyAmount amount, DateTime validFrom) { var instance = new BudgetedAmount() { BudgetedAmountId = new BudgetedAmountId(), BudgetCategoryId = budgetCategory.BudgetCategoryId }; instance.SetAmount(amount); instance.SetValidFromDate(validFrom); return(instance); }
public BudgetCategoryBalance(BudgetCategory category) { BudgetCategoryId = category.Id; OverallBudgetBalance = category.OverallBudgetBalance; ThisMonthBudgetBalance = category.ThisMonthBudgetBalance; ThisMonthTransactionsSum = category.ThisMonthTransactionsSum; ThisMonthYetScheduledSum = category.ThisMonthYetScheduledSum; LeftToEndOfYear = category.LeftToEndOfYear; ThisYearBudget = category.ThisYearBudget; ThisYearYetScheduledSum = category.ThisYearYetScheduledSum; ThisMonthBudget = category.ThisMonthBudget; BudgetSoFar = category.BudgetSoFar; TotalTransactionsSum = category.TotalTransactionsSum; TotalAllocationsSum = category.TotalAllocationsSum; }
public static TransactionTemplate Create (string description, BudgetCategory budgetCategory, MoneyAmount amount) { var transaction = new TransactionTemplate { TransactionTemplateId = new TransactionTemplateId(), Description = description }; transaction.SetBudgetCategory(budgetCategory); transaction.SetAmount(amount); transaction.CreationDateTime = DateTime.Now; return(transaction); }
public static BudgetCategory Create (Budget budget, string name, BudgetCategoryIcon icon, eBudgetCategoryType budgetCategoryType) { var category = new BudgetCategory() { BudgetCategoryId = new BudgetCategoryId(), BudgetCategoryType = budgetCategoryType, BudgetId = budget.BudgetId }; category.SetIcon(icon); category.SetName(name); return(category); }
public static Allocation Create (string description, BudgetCategory targetBudgetCategory, BudgetCategory sourceBudgetCategory, MoneyAmount amount, DateTime allocationDate) { var transaction = new Allocation { AllocationId = new AllocationId(), Description = description }; transaction.SetTargetBudgetCategory(targetBudgetCategory); transaction.SetSourceBudgetCategory(sourceBudgetCategory); transaction.SetAmount(amount); transaction.SetAllocationDate(allocationDate); transaction.CreationDateTime = DateTime.Now; return(transaction); }
public static PeriodReport GetPeriodReport(BudgetCategory category, DateTime startDate, DateTime endDate) { var instance = new BudgetCategoryReport(category, startDate, endDate); return(instance.PeriodReport); }
public static PeriodMonthlyReport GetMonthByMonth(BudgetCategory category, DateTime startDate, DateTime endDate) { var instance = new BudgetCategoryReport(category, startDate, endDate); return(instance.MonthByMonth); }
public void SetSourceBudgetCategory(BudgetCategory budgetCategory) { SourceBudgetCategoryId = budgetCategory?.BudgetCategoryId; }