Skip to content

Commit

Permalink
Merge pull request #239 from AY1920S1-CS2103T-W12-3/develop-loan
Browse files Browse the repository at this point in the history
Develop loan
  • Loading branch information
dingyuchen committed Nov 8, 2019
2 parents 21afb5c + efb4a2c commit 9989109
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 15 deletions.
79 changes: 66 additions & 13 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Example: `TYPE+INDEX` refers to joining `TYPE` and `INDEX` together without a sp
====

=== Logging Income : `in`
=======
Adds an income of your personal finance +
Format: `in $/AMOUNT n/ITEM d/DATE [c/CATEGORY]`
Expand All @@ -80,7 +81,7 @@ Format: `in $/AMOUNT n/ITEM d/DATE [c/CATEGORY]`
* `CATEGORY` accepts the CATEGORY for this income. An in` Transaction can be created without `CATEGORY` inputs.
* `in` updates the Bank Account with a net positive amount (e.g. `in n/work $/1000 d/10102019` will **increase** Bank Acount balance by $1000)
****

=======
Examples:

* `in $/100 d/01012019 n/errand c/work c/drinks`
Expand Down Expand Up @@ -108,8 +109,6 @@ Examples:

=== Setting a Budget : `set`

=== Setting a Budget : `set`

You can set a budget for a particular category until a certain date, given it is not already present in the budget list.
A duplicate budget is a budget with the same `AMOUNT` and `DATE` and `CATEGORY`. +
If you attempt to do so, you will receive an error message: `This budget already exists in the bank account`. +
Expand Down Expand Up @@ -158,32 +157,86 @@ Examples:
=== Splitting a Bill with Friends : `split`

Split a bill with your friends +
Format: `split $/AMOUNT n/NAME1 [n/NAME2]... [s/SHARE]...`

Format: `split $/AMOUNT n/NAME1 a/DESCRIPTION [d/DATE] [n/NAME2]... [s/SHARE]...`

====
* `DESCRIPTION` encompasses more details for the bill being split. User can make use of this
field to determine nature of bill.
* `[SHARE]` defines portion of bill to be paid by each person
** if no shares are given, `amount` will be split evenly across all people, including user
** user is included in the bill if number of shares is *1* more than number of people
*** user's share will be the first listed share
** each person's share is assigned in order
*** i.e. last person's share is the last share listed
** shares cannot be negative numbers
====

Examples:
===== Ledger GUI
.Sample Ledger Graphical User Interface
image::LedgerUI.png[]

This is how the *Ledger* looks when you switch to the *Ledger* tab. +
The left shows the people who has unresolved balances with you, while the right lists
all transactions that have to do with the *Ledger*. +
*Ledger*'s balance is separate from the *BankAccount*. It is displayed in the same position,
at the bottom right corner.

==== Example Usage:
* `split $/1000 n/Amy n/Betty n/Catherine n/Dan a/haidilao`

$1000 is split equally between Amy, Betty, Catherine, Dan and the user.

. Enter appropriate command into the command line.
+
.Splitting evenly
image::SplitEven1.png[]
+
. Result is displayed accordingly
+
.Splitting evenly (result)
image::SplitEven2.png[]
+
For an even split of $1000, each person pays $200. Therefore *Ledger* shows $200 on the tab of each person.
*Ledger* balance does not include the amount spent by the user. In this bill, the user is owed $800 in total
from the rest of his friends. Therefore *Ledger* balance is -$800, as shown in the bottom right.

* `split $/100 n/Albert n/Bernard n/Clement s/2 s/1 s/7 a/kbbq dinner`

$100 is split with Albert owing $20, Bernard owing $10 and Clement owing $70.

. Enter appropriate command into the command line.
+
.Splitting unevenly
image::SplitUneven1.png[]
+
. Result is displayed accordingly
+
.Uneven split results
image::SplitUneven2.png[]

* `split $/1000 n/Amy n/Betty n/Catherine n/Dan`
** $1000 is split equally between Amy, Betty, Catherine, Dan and the user.
* `split $/100 n/Albert n/Bernard n/Clement s/2 s/1 s/7`
** $100 is split with Albert owing $20, Bernard owing $10 and Clement owing $70.

=== Receiving Money from a Friend : `receive`

Receives money from 1 friend +
Format: `receive $/AMOUNT n/NAME1 [d/DATE]`
Format: `receive $/AMOUNT n/NAME1 [d/DATE] [a/DESCRIPTION]`

Examples:
==== Example usage:

* `receive $/20 n/Albert`

* `receive $/2.5 n/Albert`
Transfers $20 from Albert to user. If Albert is no longer owe or is owed money, he will be removed from the Ledger.

. Enter appropriate command into the command line.
+
.Receive payment
image::Receive1.png[]
+
. Result is displayed accordingly.
+
.Receive payment result
image::Receive2.png[]
+
Albert is removed from the *Ledger* since he no longer owes any money. *Ledger* balance is also updated accordingly.

=== Projecting Balance : `project`

Expand Down
Binary file added docs/images/LedgerUI.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Receive1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Receive2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SplitEven1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SplitEven2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SplitUneven1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SplitUneven2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/startingUp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class ReceiveCommand extends Command {
+ ": Friend pays you some money.\n"
+ "Parameters: "
+ PREFIX_AMOUNT + "AMOUNT "
+ "[" + PREFIX_DESC + "DESCRIPTION] "
+ PREFIX_NAME + "NAME "
+ "[" + PREFIX_DESC + "DESCRIPTION] "
+ "[" + PREFIX_DATE + "DATE]\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_AMOUNT + "600 "
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
-fx-vgap: 3;
}

#budgetDetails .label {
#budgetDetails, #amounts .label {
-fx-text-fill: white;
-fx-background-color: #56ae87;
-fx-padding: 1 3 1 3;
Expand All @@ -378,6 +378,8 @@
-fx-border-radius: 2;
-fx-background-radius: 2;
-fx-font-size: 11;
-fx-hgap: 7;
-fx-vgap: 3;
}

#people {
Expand Down

0 comments on commit 9989109

Please sign in to comment.