Top Banner
GAMMA Entertainment Payroll System Contents a.1. Definition of the problem a.2. Investigation and analysis b.1. Nature of the solution b.2. Intended Benefits b.3. Limits of the system c.1. Development and Testing c.2. Implementation c.3. Suitability of available facilities d.1. Technical Documentation d.2. User Documentation e.1. Degree of Success e.2. users response e.3. Desirable extensions Appendix 1 (Annotated Coding) Appendix 2 Candidate Name: H. Chathuranga B. Sumanasekera - 1 -
218
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Contentsa.1. Definition of the problema.2. Investigation and analysis

b.1. Nature of the solutionb.2. Intended Benefitsb.3. Limits of the system

c.1. Development and Testingc.2. Implementationc.3. Suitability of available facilities

d.1. Technical Documentationd.2. User Documentation

e.1. Degree of Successe.2. users responsee.3. Desirable extensions

Appendix 1 (Annotated Coding)Appendix 2

[A] (i) Definition – Nature of the problem1. Company Background

Candidate Name: H. Chathuranga B. Sumanasekera - 1 -

Page 2: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

GAMMA Entertainment was established in 1994 as an Audio & Visual equipment provider for movie makers and TV crews. It rents out items such as expensive high-speed cameras, tripods, wireless microphone systems, audio analyzers and such related industrial equipment. These equipment are highly expensive for videographers (movie makers, etc.) to buy just for the production of a certain program or movie so it is commonly rented for periods of time when they are needed.

The company imports its items directly from manufacturers located around the world. It deals with popular brands such as SONY, PANASONIC, JVC, etc.

The company currently maintains three branches in Sri Lanka with its head office based in Colombo. It employs over 100 people in its island-wide branches. Separate departments located at the head office deals with the company’s management such as stock control and its payroll.

2. Problem Definition

GAMMA Entertainment currently operates a manual payroll system which is handled by the Accounting Department. However recent technological advances have made this process highly inefficient.

The current method uses a daily register where the employee have to sign in with details of time and date, which is later used to calculate his or her pay. However the details entered can be easily altered or false which may affect the pay calculation causing it to be inaccurate.

Furthermore the pay is often not delivered to on time resulting in inconvenient delays in paying the salaries.

The management therefore wishes to build a new computerized payroll system which automatically records the time the employee comes and leaves the office so that the new system can be fast, accurate and efficient.

3. Overview of the Current System

Inputs Initially when an employee joins the company his personal details are taken and stored in a

separate file marked ‘Personnel Information’. GAMMA Entertainment uses a daily register in which all employees have to sign

when entering and leaving the premises. The data is taken each day and the employee has to enter his/her name, ID no., and the

entering and leaving time. Their signature is also taken is proof that the record was entered by a certain employee.

At the end of the month the data is handed over to the Accounting Department at the head office for the calculation of the salaries.

When an employee wants to take leave the details are entered into a ‘Leave Register’ProcessingAccounting Department uses the data recorded in the Daily Register to calculate each employee’s salary.

Candidate Name: H. Chathuranga B. Sumanasekera - 2 -

Page 3: AL Computer Project - Gamma Entertainment Payroll System

Daily Register

ManualPayroll System

Employees

Management

Attendance Data

Pay – bank cheques

Summarized Expenditure

Report

GAMMA Entertainment Payroll System

The beginning characters of the ID no. shows in which department the particular employee is working (e.g. SD012 would mean that the employee works in the Sales Department) so that the Accounting Department know what that individual’s normal salary is and what bonuses he is liable to receive.

The Department retrieves these data from a separate Account Rates File which also has the amount which the employee is supposed to be paid.

A standard rate per hour is used when calculating the Salary. This rate can differ among various employees depending on their rank. The number of hours each employee has worked is calculated manually from the Register.

If the an employee’s hours worked exceeds the standard no. of hours required by the company for an employee to work per month, those exceeding hours are considered as overtime hours and calculated according to the company’s overtime rates which may vary for different departments. For example if the standard no. of hours per month is 180, and the employee has worked 195 hours in one month, then (195-180) = 15 hours is taken as the amount of overtime hours.

The information of each employee’s pay is used to compile a summarized report for the management’s use.

When leave details are entered into the Leave Register the amount of days of leave the employee have left to take is calculated by deducting the days of leave taken from the allowed amount of leave days.

Output The Accounting Department stores each month’s Daily Register for company’s needs and

also uses it to recheck a salary if a calculation is suspected to be incorrect. The pay is handed over to the employees usually in the first week of the next month. It is

handed over in the form of a bank cheque which the employee can deposit in their bank account.

A summarized report is handed over to the management each month. The report is typed in a computer using an ordinary word processor. This report contains that month’s total salaries paid along with the amount paid to each department. The management uses this report to check the company’s expenses and the overall development.

The results from the calculation of days from the leave data are stored in the Leave Register itself.

[A] (ii) Investigation and Analysis1. Fact Finding

Candidate Name: H. Chathuranga B. Sumanasekera - 3 -

Page 4: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

All the employees where handed out questionnaires that they were asked to fill out. A sample of the questionnaire is shown below.

The questionnaire was designed to find whether the employee:

is satisfied or not with the current manual payroll system

Candidate Name: H. Chathuranga B. Sumanasekera - 4 -

141, Galle Road, Bambalapitiya, Sri Lanka.

EMPLOYEE QUESTIONNAIRE

EMPLOYEE ID: ………..

EMPLOYEE NAME: ……………………………………………………..

1) Are you satisfied with the currently used method to calculate your monthly pay? If not ‘Yes’ please give a reason for your answer.| | Yes | | Satisfactory | | No

………………………………………………………………………………………………

2) Are you capable of using a personal computer?

| | Yes | | No | | Yes, but not very well

3) Do you prefer the establishment of new method to calculate your pay (such as a computerized system)?| | Yes | | No

4) Are there any particular changes you would like to see in new system from the current one?………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

………………………….. …………………………….

SIGNATURE DATE

Page 5: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

is capable of handling a computerized system if implemented favors the establishment of a new system and any other input the employees had to offer

The information gathered here would take a vital role on making the final decision of the building of a new system.

The head of the accounting department was interviewed and he demonstrated the way how the current system operated. This interview divulged information not only on how the current system works (see (i) 3. Overview of the Current System) but also the shortcomings of the system which was used to construct the User Requirements described in the next section.

The Q & A session with the head of the Accounting Department is given below.

Q: Sir, where do the Department get the data it requires to create the payroll?A: The company maintains an ‘attendance register’. Here when the employee comes in to the office he or she will write the time they came, their ID and their signature. When they leave they simply write that time in another column of the row they filled in the morning.

Q: Are any problems currently with this method of data collection?A: Yes, inaccuracy is the main factor. We do have a security guard at the place where they sign in but it’s still not very effective. Also sometimes we encounter that the handwriting is illegible.

Q: What do you do in such cases (when the handwriting is illegible)?A: We just read it the best we can. There is no other way, as the employee would certainly not remember the exact time he came in.

Q: What is the first thing you do once you get the attendance data?A: We have a sheet in which every employee’s ID is displayed in the rows and the each date of the month is displayed in the columns (see diagram below). We use the data from the ‘attendance register’ to fill in the sheet. The –in and –out times for each day a subtracted manually. The total hours worked is calculated by adding the individual hours worked for each day.

Month – March 2005Emp. ID 1st 2nd 3rd 4th 5th 6th ….. Total Hours Worked

Q: What is done next?

Candidate Name: H. Chathuranga B. Sumanasekera - 5 -

Page 6: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

A: We have another similar sheet (see below), but here instead of the dates of the month we have the column headings ‘Total Hours Worked’, ‘Standard Hours’, ‘Overtime Hours’, ‘Pay’, ‘Overtime Pay’ and ‘Total Pay’.

We have a standard no. of hours which each employee has to work. If he works more than the amount of ‘Standard Hours’ then it is taken as overtime. He standard no. of hours defer from department to department. So in this column we put Standard hours the employee should have worked according to the employee’s particular department.

Emp ID Tot. Hours Worked Standard Hours Overtime Hours Pay Overtime Pay Total Pay (Rs.)

Q: How do you know which department an employee works in?A: From the employee ID. The first two letters in the ID stand for the department they work for. For an example if the ID is SD120 then he works in the Sales Department. Similarly AD stands for Accounting Department and TD stand for Technical Department.

Q: How are the other columns filled?A: The Overtime Hours is calculated buy subtracting the ‘Total Hours Worked’ by ‘Standard Hours’. Of course if ‘Total Hours Worked’ don’t exceed ‘Standard Hours’ then we simply put ‘0’ in the Overtime column.

The ‘Pay’ is calculated by multiplying the ‘Standard Hours’ by the hourly pay rate defined by the company for particular employees in particular departments. But if the ‘Total Hours Worked’ is less than ‘Standard Hours’ then Total Hours is multiplied by the pay rate. The Overtime Pay is calculated by multiplying the Overtime Hours by the overtime pay rate. Finally the ‘Pay’ and the ‘Overtime Pay’ is added to give the ‘Total Pay’.

Q: What is the next step?A: The pay slips are created manually by looking at the sheets we filled. Then the pay slips are distributed among the employees.

Q: Is there anything else you do after creating pay slips?A: Yes, we create a simple expenditure report for the Management. It contains each employee’s ID with the pay he or she received and the total amount of money spent for the pay of all the employees.

Q: Is that your department’s final task?A: Yes, that’s all we do under the payroll system.

Data Flow Diagram (DFD)

Candidate Name: H. Chathuranga B. Sumanasekera - 6 -

Page 7: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The Data Flow Diagram (Second level) for the current system, created using the data gathered in the above section is shown below.

2. Requirements of the New System

Candidate Name: H. Chathuranga B. Sumanasekera - 7 -

[1]

[2]

[3] [4]

Page 8: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Functional Requirements:

1) Each individual employee should be capable of entering only his/her own in/out times and no one else’s.

Input: Demand the employee enter his or her own unique password before allowing them to enter the -in and -out times.Process: Check with the records in the database to see if the employee has entered the correct password.Output: Allow authorized employee to enter their –in and –out times.

2) The new system should allow the employee to enter only the accurate times he/she comes and leaves the office.

Input: The time the employee logs-in and out of the system.Process: Store the computer clock time of the log times in the database and calculate the difference in the –in and –out times to know the hours the employee worked.Output: Use data stored in the database to help calculate the pay.

3) The payroll has to be calculated in an easy and accurate method in such a way that no user may alter the final pay details

Input: Require the user to enter employee ID and the month to calculate pay.Process: Calculate the pay using the attendance data stored during the course of the month.Output: Display the pay information where the user cannot alter the data.

4) Details of leave obtained by an employee should be recorded and deducted from the amount of annual leave the company allows an employee to take.

Input: Employee must enter the amount and type of leave he or she requires.Process: Deduct the amount entered from the amount of leave the employee is entitled to from the data in the database.Output: The remaining amount of days of leave available should be displayed.

5) Summarized Reports should be generated easily and accurately.Input: Data from the Pay table in the database.Process: Report should be generated in the pre-defined report layout.Output: The Report should be displayed and printed.

Non-Functional Requirements

Candidate Name: H. Chathuranga B. Sumanasekera - 8 -

Page 9: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

6) Different levels of authorization so that low level entities such as employees and accountants do not have the capability to alter hourly pay rates, overtime rates, etc. Only those in the management level should be allowed to this.

7) The amount of hours worked should be calculated flawlessly and unauthorized editing of this data should not be allowed (i.e. no alteration or tampering of the data ought to be permitted) so that the pay calculated is fair and accurate.

8) Should be designed to provide good user-friendliness interface so that all users can easily use the system regardless of their individual computer skill.

3. Alternative Solutions

Candidate Name: H. Chathuranga B. Sumanasekera - 9 -

Page 10: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Having gathered adequate data about the current payroll system of GAMMA Entertainment, the following possible solutions have been drawn up.

A. Complete Automation of the Payroll System: -

One possible solution would be to construct a completely automated system to achieve the noted objectives in section (ii) 2. Requirements of the New System. Here two main programs - Microsoft Visual Basic 6.0 and Microsoft Access 2002 will be used to create the necessary computer program.

Using the various tools available with Microsoft Visual Basic, the interface and the program can be built easily and quickly. In addition, Visual Basic can be used to automate data entry where possible and to perform the required calculations using the data. The database needed for the storage of various kinds of information, such as employee data, times each employee came and went and pay data, could be built using the facilities available in Microsoft Access. Access can also be used to construct any queries and tables that may be required for the system.

Pay slips can also be produced using the data stored in the database. Passwords issued for individual employee can be used to ensure the level of accuracy for the data entered.

In this solution initial set up costs (i.e. purchase of computers, any additional printers, etc.) would be high, but it would also achieve all the objectives stated earlier to a satisfactory level.

B. Improving the Existing Manual System: –

The other possible solution would be to improve the currently existing system. In order to do this more staff will have to be recruited who can handle the increasing amount of work within the current system.

This will include assigning a reliable staff member to oversee entering the -in and –out times for each employee. Furthermore, additional staff members in the Accounting Department will be charged with speeding up the pay calculations process and also recheck such calculations to ensure the highest possible levels of accuracy. In addition, the staff should also be trained (using workshops, seminars, etc.) to work more resourcefully so that the system would be much more efficient than its current status. This system will cause a long term expenditure increase of the company due to the cost of hiring new staff members to make the Department more efficient.

Furthermore, this system may not be capable of accomplishing all the objectives that was stated earlier.

4. Evaluation of the Alternative Solutions

Candidate Name: H. Chathuranga B. Sumanasekera - 10 -

Page 11: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Having drawn up the alternative solutions, the individual advantages and disadvantages of the alternative solutions have been discussed below.

A. Complete Automation of the Payroll System

Advantages

The amount of possible human errors will be minimized if this system is implemented whereas in a manual system human errors (in calculations, etc.) would certainly occur. Furthermore, the automated system, using the computer system’s own time settings, would be highly accurate in recording the times employees come and leave the office.

The management of GAMMA Entertainment already has possession of several computers under the Accounting Department that could be used to implement the automated system if necessary with a minimal consumption of money if the Department was instead renewed to make it more efficient, as the renewal process will itself cost a considerable amount of money which may not be economical.

The expenditure of paying the salaries of the staff can be reduced as certain staff members who were earlier charged with the manual payroll system can be replaced by one staff member who is capable of handling the computerized system.

The automated system would capable of producing the pay slips of individual employees and the creating of Expenditure reports in a very time efficient manner.

Disadvantages

The system will required a backup power supply (such as an Uninterrupted Power Supply – UPS which means more expenditure) as it cannot survive a power failure.

B. Improving the Existing Manual System: -

Advantages

This system can work effectively throughout the day as it does not depend on electrical power supply and it will not experience system crashes unlike an automated system.

The staff does not specifically need to be trained to handle computers and other related equipment.

Disadvantages

This system may not be able to achieve all the objectives of a new system in which case it would unnecessary to use such a system.

Candidate Name: H. Chathuranga B. Sumanasekera - 11 -

Page 12: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The definite increase in expenditure due to extra staff costs may not be financial feasible for the company when it is looking to increase its profits and income.

Workshops in which the staff has to undergo training may not prove economical. It might also disrupt the normal functioning of the department when the employee goes to attend these workshops and seminars.

Overall Evaluation

Feasibility Study:

The feasibility study of the Automated System conducted using the data received from the questionnaires and the interview held with the head of the Accounting Department (see (ii) 1. Fact Finding) is shown below.

Economic Feasibility: The company, as it already posses some computers, would need to purchase a minimal amount of new items and upgrades. This factor proves that the implementation of a new system would be economical to the company when looking at the improvements it will make to the accounting department.

Social Feasibility: The research conducted within the staff members has found that most of them have the basic knowledge required to operate a computer which is advantageous as they do not need to be specially trained to handle the new system.

Technical Feasibility: As mentioned above, the company already posses some computers (which were used by the Accounting Department for word processing the summary reports) that, upon inspection was discovered, will be suitable to be used for the new system after an upgrade is done to them.

Conclusion:

After going through advantages and disadvantages of the possible solutions and the Feasibility Study the Company decided that automation of the payroll system as the best option currently available.

Candidate Name: H. Chathuranga B. Sumanasekera - 12 -

Page 13: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[B] (i) Nature of the Solution1. Objectives of the System

The objectives the new system should achieve are given below based on the results of the

investigation and analysis section.

1) Employee should be only able of entering their own times (at which they come and leave

the office) and no one else’s. The times entered must also be highly accurate.

2) Details of leave obtained by an employee should be recorded and deducted from the amount

of annual leave the company allows an employee to take.

3) The payroll has to be calculated in an easy and accurate method in such a way that no user

may alter the final pay details.

4) Summarized Reports should be generated easily and accurately using the data available in

the database.

5) Different levels of authorization so that low level entities such as employees and

accountants do not have the capability to alter hourly pay rates, overtime rates, etc. Only

those in the management level should be allowed to this.

6) The amount of hours worked should be calculated perfectly and unauthorized editing of this

data should not be allowed (i.e. no alteration or tampering of the data ought to be permitted)

so that the pay calculated is fair and accurate.

7) Should be designed to provide good user-friendliness interface so that all users can easily

use the system regardless of their individual computer skill.

