Leave Management System A project report submitted in partial fulfillment of the requirements for the award of the degree of BACHELOR OF TECHNOLOGY IN COMPUTER SCIENCE & ENGINEERING Presented by: P.Srilakshmi (08501A0588) M.Vamsi (08501A0567) P.Lahari (08501A0589) P.Yamini (08501A0586) T.Prasanna (08501A05B3) Under the esteemed guidance of Mr.B.Srinivasa Rao , M.Tech (Ph.D), Sr.Asst. Professor Department of CSE
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
Leave Management System
A project report submitted in partial fulfillment of the requirements
for the award of the degree of
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE & ENGINEERING
Presented by:
P.Srilakshmi (08501A0588)
M.Vamsi (08501A0567)
P.Lahari (08501A0589)
P.Yamini (08501A0586)
T.Prasanna (08501A05B3)
Under the esteemed guidance of
Mr.B.Srinivasa Rao , M.Tech (Ph.D), Sr.Asst. Professor
Department of CSE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
PRASAD V. POTLURI SIDDHARTHA INSTITUTE OF TECHNOLOGY
(Affiliated to JNTU:Kakinada, Approved by AICTE)
(An ISO certified and NBA accredited institution) Kanuru, Vijayawada – 520007.
PRASAD V. POTLURI
SIDDHARTHA INSTITUTE OF TECHNOLOGY
(Affiliated to JNTU:Kakinada, Approved by AICTE)
(An ISO certified and NBA accredited institution)
Kanuru, Vijayawada – 520007
CERTIFICATE
This is to certify that this project entitled “ Leave Management System” is a
bonafide work carried out by P.SRILAKSHMI(08501A0588) , M.VAMSI(08501A0567) ,
P.LAHARI(08501A0589) , P.YAMINI(08501A0586) , T.PRASANNA(08501A05B3) in the partial
fulfilment for the award of degree of Bachelor of Technology in Computer Science and
Engineering of JNTU, Kakinada during the year 2011-2012.
The satisfaction that accompanies the successful completion of any task would be
incomplete without a mention of the people, who made it possible and whose guidance and
encouragement crown all the efforts with success.
We wish to place on record our profound gratitude to Dr.P.Venkateswarlu, Principal,
PVP Siddhartha Institute of Technology, Kanuru, Vijayawada for having given us the
opportunity to complete this project successfully.
We reckon to a distant pleasure to endorse out indebtedness and deep sense of gratitude
to Dr. K. Nageswara Rao, Head, Department of Computer Science and Engineering, for his
encouragement in all endeavours.
We sincerely thank our guide Mr.B.Srinivasa Rao for the guidance and support. We
thank for timely suggestions and constant encouragement that boosted up our moral and to the
accomplishment of this project.
We are very much grateful to all the staff and faculty of Department of CSE for their
cooperation during the course of this project work. Finally we would like to express our sincere
thanks to each and every one of our college, who have contributed their help and guidance for
the successful completion of this project.
3
TABLE OF CONTENTS
1. ABSTRACT 7
2. INTRODUCTION 9
2.1 Project overview
3. SYSTEM STUDY 11
3.1 Problem Definition
3.2 Existing System
3.3 Proposed System
4. SYSTEM REQUIREMENT ANALYSIS 14
4.1 Hardware Requirements
4.2 Software Requirements
4.3 Feasibility Study
5. DESIGN 18
5.1 Use Case Diagrams
5.2 Class Diagram
5.3 Sequence Diagrams
6. DATABASE DESIGN 26
6.1 Data Dictionary
6.2 Tables
7. SYSTEM DESIGN 31
7.1 Software Design
7.2 Module Design
7.2.1 HOD Module
7.2.2 Employee Module
4
7.3 Input/output Design
7.3.1 Input design
7.3.2 Output design
8. IMPLEMENTATION 35
9. SOFTWARE TESTING 39
9.1 Testing Types
9.2 Test Cases
10. SCREEN SHOTS 44
11. CONCLUSION AND SCOPE FOR FUTURE ENHANCEMENT 56
12. TEXTBOOKS AND WEB REFERENCES 58
5
LIST OF FIGURES
S.NO FIGURE CONTENT PAGE NO
1 5.1 Use Case Diagram for Administrator 20
2 5.2 Class Diagram for Leave Management System 21
3 5.3.1 Sequence Diagram for Applying a leave 23
4 5.3.2 Sequence Diagram for Accepting a leave 24
5 5.3.3 Sequence Diagram for Rejecting a leave 25
LIST OF TABLES
S.NO TABLE CONTENT PAGE NO
1 6.2.1 Leaves 28
2 6.2.2 Approved Leaves 28
3 6.2.3 Employees 29
4 6.2.4 Employee Leave Balance 30
6
ABSTRACT
7
ABSTRACT
Leave Management System is intended to manage the details of faculty of a college. It
also serves the need of managing leaves of the faculty. This project is aimed at developing an
online leave management system that is of importance to either an organisation or a college. The
Leave Management System (LMS) is an Intranet based application that can be accessed
throughout the organisation or a specified group/Dept. This system can be used to automate the
workflow of leave applications and their approvals. The periodic crediting of leave is also
automated. There are features like email notifications, cancellation of leave, automatic approval
of leave, report generators etc in this system.There will be two types of users of this system:
HOD and staff. The administrator will be able to do the functions such as
creating/editing/deleting the employee details. The employee can edit his own details and apply
leaves which are to be approved by his supervisors. Once an employee applies for a leave, the
HOD of the respective department has to decide whether to approve the leave or not based on
priority. The user can use the module for applying leave or as approving authority or as Leave
Management System administrator for sanctioning the leave. Through Leave Management
System it will be also possible to cancel a leave already applied for or to extend the leaves of an
employee. All the application, approval, rejection of the leaves will be done by the email
reducing the paperwork.
8
INTRODUCTION
9
2. INTRODUCTION
2.1 Project overview
Leave Management System is intended to manage the details of employees of an
organization. It also serves the need of managing leaves of the employees. It is designed to
maintain the leave records of employee of and allows the user to apply different kind of leave
permissible. There will be two types of users of this system: an Administrator and employee. The
administrator will be able to do the functions such as creating/editing/deleting the employee
details. The employee can edit his own details and apply leaves which are to be approved by his
supervisors. Once an employee applies for a leave, system has to decide whether to approve the
leave or not based on priority.
This project is mainly divided into 2 modules for proper functioning. They are
1. HOD module
2. Employee module
10
SYSTEM STUDY
11
3. SYSTEM STUDY
3.1 Problem Definition
This project is developed for providing the services like online services to the employees and
recruiting paper work. Automating many of the tasks, thereby reducing tedious jobs like
managing the leaves.
3.2 Existing System
In the present system all work is done on paper. The whole leave management session leave is
stored in register and at the end of the session the leaves are approved.
Disadvantages
• Not User Friendly:- The existing system is not user friendly because the retrieval of data is
very slow and data is not maintained efficiently.
• Manual control:- As the leaves are approved manually, there is greater chance of errors.
• Lots of paperwork:- Existing system requires lot of paper work. Loss of even a single
register/record led to difficult situation because all the papers are needed.
• Time consuming:- Every work is done manually so we cannot generate report in the middle of
the session or as per the requirement because it is very time consuming.
3.3 Proposed System
In this proposed system, all the data is stored into the computer on applying leaves by the staff.
So leaves can be approved easily by the HOD of the respective department using the faculty
data. At the same time the employee can view the status of his request.
12
Advantages
• User Friendly: The proposed system is user friendly because the retrieval and storing of data is
fast and data is maintained efficiently. Moreover the graphical user interface is provided in the
proposed system, which provides user to deal with the system very easily.
• Very less paper work: The proposed system requires very less paper work. All the data is
feted into the computer immediately and leaves can be applied and approved through computers.
Moreover work becomes very easy because there is no need to keep data on papers.
• Computer operator control: Computer operator control will be there so no chance of errors.
Moreover storing and retrieving of information is easy. So work can be done speedily and in
time.
13
SYSTEM
REQUIREMENT
ANALYSIS
14
4. SYSTEM REQUIREMENT ANALYSIS
“Leave Resource Information System” service is a network based application.
When we talk about hardware and software, we have to mention requirements on both sides
client and server part.
4.1 Hardware Requirements
Processor : Pentium-III(or) Higher
Ram : 128MB (or) Higher
Cache : 512MB
Hard disk : 10GB
4.1.1 Hardware Requirements
4.2 Software Requirements
4.2.1 Software Requirements
4.3 Feasibility Study15
Web Server : Tomcat 5.0
Server-side Technologies : Java, PHP
Client-side Technologies : Hyper Text Markup Language, Cascading Style
Sheets, Java Script
Database Server : My SQL
Operating System : Windows (or) Linux (or) Mac any version
The next step in analysis is to verify the feasibility of the proposed system. “All
projects are feasible given unlimited resources and infinite time“. But in reality both resources
and time are scarce. Project should confirm to time bounce and should be optimal in their
consumption of resources. This places a constant approval of any project.
Feasibility has applied to “Leave Management System” pertains to the following areas:
Technical feasibility
Behavioural feasibility
Economical feasibility
Technical Feasibility
To determine whether the proposed system is technically feasible, we should take into
consideration the technical issues involved behind the system.
“Leave Management System” uses the web technologies, which is rampantly employed these
days worldwide. The world without the web is incomprehensible today.
The technical requirement for the system is economic and it does not use any other additional
Hardware. That goes to proposed system is technically feasible
Behavioural Feasibility
The system working is quite easy to use and learn due to its simple but attractive interface. User
requires no special training for operating the system. The system is also time effective because
the leave management is automated as per the user requirement. The result obtained contains
minimum errors and are highly accurate as the data is required.
Economic Feasibility
To decide whether a project is economically feasible, we have to consider various factors as:
Cost benefit analysis
Long-term returns
Maintenance costs
The proposed “Enterprise Resource Information System “ is computer based. It requires average
computing capabilities and access to internet, which are very basic requirements and can be
afforded by any organization hence it doesn’t incur additional economic overheads, which
renders the system economically feasible.The system being developed is economic with respect
to School or Collage’s point of view. It is cost effective in the sense that has eliminated the paper
work completely.
.
16
17
DESIGN
5. DESIGN
UML DIAGRAMS
18
The Unified Modelling Language (UML) is a graphical language for
visualizing, specifying, constructing, and documenting the artifacts of a software intensive
system. The UML gives us a standard way to write a system’s blueprints, covering conceptual
things, such as business processes and system functions, as well as classes written in a specific
programming language, database schemas, and reusable software components.
5.1 USECASE DIAGRAMS
Use Case diagrams are one of the five diagrams in UML for
modelling the dynamic aspects of systems. Use case diagrams are central to modelling the
behaviour of a system, a subsystem, or a class.
Actors are external entities that interact with the system. Examples of actors
include users like client, administrator…etc., or another system like central database.
The overview of the whole project through use case diagram is as follows:
19
20
5.2 CLASS DIAGRAM
A class diagram shows a set of classes, interfaces, and collaborations and their
relationships. Class diagrams are used to illustrate the static design view of a system.
Fig 5.2 Class Diagram for Enterprise Resource Information System
21
5.3 SEQUENCE DIAGRAMS
A sequence diagram is an interaction diagram that emphasizes the time ordering
of messages. Graphically, a sequence diagram is a table that shows objects arranged along X axis
and messages, ordered in increasing time along the Y axis. It contains the object life line that
represents the existence of an object over a period of time. There is a focus of control that shows
the period of time during which an object is performing an action, either directly or through a
subordinate procedure.
5.3.1 APPLY LEAVE
22
Fig 5.3.1 Sequence Diagram for Applying a leave
5.3.2 APPROVE LEAVE
23
Fig 5.3.2 Sequence Diagram for Approving a leave
24
5.3.3 REJECT A LEAVE
Fig 5.3.3 Sequence Diagram for Rejecting a leave
25
DATABASE DESIGN
26
6. DATABASE DESIGN
A database is a collection of interrelated data stored with the minimum redundancy to
serve many users quickly and efficiently. The general objective is to make information access
quick, in expensive and flexible for the user. The tables are organized
To reduce data duplication and hence inconsistency.
To enable the efficient storage and retrieval.
6.1 DATA DICTIONARY
Introduction to the Data Dictionary
One of the most important parts of an Oracle database is its data dictionary, which
is a read-only set of tables that provides information about the database. A data dictionary
contains:
The definitions of all schema objects in the database (tables, procedures, functions,
packages and so on)
How much space has been allocated for, and is currently used by, the schema objects
Default values for columns
Integrity constraint information
The names of Oracle users
It provides domain information.
Other general database information
6.2 TABLES
27
Table Name: Leave
S.no Field Name Data Type Size Constraints
1. Leave ID Varchar2 10 Primary Key
2. Employee ID Varchar2 10 Not Null
3. From Date Date 10 Not Null
4. To Date Date 10 Not Null
5. No.of Days Number 3 Not Null
6. Leave Type Varchar2 20 Not Null
7. Status Varchar2 10 Not Null
6.2.1 Leaves
Table Name: Approved Leaves
S.no Field name Data Type Size Constraints
1. Leave ID Varchar2 10 Primary Key
2. Emp ID Varchar2 10 Foreign Key
3. From Date Date 10 Not Null
28
4. To Date Date 10 Not Null
5. No.of days Varchar2 10 Not Null
6. Leave Type Varchar2 20 Not Null
6.2.2 Approved Leaves
Table Name: Employee
S.no Field Name Data Type Size Constraints
1 emp_id Varchar2 10 Primary Key
2 Emp name Varchar2 20 Not Null
3 Password Varchar2 20 Not Null
4 Designation Varchar2 20 Not Null
5 Date of join Date 20 Not Null
6 Gender Varchar2 20 Not Null
7 Department Varchar2 10 Not Null
8 Address Varchar2 100 Not Null
9 Phone Number 15 Not Null
10 Email Varchar2 30 Not Null
6.2.4 Employee
Table Name: Employee Leave Balance
S.no Field Name Data Type Size Constraints
1 Emp ID Varchar2 15 Primary Key
2 CL Number 3 Not Null
29
3 HPL Number 3 Not Null
4 EL Number 3 Not Null
5 Others Number 3 Not Null
6.2.5 Leave Balance
30
SYSTEM DESIGN
7. SYSTEM DESIGN
System design is transition from a user oriented document to programmers or data base
personnel. The design is a solution, how to approach to the creation of a new system. This is
31
composed of several steps. It provides the understanding and procedural details necessary for
implementing the system recommended in the feasibility study. Designing goes through logical
and physical stages of development, logical design reviews the present physical system, prepare
input and output specification, details of implementation plan and prepare a logical design
walkthrough.
The database tables are designed by analyzing functions involved in the system and format of the
fields is also designed. The fields in the database tables should define their role in the system.
The unnecessary fields should be avoided because it affects the storage areas of the system. Then
in the input and output screen design, the design should be made user friendly. The menu should
be precise and compact.
7.1 Software Design
In designing the software following principles are followed:
1. Modularity and partitioning: software is designed such that, each system should consists
of hierarchy of modules and serve to partition into separate function.
2. Coupling: modules should have little dependence on other modules of a system.
3. Cohesion: modules should carry out in a single processing function.
4. Shared use: avoid duplication by allowing a single module be called by other that need the
function it provides.
7.2 Module Design
The major modules of the project are
32
1. HOD module
2. Employee module
7.2.1 HOD Module
HOD plays a vital role in this project. He has rights to update the faculty profile. Faculty send
their requests to the HOD. Based up on the priorities he will approve the leaves.
7.2.2 Employee Module
The employee must register to enter into the website. He can apply for leaves.And view the
status of the leave request.
7.3 Input/output Design
7.3.1 Input design
Considering the requirements, procedures to collect the necessary input data in most efficiently
designed. The input design has been done keeping in view that, the interaction of the user with
the system being the most effective and simplified way.
Also the measures are taken for the following
Controlling the amount of input
Avoid unauthorized access to the classroom.
Eliminating extra steps
Keeping the process simple
At this stage the input forms and screens are designed.
7.3.2 Output design
33
All the screens of the system are designed with a view to provide the user with easy operations
in simpler and efficient way, minimum key strokes possible. Instructions and important
information is emphasized on the screen. Almost every screen is provided with no error and
important messages and option selection facilitates. Emphasis is given for speedy processing
and speedy transaction between the screens. Each screen assigned to make it as much user
friendly as possible by using interactive procedures. So to say user can operate the system
without much help from the operating manual.
34
IMPLEMENTATION
8. IMPLEMENTATION
Hyper Text Markup Language (HTML)
35
HTML is a static language used to create hypertext documents that have hyperlinks
embedded in them. You can build web pages. It is only formatting language and not a
programming language. Hyperlinks are underlined or emphasized words or locations in a screen
that lead to other documents. WWW is a global, interactive, graphical, hypertext information
system. .
Hypertext Pre-processor(PHP)
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.). PHP is an open source software. PHP is free to download and use.PHP files can contain text, HTML tags and scripts. PHP files are returned to the browser as plain HTML . PHP files have a file extension of ".php", ".php3", or ".phtml".
Basically, PHP allows a static webpage to become dynamic. "PHP" is an acronym that stands for "PHP: Hypertext Preprocessor". The word "Preprocessor" means that PHP makes changes before the HTML page is created. This enables developers to create powerful applications which can publish a blog, remotely control hardware, or run a powerful website such as Wikipedia or Wikibooks. Of course, to accomplish something such as this, you need a database application such as MySQL.
$a=array($new[2],$new[1],$new[0]);$n=implode("-",$a);$c=explode("-",$n);$cl=12;$hpl=5;$el=5;$others=3;$res=mysql_query("select * from employee");while($j=mysql_fetch_array($res)){if($j["EMPID"]==$empid){$y=1;include("login.html");echo '<script language="javascript">alert("You have already Registered")</script>;';}}if($y!=1){mysql_query("insert into employee values('$empid','$name','$hash','$desg','$n','$rgroup','$dept','$address','$phone','$email')");mysql_query("insert into leavebalance values('$empid',$cl,$hpl,$el,$others)");if($desg=="Head Of Department"){mysql_query("insert into departmenthod values('$dept','$empid')");}echo '<script language="javascript">alert("Registration successful.Login to proceed with further activities")</script>;';include("login.html");}
$kk=mysql_query("select * from leavetable where EMPID='$r' and FROMDATE='$n' and TODATE='$ns'");while($k=mysql_fetch_array($kk)){
44
echo $k['EMPID'];echo '<script language="javascript">alert("You have already applied leave on the same dates!")</script>;';}
if($q != 0){mysql_query("insert into leavetable(EMPID,FROMDATE,TODATE,NUMOFDAYS,LEAVETYPE,STATUS,REASON) values('$r','$n','$ns',$q,$type,'$status','$rsn')");$levid = mysql_query("select LEAVEID from leavetable where EMPID='$r' and FROMDATE='$n' and TODATE='$ns'");
{ // This code executes when the user clicks on a day // in the calendar. if ("TD" == event.srcElement.tagName) // Test whether day is valid. if ("" != event.srcElement.innerText)
{ var mn = document.all.month.selectedIndex+1;
var Year = document.all.year [document.all.year.selectedIndex].text;
element_id = elem_name; // element_id is global variablenewCalendar();SetCalendarOnElement(element_id);//document.all.calendar.style.visibility = "visible";document.all.calendar.style.display="inline";
$dept=mysql_query("select DEPARTMENT from employee where EMPID='$t'");while($dep=mysql_fetch_array($dept)){ $w=$dep['DEPARTMENT'];echo $w;}
$ref=mysql_query("select * from LEAVETABLE l1,EMPLOYEE e1 where e1.EMPID=l1.EMPID and e1.DEPARTMENT='$w' ORDER BY l1.FROMDATE,l1.TODATE,l1.LEAVETYPE");
if($row['STATUS']=="Applied"){ echo "<td>";echo "<form action ='approval.php' method = 'post'><input type = 'submit' name = '$user1' value = 'Approve'><input type = 'hidden' name = 'username' value = '$user1'></form>";echo "<form action ='reject.php' method = 'post'><input type = 'submit' name = '$user1' value = 'Reject'><input type = 'hidden' name = 'username' value = '$user1'></form>";echo "</td>";}