Skip to content

Simple accounting ledger application which keeps track of all expenses and credits under a user.

Notifications You must be signed in to change notification settings

sekwanaa/Accounting-Ledger-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capstone 1 - Accounting Ledger Application

The goal of this application is to allow the user to add and view accounting transactions.
It allows the user to add expenses, payments, and to view their current balance.
Additionally, the user is able to view their transactions. If they would like, they can view all transactions, or filter them by payments or expenses.
For now, instead of using a database, each transaction is stores in a file called transactions.csv.

Home Screen

This is the main screen that users will encounter when working with the application.
Users are able to:

  • Add an expense
  • Add income
  • Access the ledger screen
  • View their current balance

image

Adding transactions

Adding Expenses

image

Adding Payments

image

Accessing the Ledger

The ledger is what stores user transactions, whether it be an expense or income. The user is able to view all transactions, only expenses, or only income. Users are able to also view custom pre-defined reports to further fine tune their ability to view transactions.
Custom reports include the ability to search:

Month to Date      |      Year to Date      |      Search by Vendor
Previous Month    |      Previous Year     |      Custom Search...

image

Showing Entries

All Entries

image

Displaying Only Expenses

image

Displaying Only Income

image

Custom Reports

Custom Report Screen

image

Month to Date

image

Previous Year

image

Search by Vendor

image

Custom Search

image

Viewing Balance

Users are able to view the current balance of their ledger

image

Interesting Piece of Code

I chose this piece of code because it uses a simple ternary operator, and also easily checks each transaction for whether it satisfies all the filters. As soon as one does not satisfy it, it moves on. Only when it satisfies all the search criteria will it add it to the output.

case 6:
  System.out.print("\n-----------------Leave field blank if you do not want to search with that filter-----------------\n");
  System.out.println("-----------------------------------Everything is optional----------------------------------------\n");
  Map<String, String> filters = new HashMap<>();
  System.out.print("Start Date i.e 1999-02-18: ");
  String startDateSearch = scanner.hasNextLine() ? scanner.nextLine() : "";
  System.out.print("End Date i.e 1997-10-29: ");
  String endDateSearch = scanner.hasNextLine() ? scanner.nextLine() : "";
  System.out.print("Transaction description: ");
  String descriptionSearch = scanner.hasNextLine() ? scanner.nextLine() : "";
  System.out.print("Transaction vendor/payer: ");
  String vendorSearch = scanner.hasNextLine() ? scanner.nextLine() : "";
  System.out.print("Transaction amount:  ");
  String amountSearch = scanner.hasNextLine() ? scanner.nextLine() : "";

  if (!Objects.equals(startDateSearch, "")) {
    filters.put("startDateSearch", startDateSearch);
  }
  if (!Objects.equals(endDateSearch, "")) {
    filters.put("endDateSearch", endDateSearch);
  }
  if (!Objects.equals(descriptionSearch, "")) {
    filters.put("descriptionSearch", descriptionSearch);
  }
  if (!Objects.equals(vendorSearch, "")) {
    filters.put("vendorSearch", vendorSearch);
  }
  if (!Objects.equals(amountSearch, "")) {
    filters.put("amountSearch", amountSearch);
  }

  List<String> filteredLedger = filterSearch(filters);
  output.addAll(filteredLedger);
  break;

Error Handling

image

image

image

About

Simple accounting ledger application which keeps track of all expenses and credits under a user.

Topics

Resources

Stars

Watchers

Forks

Languages