Candidate Name: H. Chathuranga B. Sumanasekera - 13 -

Page 14: AL Computer Project - Gamma Entertainment Payroll System

Employee

Attendance Information

Department

Leave

Pay Information

Employee ID

Password

Name

Address

Department

N.I.C. No

Tel No.

EPF

ETF

Worksin

Enters

Takes

DepartmentStandard Hours

Overtime Rate

Hourly Rate

Standard Days

Type of Leave

No. of days

Total Days

Employee ID

Time OutTime In

Date

Employee ID

Used to

calculate

Total PayOvertimeHours Worked

MonthEmployee ID

Many

One

One

One

One

Many

GAMMA Entertainment Payroll System

2. System Design (file and data structures)

Normalization of File Structure:

The Entity-Relationship (ER) diagram for the file structure is given below.

As seen above for the ER diagram, all entities are already normalized. Therefore no more normalization is required at this stage.

Candidate Name: H. Chathuranga B. Sumanasekera - 14 -

Page 15: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

File Structure:

The data will be stored in a database which shall constitute of 5 tables:

a) Employee Datab) Attendance Datac) Department Datad) Leave Detailse) Pay Details

Each of the tables, their field names and respective data types has been explained below.

a) Employee Data

Table Name: EmployeeDataPrimary Key: EmployeeIDContents: This table will contain all personal details of every employee in the payroll.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

Password Text 20 Password

Name Text 50

Address Memo -

TelNo Number Long Integer 0000000000

NICNo Text 10 000000000L

Department Text 15

EPFNo Number Long Integer

ETFNo Number Long Integer

b) Attendance Data

Table Name: AttendanceDataPrimary Key: EmployeeID, DateContents: This table will contain the times each employee enters and leaves the office so the payroll can be calculated from the hours worked which can be found by the data in this table.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

Date Date/Time - 99/99/0000;0;_

TimeIn Date/Time - 99:00:00\ >LL;0;_

TimeOut Date/Time - 99:00:00\ >LL;0;_

Candidate Name: H. Chathuranga B. Sumanasekera - 15 -

Page 16: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

c) Department Data

Table Name: DepartmentPrimary Key: DepartmentContents: This table will contain all pay details for every department (such as hourly rates, overtime rates, etc.)

Field Names Data types Field Size Input MaskDepartment Text 15

HourlyRate Currency - 999

StandardHours Text 3 999

OvertimeRate Currency - 999

d) Leave Details

Table Name: LeaveDetailsPrimary Key: EmployeeIDContents: This table contains the amount of leave an employee has taken and the amount remaining.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

StandardDays Text 2 99

Casualleave Text 2 99

Sickleave Text 2 99

Emergencyleave Text 2 99

Nodays Number Long Integer 99Totaldays Number Long Integer 99

e) Pay Details

Table Name: PayDetailsPrimary Key: EmployeeID, MonthContents: This table contains the information gathered when calculating the pay, such as hours worked and also the total pay for the employee.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

Month Text 8 -

HoursWorked Number Long Integer 999

Overtime Number Long Integer 999

TotalPay Currency - 999999The relationships between the 5 tables are as shown:

Candidate Name: H. Chathuranga B. Sumanasekera - 16 -

Page 17: AL Computer Project - Gamma Entertainment Payroll System

AttendanceData

EmployeeData

LeaveDetails

Department PayDetailsOne

One One

OneMany

Many

Many

One

GAMMA Entertainment Payroll System

Query Design:

1. Date Query

Used in the Attendance Form where employees have to log in when they come to the office and when they leave the record they saved on earlier has to be retrieved. This query is used to perform that task.Name: QueryDateTable(s): Attendance Data Criteria: Enter Employee ID, Enter Date

2. Pay Query

Used to retrieve records of employees in a certain month in order to calculate his/her pay.Name: QueryPayTable(s): Pay details Criteria: Enter Employee ID, Enter Month

3. Attendance Data Delete Query

This query is used to retrieve all the records of a certain employee in the Attendance Data table so that they can be deleted. This is required in order to delete an employee from the database.Name: QueryDelete_ATable(s): Attendance DataCriteria: Enter Employee ID

4. Pay Data Delete Query

This serves the same purpose as the earlier one (above) except that this time the Pay Details table’s records of a certain employee is deleted.Name: QueryDelete_PTable(s): Pay detailsCriteria: Enter Employee ID3. Hardware requirements of the system

Candidate Name: H. Chathuranga B. Sumanasekera - 17 -

Page 18: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The hardware devices that would be required to setup the system are given below.

Device Technical Specification Cost (Rs.) Required For

Processor Intel Pentium® IV Processor 1800 MHz 13,000 Processor is required to form a

functional computer.

Motherboard ASUS K8N4 series P4 supported motherboard 12,000

Motherboard is a primary component of a computer system. All other devices are connected to this.

Monitor 15” Philips/LG Color Monitor – CRT/LCD

CRT – 6,000LCD – 14,000

Good monitors allow the display of high-resolution graphics and LCD screens can be used to reduce eye strain but is expensive.

Hard Disk 15GB 6,000Used to store the OS, other vital programs as well as the database with the Payroll program.

Graphics NVIDIA GeForce 4 – 128 MB 7,000The Payroll system and OS like Windows XP requires a formidable graphics card to function smoothly.

CDR-ROM CDR-ROM drive – LITEON 52X read and 24X write speed. 3,000

CD-ROM will have to be used to install softwares and the CDR can be used to save backup copies of the database.

Speakers Standard 100W speakers(2 channel audio) 750

Speakers is a low cost solution that enables sound output that shall be used by the Windows OS and the Payroll system when producing error messages, starting & shutting down the computer, etc.

Memory Kingston 256MB DDR RAM 3,000

A sizable RAM should be available to avoid frequent system crashes and make full use of the processor‘s capabilities. Furthermore using an OS like Windows XP with advanced GUI needs good memory and graphics to function.

Keyboard & Mouse

Logitech Multimedia Anti-RSI Keyboard and Logitech optical mouse.

1,500

Obvious and essential data entry devices. Anti-RSI keyboards can help prevent Repetitive Strain Injury caused by prolonged use of a computer.

Printer Hewlett Packard InkJet printer 8,000

Inkjet printers can be used to produce satisfactory quality printouts for the pay slips and summary reports.

4. Software requirements

Candidate Name: H. Chathuranga B. Sumanasekera - 18 -

Page 19: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The software used in this system is given below along a brief description of each.

Microsoft Visual Basic 6.0 – used as the primary programming language

Microsoft Visual Basic is a powerful designing tool, which apart from allowing you to create a fashionable and attractive user interface from its Integrated Development Environment (IDE), is also one of the first development environments that frees programmers from mundane tasks and allows them to concentrate on their ultimate goal - application development.

Visual Basic has its foundation in Basic, but its capabilities spread far beyond what Basic could do as a development tool. Visual Basic 6 contains several hundred statements, functions, and keywords that are not found in the original Basic language. Many of these additions are in relation with the Window graphical interface and its object-oriented nature.

Additionally, Visual Basic also supports dynamic data exchange (DDE) and object linking and embedding (OLE).

Microsoft Access 2002 – used for database creation and management

Microsoft Access is a Relational Database Management System (RDBMS), which includes a user-friendly interface, reporting facilities, and other tools that make it easy for the creation, and management of databases. Microsoft Access, apart from being used to create all the databases and its tables, can also be used to create the necessary queries and filters for the automated system.

Windows Operating System – primary environment for the system

Microsoft Windows is to be used as the primary operating system for this system. Its user friendly interface will help the users to use the system effectively .The system is planned to be used on a Windows XP Professional Service Pack 1 version.

Justification for using the proposed software: -

Microsoft Visual Basic 6.0 – The above description gives the various advantages of using Visual Basic as the primary programming language for this system. Furthermore, I as the programmer am more familiar with it and has considerable amount of knowledge about it than any other programming language that might be suitable for this system.

Microsoft Access 2002 –Access is a database development tool that has been designed to store data which has a maximum size of 1 gigabyte (this is quite enough as the payroll system wouldn’t exceed that much data). Furthermore, Access is designed to support multiple concurrent users so that if the company wishes to expand the system and place it in a network, it can be done easily.

Microsoft Windows XP – The primary cause for selecting to use the program in a Windows based environment is that it is extremely user-friendly and the staff at the company should have no problem handling the system in such an environment.

5. User Interface Design

Candidate Name: H. Chathuranga B. Sumanasekera - 19 -

Page 20: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment

Password:

Username:

Login Cancel

Shows the main menu if username and password incorrect.

Closes this screen

File Edit Reports Help

GAMMA Entertainment[image]

GAMMA Entertainment Payroll System

The user interfaces which was designed for the payroll system is shown below. Each and every form has been carefully designed to achieve all of the user requirements listed in [A] ii) Investigation & Analysis.

a) Login Screen:

b) Main Menu:

Candidate Name: H. Chathuranga B. Sumanasekera - 20 -

Page 21: AL Computer Project - Gamma Entertainment Payroll System

File

Employee DataDepartment DataAttendance DataLog OffExit

Edit

PayLeave Details

Reports

Monthly Summary

Help

About

Employee Data

Employee ID:

Password:

Name:

Address:

Tel. No.:

N.I.C. No.:

Department:

EPF No.

ETF No.:

Find

Save Delete Edit Clear All Exit

Adds the data of a new employee to the database

Deletes the employee

Saves changes made to existing employee’s info

Clears all text boxes

Closes the form

Retrieves info on employee who’s ID is typed

GAMMA Entertainment Payroll System

The Main Menu has been designed to allow the users to access all necessary forms and reports. However, depending on the level of authorization each user has, he or she will have access only to the forms which they strictly require.

c) Employee Information:

Here all data is saved to the ‘Employee Data’ table in the database. Also records will be created in the ‘Leave Details’ and ‘Pay Details’ tables for the new employees. Data which is retrieved and edited or deleted will come from the ‘Employee Data’ table.

Candidate Name: H. Chathuranga B. Sumanasekera - 21 -

Page 22: AL Computer Project - Gamma Entertainment Payroll System

Department Details

Department:

Hourly Rate:

Standard no. of Hours:

Overtime Rate:

Department: Retrieve

Add Department Edit Clear All Exit

Adds the Department’s data to the database

Saves changes made to a Department

Resets all text and combo boxes

Closes the form

Retrieves data on a Department

GAMMA Entertainment Payroll System

d) Department Details:

Here all data is saved to and retrieved from the ‘Department Data’ table in the database.

Candidate Name: H. Chathuranga B. Sumanasekera - 22 -

Page 23: AL Computer Project - Gamma Entertainment Payroll System

Attendance Data

Employee ID:

Employee Password:

Date:

Time-in:

Time-out::

The current time is:

Find

Clock time-in Clock time-out Clear All Exit

Saves the time at which employee enters the office

Saves time employee leaves the office

Clears all entries

Closes the form

Retrieves the record saved earlier where the employee clocked-in so that the employee can now clock time-out

Shows the current time when form loads

GAMMA Entertainment Payroll System

e) Attendance Data:

Here all data is saved to and retrieved from the ‘Attendance Data’ table in the database.

Candidate Name: H. Chathuranga B. Sumanasekera - 23 -

Page 24: AL Computer Project - Gamma Entertainment Payroll System

Leave Details

Employee ID:

No. of Days:

Type of leave:

No. of days of leave currently available:

No. of days of leave remaining:

Check no. of days available

Save Clear All Exit

Saves the amount of leave the employee wants to take to the database.

Resets all data entry fields Closes the form

Recalls the amount of leave taken and amount left of the employee whose ID has been entered and displays them on the labels below the text boxes

GAMMA Entertainment Payroll System

f) Leave Details:

Here all data is saved to and retrieved from the ‘Leave Details’ table in the database.

Candidate Name: H. Chathuranga B. Sumanasekera - 24 -

Page 25: AL Computer Project - Gamma Entertainment Payroll System

Calculate Pay

Employee ID:

Month:

Total Hours Worked:

Overtime Hours:

Total Pay (Rs.):

Calculate Pay

Save Print Clear All Exit

Calculates the pay of the employee by retrieving the attendance data from the database and performing all necessary calculations

Displays the pay calculated

Saves the data into the ‘Pay Details’ table in the database Opens another form

(see h) print form) from which the pay slip can be printed

Clears all entries

Closes the form

GAMMA Entertainment Payroll System

g) Pay Details:

Here all data is saved to and retrieved from the ‘Pay Details’ table in the database.

Candidate Name: H. Chathuranga B. Sumanasekera - 25 -

Page 26: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment (Pvt.) Ltd.

MONTHLY PAY

Employee ID:

Month:

Hours Worked:

Total Amount (Rs.):

EPF No.:

ETF No.:

Overtime hours:

……………………..…..Accountant GAMMA Entertainment Print

Prints the form (i.e. the pay slip) and closes the form after printing

Data from the ‘Pay Details’ form is displayed here

GAMMA Entertainment Payroll System

h) Print Form:

The print form is approximately 5.5” by 3.2”. It can be printed on A4 size paper or any suitable size which has the above size specification.

Candidate Name: H. Chathuranga B. Sumanasekera - 26 -

Page 27: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment System

[image]

Program Created By: Chathuranga SumanasekeraDeveloped For: GAMMA EntertainmentVersion 1.0

[copyright law warning] Exit

System Info

[Windows Media Player]

Click here to change audio track

Closes the form

Displays the Computer System’s information

Uses the Windows Media Player component in Visual Basic to play music from a predefined location.

Form colour here is blue.

GAMMA Entertainment Payroll System

i) About Form

Candidate Name: H. Chathuranga B. Sumanasekera - 27 -

Page 28: AL Computer Project - Gamma Entertainment Payroll System

GAMMAENTERTAINMENT

License to: GAMMA Entertainment (Pvt.) Ltd.

[Trademark information and copyright law liability]

Version 1.0 |||||||||||||||||||||||||||||||||

Progress bar which when it finish loading will take the user to the login form

The form colour is black

GAMMA Entertainment Payroll System

j) Splash Screen:

Basic Overview of all data entry forms

All the forms displayed in the above section has the default Microsoft Windows® colour schemes unless otherwise specified.

All forms that required database connectivity uses an ADODC control to connect each form with the database in Microsoft Access.

Candidate Name: H. Chathuranga B. Sumanasekera - 28 -

Page 29: AL Computer Project - Gamma Entertainment Payroll System

Payroll Expenditure ReportGAMMA Entertainment

[address]

Month:

EmployeeID: Hours worked: Overtime (Hours): Total Pay (Rs.):

Page Number

Total Expenditure for the month:

GAMMA Entertainment Payroll System

6. Output Forms

a.) Expenditure Report

b) Pay Slip (see earlier section h) ‘Print form’)

Candidate Name: H. Chathuranga B. Sumanasekera - 29 -

Page 30: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

7. Process Model of all forms

a) Login Screen:

BeginEnter Username and PasswordLogin to the systemIf Username = Management and Password is correct Then

Show Main Menu and close login formElseIf Username = Accountant or Username = Employee and Password is correct Then

Show Main Menu with some features disabled and close login formElse

Display Error MessageEndIf

End

b) Main Menu: Once you click on an item it will open the corresponding form. Clicking File > Exit is close the main menu. Clicking File > Log off will enable the user to back to the Login Screen.

c) Employee Data:

BeginAllocate memory for databaseLoad database to memoryEnter new employee recordAdd new recordIf any field is blank or contains invalid data Then

Display error messageElse

Save employee record to databaseEndifClear all entriesEnter Employee ID of existing employeeFind the employeeSearch database for employeeIf employee if found Then

View RecordElse

Display Error MessageEndifChange the data retrievedEdit the recordIf any field is blank or contains invalid data Then

Display error messageElse

Save changes to databaseEndifDelete the record

Candidate Name: H. Chathuranga B. Sumanasekera - 30 -

Page 31: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If any field is blank or contains invalid data ThenDisplay error message

ElseDelete employee from database

EndifClose the form

End

d) Department Details

BeginAllocate memory for databaseLoad database to memoryEnter details of a DepartmentAdd new recordIf any field is blank or contains invalid data or Department already exists Then

Display error messageElse

Save Department data to databaseEndifClear all entriesSelect an existing DepartmentRetrieve the recordIf Department not found Then

Display error messageElse

View RecordEndifChange the dataEdit the recordIf any field is blank or contains invalid data Then

Display error messageElse

Save changes to databaseEndifClose the form

End

e) Attendance Data

BeginAllocate memory for databaseLoad database to memoryEnter required informationClock-in to the systemIf any field is blank or contains invalid data or wrong password Then

Display error messageElse

Candidate Name: H. Chathuranga B. Sumanasekera - 31 -

Page 32: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Save data to databaseEndifClear all entriesEnter an Employee ID and passwordIf any field is blank or contains invalid data or wrong password Then

Display error messageElse

View RecordEndifClock-out of the systemSave the Time Out to the recordCalculate the difference in Time In and Time OutAdd it to ‘Hours Worked’ in Pay Details table in database for that employeeClose the form

End

f) Leave Details

BeginAllocate memory for databaseLoad database to memoryEnter Employee IDCheck no. of days availableIf any field is blank or contains invalid data Then

Display error messageElse

View RecordEndifEnter required dataAdd new recordIf any field is blank or contains invalid data Then

Display error messageElse

Save data to the databaseEndifClear all entriesClose the form

