Document Navigator For The Design Index
Previous Section
(Book Administration)
This Section
(Customer Administration)
Next Section
(Transactions)
Previous (Data Flow Diagrams) Add Customer Next (Search Customer)

 


Add Customer Module                                   

 

Input                                   
     
Last Name
A string with a maximum length of 60 characters. This does not need to be unique to each customer (ie. more than one customer can have the same last name).
First Name
A string with a maximum length of 40 characters. This does not need to be unique to each customer (ie. more than one customer can have the same first name).
Phone number
A standard North American phone number. When entering the phone number, if the entry may begin with a '(' and if so has the form '(DDD) DDD-DDDD' where D is a decimal digit in the range of 0-9. If the entry begins with a digit then the accepted form is DDD-DDDD where D is as above. Any other input is invalid and upon leaving the entry will be cleared.
Address
A string with a maximum length of 80 characters. This field represents the name of the street portion of the customers mailing address.
City
A string with a maximum length of 20 characters. This field represents the name of the city portion of the customers mailing address. The acceptable input characters are in the range of A-Z and a-z. This field will be defaulted to the name of the city that the system is installed in.
Province
A string with exactly 2 characters. This field represents the name of the province/state portion of the customers mailing address. The acceptable input characters are in the range of A-Z and a-z. This field will be defaulted to the name of the province/state that the system is installed in.
Country
A string with a maximum of 10 characters. This field represents the name of the country portion of the customers mailing address. The acceptable input characters are in the range of A-Z and a-z. This field will be defaulted to the name of the country that the system is installed in.
Postal Code
A string with a maximum length of 11 characters. If the string begins with a letter then the string must be in the form of LDL DLD, where D is a decimal digit in the range of 0-9 and L is a letter in the english alphabet. If the string begins with a digit then it must be in the form of DDDDDDDDDDD where D is a decimal digit. Any other form the string takes is invalid and the field will be cleared.
Max Books
The maximum number of books the customer can borrow. This field can only be modified by a user with supervisor status. This field will be defaulted to a value determined by the customer.
Max fine
The maximum amount of fines the customer can have. Like the max books, this value can only be modified by a user with supervisor status. This field will be defaulted to a value determined by the customer.
Restricted
Specifies whether or not the customer can borrow. Calculated automatically by the system when the customer's fines exceed the maximum amount allowed. The number of books the customer currently has on loan cannot exceed the maximum number of books allowed. This field will be defaulted to 'No'.
Customer ID Number
A unique integer determined and supplied by the system.
Fines
The customers current fines in dollars and cents. This field will be supplied by the system.

 

Outputs                                   
     Upon acceptance and verification of the customer data the customer will be added to the database.
     If an unrecoverable error (such as read write errors to the database) occurs the module will output the error code to the error handling module.
     Recoverable errors (such as duplicate customer) will be dynamically handled by this module through user interaction.

 

Error Conditions                                   
     Syntax errors on inputs to the fields with required formats.
     Input missing from field. (all fields must be complete)
     Customer already exists in the database.
     A change to the default values for Max Books, Max Fines or Restricted with out the valid supervisor password.
     Hardware error is an unrecoverable error that will be processed by the error module.

 

Description                                   
     
Add Customer Window
This window contains text entry fields for: last name, first name, phone number, address, city, province, country, postal code, max fines, and max books. There is a checkbox for the restricted field, and the customer ID number and current fines are also displayed but are not modifiable.

Buttons Present: ADD, QUIT

ADD
Once selected, the system checks to see if all of the fields have been entered correctly and there is an entry for each field. If there are any format errors in the information fields, a message box will pop up and display a message with a list of each field that was incorrectly entered.

Button Present: OK

Select 'OK' to close the message box.

The system checks to see if there are duplicate customers in the database by comparing the first and last names. If duplicate names exist, then the system will bring up the customer search window with the first and last names supplied in the appropriate fields and the list of duplicate names found in the results section of the window (the search window is described in the 'Customer Search' section).

Buttons Present: YES, NO, SEARCH

Search Message: "Duplicate name(s) found. Continue to add new customer?"

YES
When selected, closes the search window and continues the add process.
NO
Closes the search window and returns control to the 'Add Customer' window for further modifications of the add new customer process.
SEARCH
Perform a search based on the search criteria as stated in the 'Customer Search' section.
The system checks if the 'Max Books', 'Max Fines', or 'Restricted' fields have been modified. If this is the case, a message box will pop up.

Message: "x requires supervisor approval. Do you wish to continue?" where x is 'Max Books' and/or 'Max Fines' and/or 'Restricted'

Buttons Present: YES, NO

YES
A supervisor approval window pops up (described in 'Supervisor Approval' section). If the approval was ok then the system will close the message box and continue to add the customer. Otherwise, the system will close the message box, change the appropriate fields to their default values, and discontinue the add process by returning control to the 'Add Customer' window.
NO
Close the message box, change the appropriate fields to their default values, and discontinue the add process by returning control to the 'Add Customer' window.
The system will add the customer's information to the database. If an error occurs at this point, control is passed to the error handler along with the error code. If the process was successful, a message box will pop up.

Message: "Process Successful"

Button Present: OK When selected, the message box is closed as well as the 'Add Customer' window and control is returned to the 'Customer Administration' window.

QUIT
If selected, the 'Add Customer' window is closed and control is returned to the 'Customer Administration' window.

 

Walkthrough                                   
     The librarian inputs all of the customer's information in the appropriate fields. The librarian selects the 'Add' button to add this customer to the database. If there is a duplicate name in the database, the librarian can shrink the results list by inputting additional information for other fields (such as phone number) and then pressing the 'Search' button. By looking at the duplicate names list, the librarian can decide to continue to add the customer by pressing the 'Yes' button or discontinue by pressing the 'No' button. If the librarian modified restricted information, the approval of a supervisor will be required.

 


Document Navigator For The Design Index
Previous Section
(Book Administration)
This Section
(Customer Administration)
Next Section
(Transactions)
Previous (Data Flow Diagrams) Add Customer Next (Search Customer)

Copyright ©1997 VoidWorks Software Inc.

Send mail to the Group Leader or the Webmaster
Pages created and maintained with Mortar