A comprehensive payroll management system built with Python, Streamlit, and MySQL. The system manages employee records, departments, projects, and salary details.
emp_no
: INT (Primary Key)first_name
: VARCHARlast_name
: VARCHARjob_title
: VARCHARbasic_salary
: DECIMALdepartment_id
: INT (Foreign Key)
department_id
: INT (Primary Key)department_name
: VARCHARmanager_id
: INT (Foreign Key to Employees)
project_id
: INT (Primary Key)project_name
: VARCHARstart_date
: DATEend_date
: DATEdepartment_id
: INT (Foreign Key to Departments)
emp_no
: INT (Foreign Key to Employees)project_id
: INT (Foreign Key to Projects)hours_worked
: DECIMAL
emp_no
: INT (Foreign Key to Employees)salary_date
: DATEbasic_salary
: DECIMALda
: DECIMALhra
: DECIMALgross_salary
: DECIMALtax
: DECIMALnet_salary
: DECIMAL
- Establishes connection to the MySQL database.
- Selects the
CompanyManagementDB
database for operations. - Lists available tables (
employees
,departments
,projects
,employee_project
,salaries
).
-
Insert Data into Tables
- Allows insertion of records into tables such as
employees
,departments
,projects
,employee_project
, andsalaries
. - Automatically calculates DA, HRA, gross salary, tax, and net salary based on predefined formulas for salary insertions.
- Allows insertion of records into tables such as
-
Update Data in Tables
- Provides functionality to update existing records in tables like
employees
,departments
,projects
,employee_project
, andsalaries
. - Allows updating specific columns identified by the user.
- Provides functionality to update existing records in tables like
-
Delete Data from Tables
- Enables deletion of records from tables such as
employees
,departments
,projects
,employee_project
, andsalaries
. - Prompts for identification using primary keys (
emp_no
,department_id
,project_id
, etc.).
- Enables deletion of records from tables such as
- Generate Payslip
- Fetches and displays payslip details for a specific employee and salary date.
- Calculates and displays components like basic salary, DA, HRA, gross salary, tax, and net salary in a formatted table using the
tabulate
library.
- Streamlit Application
- Provides a user-friendly web interface with options to insert, update, delete data, generate payslips, and view other functionalities.
- Ensures intuitive navigation through the system functionalities.
-
Clone the repository:
git clone https://github.com/PhenomSG/Payroll-Management-System.git
-
Navigate to the project directory:
cd Payroll-Management-System
-
Install the required packages:
pip install -r requirements.txt
-
Configure the MySQL database connection in the script.
-
Run the Streamlit application:
streamlit run streamlit_app.py
-
Open your web browser and go to the provided URL to interact with the application.
This project is licensed under the MIT License.