ryanlevi / domatio

A Ruby on Rails webapp with tools for roommates.
http://domatio.herokuapp.com/
1 stars 0 forks source link

Bill Splitter #19

Closed ryanlevi closed 10 years ago

ryanlevi commented 10 years ago

This will probably involve new MVC, but I may edit the groups controller so that it's /groups/bills Anyone have a preference?

ryanlevi commented 10 years ago

tl;dr Basic Bills done, TODO for next week -- implementing a system for marking bills as paid

read below if you give a shit about the bills system and would like to help.

So far I have created the bills MVC. This is the Bills db structure so far: Bills:

I have now realized that to mark users as "bill paid" I will need a new DB. This DB should look something like this: Bills_Helper:

Then we can say something like: if Bills_Helper contains user.email: display the bill on their Owed list and if Bill due date is in ~2 days, email them a reminder

and if the owner marks user as paid, Bills_Helper.destroy user

A little more thought should probably be put into this. I'll probably merge the completed bill stuff to master by Thursday so I can start the other stuff and we have some bill stuff to demo.

Any input from anyone for the bills is appreciated. If anyone wants to take over or help on it, that's cool too.

ryanlevi commented 10 years ago

STATUS UPDATE:

I created a new table called BillsHelp -- it has Bill_id, user, and amount Now every time a bill is created in the Bills table, a couple BillsHelp rows are added (1 for each user.. for now, even if the user has 0 they should be added but we will work on efficiency later).

I also added a recurring column to bills. If the user checks "recurring" when they make a bill, the day of the month is logged in the Bills table For example, I make a bill due on the 20th of November. I select recurring, the database logs recurring=>20 If I don't select it, it logs nil

Will be working more on this soon

Btw, I want status updates from everyone if they have them. Comment on your issues.

ryanlevi commented 10 years ago

Closing this. Basic bills are up. I'll create separate issues for more specific features.