Project File On Payroll Management

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

CERTIFICATE

This is to certify that Deepanshu Samant has


demonstrated exceptional proficiency and
dedication in the successful completion of the
Computer Science project on Payroll
Management. Under the guidance of Mr.
Bansidhar, their teacher, they exhibited
commendable skills in database design and
management.

Awarded on this 20-nov-2023 this certificate


stands as a testament to their academic
excellence and commitment to the field of
computer science.

_
Mr. Bansidhar
Computer Science Teacher
ACKNOWLEDGEMENT

In the accomplishment of this project


successfully, many people have best owned
upon us their blessings and the heart pledge
support, this time we are utilizing to thank all
the people who have been concerned with this
project. Primarily we would like thank god for
being able to complete this project with
success. Then we would like to thank my
principal “Mrs. Kalpana Deolal” and our
Computer science teacher “Mr. Banshidhar”
whose valuable guidance has been the ones
that helped us patch this project and make it
full proof success, his suggestions and
instruction has served as the major contribution
towards the completion of this project. Then we
would like to thank our parents who have
helped us with their valuable suggestions and
guidance has been very helpful in various
phases of the completion of the project.
CONTENTS

PRATICULARS:-

 Preface
 Manual System
 Proposed System
 Introduction of Payroll Management
 Signification of Payroll Management
 Objectives and Scope of Project
 Hardware and Software Requirements
 Working Enviroment
 Function and Modules used in program
 Source Code
 Conclusion
PREFACE

The Central Board Of Secondary Education has


included in its course, a full-fledged computer
course covering the fundamentals of computer
and programming. Exploring the world of
computers, and the project is both informative
and exciting.The project “PayRoll Management
System” has been allocated to me. This project
work allocated to me is a part of the entire
process involved in computerization of theSchool
Management System.
MANUAL SYSTEM
Manual system means a system which does it’s work itself not by
help of any technology in which paper work has some special
place.

All conventional methods are in more use instead of new


technologies. And now as everybody knows that computer graphs
at it’s extent means the more you can use computer system the
more you can make your work easier and if this case system is not
computerized then it has to face a lot of problems because every
task gets complex and time consumable.

>Costly

>Difficulty in searching the records

>Maintenance Problem

>Time consuming

>Tedious
PROPOSED SYSTEM

Proposed system is a system which is computerized in every


manner . Computerized system is not just adding machines
but they are capable of doing much complex, tedious and
cumbersome tasks.
Processing of data by hand is satisfactory only when the
amount of data is processed is small and also the manual
processing is slow, monotonous and often subject to error.
Above explanation is clearly telling us that existing system
contains a lot of deficiencies which can be removed by only
by following proposed system.
Now a days, computer graph is at its extent. Computerization
contains a lot of benefits so that everyone chasing and
following computerized items. Now, question arises what
kind of help this project or computerized system can give to
remove all disadvantages of this existing system.
INTRODUCTION OF PAYROLL
MANAGEMENT

The proposed project “Payroll Management System”


has been developed to overcome the problem faced in
the practicing of manual system . A payroll management
system is a software that is use to manage all you
employee’s financial records in a simple and
automated fashion . The payroll management system
manages employee’s salaries, deductions, other
conveyance, net pay, bonuses and generation of pay-
slips, etc.

This software is built to eliminate and in some cases


reduce the hardships faced by the existing system.
Moreover, the system designed for particular need of
the company to carry out its operations in a
smooth and effective manner.
SIGNIFICANCE OF PAYROLL
MANAGEMENT

Accurate and efficient payroll management is essential for several


reasons:

A. Employee Satisfaction: Timely and accurate payment of salaries and


benefits is crucial for maintaining high levels of employee satisfaction and
morale. It fosters a positive work environment and helps retain valuable
talent.

B. Legal and Regulatory Compliance: Payroll processing must comply with a


myriad of local, state, and federal labor laws and tax regulations. Failure to
adhere to these regulations can lead to costly penalties and legal issues

C. Financial Stability: Proper payroll management ensures that a company


allocates its financial resources appropriately. It also provides a clear view
of labor costs and aids in budgeting and financial planning.

D. Record Keeping: Payroll management involves maintaining comprehensive


records of employee compensation, tax withholdings, and benefits. These
records are invaluable for auditing, reporting, and historical reference.
OBJECTIVES AND SCOPE OF
PROJECT
OBJECTIVES OF THE PROJECT
The primary objectives of the "Payroll Management System" project include:

 Designing and implementing a user-friendly and efficient system for managing


employee payroll.

 Automating the calculation of employee salaries, reducing manual errors.

 Ensuring the accuracy and efficiency of the payroll processing and


disbursement.

 Providing the ability to generate various reports to assist management in


financial decision-making.

 Safeguarding sensitive employee data through robust data security


