By: CS2113T-W12-4 Since: Jun 2016 Licence: MIT

1. Introduction

drink io logo

Drink I/O is a desktop application that helps you to manage your drink distribution company. You can use Drink I/O to keep track of your inventory and analyse your company’s sales performance. Drink I/O is optimised for Command Line Interface (CLI), allowing you to manage your company faster than traditional Graphical User Interface (GUI) apps, while retaining the benefits of a GUI

This user guide provides comprehensive documentation on the Drink I/O setup process, the features you can access and the commands you can use. Choose a topic from the Table of Contents above to find answers, get instructions and learn to improve your workflow with Drink I/O.

1.1. How to use this guide

General Command Format

  • Words in UPPER_CASE are the parameters supplied by users

  • Use underscore for spaces for fields other than NAME

  • Parameters can be supplied in any order as tags are specified

    • e.g. p/' for selling price, `n/ for name

  • Parameters in square brackets are optional

2. Quick Start

  1. Ensure you have Java version 9 or later installed in your Computer.

  2. Download the latest DrinkIO.jar here.

  3. Copy the file to the folder you want to use as the home folder for your Address Book.

  4. Double-click the file to start the app. The GUI should appear in a few seconds.

  5. Refer to Section 3.1, “Logging in” to login the product.

    login page main
  6. After login in, the main window will appear as shown below.

    Ui
  7. Type the command in the command box and press Enter to execute it.
    e.g. typing help and pressing Enter will open the help window.

  8. Some example commands you can try:
    <to be added>

  1. Refer to Section 3, “Getting Started” for details of each command.

3. Getting Started

3.1. Logging in

Upon entering starting up the application, you will be met by the login page below:

login page main

To login, you can use either the CLI or GUI to input your USERNAME and PASSWORD.

GUI Login

  1. Enter your USERNAME and PASSWORD into the respective username and password fields

  2. Click on the LOGIN button

CLI Login

  1. Enter your USERNAME and PASSWORD into the terminal in this format

    1. Format: USERNAME PASSWORD

  2. Press the ENTER key

  • User name and password are seperated with a single space when using CLI input

  • Both username and password are single words. No spaces are allowed in username or password.

Examples for CLI input:

Table 1. Table List of user accounts at first launch or upon reset
User Name Password Authentication Level

tester

123

ADMIN

manager

123

MANAGER

stocktaker

123

STOCKTAKER

accountant

123

ACCOUNTANT

The example provided is a default login account for admins. This account is created only for testing purposes.

After successfully logging in, a confirmation message would be shown indicating your authentication level:

login confirmation

3.2. Logging out

Logging out of the application will bring you back to the login screen.

  1. To log out, enter the following command into the command bar

    1. Command format: logout

  2. Press the ENTER key

4. Types of Users

In small-scale drink distribution companies, there are generally 3 critical roles and responsibilities to keep the company running:

  1. Stock taker

  2. Accountant

  3. Manager

This is taken into account in Drink I/O. Each role has a different type of Drink I/O account, and in a specific role, you can work with functions that are tailored to your role.

4.1. Stock Taker

As the stock taker is primarily in charge of updating inventory, the Stock Taker account has tailored access to the inventory manager. See Section 10.3, “Stock Taker Commands” for a summary of the commands that you can use as a stock taker.

4.2. Accountant

The accountant has access to Drink I/O's financial analysis tools in the Accountant account. See Section 10.4, “Accountant Commands” for a summary of the commands that you can use as an accountant.

4.3. Manager

A manager has access to all of Drink I/O's features and commands by using the Manager account. See Section 10.2, “Manager Commands” for a summary of the commands that you can use as a manager.

5. Managing Your Drink I/O Account

Drink I/O has a login feature. This ensure that every user has to have an account before using the application. Hence, it would increase the security of the application.

5.1. Confirmation of Command

When you enter command that will change the data storage, you will be prompted with a message as shown below:

Command confirmation

If you have confirmed the command, key in y or Y to confirm.

