CSC207-2022F-UofT / course-project-bill-gates

A bill recording software developed by team "Bill Gates."
9 stars 4 forks source link

[Feature 7] Design and Implement Bill Splitter. #11

Closed ScottCTD closed 1 year ago

ScottCTD commented 1 year ago

Initiations

Design

Implementation Details

Database Specifications

Table Name: bill_{bill_id}

Table Specifications: Column Name Data Type Notes
entry_id INT
date TIMESTAMP
value DECIMAL(16, 2) We expect value to have 16 integer places and 2 decimal places. value here is the amount of money that the payee needs to pay.
currency CHAR(3) As defined in ISO 4217, currency codes all have a length of 3
description TEXT
from TEXT
to TEXT
location TEXT
payee TEXT We may want to change the datatype here. We may not need such a big type here.
paid_back BOOLEAN This represents whether the payee had paid the money back.

Related Use Case and Details

TODOs

Use Case Update: Insert Entry Use Case

If you are willing to participate in the development of this feature, please feel free to assign yourself as an assignee.

ScottCTD commented 1 year ago

TODO: https://github.com/CSC207-2022F-UofT/course-project-bill-gates/pull/15#pullrequestreview-1162668971

xgao28 commented 1 year ago

I'm not sure if I understand how the bill splitter works. From my current thought, it works as one of the following examples:

(1) A, B, C, and D had dinner together and A paid the bill altogether at first, being recorded as an entry in A's bill. Then, A, as a user, decided to split the bill, creating 3 split entries for B, C, and D respectively, and A's bill shows the information on these entries including the amount of money they should pay to A as well as whether they paid back.

(2) A, B, C, and D had dinner together and A paid the bill altogether at first, being recorded as an entry in A's bill. Then, A, as a user, decided to split the bill, creating 3 split entries for B, C, and D respectively in a splitter bill from A, and the splitter bill shows the information on these entries including the amount of money they should pay to A as well as whether they paid back.

If neither (QAQ), is there any example that helps me with this?

ScottCTD commented 1 year ago

I'm not sure if I understand how the bill splitter works. From my current thought, it works as one of the following examples:

(1) A, B, C, and D had dinner together and A paid the bill altogether at first, being recorded as an entry in A's bill. Then, A, as a user, decided to split the bill, creating 3 split entries for B, C, and D respectively, and A's bill shows the information on these entries including the amount of money they should pay to A as well as whether they paid back.

(2) A, B, C, and D had dinner together and A paid the bill altogether at first, being recorded as an entry in A's bill. Then, A, as a user, decided to split the bill, creating 3 split entries for B, C, and D respectively in a splitter bill from A, and the splitter bill shows the information on these entries including the amount of money they should pay to A as well as whether they paid back.

If neither (QAQ), is there any example that helps me with this?

For example, if you paid the bill and there are three people who need to pay some money back.

You opened our software and first created a new entry in your main bill. The value should be the total amount of money you spent.

Then, you double-clicked the splitter attribute of the entry you just created. A new splitter bill would be created.

In the new splitter bill, you add 3 entries, each specifying which people should pay how much value back.