measures.

This project holds the potential to significantly benefit not only but also their
employees, ensuring timely and accurate compensation while simplifying the
administrative workload. Furthermore, it provides an opportunity to gain practical
experience in software development, reinforcing the importance of information
technology in addressing real-world challenges.

The "Payroll Management System" project promises to be a valuable addition to


the domain of payroll management, offering an innovative and cost-effective
solution to streamline payroll processes and enhance organizational efficiency
SCOPE OF THE PROJECT
The scope of this project is to create a comprehensive Payroll Management System
that will encompass the following key features:

1. Employee Data Management: A secure and centralized database for


storing employee records and personal information.

2. Salary Calculation: Automation of salary calculations, including tax


deductions, bonuses, and overtime payments.

3. Pay slip Generation: Generation of detailed pay slips for each employee,
ensuring transparency in compensation.

4. Reporting: Provision of various reports, such as salary registers and tax


reports, to aid management in decision-making

5. User-Friendly Interface: Development of an intuitive and user-friendly


interface to ensure ease of use.

6. Data Security: Robust security measures will be in place to protect


sensitive employee data and ensure compliance with data privacy laws

7. Compliance with Laws and Regulations: The system will ensure that all
payroll calculations and processes adhere to relevant labor laws, tax
regulations, and statutory requirements.

8. Training and Support: Provisions for training the personnel who will use
the system and providing ongoing support for system maintenance and
troubleshooting.
HARDWARE AND SOFTWARE
SPECIFICATIONS

HARDWARE

 Processor: Pentium ® G2030 @ 3.70 GZ

 Processor Speed: 533 MHz

 RAM: 2 GB or more

 Hard Disk: 2.00 GB

SOFTWARE

 Operating System: Windows 7 or above

 IDE: IDLE Python

 Front End - Python 3.6 or above

 Back End - MySQL server 5.0 or above


WORKING ENVIRONMENT

 What is Python?

Python is a high-level, general-purpose programming language known


for its simplicity, readability, and versatility. It was created by Guido
van Rossum, and released in 1991. Python has become one of the
most popular and widely used programming languages due to its
ease of learning and its applicability in various domains, including
web development, data analysis, scientific computing , artificial
intelligence, etc.

What are the important uses of Python?

Uses of Python:
1. Web Development: Python is widely used to create dynamic and
interactive websites and web applications. Frameworks like Django
and Flask simplify web development by providing pre-built
components and tools for developers.

2. Data Analysis and Visualization: Python is a popular choice for


data scientists and analysts. Libraries like NumPy, Pandas, and
Matplotlib enable data manipulation, analysis, and visualization,
making Python a primary tool in data science
3. Machine Learning and Artificial Intelligence: Python is the go-to
language for machine learning and AI. Libraries like
TensorFlow , Keras, and scikit-learn offer powerful tools for
building and training machine learning models.

4. Scientific Computing: Python is used in scientific research and


engineering simulations due to its extensive libraries and packages, such
as SciPy and SymPy.

5. Database Management: Python can be used to connect to and


manipulate various types of databases through libraries such as
SQLAlchemy and psycopg2 for PostgreSQL.

What Python can do?

 Python can be used on a server to create web


applications.
 Python can be used alongside software to create
workflows
 Python can connect to database systems. It can also read
and modify files.
 Python can be used to handle big data and perform
complex mathematics.
 Python can be used for rapid prototyping, or for
production-ready software development.
What is MySQL?

• MySQL is an open-source relational database management system


(RDBMS) that is widely used for managing and storing structured
data. It was originally developed by a Swedish company, MySQL
AB, and later acquired by Oracle Corporation.

• MySQL is available in both community and enterprise versions.


The community version is open source and free to use, while the
enterprise version offers additional features and support

• The data in a MySQL database are stored in tables which consists


of columns and rows.

• MySQL is a database system that runs on a server.

• MySQL is ideal for both small and large applications.

• MySQL is very fast, reliable, and easy to use database system. It


uses standard SQL.

• MySQL compiles on a number of platforms.


Interface Python with MySQL

MySQL Python/Connector is an interface for connecting to a MySQL


database server from Python. It implements the Python Database
API and is built on top of the MySQL.

The general workflow of a Python program that interacts with a


MySQL- based database is as follows:

1. Connect to the MySQL server.

2. Create a new database.

3. Connect to the newly created or an existing database.

4. Execute a SQL query and fetch results.

5. Inform the database if any changes are made to a table.

6. Close the connection to the MySQL server


FUNCTIONS AND MODULES USED IN
PROJECT
Modules used in the Project:

1. mysql connector >> A MySql connector, often referred to