5.2. Changing your password

When you receive an account from manager, you want to change the password to increase security. Format: changePassword o/[OLD_PASSWORD] n/[NEW_PASSWORD]

Examples for changePassword:

  • changePassword o/123 n/1234

If password changes is successful, a message will be shown:

password change successful

5.3. Create additional account

As a manager or administrator, you want to create new account for new employee.

Format: createAccount u/USER_NAME p/PASSWORD a/AUTHENTICATION_LEVEL

AUTHENTICATION_LEVEL must be one of:

  • ADMIN

  • MANAGER

  • STOCKTAKER

  • ACCOUNTANT

Examples for create new account:

  • createAccount u/tester p/myPassword a/ADMIN

If create account is successful, a message will be shown:

create new account successful

5.4. Delete account

As a manager or administrator, you might want to delete a account when it is no longer used. Format: deleteAccount u/USER_NAME

Examples for delete old account:

  • deleteAccount u/tester

If delete account is successful, a message will be shown:

deleteAccount successful

6. Managing Your Inventory

The core feature of Drink I/O is to manage your company’s inventory. This includes the adding of drinks into the inventory, deleting, viewing their details and updating these details.

In Drink I/O, each drink has a unique name, a selling price, a cost price, stock count and tags that allow you to classify the drink (e.g. soft drink, tea) and enter any other information.

6.1. Adding new drinks

You can add new drinks into your inventory to let Drink I/O track them.

Summary
Command format: add n/NAME p/SELLING_PRICE cp/COST_PRICE [t/TAG]…​

  • NAME is the name of the drink you wish to record

    • This name must be unique among the drinks recorded in Drink I/O

    • Names are case-sensitive, and must contain only alphanumeric characters and spaces

  • SELLING_PRICE is the default selling price of 1 carton of the drink

  • COST_PRICE is the default cost price of 1 carton of the drink

    • Prices must not be negative values, and should have at most 2 decimal places

  • TAG is optional, and must contain only alphanumeric characters

    • You can add any number of tags, including 0

Step-by-Step Instructions
To enter a new drink into Drink I/O,

  1. Enter add into the command box

  2. Key in n/, followed by name of drink (NAME)

  3. Key in p/, followed by default selling price of 1 carton of the drink (SELLING_PRICE)

  4. Key in cp/, followed by default cost price of 1 carton of the drink (COST_PRICE)

  5. Press enter

  6. Confirm the command by entering y or Y

  7. Press enter

  8. Check whether the drink has been recorded successfully in the system

    • If you see the message "New drink added", followed by the drink’s details that you entered, the drink has been successfully entered into Drink I/O

      • The drink will also appear at the bottom of the inventory list panel

    • If not, follow the instructions displayed in the message display pane, and re-enter the command

  • The new drink you want to add must be have a unique name among the drinks in Drink I/O.

  • The adding of the drink will fail if SELLING_PRICE or COST_PRICE are negative values.

6.2. Searching for specific drink(s)

Finds drinks which meet specific criteria depending on the prefix of the input.

Summary
Command format:
find n/ DRINK NAME
find q/ QUANTITY
find d/ DATE

6.2.1. Searching by drink name

You can search for specific drinks by name using this search function

Finds all drinks which names contain any of the given keywords.
Format: find n/KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive. e.g coke will match Coke

  • The order of the keywords does not matter. e.g. Tea Green will match Green Tea

  • Only the drink name is searched.

  • Only full words will be matched e.g. Han will not match Hans

  • Drinks matching at least one keyword will be returned (i.e. OR search). e.g. Tea will return Green Tea, Milk Tea

Examples:

  • find n/Tea
    Returns Milk Tea and Green Tea

  • find n/Tea Milk Coke
    Returns any drink having Tea, Milk, or Coke in their names

6.2.2. Searching by drink quantity

To find out which drinks in your drink company are in need of restocking, you can utilise this search function which will return the drinks with quantity less than the quantity input.