Exit

g) Pay Details

BeginAllocate memory for databaseLoad database to memoryEnter Employee IDCalculate the PayUse data in database to calculate payDisplay Pay Calculated

Candidate Name: H. Chathuranga B. Sumanasekera - 32 -

Page 33: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Add new recordSave the data to the databasePrint the pay slipOpen Print FormClear all entriesExit the systemClose the form

End

h) Print Form

BeginRetrieve and display data from Pay Details formPrint the form when user tells to printClose the form.

End

i) About Form

BeginLoad music track to Media PlayerChange audio trackLoad next track into Media PlayerWhen user click ‘System Info’Show System InformationClose the form

End

j) Splash Screen

BeginClick ‘Click here to continue’Load Login formClose the form

End

8. Data Flow Diagram

Please refer [D] (i) Technical Documentation for the Data Flow Diagram of the new system.

9. User Agreement

All the designs given above were gone through with the Head of the Accounting Department, who on behalf of GAMMA Entertainment agreed to the basic structure and appearance of the system.

He also agreed to allow the system analyst to make slight alterations to the design if it becomes necessary. However if there are any major changes which may affect the functionality of the system it should first be cleared with himself on any high ranking official in the company.

Candidate Name: H. Chathuranga B. Sumanasekera - 33 -

Page 34: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[B] (ii) Intended BenefitsOne obvious advantage of the new system is the degree of accuracy attained. From calculating the amount of hours worked to printing the pay slips there is minimal involvement of any people who can alter the data to create inaccuracy and unjust pay. But in the previous system any of the accountants had the ability to modify the data to produce the results they wanted in either a bias or unjust way.

Another advantage of the system is the time factor. Instead of the employees writing all required details in the attendance register they can clock-in and clock-out from the new system in less than 2 minutes and also instead of going through the daily register and calculating the hours worked each day for each employee in a very time consuming manner, all those calculations can be done in the new system with the click of a button which would only take a few seconds depending on the processor speed.

Further the new system gives enhanced security features with users being asked to enter their username and password to access the system. The employees have to sign-in with their own unique passwords assigned to their employee ID so that no falsification is possible.

Thus the new system gives the fastest as well as the most accurate way of producing the payroll.This will enable the employees to conveniently get their pay slips without any delay.

Furthermore the necessary expenditure report can also be generated in a click of a button so that too can be forwarded to the management without any delays or mishaps.

Candidate Name: H. Chathuranga B. Sumanasekera - 34 -

Page 35: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[B] (iii) Limits of the scope of the solutionThe new system does not have the facility for networking multiple branches together but instead requiring them to be run the new system separately.

The new system also does not efficiently accommodate any possible future improvements and expansions such as using magnetic stripe cards for employees to login and logout as Microsoft Visual Basic does not have capabilities for such direct hardware interaction.

Microsoft Access, which is used to implement the database, has a file size limit of 1 GB. Although at current levels the file size (estimation is shown below) is very unlikely to exceed this amount, it is possible that is may hinder capabilities of the new system if the amount of employees grows very large.

Estimated file size of the system:

Tables:

a) Employee DataPer Record (Key – field name (size in bytes)): Employee ID (5), Password (20), Name (50), Address (50), TelNo. (10), N.I.C. No (10), Department (15), EPF No. (10), ETF No. (10)Total = 5+20+50+50+10+10+15+10+10 = 180 bytes

b) Attendance Data

Per Record (Key – field name (size in bytes)):Employee ID (5), Date (10), Time In (8), Time Out (8)Total = 5+10+8+8 = 31 bytes

c) Department Data

Per Record (Key – field name (size in bytes)):Department (15), Hourly Rate (3), Standard Hours (3), Overtime Rate (3)Total = 15+3+3+3 = 24 bytes

d) Leave Details

Per Record (Key – field name (size in bytes)):Employee ID (5), StandardDays (2), Casual leave (2), Sick leave (2), Emergency leave (2), Total Days (2)Total = 5+2+2+2+2+2 = 15 bytes

Candidate Name: H. Chathuranga B. Sumanasekera - 35 -

Page 36: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

e) Pay Details

Per Record (Key – field name (size in bytes)):Employee ID (5), Month (2), Hours worked (3), Overtime (3), Total Pay (6)Total = 5+2+3+3+6 = 19 bytes

The a) Employee Data and d) Leave Details tables will have the records amounting to the number of employees which around 100 records each at current levels.

Considering for up to 5 years the amount of records in the e) Pay details table shall be 100 x (12x5) (i.e. the number of employees into the amount of months) which equals to 6000 records.

For c) Department table can only have 3 records – that is the records of the Sales, Technical and Accounting Departments.

And b) Attendance data shall have a maximum of (considering for a five year period and 100 employees) 100 x (365 x 5) records that comes to a total of 182,500 records.

Therefore Total file size:

Key: Table = (No. of records x per record size) bytes

a) Employee Data = 100 x 180 = 18,000b) Attendance Data = 182,500 x 31 = 5,657,500c) Department = 3 x 24 = 72d) Leave Details = 100 x 15 = 1500e) Pay Details = 6000 x 19 = 114,000

Total = 18,000 + 5,657,500 + 72 + 1500 + 114,000 = 5,791,072 bytes = 5655.34 KB = 5.52 MB

Candidate Name: H. Chathuranga B. Sumanasekera - 36 -

Page 37: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[C] (i) Development and Testing1. Program Listings

The program code for the entire system developed in Microsoft Visual Basic 6.0 is showed in Appendix 1.

2. Data Structures

Given below are the five tables created for the system.

The data structures of each of the tables are shown below. Each of the tables were designed keeping with the earlier agreed upon data structures (see [B] (i) 1. System Design (file and data structures)).

a) Employee Data

Candidate Name: H. Chathuranga B. Sumanasekera - 37 -

Page 38: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This table stores all personal information about the company’s employees including their login password.

i) Field Properties for ‘Password’:

ii) Field Properties for ‘Name’:

Candidate Name: H. Chathuranga B. Sumanasekera - 38 -

Page 39: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

iii) Field Properties for ‘Address’:

iv) Field Properties for ‘TelNo’:

Candidate Name: H. Chathuranga B. Sumanasekera - 39 -

Page 40: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

vi) Field Properties for ‘NICNo’:

vii) Field Properties for ‘Department’:

Candidate Name: H. Chathuranga B. Sumanasekera - 40 -

Page 41: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

viii) Field Properties for ‘EPFNo’:

ix) Field Properties for ‘ETFNo’:

b) Attendance Data

Candidate Name: H. Chathuranga B. Sumanasekera - 41 -

Page 42: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This table stores the data on the daily attendance of each employee on each day he/she attends the office. The data here will primarily be used to calculate the pay of each employee at the end of the month.

i) Field Properties for ‘Date’:

ii) Field Properties for ‘TimeIn’:

Candidate Name: H. Chathuranga B. Sumanasekera - 42 -

Page 43: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

iii) Field Properties for ‘TimeOut’:

c) Department Data

Candidate Name: H. Chathuranga B. Sumanasekera - 43 -

Page 44: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This table stores data on the pay rates of each department. For this purpose the hourly rate, overtime rate and the standard no. of hours an employee should work per month is stored in this table.

i) Field Properties for ‘Hourly Rate’:

ii) Field Properties for ‘StandardHours’:

Candidate Name: H. Chathuranga B. Sumanasekera - 44 -

Page 45: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

iii) Field Properties for ‘OvertimeRate’:

d) Leave Details

Candidate Name: H. Chathuranga B. Sumanasekera - 45 -

Page 46: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This table is designed to store amount of days of leave an employee takes per month.

i) Field Properties for ‘StandardDays’:

ii) Field Properties for ‘Casualleave’:

Candidate Name: H. Chathuranga B. Sumanasekera - 46 -

Page 47: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

iii) Field Properties for ‘Sickleave’:

iv) Field Properties for ‘Emergencyleave’:

Candidate Name: H. Chathuranga B. Sumanasekera - 47 -

Page 48: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

v) Field Properties for ‘Nodays’:

vi) Field Properties for ‘Totaldays’:

Candidate Name: H. Chathuranga B. Sumanasekera - 48 -

Page 49: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

e) Pay Details

Candidate Name: H. Chathuranga B. Sumanasekera - 49 -

Page 50: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This table stores the pay of each employee after it is calculated by the program using data available in other tables. The data in this table is used primarily to generate the monthly expenditure report for the management.

i) Field Properties for ‘Month’:

ii) Field Properties for ‘HoursWorked’:

Candidate Name: H. Chathuranga B. Sumanasekera - 50 -

Page 51: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

iii) Field Properties for ‘Overtime’:

iv) Field Properties for ‘TotalPay’:

The relationships between the tables (as seen in Microsoft Access) are shown below:

Candidate Name: H. Chathuranga B. Sumanasekera - 51 -

Page 52: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

As seen above the relationships too were developed keeping with the prior design specifications.

3. Illustration of Inputs and Outputs (Program Description)

Candidate Name: H. Chathuranga B. Sumanasekera - 52 -

Page 53: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Please refer the User Manual on page ….. (Section D. 2) for the program description.

4. Test Strategy

Testing has to be performed in order to guarantee the serviceability of the system. The test strategies used here will be Black Box testing strategy. This means that the complete system will be tested for its functionality, every single form and command button will be tested to ensure that they perform all the required tasks, including validation, in an acceptable manner. Therefore the testing done here will be alpha testing. Please refer C.2 Implementation for information on the beta testing.

(i.) Splash Screen

Test Plan:

Test No.

Module Name Item Tested Expected Result

1. Splash Screen

Loading of splash screen -When the progress bar has reached its maximum level then the Login Screen should be displayed.

Login Screen displayed.

Test Result:

Test No. 1:The testing carried out here was successful (please refer the Technical Documentation for coding of the splash screen for verification).

(ii.) Login Screen & Main MenuTest Plan:Test No.

Field Name Test Data Type Expected Result

2. UsernameEmployeeAccountantManagement

NormalNormalNormal

Accepted if password is correct.

3. Password

empGTA200acc58FE34manage76CQWthwekH33

NormalNormalNormalAbnormal

Accepted if corresponding username is correct.

- Error message displayed

Test No. Module Test Conducted Expected Result

4. Main Menu

Depending on the username, only when the correct password is entered in the Login Screen should the main menu be displayed.

If the username is ‘Accountant’ or ‘Employee’ then certain options in the main menu should be disabled. Only the username ‘Management’ should be given full access to main menu.

Test Result:

Candidate Name: H. Chathuranga B. Sumanasekera - 53 -

Page 54: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 2 & 3:

The tests carried put here were successful. Given below is the screen dump of the expected error message on the occasion an invalid password is entered.

Test No. 4:

As seen below, the tests here were completed satisfactorily.The Menu options disabled when an employee logged in:

The Menu options disabled and others enabled when an accountant logged in:

The complete menu enabled when a ‘Management’ user logged in:

Candidate Name: H. Chathuranga B. Sumanasekera - 54 -

Page 55: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The above test results can be further verified by referring to the program coding in Appendix 1.

(iii) Employee Data form

Test Plan:

Test No.

Field Name Test Data Type Expected Result

5. Employee ID

AD103TD999D5488

NormalExtremeInvalid

-Accepted-Accepted- Error message displayed

6. Password empFGD100 Normal-Accepted and characters typed should be in the ‘****’ format.

7. NameJeff GoursonDavid Tomei Krista DorfmanAdam2215

NormalExtremeInvalid

- Accepted- Accepted- Error message displayed

8. Address10202 W. Washington Blvd., Culver City, California 90232-3195.

Normal -Accepted

9. Telephone No.

01129852100112999999012DFR

NormalExtremeInvalid

- Accepted- Accepted- Error message displayed

10.National Identity Card No.

249751268V999999999Vrgst5355

NormalExtremeInvalid

- Accepted- Accepted- Error message displayed

11. Department AccountsTechnical Normal -Accepted

12. EPF No. 54258425vdf34

NormalInvalid

- Accepted- Error message displayed

13. ETF No. 56844226dgg

NormalInvalid

- Accepted- Error message displayed

Test No. Module Test Conducted Expected Result

Candidate Name: H. Chathuranga B. Sumanasekera - 55 -

Page 56: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

14. ‘Save’ button

After entering data into form, the Save button is clicked to add the data to the database.

If there are any blank fields and error message should be displayed. Else the data should be added to the ‘EmployeeData’ table, and also new records should be created for the employee in the LeaveDetails and PayDetails tables. Then a message saying the operation was successful should be seen.

15. ‘Find’ button

After entering the ‘EmployeeID’ click Find to retrieve that employee’s record.

If employee is not found then an error message should be displayed. Otherwise the record should be retrieved and displayed, but the password should not be displayed. The ‘Add’ button should get disabled.

16. ‘Edit’ button

After editing any retrieved data click ‘Edit’ to save the changes.

The changes must be saved and a message saying the operation was successful should be displayed. The ‘Add’ button should be enabled and the ‘Edit’ button disabled.

17. ‘Delete’ button

After retrieving data press ‘Delete’ button to delete the data.

The requested data should be deleted and a message displayed to confirm it.

18. ‘Clear All’ button

Clears all data entered once clicked.

The data should be cleared.

19. ‘Exit’ button

Click Exit to quit the form

Form should close.

Test Result:The following two screen shots show all the normal and extreme data typed into the form with no errors as expected. Normal data accepted:

Extreme Data accepted:

Candidate Name: H. Chathuranga B. Sumanasekera - 56 -

Page 57: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Invalid Data rejected:

Test No. 5:

Test No. 6: See earlier Normal data accepted screenshot.

Test No. 7:

Test No. 8: See earlier Normal data accepted screenshot.

Candidate Name: H. Chathuranga B. Sumanasekera - 57 -

Page 58: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 9:

Test No. 10:

Test No. 11: See earlier Normal data accepted screenshot.

Test No. 12:

Test No. 13:

Test No. 14:

Candidate Name: H. Chathuranga B. Sumanasekera - 58 -

Page 59: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

When fields are blank:

When all valid data is entered:

In the database before and after:

EmployeeData table Before:

EmployeeData table After:

Candidate Name: H. Chathuranga B. Sumanasekera - 59 -

Page 60: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

PayDetails table After:

LeaveDetails table After:

Test No. 15:

When employee not found:

Candidate Name: H. Chathuranga B. Sumanasekera - 60 -

Page 61: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Otherwise:

Test No. 16:

When retrieved data is edited:

Candidate Name: H. Chathuranga B. Sumanasekera - 61 -

Page 62: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Afterwards form is cleared and necessary button enabled:

Test No. 17:

Asks user for confirmation:

Then if user select ‘Yes’:

Test No. 18:

Candidate Name: H. Chathuranga B. Sumanasekera - 62 -

Page 63: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Before clear:

After pressing ‘Clear All’

Test No. 19:

Test done here were successful.

Overall test results:

As seen above all tests were completely successful. The evidence of the test results can be further confirmed by inspection of the program code found in the Technical Documentation.

Candidate Name: H. Chathuranga B. Sumanasekera - 63 -

Page 64: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

(iii) Attendance Data form

Test Plan:

Test No.

Field Name Test Data Type Expected Result

20. Employee ID

AD103TD999D5488

NormalExtremeInvalid

-Accepted-Accepted- Error message displayed

21. Password empFGD100 Normal -Accepted and characters typed should be in the ‘****’ format.

22. Date 9/26/2005 Normal -Accepted

23. Time-In 9:02:52 AM Normal-Accepted (User does not need to enter this. The program should automatically take the system time)

24. Time-Out 5:13:46 PM Normal-Accepted (User does not need to enter this. The program should automatically take the system time)

Test No. Module Test Conducted Expected Result

25. ‘Clock Time In’ button

After entering data into form, the Clock time-in button is pressed to save the data.

The employee should be searched for in the database using the Employee ID the user enters. If no match arises then an error message should be displayed. If the employee is found his/her password should be checked against the one entered and if wrong an error message should display. If password is correct the data should be added to the ‘AttendanceData’ table.

26. ‘Find’ button

After entering the ‘EmployeeID’ and ‘Password’ click Find to retrieve the record saved earlier that same day when the employee clocked-in.

If any field is blank then an error message should be displayed. The same checks as done in ‘Clock Time In’ button (see above) (i.e. employee check, password check) should be performed and if any data is wrong or no record is found then an error message should be displayed. Else the record should be retrieved and displayed.

27. ‘Clock Time Out’ button

After retrieving a record this button is pressed to save the time-out to the database.

The record should be saved to the database and a confirmation message should be displayed.

28. ‘Clear All’ button

Clears all data entered once clicked.

The data should be cleared.

29. ‘Exit’ button

Click Exit to quit the form

Form should close.

Candidate Name: H. Chathuranga B. Sumanasekera - 64 -

Page 65: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test Results:

The following screenshot shows the entire form with normal data that has been entered and accepted as expected.

<< Normal data accepted

Test No. 20:

Normal Data (see above screenshot)Extreme Data accepted:

Invalid data rejected:

Candidate Name: H. Chathuranga B. Sumanasekera - 65 -

Page 66: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 21:

See Normal data accepted screenshot in the previous page.

Test No. 22:

The normal data was accepted:

Test No. 23 & 24:

As seen below the user does not need to enter the time. The program successfully takes the system time to the data field. Further verification can be obtained by inspecting the program code found in the Technical Documentation