as a MySql database connector is a software component
that enables a programming language, such as Python ,
Java , PHP ,etc to communicate with and interact wih MySql
database. It acts as a bridge between the application and
the database, allowing the application to send SQL queries,
retrieve data, and perform various database operations.
Each programming language typically has its own MySQL
connector or driver specifically designed for that language.

2. datetime module >> The datetime module is a built-in


module in Python that provides classes and functions for
working with dates and times. It allows you to manipulate,
format, and perform various operations on dates and times.
The datetime module is part of the Python Standard Library,
which means you can use it without the need for additional
installations or external libraries.
3. tabulate module >> The tabulate module is a Python library that
provides a simple way to format tabular data into visually
appealing tables. It makes it easy to display structured data in a
human-readable format, making it a popular choice for generating
tables in command-line applications, scripts, and reports.

The primary feature of the tabulate module is to convert


structured data, typically in the form of lists, dictionaries, or
nested sequences, into tables. It supports various output formats,
including plain text, Markdown, HTML. The library offers options
for customizing table appearance, such as specifying table headers,
column alignment, and formatting.

4.inflect module >> The inflect module in Python is a library that


provides a convenient way to work with English words and numbers.
It is particularly useful for converting numbers to their written word
representations (e.g., converting "42" to "forty-two") and performing
pluralization and singularization of nouns. The inflect module
simplifies tasks related to natural language generation and
formatting.
SOURCE CODE
import mysql.connector

import datetime

from tabulate import tabulate

db = input("Enter name of your database: ")