Finds all drinks which have quantity less than the given quantity.
Format: find q/QUANTITY

  • Only numbers are allowed in the Quantity field

Examples:

  • find q/400
    Returns Coke and Green Tea which have a quantity less than 400

6.2.3. Searching by batch import date

To find out which drinks have been in the warehouse for a long period of time you can utilise this search function which will return the drinks that have batches older than the date input.

Find drinks which have batches that are older than the given date.
Format find d/DATE

  • Date must be in either of the following formats:

    • DD / MM / YYYY

    • D / MM / YYYY

  • Date must be an existing date in the calendar

    • i.e. 30/02/2018 is a nonexistent date

  • Even if a drink has only 1 batch that meets the requirements, it will be shown

Examples:

  • find d/02/11/2018
    Returns all drinks which have batches imported before 2nd November 2018

  • find d/9/11/2018
    Returns all drinks which have batches imported before 9th November 2018

6.3. Viewing all drinks in inventory

To show the full list of drinks in the inventory list, use list. This is especially useful after using a find command.

Summary
Command format: list

Step-by-Step Instructions
To view all drinks in Drink I/O,

  1. Enter list into the command box

  2. Press enter

  3. You will see alll the drinks listed in the inventory panel on the left of the interface.

6.4. Viewing drink details

To view further details of the drink such as its batches that are not displayed on the drink card panel, you can simply click on the relevant drink card to select it or use the select command.

Selects the drink identified by the index number used in the displayed drink list.
Format: select INDEX

  • Selects the drink and loads the Drink detail page and the batch list page of the drink at the specified INDEX.

  • The index refers to the numbered bullet shown in the displayed drink list.

  • The index must be a positive integer 1, 2, 3, …​

6.5. Updating drink details

You can change the cost price, selling price and tags of a drink.
For even greater efficiency, Drink I/O allows you to edit the above fields simultaneously. You can do this by specifying multiple fields to edit in a single command.

For power users
You can update multiple fields at once by indicating multiple fields to edit in one command.
Command format: edit INDEX [cp/COST_PRICE] [p/SELLING_PRICE] [t/TAG]…​

  • INDEX refers to the numbered bullet shown in the displayed drink list.

  • You must specify at least one of the fields.

6.5.1. Updating cost price

Drink I/O allows you to change the cost price of a drink after adding it.

Summary
Command format: edit INDEX cp/COST_PRICE

  • INDEX refers to the numbered bullet shown in the displayed drink list.

Step-by-Step Instructions
To edit the cost price of a drink in Drink I/O,

  1. Enter edit into the command box

  2. Enter the inventory list bullet number corresponding to the desired drink (INDEX)

  3. Key in cp/, followed by new cost price (COST_PRICE)

  4. Press enter

  5. Check whether the drink details have been edited successfully in the system

    • If you see the message "Edited drink", followed by the updated drink details, the drink’s cost price has been successfully edited into Drink I/O

      • The drink’s updated details will also be updated in the inventory list panel

    • If not, follow the instructions displayed in the message display pane, and re-enter the command

6.5.2. Updating selling price

Drink I/O allows you to change the selling price of a drink after adding it.

Summary
Command format: edit INDEX p/SELLING_PRICE

  • INDEX refers to the numbered bullet shown in the displayed drink list.

Step-by-Step Instructions
To edit the selling price of a drink in Drink I/O,

  1. Enter edit into the command box

  2. Enter the inventory list bullet number corresponding to the desired drink (INDEX)

  3. Key in p/, followed by new selling price (SELLING_PRICE)

  4. Press enter

  5. Check whether the drink details have been edited successfully in the system

    • If you see the message "Edited drink", followed by the updated drink details, the drink’s cost price has been successfully edited into Drink I/O

      • The drink’s updated details will also be updated in the inventory list panel

    • If not, follow the instructions displayed in the message display pane, and re-enter the command

6.5.3. Updating tags

Drink I/O allows you to change the optional tags of a drink after adding it.

