Skip to content

Commit 9989109

Browse files
authored
Merge pull request #239 from AY1920S1-CS2103T-W12-3/develop-loan
Develop loan
2 parents 21afb5c + efb4a2c commit 9989109

File tree

11 files changed

+70
-15
lines changed

11 files changed

+70
-15
lines changed

docs/UserGuide.adoc

Lines changed: 66 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Example: `TYPE+INDEX` refers to joining `TYPE` and `INDEX` together without a sp
6969
====
7070

7171
=== Logging Income : `in`
72+
=======
7273
7374
Adds an income of your personal finance +
7475
Format: `in $/AMOUNT n/ITEM d/DATE [c/CATEGORY]`
@@ -80,7 +81,7 @@ Format: `in $/AMOUNT n/ITEM d/DATE [c/CATEGORY]`
8081
* `CATEGORY` accepts the CATEGORY for this income. An in` Transaction can be created without `CATEGORY` inputs.
8182
* `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)
8283
****
83-
84+
=======
8485
Examples:
8586

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

109110
=== Setting a Budget : `set`
110111

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

160159
Split a bill with your friends +
161-
Format: `split $/AMOUNT n/NAME1 [n/NAME2]... [s/SHARE]...`
162-
160+
Format: `split $/AMOUNT n/NAME1 a/DESCRIPTION [d/DATE] [n/NAME2]... [s/SHARE]...`
163161

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

172-
Examples:
174+
===== Ledger GUI
175+
.Sample Ledger Graphical User Interface
176+
image::LedgerUI.png[]
177+
178+
This is how the *Ledger* looks when you switch to the *Ledger* tab. +
179+
The left shows the people who has unresolved balances with you, while the right lists
180+
all transactions that have to do with the *Ledger*. +
181+
*Ledger*'s balance is separate from the *BankAccount*. It is displayed in the same position,
182+
at the bottom right corner.
183+
184+
==== Example Usage:
185+
* `split $/1000 n/Amy n/Betty n/Catherine n/Dan a/haidilao`
186+
187+
$1000 is split equally between Amy, Betty, Catherine, Dan and the user.
188+
189+
. Enter appropriate command into the command line.
190+
+
191+
.Splitting evenly
192+
image::SplitEven1.png[]
193+
+
194+
. Result is displayed accordingly
195+
+
196+
.Splitting evenly (result)
197+
image::SplitEven2.png[]
198+
+
199+
For an even split of $1000, each person pays $200. Therefore *Ledger* shows $200 on the tab of each person.
200+
*Ledger* balance does not include the amount spent by the user. In this bill, the user is owed $800 in total
201+
from the rest of his friends. Therefore *Ledger* balance is -$800, as shown in the bottom right.
202+
203+
* `split $/100 n/Albert n/Bernard n/Clement s/2 s/1 s/7 a/kbbq dinner`
204+
205+
$100 is split with Albert owing $20, Bernard owing $10 and Clement owing $70.
206+
207+
. Enter appropriate command into the command line.
208+
+
209+
.Splitting unevenly
210+
image::SplitUneven1.png[]
211+
+
212+
. Result is displayed accordingly
213+
+
214+
.Uneven split results
215+
image::SplitUneven2.png[]
173216

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

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

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

184-
Examples:
223+
==== Example usage:
224+
225+
* `receive $/20 n/Albert`
185226

186-
* `receive $/2.5 n/Albert`
227+
Transfers $20 from Albert to user. If Albert is no longer owe or is owed money, he will be removed from the Ledger.
228+
229+
. Enter appropriate command into the command line.
230+
+
231+
.Receive payment
232+
image::Receive1.png[]
233+
+
234+
. Result is displayed accordingly.
235+
+
236+
.Receive payment result
237+
image::Receive2.png[]
238+
+
239+
Albert is removed from the *Ledger* since he no longer owes any money. *Ledger* balance is also updated accordingly.
187240

188241
=== Projecting Balance : `project`
189242

docs/images/LedgerUI.png

34 KB
Loading

docs/images/Receive1.png

35.2 KB
Loading

docs/images/Receive2.png

35.2 KB
Loading

docs/images/SplitEven1.png

24.1 KB
Loading

docs/images/SplitEven2.png

31.7 KB
Loading

docs/images/SplitUneven1.png

24.4 KB
Loading

docs/images/SplitUneven2.png

34.5 KB
Loading

docs/images/startingUp.png

32.4 KB
Loading

src/main/java/seedu/address/logic/commands/ReceiveCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public class ReceiveCommand extends Command {
2222
+ ": Friend pays you some money.\n"
2323
+ "Parameters: "
2424
+ PREFIX_AMOUNT + "AMOUNT "
25-
+ "[" + PREFIX_DESC + "DESCRIPTION] "
2625
+ PREFIX_NAME + "NAME "
26+
+ "[" + PREFIX_DESC + "DESCRIPTION] "
2727
+ "[" + PREFIX_DATE + "DATE]\n"
2828
+ "Example: " + COMMAND_WORD + " "
2929
+ PREFIX_AMOUNT + "600 "

0 commit comments

Comments
 (0)