mydb = mysql.connector.connect(host='localhost', user='root', passwd='052)

mycursor = mydb.cursor()

sql = "CREATE DATABASE if not exists %s" % (db,)

mycursor.execute(sql)

print("Database created successfully...")

mycursor = mydb.cursor()

mycursor.execute("USE " + db)

TableName = input("Name of Table to be created:")

query = "CREATE TABLE IF NOT EXISTS " + TableName + " \

(empno INT PRIMARY KEY, \

name VARCHAR(15) NOT NULL, \

job VARCHAR(15), \

BasicSalary INT, \

DA FLOAT, \

HRA FLOAT, \

GrossSalary FLOAT, \
Tax FLOAT, \

NetSalary FLOAT)"

print("Table " + TableName + " created successfully.....")

mycursor.execute(query)

while True:

print('\n\n\n')

print("*" * 95)

print('\t\t\t\t\tMAIN MENU')

print("*" * 95)

print('\t\t\t\t1. Adding Employee record')

print('\t\t\t\t2. For Displaying Record of All the Employees')

print('\t\t\t\t3. For displaying Records of a particular Employe)

print('\t\t\t\t4. For deleting Records of all the Employees')

print('\t\t\t\t5. For Deleting a Record of a particular employee)

print('\t\t\t\t6. For Modification in a record')

print('\t\t\t\t7. For displaying payroll')

print('\t\t\t\t8. For displaying Salary Slip for all the Employee)

print('\t\t\t\t9. For displaying Salary Slip for a particular Employee')

print('\t\t\t\t10. For Exit')

print('Enter Choice.....', end=' ')

choice = int(input())

if choice == 1:

try:
print('Enter employee information ......')

mempno = int(input('Enter employee no: '))

mname = input('Enter employee name: ')

mjob = input('Enter employee job: ')

mbasic = float(input('Enter basic salary: '))

if mjob.upper() == 'OFFICER':

mda = mbasic * 0.5

mhra = mbasic * 0.35

mtax = mbasic * 0.2

elif mjob.upper() == 'MANAGER':

mda = mbasic * 0.45

mhra = mbasic * 0.30

mtax = mbasic * 0.15

else:

mda = mbasic * 0.40

mhra = mbasic * 0.25

mtax = mbasic * 0.1

mgross = mbasic + mda + mhra

mnet = mgross - mtax

rec = (mempno, mname, mjob, mbasic, mda, mhra, mgross, mtax, mnt)

query = "INSERT INTO " + TableName + " VALUES (%s, %s, %s, %s, %
%s, %s, %s, %s)"

mycursor.execute(query, rec)

mydb.commit()
print('Record added successfully......')

except Exception as e:

print('Something went wrong', e)

elif choice == 2:

try:

query = 'SELECT * FROM ' + TableName

mycursor.execute(query)

print(tabulate(mycursor, headers=['EmpNo', 'Name', 'Job', 'Basic Salary', 'DA', 'H


RA', 'Gross Salary', 'Tax', 'Net Salary'], tablefmt='fancy_grid'))

except Exception as e:

print('Something went wrong', e)

elif choice == 3:

try:

en = input('Enter employee no. of the record to be displayed ......')

query = "SELECT * FROM " + TableName + " WHERE empno=" + en

mycursor.execute(query)

myrecord = mycursor.fetchone()

print("\n\nRecord of Employee No.:" + en)

print(myrecord)

c = mycursor.rowcount

if c == 0:

print('Nothing to Display')
except Exception as e:

print('Something went wrong', e)

elif choice == 4:

try:

ch = input('Do you want to delete all the records? (y/n)')

if ch.upper() == 'Y':

mycursor.execute('DELETE FROM ' + TableName)

mydb.commit()

print('All the records are deleted....')

except Exception as e:

print('Something went wrong', e)

elif choice == 5:

try:

en = input('Enter employee no. of the record to be deleted...')

query = 'DELETE FROM ' + TableName + ' WHERE empno=' + en

mycursor.execute(query)

mydb.commit()

c = mycursor.rowcount

if c > 0:

print('Deleting done')

else:

print('Employee no ', en, ' not found')


except Exception as e:

print('Something went wrong', e)

elif choice == 6:

try:

en = input('Enter employee no. of the record to be modified.....')

query = 'SELECT * FROM ' + TableName + ' WHERE empno=' + en

mycursor.execute(query)

myrecord = mycursor.fetchone()

c = mycursor.rowcount

if c == 0:

print('Empno ' + en + ' does not exist ')

else:

mname = myrecord[1]

myjob = myrecord[2]

mbasic = myrecord[3]

print('empno : ', myrecord[0])

print('name : ', myrecord[1])

print('job : ', myrecord[2])

print('basic : ', myrecord[3])

print('da : ', myrecord[4])

print('hra : ', myrecord[5])

print('gross : ', myrecord[6])

print('tax : ', myrecord[7])


print('net : ', myrecord[8])

print('----------------------------------------')

print('Type Value to modify below or just press Enter for no change ')

x = input('Enter name: ')

if len(x) > 0:

mname = x

x = input('Enter job: ')

if len(x) > 0:

myjob = x

x = input('Enter basic salary: ')

if len(x) > 0:

mbasic = float(x)

query = 'UPDATE ' + TableName + ' SET name=' + "'" + mname + "'" + ', job='
+ "'" + myjob + "'" + ', basicsalary=' \

+ str(mbasic) + ' WHERE empno=' + en

mycursor.execute(query)

mydb.commit()

print('Record Modified')

except Exception as e:

print('Something went wrong', e)

elif choice == 7:

try:

query = 'SELECT * FROM ' + TableName


mycursor.execute(query)

myrecords = mycursor.fetchall()

print("\n\n\n")

print("*" * 95)

print('Employee Payroll '.center(90))

print("*" * 95)

now = datetime.datetime.now()

print("Current Date and Time:", end=' ')

print(now.strftime("%y-%m-%d %H:%M:%S"))

print()

print("-" * 95)

print('%-5s %-15s %-10s %-8s %-8s %-8 %-9s %-8s %-9s' \

% ('Empno', 'Name', 'Job', 'Baic', 'DA', 'HRA', 'Gross', 'Tax', 'Net'))

print("-" * 95)

for rec in myrecords:

print('%4d %-15s %-10s %8.2f %8.2f %8.2f %9.2f %8.2f %9.2f' % rec)

print("-" * 95)

except Exception as e:

print('Something went wrong', e)

elif choice == 8:

try:

query = 'SELECT * FROM ' + TableName

mycursor.execute(query)
now = datetime.datetime.now()

print("\n\n\n")

print("-" * 95)

print("\t\t\t\tSalary Slip")

print("-" * 95)

print("Current Date and Time:", end=' ')

print(now.strftime("%y-%m-%d %H:%M:%S"))

myrecords = mycursor.fetchall()

for rec in myrecords:

print('%4d %-15s %-10s %8.2f %8.2f %8.2f %9.2f %8.2f %9.2f' % rec)

except Exception as e:

print('Something went wrong', e)

elif choice == 9:

try:

en = input("Enter employee number whose pay slip you want to retrieve:")

query = 'SELECT * FROM ' + TableName + ' WHERE empno=' + en

mycursor.execute(query)

now = datetime.datetime.now()

print("\n\n\n\t\t\t\tSalary Slip ")

print("Current Date and Time:", end=' ')

print(now.strftime("%y-%m-%d %H:%M:%S"))

print(tabulate(mycursor, headers=['EmpNo', 'Name', 'Job', 'Basic Salary', 'DA',


'HRA', 'Gross Salary', 'Tax', 'Net Salary'], tablefmt='fancy_grid'))
except Exception as e:

print('Something went wrong', e)

elif choice == 10:

break

else:

print('Wrong Choice.........')
OUTPUT
Conclusion

Payroll System software developed


for a company has been designed to
achieve maximum efficiency and
reduce the time taken to handle the
Payroll Management activity. It is
designed to replace an existing
manual record system there by
reducing time taken for calculations
and for storing data.

You might also like