Test No. 25:

No employee found error message:

Candidate Name: H. Chathuranga B. Sumanasekera - 66 -

Page 67: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Incorrect Password error message:

When all data is entered accurately:

Test No. 26:

Candidate Name: H. Chathuranga B. Sumanasekera - 67 -

Page 68: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Incorrect employee ID:

Incorrect password:

When record does not exist:

When all data is correct record is success fully retrieved:

Candidate Name: H. Chathuranga B. Sumanasekera - 68 -

Page 69: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 27:

When ‘Clock Time Out’ is pressed:

Test No. 28:

When clear button is pressed:

Candidate Name: H. Chathuranga B. Sumanasekera - 69 -

Page 70: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 29:

This test was completed successfully.

Overall test results:

As seen above all the test results were completed successfully. Additional screenshots of the database during the process of adding data is shown below:

Before any data is entered:

After clocking-in:

After clocking-out:

Candidate Name: H. Chathuranga B. Sumanasekera - 70 -

Page 71: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

(iv) Department Data form

Test Plan:

Test No.

Field Name Test Data Type Expected Result

30. Department Name Sales Normal -Accepted

31.Standard no. of hours (per month)

21999s4

NormalExtremeInvalid

-Accepted-AcceptedError message displayed

32. Hourly Rate50999D34

NormalExtremeInvalid

-Accepted-AcceptedError message displayed

33. Overtime Rate

20999ED3

NormalExtremeInvalid

-Accepted-AcceptedError message displayed

Test No. Module Test Conducted Expected Result

34.‘Add

Department’ button

When this button is clicked all the data should be saved to the database.

If any fields are blank then an error message should be displayed. If all data is entered then the data should be saved to the database and a confirmation message displayed.

35. ‘Retrieve Data’ button

Data on the department the user requested must be retrieved.

The department data should be retrieved and displayed.

36. ‘Edit’ button

Any changes made a retrieved department must be saved when this button is clicked.

Any changes made to a department, whose data has been retrieved, has to be saved.

37. ‘Clear All’ button

Clears all data entered once clicked.

The data should be cleared.

38. ‘Exit’ button

Click Exit to quit the form

Form should close.

Test Results:

Test No. 30:

The following screenshots shows all the fields with normal data and extreme data entered successfully to the program.

Candidate Name: H. Chathuranga B. Sumanasekera - 71 -

Page 72: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

<< Normal Data accepted

<< Extreme data accepted

Candidate Name: H. Chathuranga B. Sumanasekera - 72 -

Page 73: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 31:

Test No. 32:

Test No. 33:

Candidate Name: H. Chathuranga B. Sumanasekera - 73 -

Page 74: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 34:

Blank fields rejected:

When data is saved successfully:

Candidate Name: H. Chathuranga B. Sumanasekera - 74 -

Page 75: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 35:

Data entered previously retrieved when ‘Retrieve Data’ is clicked:

Candidate Name: H. Chathuranga B. Sumanasekera - 75 -

Page 76: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 36:

Candidate Name: H. Chathuranga B. Sumanasekera - 76 -

Page 77: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 37:

Test No. 38:

The test carried out here was successfully.

Overall Test Results

All testing carried out here was successfully completed. As earlier further verification may be obtained by inspecting the program code listed in the Technical Documentation.

(v) Leave Details form

Test Plan:

Test No.

Field Name Test Data Type Expected Result

39. Employee ID

AD435TD9993d

NormalExtremeInvalid

-Accepted-AcceptedError message displayed

40. No. of Days (leave)

223s4

NormalExtremeInvalid

-Accepted-AcceptedError message displayed

Test No. Module Test Conducted Expected Result

41.‘Check no.

of days available’

When this button is clicked the amount of leave available the employee must be displayed.

If the employee ID entered does not exist then an error message should be displayed. Otherwise the data has to be retrieved from the ‘LeaveDetails’ table in the database.

Candidate Name: H. Chathuranga B. Sumanasekera - 77 -

Page 78: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

42. ‘Save’ button

The amount of leave taken should be recorded.

If any fields are blank then an error message should be displayed else the data should be saved to the database.

43. ‘Clear All’ button

Clears all data entered once clicked.

The data should be cleared.

44. ‘Exit’ button

Click Exit to quit the form

Form should close.

Test Results:

The Normal data accepted:

Extreme data accepted:

Test No. 39:

See above two screenshots for the system’s acceptance of normal and extreme data. The rejection of invalid data is shown by the screenshot below:

Candidate Name: H. Chathuranga B. Sumanasekera - 78 -

Page 79: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 40:

Rejecting invalid data:

Test No. 41:

When employee ID entered does not exist:

When valid data is entered:

Candidate Name: H. Chathuranga B. Sumanasekera - 79 -

Page 80: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 42:

When a field is blank:

When all valid data is entered:

Candidate Name: H. Chathuranga B. Sumanasekera - 80 -

Page 81: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 43 & 44:

All tests carried out here were successfully completed.

Overall Test Results:

The tests carried out here as seen above was successfully completed. Please refer program code in the Technical Documentation for further authentication.

(vi) Pay Details form (including Print form [see test no. 49] )

Test Plan:

Test No.

Field Name Test Data Type Expected Result

45. Employee ID

AD435TD9993d

NormalExtremeInvalid

-Accepted-AcceptedError message displayed

46. Month March Normal - Accepted

Test Module Test Conducted Expected Result

Candidate Name: H. Chathuranga B. Sumanasekera - 81 -

Page 82: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

No.

47. ‘Calculate Pay’ button

Pay of the employee should be calculated.

If the employee entered does not exist then an error message should display. When proper data is entered, the program should use data available in the database to calculate that employee’s monthly pay and the result displayed.

48. ‘Save’ button

The information on the pay of the employee should be saved.

The information obtained by the ‘Calculate Pay’ button should be saved to the database and message displayed to confirm it.

49. ‘Print’ button

Print the employee pay details

Opens the ‘Print’ form to which the existing data is copied. The user should have the option to print the data from that form and the output (in the format of a payslip) should be obtained.

50. ‘Clear All’ button

Clears all data entered once clicked.

The data should be cleared.

51. ‘Exit’ button

Click Exit to quit the form

Form should close.

Test Results:

Normal Data accepted:

Test No. 45:

Extreme Data accepted:

Candidate Name: H. Chathuranga B. Sumanasekera - 82 -

Page 83: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Invalid data rejected:

Test No. 46:

See above ‘Normal data accepted’ screenshot.

Test No. 47:

When an invalid employee no. is entered to calculate the pay:

When valid data is entered:

Candidate Name: H. Chathuranga B. Sumanasekera - 83 -

Page 84: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 48:

When the data is saved:

Candidate Name: H. Chathuranga B. Sumanasekera - 84 -

Page 85: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Test No. 49:

When ‘Print’ is clicked, the print form appears as below:

When ‘Print’ is clicked from the print form:

As seen the user can set the printer options and then print the form from the above window.

Test No. 50 & 51:All test carried out here were successful.

Overall Test Results:As seen above all tests carried out here were completed successfully.

Candidate Name: H. Chathuranga B. Sumanasekera - 85 -

Page 86: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

(vii) Monthly Summary Report

Test Plan:

Test No. Module Test Conducted Expected Result

52. Report

When user selects ‘Monthly Summary’ from Reports section in the main menu the report should be displayed.

Using data available in the ‘PayDetails’ table in the database, the report should be generated and displayed.

Test Result:

Test No. 52:

When selected:

Overall Test Results: Completed successfully.

Candidate Name: H. Chathuranga B. Sumanasekera - 86 -

Page 87: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Conclusion of Testing:

The system has demonstrated its functionality well without any mishaps or unexpected errors as seen in the above section. As mentioned earlier, further verification of all test results can be obtained by inspecting the program code in the Technical Documentation, if required.

Candidate Name: H. Chathuranga B. Sumanasekera - 87 -

Page 88: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[C] (ii) Implementation1. Implementation Plan

File System Creation: The personal data of all existing employees will be entered onto the system prior to starting the trial period, so that all required data for normal operation will be available in the database at the start of beta testing.

User Training: An afternoon workshop for all employees will be held to brief them on how to operate the new system. This 3 hour workshop to be held on 22nd December 2005, will consists of basic data entry methods, handling error messages and the access limitations of the system according to the level of the employee (i.e. Accountant, Management, etc.).

User Testing: As the System Analyst I have already successfully tested the entire system (see previous section [C] (i) Development and Testing). The testing done was in the form of Alpha testing. The system can now be exposed to beta testing where the staff of GAMMA Entertainment will have the opportunity to try out the new system while the old system runs parallel with it.

Beta testing (Trial Period):Start Date: 1st January 2006End Date: 14th January 2006Duration: 2 weeks

Method of Changeover: The system will be implemented using a Parallel Changeover method where the new system will be implemented along with the old manual system so that both systems will run parallel to each over for a period of one month. After the trial period of one month, if the company’s management is satisfied with the system, the system can be fully implemented. This trial period will be the beta testing performed on the system.

The main advantage in using this change over method is that the employees can get used to the system and learn the proper way to use it, so that when the system is fully implemented, no mishaps can occur. Another primary reason for deciding on this changeover method is that the management specifically requested this changeover to minimize any risks taken on there part, although beta testing is also conducted.

Installation: Following the conclusion of the beta testing, problems with the system, if any, will be corrected and the final version presented and installed on 26th & 27th January 2006. All system installation tasks will have to be completed within these two days. The system will run parallel with the old system for one month keeping with the above mentioned method of changeover. Thereby the system, provided the system functions to the satisfaction of the management, will begin its operations officially on the 1st March 2006.

2. Agreement with End-User

The implementation plan given above was discussed with the management of GAMMA Entertainment. The management agreed to proceed with the proposed implementation plan after a short demonstration as to how the system works, which was performed, then & there, at their head-office. Please refer the Appendix for the User Acceptance letter provided by the company.

Candidate Name: H. Chathuranga B. Sumanasekera - 88 -

Page 89: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[C] (iii) Suitability of available facilities (H/W, S/W, etc.)1. Available Resources

Hardware:

Two problematic issues were encountered here. Descriptions of the two problems and how they were solved are given below.

Issue 1:

Problem: GAMMA Entertainment already has 2 computers under the Accounting Department. Upon inspection it was discovered that both computers were Intel Pentium 3 - 800 MHz machines with 128MB RAM and 10GB hard disk. They also had Nvidia Geforce 2 - 32MB graphics cards. Both computers had been purchased at the same time to facilitate the expansion of the company about a year ago.

The 2 computers fall slightly below the expected hardware requirements (see a.2. Investigation and Analysis: Hardware Requirements) and this issue was brought up for discussion with the management of GAMMA Entertainment. Here the management thought that it would be financially advisable to use one of these computers for the implementation of the system and thus asked if I, as the system analyst, thought it was appropriate.

Solution: Following further inspection of the computers, I concluded that the computers were fit for use although one computer was malfunctioning due to a faulty RAM module. I therefore asked the management to replace the RAM module with a new 256 MB RAM and then to utilize that particular computer for the new system. The management then, after a short discussion, agreed to heed to my request and go ahead as proposed.

Issue 2:

Problem: According to the proposed system design and implementation, the program was to be installed in one computer and employees would sign in and sign out, and also other tasks like payroll calculation would be done on the same computer. However the management wanted the employees to sign -in and –out from a computer at the security desk and the Accounting department to use a computer in their office. However the system was not built with network capabilities so this was considered a setback in the implementation of the system.

Solution: After seeking for a solution, it was decided to attach two terminals (i.e. consists on Input/Output devices only) to a single processor. One terminal would be at the security desk and the other in the Accounting Department. The processor would be placed in the Accounting Department as it would be safer there. The management agreed to buy equipment for one terminal (the other would use the equipment already with the computer) and the necessary cables required to connect 2 such terminals to a single processor.

It was understood that the processor being a normal desktop computer, both terminals won’t be able to function at the same time. However the management deemed that that would not be an issue.

Candidate Name: H. Chathuranga B. Sumanasekera - 89 -

Page 90: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Software:

Software was found to be of no problematic issue as the necessary software was already available in the computers. However it was agreed to upgrade the Microsoft Office 2000 version currently installed to Microsoft Office 2002, to ensure 100% compatibility as the database was designed and developed in Microsoft Access 2002.

The main program - Microsoft Visual Basic 6.0 was used to create the program. Using the various tools available with Microsoft Visual Basic, the interface and the program can be built easily and quickly. In addition, Visual Basic can be used to automate data entry where possible and to perform the required calculations using the data. The database needed for the storage of various kinds of information, such as employee data, times each employee came and went and pay data, could be built using the facilities available in Microsoft Access. Access can also be used to construct any queries and tables that may be required for the system.

Candidate Name: H. Chathuranga B. Sumanasekera - 90 -

Page 91: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Technical Documentation

Candidate Name: H. Chathuranga B. Sumanasekera - 91 -

Page 92: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Contents1. General Info..…………………………………………………………………………… 3

2. Hardware and Software Requirements. ...………………………………………….. 3

3. Database Design………………………………………………………………………. 5

4. Data Dictionary…………………………………………………………………………. 8

5. Equations & Formulae Used………………………………………………………….. 8

6. Module Design…………………………………………………………………………. 9

7. Data Flow Diagram…………………………………………………………………….. 13

8. Program Listings……………………………………………………………………….. 15

9. Contact Us……………………………………………………………………………… 15

Appendix 1…………………………………………………………………………………. 16

Candidate Name: H. Chathuranga B. Sumanasekera - 92 -

Page 93: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Title: GAMMA Entertainment Payroll SystemPurpose: The automation of the payroll system of GAMMA Entertainment (Pvt.) Ltd.Author: H. C. B. Sumanasekera

The hardware devices that were recommended for the system is given below:Device Technical Specification Cost (Rs.) Required For

Processor Intel Pentium® IV Processor 1800 MHz 13,000 Processor is required to form a functional

computer.

Motherboard ASUS K8N4 series P4 supported motherboard 12,000

Motherboard is a primary component of a computer system. All other devices are connected to this.

Monitor 15” Color Monitor – CRT/LCD

CRT – 6,000LCD – 14,000

Good monitors allow the display of high-resolution graphics and LCD screens can be used to reduce eye strain but it is expensive.

Hard Disk 15GB 6,000Used to store the OS, other vital programs as well as the database with the Payroll program.

Graphics NVIDIA GeForce 4 – 128 MB 7,000

The Payroll system and OS like Windows XP requires a formidable graphics card to function smoothly.

CDR-ROMCDR-ROM drive – LITEON 52X read and 24X write speed.

3,000CD-ROM will have to be used to install softwares and the CDR can be used to save backup copies of the database.

Speakers Standard 100W speakers(2 channel audio) 750

Speakers is a low cost solution that enables sound output that shall be used by the Windows OS and the Payroll system when producing error messages, starting & shutting down the computer, etc.

Memory Kingston 256MB DDR RAM 3,000

A sizable RAM should be available to avoid frequent system crashes and make full use of the processor‘s capabilities. Furthermore using an OS like Windows XP with advanced GUI needs good memory and graphics to function.

Keyboard & Mouse

Logitech MultimediaAnti-RSI Keyboard and Logitech optical mouse.

1,500

Obvious and essential data entry devices. Anti-RSI keyboards can help prevent Repetitive Strain Injury caused by prolonged use of a computer.

Printer Hewlett Packard InkJet printer 8,000

Inkjet printers can be used to produce satisfactory quality printouts for the pay slips and summary reports.

The software used in this system is given below along a brief description of each.

Candidate Name: H. Chathuranga B. Sumanasekera - 93 -

Page 94: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Microsoft Visual Basic 6.0 – used as the primary programming language

Microsoft Visual Basic is a powerful designing tool, which apart from allowing you to create a fashionable and attractive user interface from its Integrated Development Environment (IDE), is also one of the first development environments that frees programmers from mundane tasks and allows them to concentrate on their ultimate goal - application development.

Microsoft Access 2002 – used for database creation and management

Microsoft Access is a Relational Database Management System (RDBMS), which includes a user-friendly interface, reporting facilities, and other tools that make it easy for the creation, and management of databases. Microsoft Access, apart from being used to create all the databases and its tables, can also be used to create the necessary queries and filters for the automated system.

Windows Operating System – primary environment for the system

Microsoft Windows is to be used as the primary operating system for this system. Its user friendly interface will help the users to use the system effectively .The system is planned to be used on a Windows XP Professional Service Pack 1 version.

Justification for using the proposed software: -

Microsoft Visual Basic 6.0 – The above description gives the various advantages of using Visual Basic as the primary programming language for this system. Furthermore, I as the programmer am more familiar with it and has considerable amount of knowledge about it than any other programming language that might be suitable for this system.

Microsoft Access 2002 –Access is a database development tool that has been designed to store data which has a maximum size of 1 gigabyte (this is quite enough as the payroll system wouldn’t exceed that much data). Furthermore, Access is designed to support multiple concurrent users so that if the company wishes to expand the system and place it in a network, it can be done easily.

Microsoft Windows XP – The primary cause for selecting to use the program in a Windows based environment is that it is extremely user-friendly and the staff at the company should have no problem handling the system in such an environment.

Candidate Name: H. Chathuranga B. Sumanasekera - 94 -