Summary
Command format: edit INDEX t/TAG…​

  • INDEX refers to the numbered bullet shown in the displayed drink list.

  • You may enter any number of tags, including 0. To clear tags, enter t/.

Step-by-Step Instructions
To edit the tags of a drink in Drink I/O,

  1. Enter edit into the command box

  2. Enter the inventory list bullet number corresponding to the desired drink (INDEX)

  3. Key in t/, followed by new tag (TAG)

    • If you wish to clear tags, enter only t/

    • You may enter multiple tags. An example to do so: t/TAG_1 t/TAG_2

  4. Press enter

  5. Check whether the drink details have been edited successfully in the system

    • If you see the message "Edited drink", followed by the updated drink details, the drink’s cost price has been successfully edited into Drink I/O

      • The drink’s updated details will also be updated in the inventory list panel

    • If not, follow the instructions displayed in the message display pane, and re-enter the command

Editing the tags will replace all existing tags of the drink with the new specified tags.

7. Managing Transactions

To manage the purchases and sales of drinks, you can record them into Drink I/O, and let Drink I/O handle the updating of the inventory for you in real-time. These transactions also facilitate financial analyses (see Section 8, “Analysing Sales Performance”).

7.1. Creating a purchase transaction

When you make a purchase, you can increase your stocks by entering a purchase transaction.

Summary
Command format: buy n/NAME q/QUANTITY

  • NAME is the name of the drink you are entering a transaction for

    • The desired drink must be recorded in Drink I/O

    • The name entered is case-sensitive

  • QUANTITY is the number of cartons of drink that you are transacting

Step-by-Step Instructions
To record a purchase transaction,

  1. Enter buy into the command box

  2. Key in n/, followed by name of drink (NAME)

  3. Key in q/, followed by quantity purchased (QUANTITY)

  4. Press enter

  5. Confirm the command by entering y or Y

  6. Press enter

  7. Check whether the transaction has been recorded successfully

    • If you see the message "Purchase transaction recorded!", followed by the transaction details, the transaction had been successfully entered into Drink I/O

      • The transaction will also appear at the bottom of the transaction list panel

    • If not, follow the instructions displayed in the message display pane, and re-enter the command

The drink you want to transact must be recorded in Drink I/O. The drink name is case-sensitive. Otherwise, you will see the message "The drink entered does not exist in the inventory list", and the transaction will not be entered into the system.

7.2. Creating a sale transaction

When you make a sale, you can decrease your stocks by entering a sale transaction.

Summary
Command format: sell n/NAME q/QUANTITY

  • NAME is the name of the drink you are entering a transaction for

    • The desired drink must be recorded in Drink I/O

    • The name entered is case-sensitive

  • QUANTITY is the number of cartons of drink that you are transacting

    • Quantity must not exceed current stock

Step-by-Step Instructions
To record a sale transaction,

  1. Enter sell into the command box

  2. Key in n/, followed by name of drink (NAME)

  3. Key in q/, followed by quantity transacted in sale (QUANTITY)

  4. Press enter

  5. Confirm the command by entering y or Y

  6. Press enter

  7. Check whether the transaction has been recorded successfully,

    • If you see the message "Sale transaction recorded!", followed by the transaction details, the transaction had been successfully entered into Drink I/O

      • The transaction will also appear at the bottom of the transaction list panel

    • If not, follow the instructions displayed in the message display pane, and re-enter the command

  • The drink you want to transact must be recorded in Drink I/O. The drink name is case-sensitive. Otherwise, you will see the message "The drink entered does not exist in the inventory list", and the transaction will not be entered into the system.

  • The recording will fail if QUANTITY is more than the available stock in Drink I/O.

7.3. Viewing transactions

You can view all the transactions entered into Drink I/O to verify their accuracy.

Summary
Command format: viewTrans

Step by Step Instructions
To view all transactions entered,

  1. Enter viewTrans into the command box

  2. Press enter

You will see a list of all transactions displayed in the transactions panel.

