icodeintx / paymentjournal

The Unlicense
0 stars 0 forks source link

Adding Monthly Budgeting screen #5

Closed icodeintx closed 2 years ago

icodeintx commented 2 years ago

There will be lots to consider. here are some screenshots that we currently use in excel

image

image

icodeintx commented 2 years ago

Expense Model


string BillName (description like rent, truck)
string Payee
decimal Amount
int EstDayDue (each mont)
bool PaidWithCC (true if paid with credit card)

Income Model

string Type (Payroll)
decimal Amount

CreditCards Model

int AccountNumber (last4)
string Holder (Visa)
string Bank0 (USAA)
string Description (USAA Credit Card)

BankAccounts Model

int AccountNumber (last4)
string Bank
string Type (Checking)
string Description (Bills Acct)
int DebtCardLast4
string CardType (Visa)

OnlineServices Model

string Service (PayPal)
int PaidTo (3573 <- either bank or cc account number - just 4 digit)
string Description (Online Purchasing)
int CCLast4

Budget Model

List<ExpenseModel>
List<IncomeModel>
List<OnlineService>
List<BankAccount>
List<CreditCard>
decimal TotalExpenses
decimal TotalExpensesPaidByCC
decimal TotalExpensesPaidByAccount
List<string> Notes
icodeintx commented 2 years ago

Models have been created.

public class BankAccount
{
    /// <summary>
    /// Usually last 4
    /// </summary>
    public int AccountNumber { get; set; }

    /// <summary>
    /// Bank Name - USAA
    /// </summary>
    public string Bank { get; set; } = string.Empty;

    /// <summary>
    /// Bills acct etc.
    /// </summary>
    public string Description { get; set; } = string.Empty;

    /// <summary>
    /// Type of acct Checking/Savings
    /// </summary>
    public string Type { get; set; } = string.Empty;
}
public class CreditCard
{
    /// <summary>
    /// usually last 4
    /// </summary>
    public int AccountNumber { get; set; }

    /// <summary>
    /// usually last 4
    /// </summary>
    public int AccountNumberAttachedTo { get; set; } //acct of bank if debt

    /// <summary>
    /// Name of Bank - USAA / Chase
    /// </summary>
    public string Bank { get; set; } = string.Empty; //USAA

    /// <summary>
    /// Description - User Defined
    /// </summary>
    public string Description { get; set; } = string.Empty;

    /// <summary>
    /// Holder of the CC - Visa, MasterCard
    /// </summary>
    public string Holder { get; set; } = string.Empty; //visa etc.

    /// <summary>
    /// True if this is a debt card
    /// </summary>
    public bool IsDebt { get; set; } = false;
}
public class Expense
{
    public decimal Amount { get; set; }
    public string BillName { get; set; } = string.Empty;
    public DateTime CreateDate { get; set; } = DateTime.Now;
    public int EstimatedDueDay { get; set; } = 1;

    //group by this property to determin how much is paid by seperate accounts.
    public int PaidByAccountNumber { get; set; }

    public string PaidTo { get; set; } = string.Empty;
}
public class Income
{
    public decimal Amount { get; set; }
    public string Type { get; set; } = string.Empty;
}
public class OnlineService
{
    /// <summary>
    /// Last 4 of CC or Bank account number
    /// </summary>
    public int PaidTo { get; set; }

    /// <summary>
    /// payPal, Youtube, etc.
    /// </summary>
    public string Service { get; set; } = string.Empty;
}
public class Budget
{
    public List<BankAccount> BankAccounts { get; set; }
    public List<CreditCard> CreditCards { get; set; }
    public List<Expense> Expenses { get; set; }
    public List<Income> Incomes { get; set; }
    public List<OnlineService> OnlineServices { get; set; }
    public decimal TotalExpenses => Expenses.Select(y => y.Amount).Sum();
    public decimal TotalExpensesPaidByAccount => Expenses.Where(y => y.PaidWithCC == false).Select(x => x.Amount).Sum();
    public decimal TotalExpensesPaidByCC => Expenses.Where(y => y.PaidWithCC == true).Select(x => x.Amount).Sum();
    public decimal TotalIncomes => Incomes.Select(x => x.Amount).Sum();
}
icodeintx commented 2 years ago

Added BudgetId to Budget class

public class Budget
{
    public Guid BudgetId { get; set; } = Guid.Empty;
    public List<BankAccount> BankAccounts { get; set; }
    public List<CreditCard> CreditCards { get; set; }
    public List<Expense> Expenses { get; set; }
    public List<Income> Incomes { get; set; }
    public List<OnlineService> OnlineServices { get; set; }
    public decimal TotalExpenses => Expenses.Select(y => y.Amount).Sum();
    public decimal TotalExpensesPaidByAccount => Expenses.Where(y => y.PaidWithCC == false).Select(x => x.Amount).Sum();
    public decimal TotalExpensesPaidByCC => Expenses.Where(y => y.PaidWithCC == true).Select(x => x.Amount).Sum();
    public decimal TotalIncomes => Incomes.Select(x => x.Amount).Sum();
}
icodeintx commented 2 years ago

Wireframe for Budget UI

Whiteboard

icodeintx commented 2 years ago

did