Page 95: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

i) File Structure & Relationships

The data will be stored in a database which shall constitute of 5 tables:f) Employee Datag) Attendance Datah) Department Datai) Leave Detailsj) Pay Details

Each of the tables, their field names and respective data types has been explained below.

a) Employee Data

Table Name: EmployeeDataPrimary Key: EmployeeIDContents: This table will contain all personal details of every employee in the payroll.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

Password Text 20 Password

Name Text 50

Address Memo -

TelNo Number Long Integer 0000000000

NICNo Text 10 000000000L

Department Text 15

EPFNo Number Long Integer

ETFNo Number Long Integer

b) Attendance Data

Table Name: AttendanceDataPrimary Key: EmployeeID, DateContents: This table will contain the times each employee enters and leaves the office so the payroll can be calculated from the hours worked which can be found by the data in this table.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

Date Date/Time - 99/99/0000;0;_

TimeIn Date/Time - 99:00:00\ >LL;0;_

TimeOut Date/Time - 99:00:00\ >LL;0;_c) Department Data

Table Name: Department

Candidate Name: H. Chathuranga B. Sumanasekera - 95 -

Page 96: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Primary Key: DepartmentContents: This table will contain all pay details for every department (such as hourly rates, overtime rates, etc.)

Field Names Data types Field Size Input MaskDepartment Text 15

HourlyRate Currency - 999

StandardHours Text 3 999

OvertimeRate Currency - 999

d) Leave Details

Table Name: LeaveDetailsPrimary Key: EmployeeIDContents: This table contains the amount of leave an employee has taken and the amount remaining.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

StandardDays Text 2 99

Casualleave Text 2 99

Sickleave Text 2 99

Emergencyleave Text 2 99

Nodays Number Long Integer 99Totaldays Number Long Integer 99

e) Pay Details

Table Name: PayDetailsPrimary Key: EmployeeID, MonthContents: This table contains the information gathered when calculating the pay, such as hours worked and also the total pay for the employee.

Field Names Data types Field Size Input MaskEmployeeID Text 5 LL000

Month Text 8 -

HoursWorked Number Long Integer 999

Overtime Number Long Integer 999

TotalPay Currency - 999999The relationships between the 5 tables are as shown:

Candidate Name: H. Chathuranga B. Sumanasekera - 96 -

Page 97: AL Computer Project - Gamma Entertainment Payroll System

AttendanceData

EmployeeData

LeaveDetails

Department PayDetailsOne

One One

OneMany

Many

Many

One

GAMMA Entertainment Payroll System

ii) Query Design:

1. Date Query

Used in the Attendance Form where employees have to log in when they come to the office and when they leave the record they saved on earlier has to be retrieved. This query is used to perform that task.Name: QueryDateTable(s): Attendance Data Criteria: Enter Employee ID, Enter Date

2. Pay Query

Used to retrieve records of employees in a certain month in order to calculate his/her pay.Name: QueryPayTable(s): Pay details Criteria: Enter Employee ID, Enter Month

3. Attendance Data Delete Query

This query is used to retrieve all the records of a certain employee in the Attendance Data table so that they can be deleted. This is required in order to delete an employee from the database.Name: QueryDelete_ATable(s): Attendance DataCriteria: Enter Employee ID

4. Pay Data Delete Query

This serves the same purpose as the earlier one (above) except that this time the Pay Details table’s records of a certain employee is deleted.Name: QueryDelete_PTable(s): Pay detailsCriteria: Enter Employee ID

Candidate Name: H. Chathuranga B. Sumanasekera - 97 -

Page 98: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The data dictionary of the system is shown below:

Table name Username Access Rights Volume (Estimated for 5 year period)

1. EmployeeDataEmployeeAccountantManagement

Full Access 100 records

2. AttendanceDataEmployeeAccountantManagement

Full Access 182,500 records

3. LeaveDetailsEmployeeAccountantManagement

- None- Full Access- Full Access

100 records

4. PayDetailsEmployeeAccountantManagement

- None- Full Access- Full Access

6000 records

5. DepartmentEmployeeAccountantManagement

- None- None- Full Access

3 records

The following formulae were used in calculating the pay of the employee:

i) Overtime hours = Hours Worked (by employee) - Standard Hours required (for department)

When overtime hours is zero the following formulae are used to calculate the pay:ii) Pay = Hours Worked * Hourly Rate (of that employee’s department)

Otherwise the pay is calculated by:iii) Pay = [Standard Hours required * Hourly Rate] + [Overtime hours * Overtime rate]

The pseudo-code for all the modules of the system is shown below.

Candidate Name: H. Chathuranga B. Sumanasekera - 98 -

Page 99: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

a) Login Screen:

BeginEnter Username and PasswordLogin to the systemIf Username = Management and Password is correct Then

Show Main Menu and close login formElseIf Username = Accountant or Username = Employee and Password is correct Then

Show Main Menu with some features disabled and close login formElse

Display Error MessageEndIf

End

b) Main Menu: Once you click on an item it will open the corresponding form. Clicking File > Exit is close the main menu. Clicking File > Log off will enable the user to back to the Login Screen.

c) Employee Data:

BeginAllocate memory for databaseLoad database to memoryEnter new employee recordAdd new recordIf any field is blank or contains invalid data Then

Display error messageElse

Save employee record to databaseEndifClear all entriesEnter Employee ID of existing employeeFind the employeeSearch database for employeeIf employee if found Then

View RecordElse

Display Error MessageEndifChange the data retrievedEdit the recordIf any field is blank or contains invalid data Then

Display error messageElse

Save changes to databaseEndifDelete the record

Candidate Name: H. Chathuranga B. Sumanasekera - 99 -

Page 100: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If any field is blank or contains invalid data ThenDisplay error message

ElseDelete employee from database

EndifClose the form

End

d) Department Details

BeginAllocate memory for databaseLoad database to memoryEnter details of a DepartmentAdd new recordIf any field is blank or contains invalid data or Department already exists Then

Display error messageElse

Save Department data to databaseEndifClear all entriesSelect an existing DepartmentRetrieve the recordIf Department not found Then

Display error messageElse

View RecordEndifChange the dataEdit the recordIf any field is blank or contains invalid data Then

Display error messageElse

Save changes to databaseEndifClose the form

End

e) Attendance Data

BeginAllocate memory for databaseLoad database to memoryEnter required informationClock-in to the systemIf any field is blank or contains invalid data or wrong password Then

Display error messageElse

Candidate Name: H. Chathuranga B. Sumanasekera - 100 -

Page 101: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Save data to databaseEndifClear all entriesEnter an Employee ID and passwordIf any field is blank or contains invalid data or wrong password Then

Display error messageElse

View RecordEndifClock-out of the systemSave the Time Out to the recordCalculate the difference in Time In and Time OutAdd it to ‘Hours Worked’ in Pay Details table in database for that employeeClose the form

End

f) Leave Details

BeginAllocate memory for databaseLoad database to memoryEnter Employee IDCheck no. of days availableIf any field is blank or contains invalid data Then

Display error messageElse

View RecordEndifEnter required dataAdd new recordIf any field is blank or contains invalid data Then

Display error messageElse

Save data to the databaseEndifClear all entriesClose the form

Exit

g) Pay Details

BeginAllocate memory for databaseLoad database to memoryEnter Employee IDCalculate the PayUse data in database to calculate payDisplay Pay Calculated

Candidate Name: H. Chathuranga B. Sumanasekera - 101 -

Page 102: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Add new recordSave the data to the databasePrint the pay slipOpen Print FormClear all entriesExit the systemClose the form

End

h) Print Form

BeginRetrieve and display data from Pay Details formPrint the form when user tells to printClose the form.

End

i) About Form

BeginLoad music track to Media PlayerChange audio trackLoad next track into Media PlayerWhen user click ‘System Info’Show System InformationClose the form

End

j) Splash Screen

BeginClick ‘Click here to continue’Load Login formClose the form

End

Data Flow Diagram (Context Level):

Candidate Name: H. Chathuranga B. Sumanasekera - 102 -

Page 103: AL Computer Project - Gamma Entertainment Payroll System

EmployeesAttendance Table

Printed pay slips

Summary Report

Employees

Management

GAMMA Entertainment Payroll System

GAMMA Entertainment Payroll System

DFD (Second Level):

Flows Lines & Processes Explained:

Flow 1: Employee’s personal details that they entered.

Candidate Name: H. Chathuranga B. Sumanasekera - 103 -

Page 104: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Process A: System receives employee’s data and creates a new profile for the employee by creating new records in the appropriate tables.

Flow 2: Employee’s personal data sent for storage in the ‘Employee Data’ table in database.

Flow 3: Data required to form new record in the ‘Pay Details’ table.

Flow 4: Data required to form new record in the ‘Leave Details’ table.

Flow 5: Employee’s data requesting to take leave.

Flow 17: Retrieve data from the database regarding employee’s available no. of days of leave.

Process C: Employee’s request to take leave processed, checked with database to see if he can take leave and the data is then stored in the ‘Leave Table’.

Flow 8: The data of the employee’s leave is stored.

Flow 6: The employee’s enters the data in the Attendance form daily.

Flow18: Data from employee table retrieved to check employee’s validity.

Process B: Data from employee stored in Attendance data table.

Flow 7: Attendance data stored.

Flow 10: Management enters departmental salary details.

Process D: Departmental data sent for storage.

Flow 11: Data stored to Department Data table.

Flow 13: Accountants needs to prepare payroll, enters employee and month for the system to calculate pay.

Flow 9: Attendance data retrieved to calculate hours worked.

Process E: Payroll calculated using data from Attendance data table, including hours worked, overtime & total pay.

Flow 14: Data stored into the Pay Details table.

Flow 15: Data used to print pay slips for the employees.Flow 16: Information of the pay calculated of all employees (retrieved from ‘Pay details’ table) generated into report.

Please refer Appendix 1 at the end of this document for the program listings.

Candidate Name: H. Chathuranga B. Sumanasekera - 104 -

Page 105: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If this document is unable to solve any of your problems or you need additional information please contact:

Name: Chathuranga SumanasekeraAddress: 27A Malwatta Ave., Nugegoda, Sri Lanka.Telephone No.: (094)-011-2822952Mobile: 077-9086216E-mail: [email protected]

[D] (ii) User Documentation<cover page>

Candidate Name: H. Chathuranga B. Sumanasekera - 105 -

Page 106: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Contents1. How to install…………………………………………………………………………… 3

Candidate Name: H. Chathuranga B. Sumanasekera - 106 -

Page 107: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

2. Creating a shortcut…………………………………………………………………….. 5

3. Using the program1. The Splash Screen……………………………………………………………… 62. The Login Window………………………………………………………………. 73. Main Menu……………………………………………………………………….. 84. Employee Data form…………………………………………………………….. 95. Attendance Data form…………………………………………………………… 116. Department Data form…………………………………………………………... 137. Leave Details form………………………………………………………………. 158. Pay Details form…………………………………………………………………. 179. Summary Report………………………………………………………………… 1910. About…………………………………………………………………………….. 2011. Log-off…………………………………………………………………………… 2012. Exit………………………………………………………………………………. 20

4. Creating a backup……………………………………………………………………… 21

5. Contact Us……………………………………………………………………………… 22

6. Glossary………………………………………………………………………………… 23

_______________________________________________________________________________

a) Insert the Installation CD into the CD-ROM. Once you open your CD-ROM drive you should see the following Payroll Setup file.

Candidate Name: H. Chathuranga B. Sumanasekera - 107 -

Page 108: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

b) Double-click on the ‘Payroll Installation’ icon to start the setup. The following screen should appear:

Now click ‘Next’.

c) This will open a window in which you have to specify the location where you want to install the program. It is recommended that you install the program in the following location ‘C:\Program Files\Payroll\’. After specifying this, click ‘next’ to continue.

Candidate Name: H. Chathuranga B. Sumanasekera - 108 -

Page 109: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

d) If the folder location you entered does not exist you will be asked if you want to create the location folder. In this case click ‘Yes’ (see image below).

e) Next the installation will begin and after its completion the following confirmation screen would appear, from here click finish to complete the setup.

_______________________________________________________________________

Candidate Name: H. Chathuranga B. Sumanasekera - 109 -

Page 110: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

a) The program can now be found at the installation location you specified when you installed the program. After going to that folder you will able to see an icon named ‘Payroll System’

b) Right-click the icon and point to the ‘Send to’ item from the pop-up menu. A second menu will appear. From here select ‘Desktop (Create Shortcut)’.

c) A shortcut for the Payroll System will now appear in your desktop. Now you can double click the program icon to run the program.

_______________________________________________________________________________

Candidate Name: H. Chathuranga B. Sumanasekera - 110 -

Page 111: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

1. The Splash ScreenThis is a brief loading window. It displays copyright information and product warnings.

Fig. 1: The splash screen

After the loading completes, the Log In window is displayed.

2. The Login Window

Candidate Name: H. Chathuranga B. Sumanasekera - 111 -

Page 112: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Fig. 2: The Log In window

In this window you are required to enter your username & password in order to gain access to the system. All employees have a common username (‘Employee’) and a password. Other users include ‘Accountant’ and ‘Management’ each with there own password. After you select the proper user and type in the correct password, you can click ‘Log In’ to enter the system. Clicking ‘Exit’ will close the Log In window.

troubleshooting a) Invalid Password:If you enter an incorrect password the following error message may appear:

Fig. 3: Invalid password error message

In such cases please check that you have chosen the appropriate user and entered the correct password.

3. Main Menu

Candidate Name: H. Chathuranga B. Sumanasekera - 112 -

Page 113: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This is the main menu from where the entire program can be accessed. However depending on the user level (i.e. Employee, Accountant, etc.) you may not have access to all program modules. Only the ‘Management’ level can have unrestricted access.

Fig. 4: Main menu viewed when logged in as ‘Management’

4. Employee DataUser Access: All

Candidate Name: H. Chathuranga B. Sumanasekera - 113 -

Page 114: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

This form allows the users to enter their personal details into the program. Each employee has to enter his or her details into this form when they join the company.

Among the details stored is the ‘Password’. This password will be used to authenticate you when you clock-in and clock-out, therefore make sure that you keep the password highly confidential.

Fig. 5: The Employee Data form

Once you fill in the data, click ‘Save’ to save the data you entered. You should get a message saying that the information had been successfully saved.

If you want to retrieve a record you will have to enter the Employee ID and then click ‘Find’. From here you will be able to delete or edit the retrieved record. However you will not be able to alter the password.

To delete an employee’s details, you have t retrieve that data and then click ‘Delete’. You may be asked whether you really want to delete the data, in such a case click ‘Yes’.

Candidate Name: H. Chathuranga B. Sumanasekera - 114 -

Page 115: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Fig. 6: Confirming deletion

To edit the information, first retrieve the data and then make any changes required. After that simply click ‘Edit’ to save the changes. You should get a message saying that the information had been successfully saved.

Pressing the ‘Clear All’ button will clear any entries typed in the form. You can click ‘Exit’ to quit the form.

troubleshooting a) Incorrect data entry

Error messages may appear if you attempt to enter invalid data, such as trying to enter a numeric character in the ‘Name’ field will cause an error message since a name can only have alphabetical characters.

Fig. 7: Entering invalid data

b) Saving an incomplete form

If you try to save the data without completing the entire form then you may get the following error message. Please make sure you enter valid data into all the fields before saving.

Fig. 8: Incomplete form

c) Attempting to delete without retrieving data

If you click the delete button without retrieving some data first, then you will be presented with a message saying you should retrieve data before deleting it.

Candidate Name: H. Chathuranga B. Sumanasekera - 115 -

Page 116: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

5. Attendance DataUser Access: All

This is the form all employees will use clock-in and clock-out. To do this you will need your Employee ID and your password you defined when you entered your details into the Employee Data form.

When an employee comes to the office he/she is required to clock-in. To do this you must enter the Employee ID and Password. Make sure that the current date is selected in the ‘Date’ section and then click ‘Clock Time In’. This will store the time you came to the office that day.

When you leave the office you will once again have to enter your Employee ID, Password & select the current date, but this time you should click ‘Find’. This will retrieve the information you stored when you entered the office in the morning. Now click ‘Clock Time Out’ to store the time you are leaving the office.

Make sure that after performing your tasks to click the ‘Clear All’ button to clean the entries you entered so that a person who comes after you cannot try and find your password.

Fig 9: The Attendance Data Form

Candidate Name: H. Chathuranga B. Sumanasekera - 116 -

Page 117: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

troubleshootinga) Employee Not Found

Fig 10: Employee error

This error occurs if the employee ID you entered does not exist in the database. Please make sure you entered the same employee ID you saved in the Employee Data form.If this error occurred when you clicked ‘Find’, then you have attempted to retrieve a record that had not been saved earlier. Please clock in before you find a record or check that the ‘Date’ is properly selected.

b) Incorrect Password

Fig 11: Incorrect Password error

This error will occur if the password you typed does not match the password of the employee ID you entered. Please recheck the password and try again.

Candidate Name: H. Chathuranga B. Sumanasekera - 117 -

Page 118: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

6. Department DataUser Access: Management Only

Only users with ‘Management’ level access can open this form. This form is used to enter and edit the salary rates of each department.

To add details of a new department, fill the form and then click ‘Add department’. You should then get a message saying the data was successfully stored.