8. Analysing Sales Performance

Drink I/O can calculate the overall cost, revenue and profit aggregated across all drinks, for various periods based on your list of transactions.

8.1. Indicating time period for analysis

You can indicate the time period for the analysis of overall sales figures.

Summary
Time period parameters:

  • Current day: (none)

  • Past 7 days (including current day): -w

  • Past 30 days (including current day): -m

The time periods available are:

  • within the current day

  • within the week (including current day)

  • within 30 days (including current day)

To indicate the time periods desired in your analysis, append one of the following period parameters to the end of the command:

  • -w for a period of a week

  • -m for a period of 30 days

No parameter is required for analysis in the period of a day. See Section 8.2, “Viewing overall cost” for concrete usage examples and step-by-step instructions.

8.2. Viewing overall cost

You can check the total costs incurred by your company, over a specified period.

Summary
Command format: costs [PERIOD_PARAMETER]

  • [PERIOD_PARAMETER] is the parameter indicating the time period for analyses.

    • It can be one of: (none), -w or -m

Step by Step Instructions

  • To view the total costs incurred within the current day:

    1. Enter costs into the command box

    2. Press enter

You should see the value of the total costs displayed in the results panel.

  • To view the total costs incurred within the past 7 days (inclusive of current day):

    1. Enter costs -w into the command box

    2. Press enter

You should see the value of the total costs incurred over the week displayed in the results panel.

  • To view the total costs incurred within the past 30 days (inclusive of current day):

    1. Enter costs -m into the command box

    2. Press enter

You should see the value of the total costs incurred over the past 30 days displayed in the results panel. The transactions list will also show the relevant transactions included in the analysis.

8.3. Viewing overall revenue

You can check the total revenue earned by your company, over a specified period.

Summary
Command format: revenue [PERIOD_PARAMETER]

  • [PERIOD_PARAMETER] is the parameter indicating the time period for analyses.

    • It can be one of: (none), -w or -m

Step by Step Instructions
To view the total revenue earned,

  1. Enter revenue into the command box

  2. Append a desired period parameter

  3. Press enter

You should see the value of the total revenue earned in the specified period displayed in the results panel. The transactions list will also show the relevant transactions included in the analysis.

8.4. Viewing overall profit

You can check the total profit earned by your company, over a specified period.

Summary
Command format: profit [PERIOD_PARAMETER]

  • [PERIOD_PARAMETER] is the parameter indicating the time period for analyses.

    • It can be one of: (none), -w or -m

Step by Step Instructions
To view the total profit earned,

  1. Enter profit into the command box

  2. Append a desired period parameter

  3. Press enter

You should see the value of the total profit earned displayed in the results panel. The transactions list will also show the relevant transactions included in the analysis.

9. Setting Reminders [Coming in v2.0]

10. Overview of Role-Specific Commands

General Command Format

  • Words in UPPER_CASE are the parameters supplied by users

  • Use underscore for spaces for fields other than NAME

  • Parameters can be supplied in any order as tags are specified

    • e.g. p/ for selling price, n/ for name

  • Parameters in square brackets are optional

10.1. Global Commands

10.1.1. Exiting Program: exit

Exits program. Format: exit

10.1.2. Viewing help : help

View help for respective users Format: help

10.1.3. Change password: changePassword

Change password of the current account Format: changePassword o/OLD_PASSWORD n/NEW_PASSWORD

This enables the user to change their password after manager create a default account.

10.2. Manager Commands

10.2.1. Viewing Help: help

Shows available commands with brief description of what a manager can do. Format: help

10.2.2. Add new drink into inventory: add

Add a new drink to the drink inventory. Format: add n/DrinkItem p/DEFAULT_SELLING_PRICE cp/DEFAULT_COST_PRICE

All the drinks added will be in a predefined list. As such, stock taker only able to add batches that is in this predefined list.

10.3. Stock Taker Commands

10.3.1. Viewing Help: help

Shows available commands with brief description of what a stock taker can do. Format: help

