ootbdev / aobotracker-HAS-MOVED

Development Team's Time/Expenses Tracker as an RoR Exercise
0 stars 0 forks source link

Model: Expense #5

Open alvinslee opened 10 years ago

alvinslee commented 10 years ago

This model depends on the completion of Issue #1 and Issue #4

An Expense represents an entry in the user's log of work expenses. Each expense belongs to a single user, who will have many expenses. Only managers and employees can have expenses. The administrator (whose single purpose is to add/delete manager users) should not be allowed to have any expenses.

An expense consists of an expense type, a description, a date, an amount, a currency (available currencies are USD and CNY), and a reimbursed? boolean flag (which should default to false)

A user can have two expenses with identical type/description/date/amount/currency. Later, we should implement some sort of "are you sure?" notification that asks users if they really want to create what looks like a duplicate expense.

The cucumber feature tests related to this issue should be tagged with @expense and @model so that we can group our tests when needed.

alvinslee commented 10 years ago

Additional specifications:

alvinslee commented 10 years ago

We changed the is_reimbursed field instead to be a String field called status. For now, allowed statuses are: not reimbursed, pending reimbursement, reimbursed, and denied.