If you want to edit the details of an already existing department, select the department from the drop down menu in the lower part of the form and click ‘Retrieve Data’. The details of the department should now be displayed on the screen. You may make any changes you wish and then click ‘Edit’ to save the changes.

You can click ‘Clear All’ to clear any entries in the form.

Fig 12: Department Information

Candidate Name: H. Chathuranga B. Sumanasekera - 118 -

Page 119: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

troubleshooting a) Incorrect type error

Fig 13: Incorrect type errorThis error message occurs if you try to enter an alphabetical character to a field in which you should only enter numbers.

b) Missing Data error

Fig 14: Missing data error

This error will occur if you try to save the form without filling it completely. Please make sure that you complete the form before you do any task.

Candidate Name: H. Chathuranga B. Sumanasekera - 119 -

Page 120: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

7. Leave DetailsUser Access: Accountant and Management only

An employee who wishes to take leave must enter the leave details to this form.

Fig 15: Leave Details form

The employee will have access this form through an accountant. The accountant can enter the employee ID and click ‘Check no. of days available’ to see how many days more that particular employee can take on leave. You need to perform this in order for the ‘Save’ button to be activated.

The Accountant should enter the employee’s ID and the number of days of leave he/she wants and the type of leave. After entering the required data, click ‘Save’ to save the information. The amount of days of leave available of the employee will automatically be deducted. You can press ‘Clear All’ to clear any entries.

troubleshooting a) Data Type Error

Fig 16: Error message displayed when you try to enter a numeric character for the first three characters of the employee ID

Candidate Name: H. Chathuranga B. Sumanasekera - 120 -

Page 121: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Fig 17: Error message displayed if you try to enter an alphabetical character to the ‘No. of days’ field.

As you can see from the above two error messages, this error occurs when you attempt to enter a type of data that is incorrect for the given field. Please make sure you enter valid data.

b) Employee not found

Fig 18: Employee not found

This error message will appear if you entered the employee ID incorrectly or the employee ID you entered does not exist in the database. Please re-check the employee ID and try again.

c) Missing Values

Fig 19: Missing values error messages

These error messages will occur if the user attempts to save the data without first entering the required data. Please fill in all required data before clicking ‘Save’.

Candidate Name: H. Chathuranga B. Sumanasekera - 121 -

Page 122: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

8. Pay DetailsUser Access: Accountant and Management only

This form can be used to calculate the pay. In order to do this the user must enter the employee ID and then select the particular month and then click ‘Calculate Pay’ to generate the pay details.

Fig 20: Pay Details form

You can save the data by clicking the ‘Save’ button. After this you may click ‘Print’ to open a new window (see below) from which you can print the pay slips.

Fig 21: Printing the pay slip

Candidate Name: H. Chathuranga B. Sumanasekera - 122 -

Page 123: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

You can click ‘Print’ from here to print the pay slip. Note: Clicking print will open the Printer Settings window from which you can change the print quality, etc. before printing. You can print the pay slip on A4 size paper although the full page will not be used.

troubleshooting a) Invalid Type Error

Fig 22: Invalid type error

This error occurs when you attempt to enter a type of data that is incorrect for the given field. Please make sure you enter valid data.

b) Employee not found

Fig 23: Employee not found

This error message will appear if you entered the employee ID incorrectly or the employee ID you entered does not exist in the database. Please re-check the employee ID and try again.

c) Missing Values

Fig 24: Missing values error messages

These error messages will occur if the user attempts to save the data without first entering the required data. Please fill in all required data before clicking ‘Save’.

d) Unable to print the pay slip

Candidate Name: H. Chathuranga B. Sumanasekera - 123 -

Page 124: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If you are unable to print the pay slip from the Printer Settings window or if the Printer Settings window does not open please check that you have properly installed your printer. If this does not fix the problem contact your printer manufacturer to fix the problem.

9. Summary ReportUser Access: Accountant and Management only

The Summary Report can be accessed from the main menu. Once you click it the report will be automatically generated and displayed.

Fig 25: Opening the Summary Report

From here you can click on the ‘Print’ icon to print the report. You can click the ‘Preview’ icon to open the print preview before printing.

Fig 26: The Summary Report

The summary report can be printed on A4 size paper.

Candidate Name: H. Chathuranga B. Sumanasekera - 124 -

The ‘Print’ iconThe ‘Preview’ icon

Page 125: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

10. AboutUser Access: All

This form displays information about the program. You may also hear music being played. Music in the ‘Music’ folder of the ‘Payroll’ folder where you installed the payroll system will be played.

11. Log OffYou can log off in order to change users from this form.

12. ExitClicking this will close the program.

Candidate Name: H. Chathuranga B. Sumanasekera - 125 -

Page 126: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

_______________________________________________________________________________

This section shows you how to create a backup copy of your database so that incase of accidental loss or deletion of the payroll files in the computer, you would be able to back-up the data and recovered the lost data. It is recommended that you create a back-up copy at the end of every day or every week.

1. Locating the database

The database can be found at the location where you installed the payroll system (by default it would be C:\Program Files\Payroll\). It will be in the form of a Microsoft Access database file with extension ‘.mdb’.

Fig 27: The payroll database file

2. Copying the file

Right-click the ‘Payroll.mdb’ file and select ‘Copy’. Now go to another location where you can store data in your computer, this may be another folder in your hard disk, a floppy disk or a CD (in this case you will have to burn the data – refer the CD Burning software help for instructions) and right-click and press ‘Paste’.

This will copy the file to the new location. If anything happens to the file in the Payroll folder you can copy this back-up copy to replace it.

Candidate Name: H. Chathuranga B. Sumanasekera - 126 -

Page 127: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

_______________________________________________________________________________

If this document is unable to solve any of your problems or you need additional information please contact:

Name: Chathuranga SumanasekeraAddress: 27A Malwatta Ave., Nugegoda, Sri Lanka.Telephone No.: (094)-011-2822952Mobile: 077-9086216E-mail: [email protected]

Candidate Name: H. Chathuranga B. Sumanasekera - 127 -

Page 128: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

_______________________________________________________________________________

CD-ROM Drive –This is the device that enables you to use compact discs. You can access this device (also referred to as ‘drive’) through the ‘My Computer’ icon on your desktop.

Form – In a program sense, a ‘Form’ is a window within the program that the user interacts with. So when you open ‘Employee Data’ window, it can be referred to as the Employee Data form.

Record - A record is a single row of data that is stored in a database. ‘Row’ here means all the data belonging to one central item (in this case mostly the Employee ID). For example if one employee enters his/her data into the program through the Employee Data form then the data he/she saves will be known as a record. If another person enters their details, then that will be another record.

User Access - This denotes which group of people has access to a particular form in the payroll system. There are three groups – Management, Accountant and Employee.

User Level - This represents the level of access a particular group of people, i.e. users, has within the program. The ‘Management’ level users have the highest access meaning they have access to all forms in the program, while ‘Employee’ is the lowest and has access only to a few forms.

Candidate Name: H. Chathuranga B. Sumanasekera - 128 -

Page 129: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

[E] (i) Achieved degree of success

Functional Requirements:

1) Each individual employee should be capable of entering only his/her own in/out times and no one else’s.

Input: Demand the employee enter his or her own unique password before allowing them to enter the -in and -out times.Process: Check with the records in the database to see if the employee has entered the correct password.Output: Allow authorized employee to enter their –in and –out times.

This objective has been handled well in the new system with the Attendance Data form which demands each user to enter their employee ID along with their password for authentication. Evidence for this may be found in the (C) (i) Development and Testing on page … and in the program coding located in the Appendix 1 of the Technical Documentation (attached at the end of this document).

2) The new system should allow the employee to enter only the accurate times he/she comes and leaves the office.

Input: The time the employee logs-in and out of the system.Process: Store the computer clock time of the log times in the database and calculate the difference in the –in and –out times to know the hours the employee worked.Output: Use data stored in the database to help calculate the pay.

This requirement, like the previous one, has been achieved by the Attendance Data form by recording the system time rather than allowing the employee to enter the time. Verification for this could be found on the screen dumps on page … and in the program code on page … of the Technical Documentation.

The only drawback of this solution is that if the system clock is incorrect then the recorded times will be faulty. However the possibility of this happening is considerably low as the company has been strictly advised to connect the computer to the internet and use the feature available in Windows XP to synchronize with an Internet time server.

3) The payroll has to be calculated in an easy and accurate method in such a way that no user may alter the final pay details

Input: Require the user to enter employee ID and the month to calculate pay.Process: Calculate the pay using the attendance data stored during the course of the month.Output: Display the pay information where the user cannot alter the data.

This is accomplished in the Calculate Pay form, where an authorized user can access the form and enter an employee ID and month to calculate the pay. The final pay is displayed on the form but the used has no possible method to alter the data. The user is then allowed to print the data, but this too cannot be altered. Evidence may be found on page … and in the program code found in the Technical Documentation.

Candidate Name: H. Chathuranga B. Sumanasekera - 129 -

Page 130: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

However it is possible that an experience computer hacker may gain access to the database where the data is stored and alter it, but the data stored in the database’s Pay Details table is only used for the generation of the expenditure report and therefore altering this data would not help them print a false pay slip. The pay slip can be printed ONLY when the pay is calculated and the data displayed on the screen is used to print the pay slip, so again altering the database would not achieve anything.

Therefore, as you can see, this objective has been completed with an exceptional degree of success with the pay been calculated in an entirely safe & secure manner.

4) Details of leave obtained by an employee should be recorded and deducted from the amount of annual leave the company allows an employee to take.

Input: Employee must enter the amount and type of leave he or she requires.Process: Deduct the amount entered from the amount of leave the employee is entitled to from the data in the database.Output: The remaining amount of days of leave available should be displayed.

This objective is accomplished by the Leave Details form which allows the user to take leave and deducts that amount from the amount of days of leave they are allowed. This data is also displayed in the pay slips issued to the employees. Evidence for this may be found on page … in [C] (i) Development and testing and in the program code found in the Technical Documentation.

5) Summarized Reports should be generated easily and accurately.Input: Data from the Pay table in the database.Process: Report should be generated in the pre-defined report layout.Output: The Report should be displayed and printed.

This is achieved by the Monthly Summary Report which gives the payroll expenditure for the month from data retrieved from the Pay Details table in the database. The report has been designed in a precise and concise manner to facilitate large amounts of data.Evidence for this may be found on page … in [C] (i) Development and testing and in the program code found in the Technical Documentation.

Non-Functional Requirements:

6) Different levels of authorization so that low level entities such as employees and accountants do not have the capability to alter hourly pay rates, overtime rates, etc. Only those in the management level should be allowed to this.

This requirement is met with the Login form which requires each level of user (Employee, Accountant, and Management) to use their own password to enter the system. Depending in the level of the user, the main menu will be displayed with access to certain forms restricted.Please refer page … in [C] (i) Development and testing and in the program code found in the Technical Documentation for verification.

Candidate Name: H. Chathuranga B. Sumanasekera - 130 -

Page 131: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

7) The amount of hours worked should be calculated flawlessly and unauthorized editing of this data should not be allowed (i.e. no alteration or tampering of the data ought to be permitted) so that the pay calculated is fair and accurate.

The amount of hours worked is calculate by subtracting the time-in from time-out. These calculations are performed by the program so no mishaps can occur unless there is an error in the coding, which is highly unlikely after the vigorous and intensive testing performed. Please refer the discussion on Functional Requirement (3) for more information on how unauthorized editing of data is prevented. Please refer page … in [C] (i) Development and testing and in the program code found in the Technical Documentation for verification.

8) Should be designed to provide good user-friendliness interface so that all users can easily use the system regardless of their individual computer skill.

Overall the system is designed to be quite user-friendly with certain forms such as the ‘About’ form, has the capability to play songs to suit the needs of the user. Please refer page the program code found in the Appendix 1 of the Technical Documentation for verification.

Conclusion:

Some objectives are achieved with an exceptionally high degree of success while others demonstrate an average degree of success. However no objectives are found without any degree of success, therefore overall the degree of success achieved is fairly high.

User Evaluation

Please refer the Appendix for the questionnaire that was answered by the Head of the Accounting Department as a phase of user evaluation after having fully implemented the system.

[E] (ii) Evaluation of user’s response to the systemAfter the implementation of the system, a questionnaire (see below) was handed over to employees in order to get their input on the new system. (See previous section to see the evaluation made by the head of the Accounting Department).

Candidate Name: H. Chathuranga B. Sumanasekera - 131 -

Page 132: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

The following table was given to selected officials of the Accounting Department to investigate about the user acceptance.

Candidate Name: H. Chathuranga B. Sumanasekera - 132 -

Page 133: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Conclusion

Candidate Name: H. Chathuranga B. Sumanasekera - 133 -

Page 134: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

1st Questionnaire (to the employees):

This questionnaire received many positive responses. Responses to questions 1), 3), 4) and 5) were largely positive while responses to question 2) were mainly ‘average’ with a few respondents giving ‘easy’. This indicated that the menus can be improved to give better user-friendliness, but taken as a whole; the system has overcome the problems of the earlier system and is quite user-friendly.

2nd Questionnaire (to the Accounting Department officials):

The responses to this was very positive with the users expressing their satisfaction of the system and a few made some useful suggestions such as improving the content of the summary report with the addition of leave details of each employee being entered to it as well.

Please refer the Appendix for few of the copies of the original responses received from the users.

[E] (iii) Desirable Extensions

Candidate Name: H. Chathuranga B. Sumanasekera - 134 -

Page 135: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Looking at the final system and its end user evaluation, it is clear that it has achieved all of its objectives. The users have explicitly expressed their satisfaction of the overall system and its performance.

However there are several possible areas of improvement. The good, the bad and possible improvements to the system are discussed below.

The Good:

System has achieved all of the requirements as specified in section [A] (ii) Investigation and Analysis.

Users are satisfied with the final product. The system achieves a credible degree of security. The system has been tested, both by the system analyst and the end-user, and has been

cleared of any faults. The system has demonstrated satisfactory easiness of operation, fault tolerance and

hardware interaction (printing, etc.).

The Bad:

Users cannot change their passwords after specifying them initially. There is no possibility of expanding the system to be used in a local or wide area network. The system does not facilitate using alternative input devices such as magnetic stripe cards.

Possible Improvements:

The user evaluation revealed that it would better if the leave details of each employee are added to the summary report. This too can be done through Visual Basic by adding the Leave Details table to the data environment and then using the necessary fields in the report layout window.

The users could be allowed to change their passwords by creating a separate table in Microsoft Access to store the passwords and make necessary changes in Visual Basic to enable the user to save the passwords to that table.

The employees can be allowed to login through the use of a magnetic stripe cards. But this would require a magnetic stripe card reader and the program currently do not facilitate this. However changes can be made by an experienced programmer to allow this facility.

Candidate Name: H. Chathuranga B. Sumanasekera - 135 -

Page 136: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Appendix 1

Annotated Program Listings

Annotated Listing: Given below is the annotated program coding for all forms as developed in Microsoft Visual Basic 6.0. Screenshots of each form is provided as in the Visual Basic development environment (not in ‘Run’ mode) so that all controls can be viewed.

Candidate Name: H. Chathuranga B. Sumanasekera - 136 -

Page 137: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Special Note: A screenshot of the form is provided along with its coding for convenience. The appearance of some of these forms may be slightly different (i.e. background pictures, pictures in command buttons, colours, etc.) from the screenshots provided in the testing stage. These changes were made after the testing stage as a final ‘brush up’. Please note that the screenshots here represent the final program that was handed over to the user. No critical changes in contents (i.e. field names, text boxes, command buttons, etc.) were mad.

a) Splash Screen (frmSpash)

Private Sub Timer1_Timer() 'opens the Login for on the completion of the progress bar. If ProgressBar1.Value > 99 Then frmLogin.Show Unload MeElse ProgressBar1.Value = ProgressBar1.Value + 0.5 End IfEnd Sub

b) Login Screen (frmLogin)

Candidate Name: H. Chathuranga B. Sumanasekera - 137 -

Page 138: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Private Sub cmdexit_Click() ' Closes the form Unload MeEnd Sub

Private Sub cmdlogin_Click() 'Authenticates the user

If txtuser.Text = "Management" Then 'if user is management If txtpass.Text = "manage76CQW" Then 'checks the password and then opens the main menu mdigamma.Show Unload Me Else 'if password is wrong then the password the user entered is deleted and error message displayed MsgBox "Invalid Password, please try again", vbCritical, "Invalid Password" txtpass.SetFocus SendKeys "{Home}+{End}" SendKeys "{Backspace}" End IfElseIf txtuser.Text = "Accountant" Then 'if user is Accountant If txtpass.Text = "acc58FE34" Then 'checks if the password is correct and then allows the main menu to appear with limited access mdigamma.dep.Enabled = False mdigamma.Show Unload Me Else 'if password is wrong then the password the user entered is deleted and error message displayed MsgBox "Invalid Password, please try again", vbCritical, "Invalid Password" txtpass.SetFocus SendKeys "{Home}+{End}" SendKeys "{Backspace}" End IfElseIf txtuser.Text = "Employee" Then 'if the user is Employee If txtpass.Text = "empGTA200" Then 'checks if the password is correct and then allows the main menu to appear with limited access mdigamma.dep.Enabled = False

Candidate Name: H. Chathuranga B. Sumanasekera - 138 -