10.3.2. Increase stock of a drink: buy

Records purchase of a drink.
Format: buy n/DRINK_NAME q/QUANTITY_PURCHASED
Examples:

  • buy n/coca cola q/12

DRINK_NAME is predefined by manager, so an alert message will appear if the drink name is not in the predefined list. In addition, drink name is case-sensitive.

10.3.3. Decrease stock of a drink: sell

Record sale of a drink. Format: sell n/DRINK_NAME q/QUANTITY_SOLD Examples:

  • sell n/coca cola q/15

  • DRINK_NAME is predefined by manager, so an alert message will appear if the drink name is not in the inventory list

  • Quantity sold cannot be more than stock. Otherwise, a warning message will be shown.

10.4. Accountant Commands

10.4.1. Viewing Help: help

Shows available commands with brief description of what the accountant account can do.
Format: help

10.5. Viewing transactions: viewTrans

Shows transactions made since the start of use of Drink I/O.
Format: viewTrans

10.5.1. Get the total profit of the company over specified periods: profit

View the total profit earned in time periods of a day, 7 days and 30 days (including current day). Format: profit

To view profit earned up to now in the current day, no parameters are used. i.e. just profit To view profit earned in last 7 days, append -w To view profit earned in last 30 days, append -m

10.5.2. Get the total revenue of the company over specified periods: revenue

View the total revenue earned in time periods of a day, 7 days and 30 days (including current day). Format: revenue

To view revenue earned up to now in the current day, no parameters are used. i.e. just profit To view revenue earned in last 7 days, append -w To view revenue earned in last 30 days, append -m

10.5.3. Get the total costs of the company over specified periods: revenue

View the total costs incurred in time periods of a day, 7 days and 30 days (including current day). Format: costs

To view costs earned up to now in the current day, no parameters are used. i.e. just profit To view costs earned in last 7 days, append -w To view costs earned in last 30 days, append -m

10.5.4. Get the quantities of each drink item sold over specified periods: sales [Coming in v2.0]

View the sales number of each drink item in a period specified by the starting date and ending date. Format: sales STARTING_DATE ENDING_DATE

10.5.5. Get the trend of cost of every drink over specified periods: drinkcosts [Coming in v2.0]

View the variation tendency of the cost of every ingredient in a period specified by the starting date and ending date. Format: drinkcost STARTING_DATE ENDING_DATE

10.5.6. Exiting the program : exit

Exits the program.
Format: exit

10.6. Administrator Commands

10.6.1. Creating an account: createAccount

Creates a new Drink I/O account. Format: createAccount u/USER_NAME p/PASSWORD a/AUTHENTICATION_LEVEL

10.7. Saving the data

Drink I/O data is saved in the hard disk automatically after any command that changes the drinks data or updates the transactions.
There is no need to save manually.

11. FAQ

Q: How do I transfer my data to another computer?
A: Install Drink I/O in the other computer. Overwrite the empty data file Drink I/O creates with the file that contains the data of your previous Drink I/O folder.

12. Command Summary

12.1. Common Commands

  • logout: logout

  • exit: exit

  • help: help

  • change password: changePassword o/OLD_PASSWORD n/NEW_PASSWORD

12.2. Manager Commands

  • add new item : add n/DRINK_NAME p/DEFAULT_SELLING_PRICE cp/DEFAULT_COST_PRICE

  • create account : createAccount u/USER_NAME p/PASSWORD a/AUTHENTICATION_LEVEL

  • delete account : deleteAccount u/USER_NAME

12.3. Stock Taker Commands

  • increase quantity of stock : buy n/DRINK_NAME q/QUANTITY

  • decrease quantity of stock : sell n/DRINK_NAME q/QUANTITY

12.4. Accountant Commands

  • get total profit : profit

  • get total costs : analyseCosts

  • view transactions : viewTrans

12.5. Administrator Commands

  • create account : createAccount u/USER_NAME p/PASSWORD a/AUTHENTICATION_LEVEL