Accounting Module Specs
The documented modules are:
Accounting_Menu
Generate Invoice
Display Invoice
Print Invoice
Search Invoice
Quarterly Report
Date to Date Report
Generate Report
Paid Invoices
Unpaid Invoice Report
Accounting Menu
Called by:
Main menu
Calls:
Print Invoice
Search Invoice
Quarterly Report
Date to Date Report
Get Menu Item
Calling Sequence:
Get Menu Item
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.
Generate Invoice:
Called by:
Display Invoice
Print Invoice
Calls:
Get Invoice
Get Billed for ( Invoice number)
Get Charged to ( Invoice number)
Get Issued by (Invoice number)
Get Guest ( Guest id)
Calling Sequence: None
Input:
A invoice number
Output:
A formated invoice
Errors:
Invoice number not found
Description:
This function generates the formated invoice layout shown to the user from the internal invoice record format.
Display Invoice:
Called by:
Accounting Menu
Calls:
Get Invoice Number
Check Invoice Number
Get Invoice
Generate Invoice
Display Invoice
Calling Sequence:
Get Invoice Number
Check Invoice Number
Get Invoice
Generate Invoice
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:
Get Invoice Number
Check Invoice Number
Get Invoice
Generate Invoice
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:
Get Search Parameters
Check Search Parameters
Get Employee ID (If needed)
Get Guest ID (If needed)
Get Charged to (If needed)
Get Billed for (If needed)
Get Issued by (if needed)
Display Seach list
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:
Generate Accounting Report
Display Accounting Report
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:
Get Report Dates
Check Report Dates
Generate Accounting Report
Display Accounting Report
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:
Get Unpaid Invoices
Display Report
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.