Development Of A Web Based Payroll System Computer Science Essay
Saving time considered to be a leading topic in this modern world where people try to get their work done in a least amount of time. Therefore time spent on simple things in day to day life made easier as web-online has conquered that place. With that intension this payroll system has been developed to organizations where small branches involved. Developing such web based payroll system may facilitate the process of attendance to paying wages for employees. Not only those employees will be able to print their payslips online with no hassle but also they will be able to view their attendance details in their payslip which would be an added feature compared to other systems.
To develop the above said web application a research took place in finding which tools has to be used, how the system work, how many users should be involved, how it benefits the company and employees and how the taxations work. Therefore for the payroll web application php, mysql and apache has been used correspondingly in programming, database and web server which comes in a package as wamp for windows. In supporting the above chosen wamp server umlet, dreamweaver, css styles, java script used correspond to drawing uml diagrams, php codings, interface designs and codings. Further in calculating taxes, current tax code and percentages of taxes been used according to current rate of HMRC revenue. Hence, the current system of payroll in organizations has also been observed in concluding the whole process of payroll with the taxations.
Payroll system is generally available and could be accessed multiply. An iterative and incremental approach applied throughout developing the payroll system where a piece of coding is tested as it went along with the development. This was useful in finding particular errors affected towards the system and not only that it helped to correct them but also it helped to step forward and trying new functions towards the goal. As php codes takes a major role in this payroll system, validations of functionalities based on it has been quite tricky and useful towards improving knowledge of php and the system.
Table of Contents
Chapter 1. Introduction 4
Chapter 2. Aims & Objectives 4
Chapter 3. Prior research 5
Chapter 4. Literature Review 8
Chapter 5. Software Requirements 10
Chapter 6. WAMP server 11
Chapter 7. Design of the payroll system 13
16
Chapter 8. System architecture 17
Chapter 9. Development of Payroll System 19
23
Problem Log 26
List of figures 27
References 28
Appendices 30
Introduction
Payroll system is a web application based on client server and electronic payment technology, which is aimed at developing a system that manages the payment of monthly wages of employees in an organization. It is supported by a database consisting of its employee’s details and their attendance details. According to that end of each month the salary is paid to the corresponding bank account of the employee.
It also considers employee’s income tax regulations and NI contributions. Hence it shall deduct the appropriate amount of deductions at their salary if they earn more than £647 per month. Further a payslip could be generated taking the above in to account.
The following technologies have been used in developing the above said application.
WAMP server
CSS
Macromedia Dreamweaver
Umlet
Aims & Objectives
The proposed system would allow the user to do their work in prototype. Hence, it has many gains compared to a manual system. In manual systems a main problem seems to be is maintaining the number of records and finding a particular record. Further calculating the final pay after income tax and other deductions would consume a lot of time. But the proposed system is capable of calculating the deductions automatically.
Some of the features of the proposed system are given below:
Maintaining the Database for Admin, Employee, attendance etc..
Attendance report.
Generate payslips.
Prior research
Fact gathering techniques were used for the following reasons,
To identify the problem in a payroll system.
To avoid repetition.
To complete these tasks following techniques has been used,
1. Interviews – a basic source of quality information. Allows gathering information from an existing system where an administrator or manager could be the user. It facilitates to discover areas of misunderstandings, indication of resistance to the proposed system. An interview could be a structured or an unstructured in this state. In a structured interview questions are standardized and in an unstructured interview questions are worded to suit the respondent that provide the information about the areas overlooked or not thought to be important. Comparison of the structured and unstructured interviewing are detailed as below.
Advantages:
Structured:
Ensures uniform wording of questions to all respondents.
Easy to administer and evaluate.
Less interview training required.
Result in shorter time.
Unstructured:
Questions can be worded to suit the respondent.
May produce the information about the areas overlooked or not thought to be important.
Disadvantages:
Structured:
Cost of preparation is high.
Such high level of structure may not always be suitable.
Some respondent may resist to such structure.
Unstructured:
Inefficient use of interviewer and respondent time.
Results take a longer time.
Extra time required for the collection of essential facts.
The success of the interview depends on the skill of the interviewer and his/her preparation for the interview.
Analysts must also be aware of the kinds of difficulties at some interview, and must know how to deal with the potential problems.
Conducting interviews determines qualitative information such as,
Activities involved in process of taking the attendance.
Activities involved in the process of Payslip generation.
Limitation of existing system.
Problems faced by the user in the existing system.
2. Record Inspection – Analysing facts from documents, examining information which has recorded about the system and users. Examining forms, files about an existing system. Such records may include,
Written policy manuals.
Rules and regulations.
Standard operating procedures used in the Payroll and Attendance System
Forms and documents.
A good documentation system provides relationships and interaction between them. Further would give an idea of the structure activities, procedures and flow of data. But it would not show how each task performed or where the decision making power lies. To gather details about the payroll system several kinds of records and reports has been reviewed such as,
Standard operating procedure
Reports generated by an existing system.
Document flow (input/output) of the Payroll and Attendance System.
Process of Preparing the Payslip.
Process of deducting the salary for tax and NI contributions.
Types and format of database registers.
3. Observation – could bring missed facts, duplicate work done unintentionally. Its not the quantity of time observed is important but the unusual angles of observation of the work content and methods would be more useful.
Observation may focus on,
Operational inefficiencies.
Alternate routes and procedures.
Interruptions in the normal flow of work.
The usage of files and documents.
Informal communication channels, etc.
On site observation provides a close view of the working real system, objects, documents and occurrences of events.
Literature Review
Considering the research took place towards developing a new payroll system the limits of the current system seems to be affecting in many ways not only the admin staff, manager or company but also to the employees concerning their wages and payslips. Check-in attendance to paying wages the whole process seems to be dragging and time consuming of admin, manager and employees. The attendance check-in system which is currently in operation has to be a double work where firstly the attendance is checked by paper in a prepared sheet for it and then will be entered to the system later with times when the employees started work and ended work. Therefore the each of employee has to look for his/her name in the registry which is in a paper and sign in/out with time ahead his/her name on it and then the admin staff who enters them in the system has also got to find the names on page in the system to clock him/her in/out. This system seems to be a hassle for the admin where it could be done in one go. So the new system would take away that headache from admin where he/she could do it one click per staff. When an employee logs in just a click in front of his name would clock him in and the time of work started will be recorded automatically. Like wise the when the employee finishes work clocked out time will be recorded and the attendance counts towards his pay.
In the above case another popular scenario could be when an employee begins work at a late time, admin has to deduct the pay hours or pay corresponding to that. But because the times of clock-in will be entered to the system automatically there won’t be any need of altering the timings of employees. Therefore again it facilitates the work of admin staff. Moving on with the attendance to the wages of employees, some of the companies account departments are outsourced simultaneously some others got their own accountants. So in transferring wages to employee bank accounts and for tax deductions account departments are involved and the attendance checked by admin staff will be forwarded to the appropriate account department. Account department uses the national rate of taxes for employee earnings according to HM Revenue & Customs and the relevant amount of taxes will be deducted depending on employee’s earning. Even in this scenario it is another point where human resources could be saved as software applications could be used which would process the attendance to final pay after calculating taxes. Therefore it is another advantage to be seen in the new payroll system.
Not only that, chances of making mistakes in entering the attendances or pay to the system could be avoided in the new payroll system. Hence, the new payroll system shall lead towards paying wages to the employees. After making payments to employees keeping records of paid amounts and record of due amounts also seem to be an additional point when comparing against the previous systems where paid records kept at account departments. Therefore possibilities of misconception have been avoided between employees and management by having these records as proof.
Looking at the employee payslips in the previous system it had to be sent by a separate department to the employees by post. But in the new payroll system, payslips made available online to employees where there won’t be any need to wait for payslips to arrive. Retail giant Tesco reveals in The one (june) as below,
“Driven by security and environmental issues, the move to online notification of pay is set to take place this summer, saving postage and paper on up to 4.7million payslips a year.”
Further rather than just being a payslip provided in the new payroll system it also has the feature of displaying the attendance according to which the salary is paid. And also it is available to print in addition to viewing. Plus an employee will be able to view and print the salary sheets of the previous months too which has been another outstanding step in the new system. Even though it could be a large page of salary sheet due to displaying all the attendances, it is concerned as fact of giving the accurate information stored to the employees and this would build up confidence and trust towards the company.
Software Requirements
Functional Requirements
Admin: In this module admin is provided with many services such as Add new employee, Update employee details, Mark in/out attendance, Update salary Details, view/print salary slips, payment to employees.
Employee: In this module employee is provided with the services such as View earnings, View deductions, View and print salary slip.
Non-Functional Requirements
System can endure even though many number of users requested the desired service.
By incorporating a robust and proven database, reliable performance and integrity of data is ensured. There must be a power backup for server system.
Ensure sensitive data is protected from unwanted access by users and implementing appropriate technology to strict user- access criteria.
WAMP server
WAMP is an open source collaborated web development kit which contains all the ingredients such as Apache, PHP and the MySQL database you need to develop and create web applications It also comes with an inbuilt phpMyAdmin page which allows you to easily manage your databases.
Further it is a solution kit that will allow you to reproduce your production server. One important aspect of the WAMP server is that once it is installed and is in play, the manager has the freedom to install as many latest releases of Apache, MySql or PHP.
Functionalities of the WAMP
Functions are very easy and less complicated; they are straightforward and can be viewed by just a click which will enable you to :
Manage Apache and MySQL services
Switch online/offline (give access to everyone or only localhost)
Install and switch Apache, MySQL and PHP releases
Manage server settings
Access logs
Access settings files
Create alias
Why an open source has been used
They are free – Totally free and available to the general public. Software developers and programmers can use them in improving their existing software or create new programs. Doesn’t require a license or sales fee.
They are cross-platform and “technology-neutral.” – Programs are usable virtually by everyone as ensured by the open source community. Open source programs are not dependant on any individual technology or style and they are technology-neutral. It shall meet the criteria as long as it runs on more than one operating system.
They must not restrict other software – gives software developers the maximum control and flexibility.
They embrace diversity – open source programs cannot discriminate against any person or group of persons.
Looking more into features of the above used,
Apache 2.2.6
As its main job it parses files requested by a browser and display results according to the code. It is powerful and could achieve any virtual task that required.
Authentication/authorization – make simpler certain authentication configurations.
Caching – considering production quality.
Configurations – made simpler and modularised.
Proxying – load balancing provided.
Large file support – support files larger than 2GB.
PHP 5.2.5
Stands for Hypertext Pre-processor and is a server-side scripting language which allows a website to be keep alive.
Controls memory consumption between requests.
Improved speed of arrays.
MySQL 5.0.45
MySQL is a structured query language server which has been designed to process complex queries and for heavy loads. It enables PHP and Apache to work together to access and display data in a browser. For maximum efficiency and speed it allows many tables to join together as a relational database.
Cursors – server-side cursors supported.
Triggers – triggers supported.
Views – updatable, named views supported.
Design of the payroll system
Payroll system is designed for a small organization/branch/department where there would be less employees compared to a large number of employees payroll system. Admin and employee are the two main users of the system. Considering the system as a whole, the following steps have been taken in process of functionality.
Add new employee – personal details of the new employee would be added with a pay rate per hour.
Edit employee details – capacity of updating employee details
Delete employee – delete an employee when an employee is no more with the organisation
Clock in/out – marking the attendance according to which an attendance report would be printed and be paid to the employee.
Attendance report – to view/print attendance report.
Salary sheet – 1st of every month employees will get paid according to the hours worked and the salary sheet would include worked hours, hourly pay, NI contributions, income tax and net salary. The salary sheet could be printed/viewed.
Payment – payment is made according to the net salary of the employee. A record would be kept on payment details date, time, employee id and amount.
Class diagram below shows the structure of the system with its classes, attributes and the relationships between the classes.
CLASS DIAGRAM
glass Relate to the design of the system as said above there are two users who get access to the payroll such as admin and employee. Use case diagram below presents a graphical overview of the functionalities of the payroll system in terms of actors, goals and their dependencies between use cases. It shall show what system functions are performed by admin and employee.
USE CASE DIAGRAM
System architecture
Payroll system is a web based application created using three tier architecture and an iterative, incremental approach to design used in the process of development.
Figure 1. three blocks which represents the client-server architecture
Client block – a client side application which runs on an operating system’s graphical user interface. Passes the challenges to the middleware block and it handles the non-local services. Client also runs a component of the distributed system management which could be a simple negotiator to an entire front end application on a managed station.
Server block – a server side application which runs on top of a shrink-wrapped server software package. Server side depends on the operating system to interface with the middleware block which brings the requests. Server also runs a distributed system management which could be a simple negotiator on a managed PC to an entire back end application.
Middleware block – runs both on the client and the server side of an application. Likewise the above middleware also has a distributed system management component.
As Orfali et al(1999)states in contrast to using other form of distributed software client server architecture inherits the following characteristics,
Service – client is a consumer of service and the server is a provider of service. Therefore, client-server provides a clean division of function based service.
Shared resources – server could provide service to many clients same time and regulate access to shared resources.
Asymmetrical protocols – clients always initiate with a request for service and servers wait for requests from clients.
Transparency of location
Mix and match – client/server is independent of hardware or operating system software platforms. Able to mix and match between platforms.
Message based exchanges – message is the delivery mechanism for service requests and replies. Clients and servers interact through message passing mechanism.
Encapsulation of services – without affecting the clients server can be upgraded as long as the published interface is not changed.
Scalability – client/server systems could be scaled horizontally or vertically. In horizontal scaling with a slight performance impact client workstations could be added or removed. In vertical scaling, across multiple servers processing loads are distributed or larger and faster machines are migrated.
Integrity – server code and server data are centrally managed which outcomes in cheaper maintenance and protecting data integrity. Same time clients stay independent and personal.
Development of Payroll System
As mentioned above admin and employee are the two users of the payroll system. Many users could be added in the database as admin users. Therefore added all admin users shall be privileged to perform admin tasks in fulfilling their needs. A login process for any user involves few components such as,
Form of submitting the login information
A validation to confirm the information has been submitted.
A database query which compares the submitted information against the stored information.
After successful login as an admin staff view of the homepage would look like below,
Admin homepage
Figure 2. home page of admin staff with quick access icon.
As shown above using icons of the homepage or using the tabs on top, corresponding page could be accessed. Further in addition to the tabs an admin could change his/her password using the icon on the homepage which would also update the database according to it. Doing so would give a conformation saying that the update has been successfully completed.
Employee page allows admin to add a new employee with employee personal details and also allows updating details of employee.
The details of employee would be saved in the database and further an employee attendance details, payments made, payment balance could be viewed. If an employee doesn’t exist anymore his/her details will be deleted and this will remove his/her details from the database too.
Figure 3. a page which opens to update details of an employee from employee page.
Update employee information
An employee who is entered to the system in the database will automatically be inserted in attendance check-in in the attendance page. Therefore when admin staff does the attendance check employee name will be selected from the arrow-down list and it will display below to view which employees has arrived to work. Simultaneously database will be updated in the check-out table with the check-in information of the employee who has been clocked-in. By the time when the corresponding employee finishes his/her work shift, admin would check-out from the drop-down list again. Doing so would remove the check-in information of the employee from the check-out table in database and the attendance information will be entered to the attendance report and the payslip adding to his/her worked hours towards the final pay.
Attendance
check-in/check-out
Figure 4. attendance check-in and out for employees by admin.
Therefore admin staffs are able to view an attendance report of an employee in the employee page where it is referred to an employee. Not only that, the details of attendance will also be displayed in the payslips where could printed from the salary sheet page. In the salary page an admin staff can select the employee name which ever she/he wants to print the payslip of. Further after selecting the employee’s name, again admin is capable of selecting which month’s payslip she/he wants to print. Doing so would open a page and enables to print it according to which was selected by admin.
Considering the deductions of taxes which are income tax and NI contributions, when the pay is calculated end of each month automatically the above taxes would be deducted in a rate 15% for income tax and 9% for NI contributions. Therefore the final net pay would be calculated automatically as the salary for each employee. An important factor here involved in deductions is, inclusion of a tax code to the pay. At a national rate of 647 which reveals that up to a pay of £647 per month the above said tax would not be deducted and who ever earns above the rate of £647 will have to pay the above mentioned taxes. Therefore the above said taxes will automatically be deducted when an employee earns above the tax code.
Regarding salary payments to the employees, net pay for each month will be paid end of that month to the employee. In the payments page this could be done and who ever needs to be paid can be selected from the drop down list. When a payment is made to an employee a record will be kept in the database in the payments and also the recent paid payments records will also be displayed below in the payments page. Further if there’s a balance due to pay it will record and could be viewed in the employee details. Therefore any remaining payments could be checked straight away and can get rid of under paying, shortages and keeping balance payments to employees. And also because the employee gets payments according to his worked hours there is no fraud involved or alterations cannot be made. In such way this payment could be considered as secure method of paying salaries.
Payslip of an employee
Figure 5. Payslip of an employee which records not only the NI contributions and income taxes but also the attendance of an employee.
Apart from functions of payment and attendance an admin also can change his/ her password from the homepage using change password icon for a given admin username.
Finally taking admin privileges as whole, admin takes the responsibility of adding new employee, updating employee details, deleting employee, the attendance system which is checkin-in and out of employees in order to record their attendance towards their wages and the payment system which includes paying wages and keeping records of them.
Payments page where salary paid
Figure 6. Paying wages for employees by an admin staff.
In the event of employee user functions each and every employee will have their own passwords assigned by the admin when each employee registers with the payroll system. Doing so will create separate users for employees to access their attendance report and in printing their payslips. Passwords for employee login could only be changed by an admin user in edit employee details. Matching login details with the payroll database would allow the user to access his/her profile which contents the attendance report and the salary sheet of employee.
Figure 7. Homepage of an employee user.
Not only the tabs displayed would allow accessing the corresponding page but also the shortcut icons in the homepage would allow doing so. In the attendance page an employee could view his/her attendance so far and will also be able to print it.
Likewise in the salary sheet page by selecting the necessary month of salary sheet allows to view and print the corresponding salary sheet.
Figure 8. months of the salary sheets given to choose from.
Figure 9. salary sheet for a chosen month of an employee.
Problem Log
Error
Date
Explanation
Solution
1.fatal error: function name must be a string
03-05-10
appropriate brackets not used
Change the brackets style
2.notice undefined index php
03-05-10
Post method not defined properly
$fname = $_POST[‘fname’];
3.parser error:
25-05-10
Retrieving method not defined properly per row
while($row = mysql_fetch_array( $result ))
4. Notice: Use of undefined constant ‘id’ – assumed ”id”
27-05-10
Undefined id with brackets
Define id with brackets
5. Parse error: syntax error, unexpected $end
01-07-10
No ending, missing brackets
Include appropriate brackets
6. logging out to a blank page
02-07-10
Should revert to log-in page
Include a header
7. Parse error: syntax error, unexpected T_constant_encapsed_string
02-07-10
Using invalid symbol
Use inverted comas appropriately
8. parser error
03-07-10
Unexpected ending
Php headers and appropriate brackets
List of figures
Figure 1. three blocks which represents the client-server architecture 17
Figure 2. home page of admin staff with quick access icon. 19
Figure 3. a page which opens to update details of an employee from employee page. 20
Figure 4. attendance check-in and out for employees by admin. 21
Figure 5. Payslip of an employee which records not only the NI contributions and income taxes but also the attendance of an employee. 22
Figure 6. Paying wages for employees by an admin staff. 23
Figure 7. Homepage of an employee user. 23
Figure 8. months of the salary sheets given to choose from. 24
Figure 9. salary sheet for a chosen month of an employee. 25
Figure 10. Employee table in the payroll database 29
Order Now