Accounting Module Specs


The documented modules are:
  1. Accounting Menu
    • Called by:
      • Main menu
    • Calls:
      • Print Invoice
      • Search Invoice
      • Quarterly Report
      • Date to Date Report
      • Get Menu Item
    • Calling Sequence:
      1. Get Menu Item
      2. Any of the first four
    • Input:
      • None
    • Output:
      • Exit Status
        • 0 - Do not exit the program
        • 1 - Exit the program
    • Errors:
      • None
    • Description:
      • This modules calls Get Menu Item to wait for the user to choose a menu option. It then calls the function that the user selected. If the user choose to quit the program it return exit an exit code.
  2. Generate Invoice:

    It seems odd that the invoices are printed by invoice number and not by room number of customer name. How will we know what the invoice number for the particular customer is when he/she checks out? Will we have to look for it first?

  • Display Invoice:

    The module specs are a little hard to understand- print invoice and display invoice seem to call themselves. Please clarify.

    • Called by:
      • Accounting Menu
    • Calls:
      1. Get Invoice Number
      2. Check Invoice Number
      3. Get Invoice
      4. Generate Invoice
      5. Display Invoice
    • Calling Sequence:
      1. Get Invoice Number
      2. Check Invoice Number
      3. Get Invoice
      4. Generate Invoice
      5. Display Invoice
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • An Invalid Invoice number - Prompt the user again
      • The invoice doesn't exist.
    • Description:
      • This function prompts the user for an invoice number and then display the invoice to the screen. The format of the invoice will be shown later.
  • Print Invoice
    • Called by:
      • Accounting Menu
    • Calls:
      • Get Invoice Number
      • Check Invoice Number
      • Get Invoice
      • Generate Invoice
      • Print Invoice
      Calling Sequence:
      1. Get Invoice Number
      2. Check Invoice Number
      3. Get Invoice
      4. Generate Invoice
      5. Print Invoice
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • An Invalid Invoice number - Prompt the user again
      • The invoice doesn't exist.
    • Description:
      • This function prompts the user for an invoice number and then prints a copy of the invoice on the system printer. The format of the invoice will be shown later.
  • Search for Invoice
    • Called by:
      • Accounting Menu
    • Calls:
      • Get Search Parameters
      • Check Search Parameters
      • Check Room Number
      • Check Employee Name
      • Check Guest Name
      • Check Date
      • Get Employee ID (Employee Name)
      • Get Guest ID (Guest Name)
      • Get Charged to (Guest ID)
      • Get Billed for (Room #)
      • Get Issued by (Employee ID)
      • Display search results
      • Display message
    • Calling Sequence:
      1. Get Search Parameters
      2. Check Search Parameters
      3. Get Employee ID (If needed)
      4. Get Guest ID (If needed)
      5. Get Charged to (If needed)
      6. Get Billed for (If needed)
      7. Get Issued by (if needed)
      8. Display Seach list
      9. Display message (if needed)
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • Invalid search parameters
      • No invoice records found
    • Description:
      • This function displays a search parameters window that allows the user to specify search parameters. It then checks that the given parameters are valid. With the valid parameters it finds all the invoice records that meet the given critiera. The list of invoice records is then displayed to the user.
  • Quarterly Report
    • Called by:
      • Account Menu
    • Calls:
      • Generate Accounting Report
      • Display Accounting Report
      • Print Accounting Report
    • Calling Sequence:
      1. Generate Accounting Report
      2. Display Accounting Report
      3. Print Accounting Report ( If requested )
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • Not enough data to make a quaertly report
    • Description:
      • This function calls the Generate Accounting Report for the last 3 months. It then displays the report to the screen with the option to print it.
  • Date to Date Report
    • Called by:
      • Accounting Menu
    • Calls:
      • Get Report Dates
      • Check Report Dates
      • Check Date
      • Generate Accounting Report
      • Display Accounting Report
      • Print Accounting Report
    • Calling Sequence:
      1. Get Report Dates
      2. Check Report Dates
      3. Generate Accounting Report
      4. Display Accounting Report
      5. Print Accounting Report ( If requested )
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • Invalid date format for either date
      • The start date is less than the ending date
      • We don't have the data for the start or end date
    • Description:
      • This function prompts the user for a starting and ending date for the report. It then checks to make sure that the dates are valid and the starting date is less than the ending date. It calls Generate Accounting Report with the two dates to generate the report.
  • Generate Accounting Report
    • Called by:
      • Quarterly Report
      • Date to Date Report
    • Calls:
      • Get Invoices ( start date, end date)
    • Calling Sequence: (None)
    • Input:
      • Starting date
      • Ending Date
    • Output:
      • A formated Invoice report
    • Errors:
      • None
    • Description:
      • This function is passed the starting and ending dates of the report. It queries the invoice datastore for all the invoices between the dates and generates the report.
  • Paid Invoice
    • Called by:
      • Account Menu
    • Calls:
      • Get Invoice Number
      • Check Invoice Number
      • Get Invoice
      • Put Invoice
    • Calling Sequence:
      • Get Invoice Number
      • Check Invoice Number
      • Get Invoice
      • Put Invoice
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • The invoice number has an invalid format
      • The invoice given doesn't exist
      • The invoice is already paid
    • Description:
      • This function allows the accounting user to pay an outstanding invoice.
  • Unpaid Invoice Report
    • Called by:
      • Account Menu
    • Calls:
      • Get Unpaid Invoices
      • Display Report
      • Print Report ( If requested )
    • Calling Sequence:
      1. Get Unpaid Invoices
      2. Display Report
      3. Print Report ( If requested )
    • Input:
      • None
    • Output:
      • None
    • Errors:
      • No unpaid invoices
    • Description:
      • This function generates a report which lists all the unpaid invoices. It is displayed to the screen and the user can print it out if they want.