Page 139: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

mdigamma.edit.Enabled = False mdigamma.rep.Enabled = False mdigamma.Show Unload Me Else 'if password is wrong then the password the user entered is deleted and error message displayed MsgBox "Invalid Password, please try again", vbCritical, "Invalid Password" txtpass.SetFocus SendKeys "{Home}+{End}" SendKeys "{Backspace}" End IfEnd If

End Sub

c) Main Menu (mdigamma)

Private Sub about_Click() 'shows the About form frmAbout.ShowEnd Sub

Private Sub attendance_Click() 'shows the Attendance Data form frmattendance.ShowEnd Sub

Private Sub dep_Click() 'shows the Department Details form frmdepartment.ShowEnd Sub

Private Sub emp_Click() 'shows the Employee Data form frmemployee.ShowEnd Sub

Candidate Name: H. Chathuranga B. Sumanasekera - 139 -

Page 140: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Private Sub ex_Click() 'closes the main menu Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me End IfEnd Sub

Private Sub leave_Click() 'shows the Leave Details form frmleave.ShowEnd Sub

Private Sub log_Click() 'allows the user to log off Dim Res As Integer Res = MsgBox("Are you sure you want to Log Off?", vbQuestion + vbYesNo, "Log Off") If Res = vbYes Then frmLogin.Show Unload Me End IfEnd Sub

Private Sub pay_Click() 'shows the Pay Details form frmpay.ShowEnd Sub

Private Sub summary_Click() 'shows the Payroll Report rptpayroll.ShowEnd Sub

d) Employee Data form (frmemployee)

Candidate Name: H. Chathuranga B. Sumanasekera - 140 -

Page 141: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Option ExplicitDim db As New ADODB.Connection 'defines the 'db' as the databaseDim recemp As New ADODB.Recordset 'defines 'recemp' as the name for the Employee tableDim recattendance As New ADODB.Recordset 'defines 'recattendance' as the name for Attendance tableDim recatsearch As New ADODB.Recordset 'defines 'recatsearch' as the name for Search queryDim recpaysearch As New ADODB.Recordset 'defines 'recpaysearch' as the name for Pay Search queryDim recleave As New ADODB.Recordset 'defines 'recleave' as the name for Leave details tableDim recpay As New ADODB.Recordset 'defines 'recpay' as the name for Pay details table

Private Sub cmdadd_Click() 'adds an employee to the database after performing validations

If txtempID.Text = "" Or txtpass.Text = "" Or txtname.Text = "" Or txtaddress.Text = "" Or txttelno.Text = "" Or txtnic.Text = "" Or txtepf.Text = "" Or txtetf.Text = "" Then MsgBox "Please complete the entire form before saving it.", vbCritical, "Error - Missing Value"Else 'creates records for the new employee in necessary tables (i.e. Employee, Leave & Pay tables) recemp.AddNew recemp!EmployeeID = txtempID.Text recemp!Password = txtpass.Text recemp!name = txtname.Text recemp!Address = txtaddress.Text recemp!TelNo = txttelno.Text recemp!NICNo = txtnic.Text recemp!Department = cmbdept.Text recemp!EPFNo = txtepf.Text recemp!ETFNo = txtetf.Text recemp.Update recleave.AddNew recleave!EmployeeID = txtempID.Text recleave!StandardDays = val(31) recleave!NoDays = val(0)

Candidate Name: H. Chathuranga B. Sumanasekera - 141 -

Page 142: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

recleave!Totaldays = val(0) recleave.Update recpay.AddNew recpay!EmployeeID = txtempID.Text recpay!Month = "" recpay!HoursWorked = val(0) recpay!overtime = val(0) recpay!TotalPay = val(0) recpay.Update MsgBox "The information has been successfully saved.", vbInformation, "Done" cmdclear = TrueEnd IfEnd Sub

Private Sub cmdclear_Click() 'clears all entries txtpass.Enabled = True txtempID.Text = "" txtpass.Text = "" txtname.Text = "" txtaddress.Text = "" txttelno.Text = "" txtnic.Text = "" txtepf.Text = "" txtetf.Text = "" cmbdept.Text = "Sales"End Sub

Private Sub cmddelete_Click() 'deletes the employee record currently viewed

Dim Choice As StringIf txtname.Text = "" Then MsgBox "Please retreive an employee's profile before deleting it.", vbInformation, "No employee found"Else Choice = MsgBox("Are you sure you want to delete this employee?", vbYesNo, "Confirm Delete") If Choice = vbYes Then recpaysearch.Open "Delete From PayDetails WHERE EmployeeID='" & (txtempID.Text) & "'", db, adOpenKeyset, adLockOptimistic recatsearch.Open "SELECT EmployeeID, Date, TimeIn, TimeOut From AttendanceData WHERE EmployeeID='" & (txtempID.Text) & "'", db, adOpenKeyset, adLockOptimistic recatsearch.Delete recleave.Delete recemp.Delete MsgBox "Record has been successfully deleted.", vbInformation, "Employee deleted" txtempID.Text = "" txtpass.Text = "" txtname.Text = ""

Candidate Name: H. Chathuranga B. Sumanasekera - 142 -

Page 143: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

txtaddress.Text = "" txttelno.Text = "" txtnic.Text = "" txtepf.Text = "" txtetf.Text = "" cmbdept.Text = "Sales" txtempID.SetFocus End IfEnd IfEnd Sub

Private Sub cmdedit_Click() 'saves changes made to an employee's record recemp!EmployeeID = txtempID.Text recemp!Password = txthidden.Text recemp!name = txtname.Text recemp!Address = txtaddress.Text recemp!TelNo = txttelno.Text recemp!NICNo = txtnic.Text recemp!Department = cmbdept.Text recemp!EPFNo = txtepf.Text recemp!ETFNo = txtetf.Text recemp.Update MsgBox "The information has been successfully saved.", vbInformation, "Done" cmdadd.Enabled = True cmdclear = True cmdedit.Enabled = False txtpass.Enabled = TrueEnd Sub

Private Sub cmdexit_Click() 'closes the form Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me db.Close End IfEnd Sub

Private Sub cmdfind_Click() 'retrieves an employee from the database If txtempID.Text = "" Then MsgBox "Please enter an Employee ID", vbCritical, "No Employee ID"Else Dim val As String recemp.MoveFirst val = txtempID.Text recemp.Find "EmployeeID='" & (val) & "'" If recemp.EOF = True Then

Candidate Name: H. Chathuranga B. Sumanasekera - 143 -

Page 144: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

MsgBox "The employee ID you entered does not exist. Please check your ID properly and try again.", vbCritical, "Employee not found" Else cmdadd.Enabled = False cmdedit.Enabled = True txtpass.Enabled = False txthidden = recemp!Password txtempID.Text = recemp!EmployeeID txtname.Text = recemp!name txtaddress.Text = recemp!Address txttelno.Text = recemp!TelNo txtnic.Text = recemp!NICNo cmbdept.Text = recemp!Department txtepf.Text = recemp!EPFNo txtetf.Text = recemp!ETFNo End IfEnd If End Sub

Private Sub Form_Load() 'opens the database and other required tables

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Payroll\Payroll.mdb"recemp.Open "EmployeeData", db, adOpenStatic, adLockOptimisticrecleave.Open "LeaveDetails", db, adOpenStatic, adLockOptimisticrecpay.Open "PayDetails", db, adOpenStatic, adLockOptimisticrecattendance.Open "AttendanceData", db, adOpenStatic, adLockOptimistic

End Sub

Private Sub txtempID_Change() 'performs length checks on the Employee ID

If Len(txtempID.Text) > 5 ThenMsgBox "You can only enter a maximum of 5 characters for this field", vbCritical, "Error"SendKeys "{Backspace}" 'deletes the incorrect entry

End If

End Sub

Private Sub txtempID_KeyPress(KeyAscii As Integer) 'performs type check for employee ID

If Len(txtempID.Text) < 2 Then Select Case KeyAscii Case 65 To 90 Case 97 To 122 Case 8 'allows backspace Case Else MsgBox "You can only enter alphabetical characters here", vbCritical, "Error"

Candidate Name: H. Chathuranga B. Sumanasekera - 144 -

Page 145: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

SendKeys "{Backspace}" End SelectElseIf 2 < Len(txtempID.Text) < 5 Then ElseIf IsNumeric(txtempID) = False Then MsgBox "You can only enter numerical characters in this field", vbCritical, "Error" SendKeys "{Backspace}"End If

End Sub

Private Sub txtepf_Change() 'performs validation checks on EPF no.If txtepf.Text = "" ThenElseIf IsNumeric(txtepf) = False Then

MsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"

End IfEnd Sub

Private Sub txtetf_Change() 'Performs validatin checks on ETF No.If txtetf.Text = "" ThenElseIf IsNumeric(txtetf) = False Then

MsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"

End IfEnd Sub

Private Sub txtname_Change() 'Peforms validation checks on NameIf txtname.Text = "" ThenElseIf IsNumeric(txtname) = True Then

MsgBox "You can only enter alphabetical characters in this field", vbCritical, "Error"SendKeys "{Backspace}"

End IfEnd Sub

Private Sub txttelno_Change() 'Performs validation checks on Tel. No.If txttelno.Text = "" ThenElseIf IsNumeric(txttelno) = False Then

MsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"

End IfEnd SubPrivate Sub cmdhidexit_Click() 'closes the form. Used in other forms (see Attendance Data) to close this form if they access it to check the password,etc. db.Close Unload MeEnd Sube) Department Data (frmdepartment)

Candidate Name: H. Chathuranga B. Sumanasekera - 145 -

Page 146: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Option ExplicitDim db As New ADODB.Connection 'defines 'db' as the databaseDim recdept As New ADODB.Recordset 'defines 'recdept' as the name for Department data table

Private Sub cmdclear_Click() 'clears all entries combodep.Text = "Sales" txthr.Text = "" txtsh.Text = "" txtovertime.Text = "" comboedit.Text = "Sales"End Sub

Private Sub cmdedit_Click() 'saves changes of a department's details

recdept!Department = combodep.Text recdept!HourlyRate = txthr.Text recdept!StandardHours = txtsh.Text recdept!overtimerate = txtovertime.Text recdept.Update MsgBox "The changes have been successfully saved." End Sub

Private Sub cmdretrieve_Click() 'retrieves a department's data Dim setvalue As String recdept.MoveFirst setvalue = comboedit.Text recdept.Find "Department='" & (setvalue) & "'" If recdept.EOF = True Then MsgBox "Department not found. Please check your spelling and try again." Else combodep.Text = recdept!Department

Candidate Name: H. Chathuranga B. Sumanasekera - 146 -

Page 147: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

txthr.Text = recdept!HourlyRate txtsh.Text = recdept!StandardHours txtovertime.Text = recdept!overtimerate End If cmdedit.Enabled = True cmdsave.Enabled = False End Sub

Private Sub cmdsave_Click() 'adds the details of a new department to the databaseIf txthr.Text = "" Or txtsh.Text = "" Or txtovertime.Text = "" Then MsgBox "Please enter all required data before saving the details", vbCritical, "Missing Data"Else comboedit.Text = combodep.Text cmdretrieve = True If recdept.EOF = False Then MsgBox "Details for this department has already been entered. Please use the 'Edit' button to save any changes to the Department", vbCritical, "Department already exsist" ElseIf recdept.EOF = True Then recdept.AddNew recdept!Department = combodep.Text recdept!HourlyRate = txthr.Text recdept!StandardHours = txtsh.Text recdept!overtimerate = txtovertime.Text recdept.Update MsgBox "Data has been succesfully saved.", vbInformation, "Done" End IfEnd If End Sub

Private Sub emdexit_Click() 'closes the form Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me db.Close End IfEnd Sub

Private Sub Form_Load() 'loads the database and required table

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Payroll\Payroll.mdb"recdept.Open "Department", db, adOpenStatic, adLockOptimistic

End Sub

Private Sub txthr_Change() 'performs validation checks on Hourly Rate

Candidate Name: H. Chathuranga B. Sumanasekera - 147 -

Page 148: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If txthr.Text = "" ThenElseIf IsNumeric(txthr) = False ThenMsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"End If

End Sub

Private Sub txtovertime_Change() 'performs validation checks on Overtime Rate

If txtovertime.Text = "" ThenElseIf IsNumeric(txtovertime) = False ThenMsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"End IfEnd Sub

Private Sub txtsh_Change() 'performs validation checks on Standard Hours

If txtsh.Text = "" ThenElseIf IsNumeric(txtsh) = False ThenMsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"End IfEnd Sub

f) Attendance Form (frmattendance)

Candidate Name: H. Chathuranga B. Sumanasekera - 148 -

Page 149: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Option ExplicitDim db As New ADODB.Connection 'defines the database name as 'db'Dim recatd As New ADODB.Recordset 'defines name for Attendance data table as 'recatd'Dim recsearch As New ADODB.Recordset 'defines search queryDim recpay As New ADODB.Recordset 'defines name for Pay Details table as 'recpay'Dim recpaysearch As New ADODB.Recordset 'defines name for pay search query

Private Sub cmdclear_Click() 'clears all entries txtempID.Text = "" txtpass.Text = ""End Sub

Private Sub cmdexit_Click() 'close the form Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me frmemployee.cmdhidexit = True db.Close End IfEnd Sub

Private Sub cmdfind_Click() 'retrieves record of earlier clock in from database

If txtempID.Text = "" Or txtpass.Text = "" Then MsgBox "Please enter all required data before retrieving the information.", vbInformation, "Complete Form"Else Dim name As String Dim pass As String name = txtempID.Text pass = txtpass.Text frmemployee.txtempID.Text = name

Candidate Name: H. Chathuranga B. Sumanasekera - 149 -

Page 150: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

frmemployee.cmdfind = TrueIf pass = frmemployee.txthidden.Text Then recsearch.Open "SELECT EmployeeID, Date, TimeIn, TimeOut From AttendanceData WHERE EmployeeID='" & (txtempID.Text) & "' AND Date=#" & DTPicker.Value & "#", db, adOpenKeyset, adLockOptimistic ‘launches query to select the clock-in record If recsearch.EOF = True Then MsgBox "The employee ID you entered does not exist. Please check your ID properly and try again.", vbCritical, "Employee not found" recsearch.Close Else txtempID.Text = recsearch!EmployeeID lblin.Caption = recsearch!TimeIn lblout.Enabled = True lblout.Caption = Format(Time) cmdsaveout.Enabled = True cmdsave.Enabled = False End IfElse MsgBox "Incorrect password. Please check your password and try again", vbCritical, "Incorrect Password"End IfEnd If End Sub

Private Sub cmdsave_Click() 'saves clock in information

If txtempID.Text = "" Or txtpass.Text = "" ThenMsgBox "Please enter all required data before clocking-in.", vbInformation, "Complete Form"ElseDim name As StringDim pass As Stringname = txtempID.Textpass = txtpass.Textfrmemployee.txtempID.Text = namefrmemployee.cmdfind = TrueIf pass = frmemployee.txthidden.Text Then recatd.AddNew recatd!EmployeeID = txtempID.Text recatd!Date = DTPicker.Value recatd!TimeIn = lblin.Caption recatd!TimeOut = lblout.Caption recatd.Update MsgBox "The information has been successfully stored", vbInformation, "Done"Else MsgBox "Incorrect password. Please check your password and try again", vbCritical, "Incorrect Password"End If

Candidate Name: H. Chathuranga B. Sumanasekera - 150 -

Page 151: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

End If

End Sub

Private Sub cmdsaveout_Click() 'saves 'clock out' time to database

db.Execute "Update AttendanceData set TimeOut = #" & (lblout.Caption) & "# WHERE EmployeeID='" & (txtempID.Text) & "' AND Date=#" & DTPicker.Value & "#"MsgBox "The information has been successfully stored", vbInformation, "Done"cmdsaveout.Enabled = Falsecmdsave.Enabled = True

If lblout.Caption <> "" Then 'calculates the hours worked for that day and saves to the employee's record in the Pay details table Dim amthours As Integer Dim amtminutes As Integer Dim calmin As Double Dim hourswork As Double Dim mont As String Dim vbmont As String Dim hw As Double Dim tothw As Double amthours = Hour(lblout.Caption) - Hour(lblin.Caption) amtminutes = Minute(lblout.Caption) - Minute(lblin.Caption) calmin = amtminutes / 60 hourswork = val(amthours) + val(calmin) mont = Month(DTPicker.Value) Select Case mont Case 1 vbmont = "January" Case 2 vbmont = "February" Case 3 vbmont = "March" Case 4 vbmont = "April" Case 5 vbmont = "May" Case 6 vbmont = "June" Case 7 vbmont = "July" Case 8 vbmont = "August" Case 9 vbmont = "September" Case 10 vbmont = "October"

Candidate Name: H. Chathuranga B. Sumanasekera - 151 -

Page 152: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Case 11 vbmont = "November" Case Else vbmont = "December" End Select recpaysearch.Open "SELECT EmployeeID, Month, HoursWorked, Overtime, TotalPay From PayDetails WHERE EmployeeID='" & (txtempID.Text) & "' AND Month='" & Trim(vbmont) & "'", db, adOpenKeyset, adLockOptimistic If recpaysearch.EOF Then recpay.AddNew recpay!EmployeeID = txtempID.Text recpay!Month = vbmont recpay!HoursWorked = hourswork recpay.Update Else hw = recpaysearch!HoursWorked tothw = hw + hourswork db.Execute "Update PayDetails set HoursWorked = '" & (tothw) & "' WHERE EmployeeID='" & (txtempID.Text) & "' AND Month='" & (vbmont) & "'" End IfElseEnd If End Sub

