DELHI PUBLIC SCHOOL SAGAR
SESSION 2025-26
ROLLNO
CLASS-12TH C
PROJECT
REPORT ON
INFORMATICS PRACTICES
TOPIC
HOTEL MANAGEMENT
Submitted to Submitted by
Mrs. Lily Pandey Krishna Agrawal
CERTIFICATE
This is to certify that this project is
submitted by Krishna Agrawal , a
student of Delhi Public school, Sagar,
has submitted the Informatics Practices
project entitled ‘Hotel Management ’
under the guidance of Mrs. Lily Pandey
During academic session 2025- 2026
PGT IP PRINCIPAL
EXTERNAL
ACKNOWLEDGEMT
I would like to express my sincere
gratitude to my IP teacher
[Link] Pandey for her vital support ,
guidance and encouragement.
Without her help the successful
completion of this project would not
have been possible. I would also like
to express my gratitude to Principal
[Link] Vajapeyajula for
providing with all the facilities that
was required.
NAME OF STUDENT: Krishna
Agrawal
CONTENT
1. Introduction
2. Objective &Scope of the Project
3. Theoretical Background
4 Problem Definition &Analysis
5 System Implementation
The Hardware Used
The Software used
6. System Design &Development.
[Link] Design
8.I/O Forms Design&Event Coding
9. Bibliography
10. Declaration
1. Introduction
This software project is developed to automate the
functionalities of a hotel. The purpose of the software
project is to develop the management information system
(mis) to automate the record of the name, phone no.
Customer Billing with a view to enhance the decision
making of the functionaries.
A MIS mainly consists of a computerized database, a
collection of interrelated tables for a particular subject or
purpose, capable to produce different reports relevant to the
user. An application program is tied with the database for
easy access and interface to the database, using application
program or front-end, we can store, retrieve and manage all
information in proper way.
This software, being simple in design and working, does
not require much of training to users, and can be used as
a powerful tool for automating a hotel management
system.
During coding and design of the software project, Python
idle, a powerful front-end tool is used for getting user
interface based integrated platform and coding simplicity.
As a back-end a powerful, open source rdbms, my sql is
used as per requirement of the CBSE curriculum of
informatics practices course.
2. Objective & Scope of the Project
The objective of the software project is to develop a
computerized MIS to automate the functions of a hotel.
This software project is also aimed to enhance the current
record keeping system, which will help managers to
retrieve the up-to date information at right time in right
shape
The proposed software system is expected to do the
following functionality- To provide a user friendly, User
Interface based integrated and centralized environment
for MIS activities. The proposed system should maintain
all the records and should generate the required reports
and information when required. To provide user-friendly
interface to interact with a centralized database based on
client-server architecture. To identify the critical
operation procedure and possibilities of simplification
using modern IT tools and practices. In its current scope,
the software enables user to retrieve and update the
information from centralized database designed with
MySQL. This software does not require much training
time of the users due to limited functionality and
simplicity.
During the development of hotel management project,
Python 1DLE, a powerful, open-source event-driven
form-based development environment is used for modular
design and future expandability of the system.
Despite of the best effort of the developer, the following
limitations and functional boundaries are visible, which
limits the scope of this application software.
1. This software can store records in pre-designed format in
soft copy. There is no facility yet to produce customized
records. Only specified records are covered.
2. Some application area like records of time when
purchased, map are not implemented in the project. It
facilitates user to view add and update record.
So far as future scope of the project is concerned, firstly it is
open to any modular expansion i.e. other modules or
functions can be designed and embedded to handle the user
need in [Link] part of the software and records can be
Modified independently without much effort.
3. Theoretical Background
What Is Database ?
Introduction and Concepts A database is a collection of
information related to a particular subject or purpose,
such as tracking customer orders or maintaining a
music collection. Using any RDBMS application
software like MY SQL, Oracle, Sybase etc, you can
manage all your information from a single database
file. Within the file, divide your data into separates
storage containers called tables. You may and retrieve
the data using queries. A table is a collection of data
about a specific topic, such as products or suppliers.
Using a separate table for each topic means you can
store that data only once, which makes your efficient
and reduces data- entry errors.
Table organizes data into columns (called fields) and
rows(called records).A Primary key is one or more
fields whose value or values uniquely identify each
record in a table. In a relationship, a primary key is
used to refer to specific record in one table from
another table. A primary key is called foreign key
when it is referred to from another table. To find and
retrieves just the data that meets conditions you
specify. Including data from multiple tables, create a
query. A query can also update or delete multiples
records at the same time,and perform builtin or custom
calculations on your data.
Role of RDBMS Application Program:
A computer database works as a electronic filing
system, which has a large number of ways of cross-
referencing, and this allows the user many different
ways in which to re-organize and retrieve data. A
database can handle business inventory, accounting
and filing and use the information in its files to prepare
summaries, estimates and other reports. The
management of data in a database system is done by
means of a general-purpose software package called a
Database Management System (DBMS). Some
commercially available DBMS are MS SQL Server,
MS ACCESS, INGRES, ORACLE, and Sybase. A
database management system, therefore, is a
combination of hardware and software that can be
used to set up and monitor a database, and can manage
the updating and retrieval of database that has been
stored in it.
What is My SQL?
The management of data in a database system is done
by means of a general purpose software package called
a Database Management System (DBMS) -
commercially available RDBMS are MS SQL Server,
MS ACCESS,. 10/19 ORACLE, and Sybase.
MySQL, the most popular Open-Source SQL database
management system, is developed, distributed, and
supported by Oracle Corporation. MySQL is named
after co-founder Monty Widenius's daughter, My. The
name of the MySQL Dolphin (our logo) is "Sakila"
MySQL is a database management system. A database is a
structured collection of data. It may be anything from a
simple shopping list to a picture gallery or the vast amounts
of information in a corporate network. database managers on
our benchmark page. MySQL Server was originally
developed to handle large databases much faster than existing
solutions and has been successfully used in highly
demanding production environments for several years.
Although under constant development, MySQL Server today
offers a rich and useful set of functions. Its connectivity,
speed, and security make MySQL Server highly suited for
accessing databases on the Internet.
MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that
consists of a multi-threaded SQL server that supports
different back ends. several different client programs and
libraries, administrative tools, and a wide range of application
programming interfaces (APIs).
The Main Features of MySQL are:
-Written in C and C++.
-Works on many different platforms.
-Uses multi-layered server design with independent modules.
Provides transactional and no transactional storage engines.
-Designed to make it relatively easy to add other storage
engines. This is useful if you want to provide an SQL
interface for an in-house database.
What is Python IDE?
IDLE stands for the Integrated Development and
Learning Environment. It is the standard, basic Integrated
Development Environment (IDE) that comes bundled with
the default Python installation, making it particularly useful
for beginners and educational purposes.
Key Features
IDLE is designed to be lightweight and user-friendly,
providing essential tools for writing, running, and debugging
Python code.
Interactive Python Shell: This is the first window you see
when opening IDLE. It functions as a Read-Eval-Print Loop
(REPL), where you can type single Python statements and
see the results immediately, which is great for testing small
snippets of code and mathematical calculations.
Multi-Window Text Editor: IDLE includes a full-featured
text editor for creating, editing, and saving complete Python
program files (with a .py extension). This editor features:
Syntax highlighting (colorizing keywords, comments,
strings, etc.).
Smart indentation and automatic indentation for code
blocks.
Code completion (autocomplete) and "call tips" which
provide function signature information.
Multiple undo and search/replace functionality.
Integrated Debugger: A built-in debugger allows you to
step through your code line by line, set breakpoints, and
inspect the values of variables at different stages of
execution to identify and fix errors efficiently.
Cross-Platform Compatibility: Implemented in 100% pure
Python using the Tkinter GUI toolkit, IDLE works
consistently across Windows, macOS, and Unix systems.
Once opened, you can immediately use the interactive shell or go
4. Problem Definition & Analysis
The hardest part of building a software system is deciding
precisely what to build. No other part of the conceptual work
is as difficult as establishing the detailed technical
requirement Defining and applying good, complete
requirements are hard to work, and success in this endeavour
has excluded many of us.
Yet, we continue to make progress. Problem definition
describes the What of a system, not How. The quality of a
software product is only as good as the process that creates it,
Problem definition is one of the most crucial steps in this
creation process. Without defining a problem, developers do
not know what to build, customers d not know what to
expect, and there is no way to validate that the built system
satisfies the [Link] definition and Analysis is
the activity that encompasses learning about the problem to
be solved, understanding the needs of'customer and users,
trying to find out who the user really is, and understanding
all theconstraints on the solution. It includes all activities
related to the following:
- Identificationand documentation of customer's or
user's needs.
-Creation of a document that describes the external
behavior and the association constraints that will
satisfies those needs.
-Analysis and validation of the requirements
documents to ensure consistency. Completeness,
and feasibility
-Evolution of needs.
After the analysis of the functioning of a hotel
management system, the proposed System is
expected to do the following:
-To provide a user friendly User Interface based
integrated and Centralized environment for
computerized hotel management System.
-The proposed system should maintain al the
records and transactions, and should generate the
required reports and information when
[Link] provide graphical and user-friendly
interface to interact with a centralized database
based on client- server architecture.
5. System Implementation
The Hardware used:
While developing the system, the used hardware are:
PC with Pentium IV processor or sometimes, PC with
Celeron (1.7 GHz) processor having 256 MB RAM,
SVGA and other required devices.
The Software used:
-Microsoft Windows® 10 as operating System.
-Python 3.13.5
-MySQL as Back-end Sever with Database for Testing.
-MS-Word 2016 for documentation.
6. SYSTEM DESIGN AND DEVELOPMENT
Database Design:
An important aspect of system design is the design of
data storage structure. To begin with a logical model of
data structure is developed first. A database is a
container object which contains tables, queries, reports
and data validation policies enforcement rules or
constraints etc. A logical data often represented as a
records are kept in different tables after reducing
anomalies and redundancies. The goodness of data
base design lies in the table structure and its
relationship.
This software project maintains a database named the
project which contains the following tables.
Table Design:
The database of Hotel Management contains 4 tables.
The tables are normalized to minimize the redundancies
of data and enforcing the validation rules of the
organization. Most of the tables are designed to store
master records. The tables and their structure are given
below:
MYSQL CODE
create database HOTEL;
use HOTEL;
PYTHON CODE
import [Link] as s
from datetime import date
from tabulate import tabulate
from [Link] import SimpleDocTemplate,
Paragraph
from [Link] import getSampleStyleSheet
from [Link] import A4
from [Link] import ( SimpleDocTemplate,
Paragraph, Table, TableStyle, Image)
from [Link] import getSampleStyleSheet,
ParagraphStyle
#from [Link] import A4
from [Link] import colors
from [Link] import inch
from [Link] import A4
from [Link] import SimpleDocTemplate,
Paragraph, Spacer, Table, TableStyle
from [Link] import colors
# Connect to MySQL
mydb = [Link](host="localhost", user="root",
password="dps")
cur = [Link]()
# Show existing databases
[Link]("SHOW DATABASES")
result = [Link]()
databases = [i[0] for i in result]
#print("Available databases:", databases)
# Ask for database
db = input("Enter the name of the database: ")
# Create database if not exists
[Link](f"CREATE DATABASE IF NOT
EXISTS {db}")
print("Database created or already exists.")
# Use database
[Link](f"USE {db}")
#login or signup option
#creating table for storing the username and
password of the user
# ----------------------------------------------------------
# Customer Table Function
# ----------------------------------------------------------
def cust():
c=int(input("enter your choice: 1: add 2:update
3:search4:delete"))
if c==1:
while True:
tab2 = input("Enter the name of the customer
table: ")
[Link](f"""
CREATE TABLE IF NOT EXISTS {tab2} (
cname VARCHAR(20),
id_number VARCHAR(20) PRIMARY
KEY,
idproof_no VARCHAR(20),
address VARCHAR(50),
contact_no VARCHAR(20),
id_proof VARCHAR(20)
)
""")
print(f"Table '{tab2}' created or already exists.")
cname = input("Enter the Name: ")
id_number = input("Enter the ID Number: ")
idproof_no = input("Enter the ID Proof
Number: ")
address = input("Enter the Address: ")
contact_no = input("Enter the Contact Number:
")
id_proof = input("Enter the name of ID Proof:
")
data = (cname, id_number, idproof_no, address,
contact_no, id_proof)
sql = f"INSERT INTO {tab2} VALUES (%s,
%s,%s,%s,%s,%s)"
[Link](sql, data)
[Link]()
print("Customer Data Entered Successfully")
ch=input("Do you want to enter more records?
(y/n)")
if ch=='n' or ch=='N':
break
elif c==2:
print("update record")
while True:
sql_update_query="""update
customer set contact_no=%s where id_number=%s"""
contact_no=int(input("enter contact
number"))
id_number=int(input("enter employee
id "))
input_data=(contact_no,id_number)
[Link](sql_update_query,input_data)
[Link]()
print("record updated successfully")
ch=input("Do you want to enter more
records?(y/n)")
if ch=='n' or ch=='N':
break
main()
elif c==3:
# Fetch results
id_number=int(input("enter booking id "))
sql_select_query = """select * from customer"""
# set variable in query
[Link](sql_select_query)
# fetch result
record = [Link]()
for row in record:
print(tabulate(row))
main()
elif c==4:
print("delete")
id_number = int(input("Enter id_number to
delete record: "))
delete_query = "DELETE FROM customer
WHERE id_number = %s"
# execute query
[Link](delete_query, (id_number,))
# commit changes
[Link]()
print([Link], "record(s) deleted
successfully")
else:
print("exiting.........")
# ----------------------------------------------------------
# Booking Table Function
# ----------------------------------------------------------
def booking():
b=int(input("enter your choice 1:Add,2:update
3:search 4:delete"))
if b==1:
tab3 = input("Enter the name of the booking
table: ")
[Link](f"""
CREATE TABLE IF NOT EXISTS {tab3} (
bookingno VARCHAR(20) PRIMARY
KEY,
booking_time DATE,
cin VARCHAR(20),
cout VARCHAR(20),
np VARCHAR(20),
rt VARCHAR(20),
nadults VARCHAR(20),
nchildren VARCHAR(20),
id_number VARCHAR(40)
)
""")
print(f"Table '{tab3}' created or already exists.")
bookingno = input("Enter booking no: ")
booking_time = [Link]().isoformat()
cin = input("Enter check-in date: ")
cout = input("Enter check-out date: ")
np = input("Enter No. of persons: ")
rt = input("Enter type of room: ")
nadults = input("Enter No. of adults: ")
nchildren = input("Enter No. of children: ")
id_number = input("Enter ID number: ")
data = (bookingno, booking_time, cin, cout, np,
rt, nadults, nchildren, id_number)
sql = f"INSERT INTO {tab3} VALUES (%s,%s,
%s,%s,%s,%s,%s,%s,%s)"
[Link](sql, data)
[Link]()
print("Booking Data Entered Successfully")
elif b==2:
print("update record")
np = int(input("Enter number of persons: "))
rt = input("Enter room type: ")
nadults = int(input("Enter number of adults: "))
nchildren = int(input("Enter number of children:
"))
bookingno = int(input("Enter booking number:
"))
update_query = """
UPDATE booking SET np = %s,rt = %s,nadults
= %s,nchildren = %s WHERE bookingno = %s"""
[Link](update_query, (np, rt, nadults,
nchildren, bookingno))
[Link]()
print("Record updated successfully")
elif b==3:
print("Booking details records")
[Link]("select * from booking")
print(tabulate(cur))
elif b==4:
print("delete")
bookingno = int(input("Enter booking number to
delete: "))
delete_query = """ DELETE FROM booking
WHERE bookingno = %s"""
[Link](delete_query, (bookingno,))
[Link]()
print("Record deleted successfully")
else:
print("exiting.........")
main()
def services():
f=int(input("enter your choice 1:add 2:update
3:search 4:delete"))
if f==1:
tab4 = input("Enter the name of the services
table: ")
[Link](f"""
CREATE TABLE IF NOT EXISTS {tab4}(
sid varchar(20) PRIMARY KEY,
id_number varchar(20),
food integer(50),
transport integer(50),
wellness integer(50),
personalization integer(50)
)
""")
print(f"Table '{tab4}' created or already exists.")
sid = input("Enter Service ")
id_number=input("Enter customer id ")
food = int(input("enter food items : "))
transport = int(input("transport charges: "))
wellness = int(input("Rate room cleanliness: "))
personalization= int(input("enter laundry "))
data =
(sid,id_number,food,transport,wellness,personalizatio
n)
sql = f"INSERT INTO {tab4} VALUES (%s,%s,
%s,%s,%s,%s)"
[Link](sql, data)
[Link]()
print("Services submitted successfully ✅")
if f==2:
food = int(input("Enter food amount: "))
transport = int(input("Enter transport amount: "))
wellness = int(input("Enter wellness amount: "))
personalization = int(input("Enter
personalization amount: "))
sid = int(input("Enter service id (sid): "))
update_query = """
UPDATE service
SET food = %s,
transport = %s,
wellness = %s,
personalization = %s
WHERE sid = %s
"""
[Link](update_query, (food, transport,
wellness, personalization, sid))
[Link]()
print("Service record updated successfully")
if f==3:
misc=""" SELECT
food+transport+wellness+personalization as total
from service
"""
[Link](misc)
record =[Link]()
for i in record:
print("Total:", i[0])
if f==4:
id_number = int(input("Enter customer ID
number to delete service: "))
delete_query = """ DELETE FROM service
WHERE id_number = %s"""
[Link](delete_query, (id_number,))
[Link]()
print("Service record deleted successfully")
# ----------------------------------------------------------
# Feedback Table Function
# ----------------------------------------------------------
def feedback():
f=int(input("enter your choice 1:add 2:update
3:search 4:delete"))
if f==1:
tab4 = input("Enter the name of the feedback
table: ")
[Link](f"""
CREATE TABLE IF NOT EXISTS {tab4}(
fid VARCHAR(50) PRIMARY KEY,
id_number VARCHAR(50),
facilities VARCHAR(50),
service VARCHAR(50),
room_cleanliness VARCHAR(50),
checkout_process VARCHAR(50),
food_quality VARCHAR(50),
staff_hospitality VARCHAR(50),
overall_experience VARCHAR(50)
)
""")
print(f"Table '{tab4}' created or already exists.")
fid = input(" facilities id: ")
id_number = input("Customer id: ")
fc = input("Rate facilities: ")
service = input("Rate service: ")
room_cl = input("Rate room cleanliness: ")
cout_cin_process = input("Rate checkout/check-
in process: ")
food_bg_q = input("Rate food & beverage
quality: ")
sc_helpfulness = input("Rate staff hospitality: ")
overall = input("Rate overall experience: ")
data = (fid,id_number,fc, service, room_cl,
cout_cin_process, food_bg_q, sc_helpfulness, overall)
sql = f"INSERT INTO {tab4} VALUES (%s,%s,
%s,%s,%s,%s,%s,%s,%s)"
[Link](sql, data)
[Link]()
print("Feedback submitted successfully ✅")
elif f==2:
print("update record")
elif f==3:
print("Search")
id_number = input("Enter customer ID number:
")
sql_select_query = """
SELECT
[Link],[Link],[Link],f.room_cleanliness,[Link]
kout_process,
f.food_quality,f.staff_hospitality,f.overall_experience
FROM feedback f, customer c
WHERE c.id_number = %s AND c.id_number =
f.id_number
"""
[Link](sql_select_query, (id_number,))
records = [Link]()
for row in records:
print("______________________________________
____________________")
print(" --------------------- SUNSET HOTEL
----------_-------- ")
print(" Feedback ratings of the customer out
of 10 points ")
print("Name of the customer: ",
row[0])
print("Rate service of the hotel: ", row[1])
print("Rate room cleanliness: ", row[2])
print("Rate checkout/check-in process: ",
row[3])
print("Rate food & beverage quality: ",
row[4])
print("Rate staff hospitality: ", row[5])
print("Rate overall experience: ", row[6])
print("---------------------------------------------------------
---------")
elif f==4:
print("delete")
else:
print("exit")
main()
# ----------------------------------------------------------
# Bill Generation
# ----------------------------------------------------------
def bill():
b=int(input("enter your choice 1:New Bill 2: Old
Bill by date"))
if b==1:
id_number = input("Enter customer ID number: ")
sql_select_query = """
SELECT [Link], c.contact_no, [Link],
[Link], b.booking_time
FROM booking b, customer c
WHERE c.id_number = %s AND c.id_number =
b.id_number
"""
[Link](sql_select_query, (id_number,))
record = [Link]()
for row in record:
# Room rates
S, P, Q, R = 3000, 2500, 1000, 1500
q = int(input("Enter no. of AC single bed rooms:
"))
o = int(input("Enter no. of AC double bed rooms:
"))
e = int(input("Enter no. of NON-AC single
rooms: "))
t = int(input("Enter no. of NON-AC double
rooms: "))
m=S*q
n=P*o
a=Q*e
c_amt = R * t
misc = """
SELECT food + transport + wellness +
personalization
FROM service
WHERE id_number = %s
"""
[Link](misc, (id_number,))
d = [Link]()[0]
total = m + n + a + c_amt + d
print("______________________________________
_________________")
print(" --------------------- SUNSET HOTEL
------------------ ")
print("Invoice to:")
print("Name:", row[0])
print("Address:", row[2], " Date:",
row[4])
print("Contact:", row[1], " Invoice No:",
row[3])
print("---------------------------------------------------------
---------")
print("Description Qty Price
Total")
print("single room AC"," ",q," ",S,"
",m)
print("Double room AC"," ",o," ",P,"
",n)
print("Single room non AC"," ",e," ",Q,"
",a)
print("Double room non AC"," ",t," ",R,"
",c_amt )
print("Miscellaneous services ",
d)
print("Total Amount
",m+n+a+c_amt+d)
# ---------- PDF CREATION ----------
pdf_name = f"Invoice_{row[3]}.pdf"
doc = SimpleDocTemplate(pdf_name,
pagesize=A4)
styles = getSampleStyleSheet()
elements = []
[Link](Paragraph("<b>SUNSET
HOTEL</b>", styles['Title']))
[Link](Spacer(1, 12))
[Link](Paragraph(f"Invoice To:
<b>{row[0]}</b>", styles['Normal']))
[Link](Paragraph(f"Address:
{row[2]}", styles['Normal']))
[Link](Paragraph(f"Contact:
{row[1]}", styles['Normal']))
[Link](Paragraph(f"Invoice No:
{row[3]}", styles['Normal']))
[Link](Paragraph(f"Date: {row[4]}",
styles['Normal']))
[Link](Spacer(1, 12))
table_data = [
["Description", "Qty", "Price", "Total"],
["AC Single Room", q, S, m],
["AC Double Room", o, P, n],
["Non-AC Single Room", e, Q, a],
["Non-AC Double Room", t, R, c_amt],
["Miscellaneous Services", "", "", d],
["", "", "Grand Total", total]
]
table = Table(table_data, colWidths=[180, 60,
80, 80])
[Link](TableStyle([
('GRID', (0,0), (-1,-1), 1, [Link]),
('BACKGROUND', (0,0), (-1,0),
[Link]),
('FONT', (0,0), (-1,0), 'Helvetica-Bold'),
('ALIGN', (1,1), (-1,-1), 'CENTER'),
('FONT', (-2,-1), (-1,-1), 'Helvetica-Bold'),
]))
[Link](table)
[Link](elements)
print(f"PDF Invoice Generated Successfully:
{pdf_name}")
elif b==2:
booking_time= input("Enter the date of bill
genrated: ")
sql_select_query = """
SELECT [Link], c.contact_no, [Link],
[Link], b.booking_time
FROM booking b, customer c
WHERE b
.booking_time = %s AND c.id_number =
b.id_number
"""
[Link](sql_select_query, (booking_time,))
record = [Link]()
for row in record:
# Room rates
S, P, Q, R = 3000, 2500, 1000, 1500
q = int(input("Enter no. of AC single bed rooms:
"))
o = int(input("Enter no. of AC double bed rooms:
"))
e = int(input("Enter no. of NON-AC single
rooms: "))
t = int(input("Enter no. of NON-AC double
rooms: "))
m=S*q
n=P*o
a=Q*e
c_amt = R * t
misc = """
SELECT food + transport + wellness +
personalization
FROM service
WHERE id_number = %s
"""
[Link](misc, (id_number,))
d = [Link]()[0]
total = m + n + a + c_amt + d
print("______________________________________
_________________")
print(" --------------------- SUNSET HOTEL
------------------ ")
print("Invoice to:")
print("Name:", row[0])
print("Address:", row[2], " Date:",
row[4])
print("Contact:", row[1], " Invoice No:",
row[3])
print("---------------------------------------------------------
---------")
print("Description Qty Price
Total")
print("single room AC"," ",q," ",S,"
",m)
print("Double room AC"," ",o," ",P,"
",n)
print("Single room non AC"," ",e," ",Q,"
",a)
print("Double room non AC"," ",t," ",R,"
",c_amt )
print("Miscellaneous services ",
d)
print("Total Amount
",m+n+a+c_amt+d)
# ---------- PDF CREATION ----------
pdf_name = f"Invoice_{row[3]}.pdf"
doc = SimpleDocTemplate(pdf_name,
pagesize=A4)
styles = getSampleStyleSheet()
elements = []
[Link](Paragraph("<b>SUNSET
HOTEL</b>", styles['Title']))
[Link](Spacer(1, 12))
[Link](Paragraph(f"Invoice To:
<b>{row[0]}</b>", styles['Normal']))
[Link](Paragraph(f"Address:
{row[2]}", styles['Normal']))
[Link](Paragraph(f"Contact:
{row[1]}", styles['Normal']))
[Link](Paragraph(f"Invoice No:
{row[3]}", styles['Normal']))
[Link](Paragraph(f"Date: {row[4]}",
styles['Normal']))
[Link](Spacer(1, 12))
table_data = [
["Description", "Qty", "Price", "Total"],
["AC Single Room", q, S, m],
["AC Double Room", o, P, n],
["Non-AC Single Room", e, Q, a],
["Non-AC Double Room", t, R, c_amt],
["Miscellaneous Services", "", "", d],
["", "", "Grand Total", total]
]
table = Table(table_data, colWidths=[180, 60,
80, 80])
[Link](TableStyle([
('GRID', (0,0), (-1,-1), 1, [Link]),
('BACKGROUND', (0,0), (-1,0),
[Link]),
('FONT', (0,0), (-1,0), 'Helvetica-Bold'),
('ALIGN', (1,1), (-1,-1), 'CENTER'),
('FONT', (-2,-1), (-1,-1), 'Helvetica-Bold'),
]))
[Link](table)
[Link](elements)
print(f"PDF Invoice Generated Successfully:
{pdf_name}")
def main():
print("👋Welcome to hotel Management👋")
print("1:Customer Details")
print("2:Booking")
print("3:services")
print("4:Feedback")
print("5:BILL💵")
ch=int(input("enter your choice"))
if ch==1:
cust()
elif ch==2:
booking()
elif ch==3:
services()
elif ch==4:
feedback()
elif ch==5:
bill()
while(True):
print("""
1. User Login
2. User Registration
""")
a=int(input("enter your choice:"))
#IF USER WANTS TO REGISTER
if a==2:
tab5 = input("Enter the name of the
regictration tables table: ")
[Link](f"""
CREATE TABLE IF NOT EXISTS {tab5}(
r VARCHAR(50) PRIMARY KEY,
n VARCHAR(50),
g VARCHAR(50),
c VARCHAR(50),
ad VARCHAR(50),
p VARCHAR(50)
)
""")
print(f"Table '{tab5}' created or already
exists.")
print("""
================================
!!!!!!!PLEASE REGISTER YOURSELF!!!!!!!!
========================
""")
r=input("Registration NO:")
n=input("Name:")
g=input("Gender:")
c=input("Contact No:")
ad=input("Address (COMPLETE
ADDRESS):")
p=input("Password:")
data = (r,n,g,c,ad,p)
sql = f"INSERT INTO {tab5} VALUES (%s,
%s,%s,%s,%s,%s)"
[Link](sql, data)
[Link]()
print("""
=================================
!!!!!!!!REGISTERED SUCCESSFULLY!!!!!!!!
=================================
=================================
!!!!!!!!******PLEASE LOGIN******!!!!!!!!
=============================""")
#IF USER WANTS TO LOGIN
elif a==1:
#PRINTING THE SINGIN OPTION AGAIN TO
THE USER AFTER REGISTRATION
print("""
=============================
!!!!!!!! {{SIGN IN }} !!!!!!!!!!
==========================
""")
un=input("Registration NO!!:")
ps=input("PASSWORD!!:")
misc = "SELECT p FROM registration
WHERE r = %s"
#record = [Link]()
[Link](misc, (un,))
row=[Link]()
for i in row:
z=list(i)
if z[0]==str(ps):
OUTPUT:
Registration and Login Details:
Customer Details :
Booking Details:
Miscellaneous Service :
Customer Feedback :
Bill:
DECLARATION
The undersigned Krishna
Agrawal student of class 12th
hereby declare that the project
work presented in this report
is my own work and has been
carried out under the
supervision of my subject
teacher Mrs. Lily Pandey and
my principal [Link]
Vajapeyajula
This work has not been
previously submitted to any
other school or any Exam.
BIBLIOGRAPHY
Preeti Arora
Sumita Arora
[Link]
[Link]
Teacher’s Notes