Private Sub Form_Load() 'loads the database and required tables. Also inserts the current time to required labels.

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Payroll\Payroll.mdb"recatd.Open "AttendanceData", db, adOpenStatic, adLockOptimisticrecpay.Open "PayDetails", db, adOpenStatic, adLockOptimisticlblin.Caption = Format(Time)lblout.Caption = Format(Time)lbltime.Caption = Time

End Sub

Private Sub Timer_Timer() 'used to show an interactive time (where the seconds are count foward in real-time) for the required labels

lblout.Caption = Timelblin.Caption = Timelbltime.Caption = Time

End Sub

Candidate Name: H. Chathuranga B. Sumanasekera - 152 -

Page 153: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Private Sub txtempID_Change() 'peforms length check on employee ID

If Len(txtempID.Text) > 5 ThenMsgBox "You can only enter a maximum of 5 characters for this field", vbCritical, "Error"SendKeys "{Backspace}"End IfEnd Sub

Private Sub txtempID_KeyPress(KeyAscii As Integer) 'performs a type check on the employee ID

If Len(txtempID.Text) < 2 Then Select Case KeyAscii Case 65 To 90 Case 97 To 122 Case 8 'allows backspace Case Else MsgBox "You can only enter alphabetical characters here", vbCritical, "Error" SendKeys "{Backspace}" 'deletes the incorrect entry End SelectElseIf 2 < Len(txtempID.Text) < 5 Then ElseIf IsNumeric(txtempID) = False Then MsgBox "You can only enter numerical characters in this field", vbCritical, "Error" SendKeys "{Backspace}"End If

End Sub

g) Leave Details (frmleave)

Candidate Name: H. Chathuranga B. Sumanasekera - 153 -

Page 154: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Option ExplicitDim db As New ADODB.Connection 'define 'db' as name for databaseDim recleave As New ADODB.Recordset 'define 'recleave' as name for Leave Details table

Private Sub cmdcheck_Click() 'retrives employee's record from database

Dim val As String val = txtempID.Text recleave.MoveFirst recleave.Find "EmployeeID='" & (val) & "'" 'used to check if employee ID entered is valid If recleave.EOF = True Then MsgBox "The employee ID you entered does not exist. Please check your ID properly and try again.", vbCritical, "Employee not found" Else txtempID.Text = recleave!EmployeeID lblused.Caption = recleave!Totaldays lblavailable.Caption = recleave!StandardDays - lblused.Caption cmdsave.Enabled = True End If End Sub

Private Sub cmdclear_Click() 'clears all entries txtempID.Text = "" txtdays.Text = "" lblavailable.Caption = "" lblused.Caption = "" Combotype.Text = "Causal Leave" End Sub

Private Sub cmdexit_Click() 'closes the form

Candidate Name: H. Chathuranga B. Sumanasekera - 154 -

Page 155: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me db.Close End IfEnd Sub

Private Sub cmdsave_Click() 'saves the leave details to the database

If txtempID.Text = "" Then MsgBox "Please enter an employee ID.", vbInformation, "No employee entered"ElseIf txtdays.Text = "" Then MsgBox "Please enter the amount of days you wish to take leave.", vbInformation, "No. of days not specified"Else recleave!Totaldays = val(lblused.Caption) + val(txtdays.Text) 'adds the amount of days of leave taken now to the total leave taken If Combotype.Text = "Casual Leave" Then 'defines the type of leave recleave!Casualleave = recleave!Casualleave + val(txtdays.Text) ElseIf Combotype.Text = "Sick Leave" Then recleave!Sickleave = recleave!Sickleave + val(txtdays.Text) ElseIf Combotype.Text = "Emergency Leave" Then recleave!Emergencyleave = recleave!Emergencyleave + val(txtdays.Text) End If recleave.Update MsgBox "Information has been successfully saved", vbInformation, "Information Saved" txtempID.Text = "" txtdays.Text = "" lblavailable.Caption = "" lblused.Caption = "" Combotype.Text = "Causal Leave" cmdsave.Enabled = FalseEnd If

End Sub

Private Sub Form_Load() 'opens the database and required table

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Payroll\Payroll.mdb"recleave.Open "LeaveDetails", db, adOpenStatic, adLockOptimistic

End Sub

Private Sub txtdays_Change() 'performs validation checks on 'No. of days'

Candidate Name: H. Chathuranga B. Sumanasekera - 155 -

Page 156: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If txtdays.Text = "" ThenElseIf IsNumeric(txtdays) = False ThenMsgBox "You can only enter numbers for this field", vbCritical, "Error"SendKeys "{Backspace}"End If

End Sub

Private Sub txtempID_Change() 'performs length check on employee ID

If Len(txtempID.Text) > 5 ThenMsgBox "You can only enter a maximum of 5 characters for this field", vbCritical, "Error"SendKeys "{Backspace}"End If

End Sub

Private Sub txtempID_KeyPress(KeyAscii As Integer) 'performs type check on employee ID

If Len(txtempID.Text) < 2 Then Select Case KeyAscii Case 65 To 90 Case 97 To 122 Case 8 'allows backspace Case Else MsgBox "You can only enter alphabetical characters here", vbCritical, "Error" SendKeys "{Backspace}" End SelectElseIf 2 < Len(txtempID.Text) < 5 Then ElseIf IsNumeric(txtempID) = False Then MsgBox "You can only enter numerical characters in this field", vbCritical, "Error" SendKeys "{Backspace}"End If

End Sub

h) Pay Details (frmpay)

Candidate Name: H. Chathuranga B. Sumanasekera - 156 -

Page 157: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Option ExplicitDim db As New ADODB.Connection 'defines 'db' as the name for the databaseDim recpay As New ADODB.Recordset 'defines 'recpay' as the name for the Pay Details tableDim recdept As New ADODB.Recordset 'defines 'recdept' as the name for the Department Data tableDim recpaysearch As New ADODB.Recordset 'defines 'recpaysearch' as the name for the Pay search queryDim deptname As StringDim hourrate As IntegerDim overrate As IntegerDim standard As Integer

Private Sub cmdclear_Click() 'clears all entries

txtempID.Text = "" cmbmonth.Text = "January" lblhours.Caption = "" lblover.Caption = "" lblpay.Caption = "" End Sub

Private Sub cmdcal_Click() 'calculates pay of the employee

Dim overtime As Integer Dim pay As Double recpaysearch.Open "SELECT EmployeeID, Month, HoursWorked, Overtime, TotalPay From PayDetails WHERE EmployeeID='" & (txtempID.Text) & "' AND Month='" & (cmbmonth.Text) & "'", db, adOpenKeyset, adLockOptimistic 'searches for the employee in the Pay Details table

Candidate Name: H. Chathuranga B. Sumanasekera - 157 -

Page 158: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

If recpaysearch.EOF Then MsgBox "The employee ID you entered does not exist. Please check your ID properly and try again.", vbCritical, "Employee not found" recpaysearch.Close Else frmemployee.txtempID.Text = txtempID.Text frmemployee.cmdfind = True deptname = frmemployee.cmbdept.Text recdept.MoveFirst recdept.Find "Department='" & (deptname) & "'" 'used to retrieve departmental salary rates hourrate = recdept!HourlyRate overrate = recdept!overtimerate standard = recdept!StandardHours txtempID.Text = recpaysearch!EmployeeID lblhours.Caption = recpaysearch!HoursWorked If lblhours.Caption > val(standard) Then 'calculates overtime overtime = lblhours.Caption - val(standard) Else overtime = 0 End If If overtime = 0 Then 'calculates pay dependent on the overtime calculated pay = val(lblhours.Caption) * val(hourrate) Else pay = val(val(standard) * val(hourrate)) + val(val(overtime) * val(overrate)) End If lblover.Caption = overtime lblpay.Caption = pay End If cmdprint.Enabled = True End Sub

Private Sub cmdexit_Click() 'closes the form Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me db.Close frmemployee.cmdclear = True End IfEnd Sub

Private Sub cmdprint_Click() 'opens separate form where the user can print the pay slip frmprint.ShowEnd SubPrivate Sub cmdsave_Click() 'saves the data to the database

Candidate Name: H. Chathuranga B. Sumanasekera - 158 -

Page 159: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

db.Execute "Update PayDetails set Overtime= '" & (lblover.Caption) & "' WHERE EmployeeID='" & (txtempID.Text) & "' AND Month='" & (cmbmonth.Text) & "'"MsgBox "The information has been successfully stored", vbInformation, "Done"

End Sub

Private Sub Form_Load() 'loads the database and required tables

db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Payroll\Payroll.mdb"recpay.Open "PayDetails", db, adOpenStatic, adLockOptimisticrecdept.Open "Department", db, adOpenStatic, adLockOptimistic

End Sub

Private Sub txtempID_Change() 'performs length check on the employee ID

If Len(txtempID.Text) > 5 ThenMsgBox "You can only enter a maximum of 5 characters for this field", vbCritical, "Error"SendKeys "{Backspace}"End If

End Sub

Private Sub txtempID_KeyPress(KeyAscii As Integer) 'performs type check on employee ID

If Len(txtempID.Text) < 2 Then Select Case KeyAscii Case 65 To 90 Case 97 To 122 Case 8 'allows backspace Case Else MsgBox "You can only enter alphabetical characters here", vbCritical, "Error" SendKeys "{Backspace}" End SelectElseIf 2 < Len(txtempID.Text) < 5 Then ElseIf IsNumeric(txtempID) = False Then MsgBox "You can only enter numerical characters in this field", vbCritical, "Error" SendKeys "{Backspace}"End If

End Sub

i) Print Form (frmprint)

Candidate Name: H. Chathuranga B. Sumanasekera - 159 -

Page 160: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Private Sub cmdprint_Click() 'opens the printer dialog window so that user can change print settings

cmdprint.Visible = False CommonDialog.ShowPrinter frmemployee.cmdclear = True frmleave.cmdclear = True

End Sub

Private Sub Form_Load() 'loads the data in the Pay details (frmpay) form the this form

lblempID.Caption = frmpay.txtempID.Text lblmonth.Caption = frmpay.cmbmonth.Text lblhours.Caption = frmpay.lblhours.Caption lblamount.Caption = frmpay.lblpay.Caption lblover.Caption = frmpay.lblover.Caption Dim name As String name = lblempID.Caption frmemployee.txtempID.Text = name frmemployee.cmdfind = True lblepf.Caption = frmemployee.txtepf.Text lbletf.Caption = frmemployee.txtetf.Text frmleave.txtempID.Text = name frmleave.cmdcheck = True frmleave.lblused.Caption = lblleave.Caption

End Sub

j) About Form

Candidate Name: H. Chathuranga B. Sumanasekera - 160 -

Page 161: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Option Explicit

' Reg Key Security Options...Const READ_CONTROL = &H20000Const KEY_QUERY_VALUE = &H1Const KEY_SET_VALUE = &H2Const KEY_CREATE_SUB_KEY = &H4Const KEY_ENUMERATE_SUB_KEYS = &H8Const KEY_NOTIFY = &H10Const KEY_CREATE_LINK = &H20Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL ' Reg Key ROOT Types...Const HKEY_LOCAL_MACHINE = &H80000002Const ERROR_SUCCESS = 0Const REG_SZ = 1 ' Unicode nul terminated stringConst REG_DWORD = 4 ' 32-bit number

Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location"Const gREGVALSYSINFOLOC = "MSINFO"Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO"Const gREGVALSYSINFO = "PATH"

Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long

Candidate Name: H. Chathuranga B. Sumanasekera - 161 -

Page 162: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As LongPrivate Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As LongDim val As Integer

Private Sub cmdexit_Click() 'closes the form Dim Res As Integer Res = MsgBox("Are you sure you want to Exit?", vbQuestion + vbYesNo, "Exit") If Res = vbYes Then Unload Me End IfEnd Sub

Private Sub cmdsys_Click() 'displays system information Call StartSysInfoEnd Sub

Public Sub StartSysInfo() On Error GoTo SysInfoErr Dim rc As Long Dim SysInfoPath As String ' Try To Get System Info Program Path\Name From Registry... If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then ' Try To Get System Info Program Path Only From Registry... ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then ' Validate Existance Of Known 32 Bit File Version If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then SysInfoPath = SysInfoPath & "\MSINFO32.EXE" ' Error - File Can Not Be Found... Else GoTo SysInfoErr End If ' Error - Registry Entry Can Not Be Found... Else GoTo SysInfoErr End If Call Shell(SysInfoPath, vbNormalFocus) Exit SubSysInfoErr:

Candidate Name: H. Chathuranga B. Sumanasekera - 162 -

Page 163: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

MsgBox "System Information Is Unavailable At This Time", vbOKOnlyEnd Sub

Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef KeyVal As String) As Boolean Dim i As Long ' Loop Counter Dim rc As Long ' Return Code Dim hKey As Long ' Handle To An Open Registry Key Dim hDepth As Long Dim KeyValType As Long ' Data Type Of A Registry Key Dim tmpVal As String ' Tempory Storage For A Registry Key Value Dim KeyValSize As Long ' Size Of Registry Key Variable '------------------------------------------------------------ ' Open RegKey Under KeyRoot {HKEY_LOCAL_MACHINE...} '------------------------------------------------------------ rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Open Registry Key If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Error... tmpVal = String$(1024, 0) ' Allocate Variable Space KeyValSize = 1024 ' Mark Variable Size '------------------------------------------------------------ ' Retrieve Registry Key Value... '------------------------------------------------------------ rc = RegQueryValueEx(hKey, SubKeyRef, 0, _ KeyValType, tmpVal, KeyValSize) ' Get/Create Key Value If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Errors If (Asc(Mid(tmpVal, KeyValSize, 1)) = 0) Then ' Win95 Adds Null Terminated String... tmpVal = Left(tmpVal, KeyValSize - 1) ' Null Found, Extract From String Else ' WinNT Does NOT Null Terminate String... tmpVal = Left(tmpVal, KeyValSize) ' Null Not Found, Extract String Only End If '------------------------------------------------------------ ' Determine Key Value Type For Conversion... '------------------------------------------------------------ Select Case KeyValType ' Search Data Types... Case REG_SZ ' String Registry Key Data Type KeyVal = tmpVal ' Copy String Value Case REG_DWORD ' Double Word Registry Key Data Type For i = Len(tmpVal) To 1 Step -1 ' Convert Each Bit KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))) ' Build Value Char. By Char. Next KeyVal = Format$("&h" + KeyVal) ' Convert Double Word To String End Select

Candidate Name: H. Chathuranga B. Sumanasekera - 163 -

Page 164: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

GetKeyValue = True ' Return Success rc = RegCloseKey(hKey) ' Close Registry Key Exit Function ' Exit GetKeyError: ' Cleanup After An Error Has Occured... KeyVal = "" ' Set Return Val To Empty String GetKeyValue = False ' Return Failure rc = RegCloseKey(hKey) ' Close Registry KeyEnd Function

Private Sub Image1_Click() 'changes the main imageImage2.Visible = TrueImage1.Visible = FalseEnd Sub

Private Sub Image2_Click() 'changes the main imageImage1.Visible = TrueImage2.Visible = FalseEnd Sub

Private Sub lblaudio_Click() 'plays audio files from a given location

val = val + 1If val = 1 Then WMP.URL = "C:\Program Files\Payroll\Music\Coolio - Gangsta's Paradise.mp3"ElseIf val = 2 Then WMP.URL = “C:\Program Files\Payroll\Music\Brand New Car.mp3"ElseIf val = 3 Then WMP.URL = “C:\Program Files\Payroll\Music\You're beautiful.mp3"ElseIf val = 4 Then WMP.URL = “C:\Program Files\Payroll\Music\Nickelback - Hero.mp3"ElseIf val = 5 Then WMP.URL = "C:\Program Files\Payroll\Music\Creed - Higher.mp3"Else val = 0End If

End Sub

k) Payroll Expenditure Report (rptpayroll)

Candidate Name: H. Chathuranga B. Sumanasekera - 164 -

Page 165: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Data Environment used for the report:

Candidate Name: H. Chathuranga B. Sumanasekera - 165 -

Page 166: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Appendix 2

Evaluation questionnaire:

Candidate Name: H. Chathuranga B. Sumanasekera - 166 -

141, Galle Road, Bambalapitiya, Sri Lanka.

END USER EVALUATION OF THE GAMMA ENTERTAINMENT PAYROLL SYSTEM

NAME: ……………………………………………….

POSITION: ……………………………………….......

1) A primary problem identified in the previous system was the inaccuracy of the times employees enter

Page 167: AL Computer Project - Gamma Entertainment Payroll System

GAMMA Entertainment Payroll System

Candidate Name: H. Chathuranga B. Sumanasekera - 167 -

141, Galle Road, Bambalapitiya, Sri Lanka.

END USER EVALUATION OF THE GAMMA ENTERTAINMENT PAYROLL SYSTEM

NAME: ……………………………………………….

POSITION: ……………………………………….......

1) A primary problem identified in the previous system was the inaccuracy of the times employees enter