project CLASS 12 A
project CLASS 12 A
SECONDARY SCHOOL
UDAIPUR(RAJ)
YEAR: 2024-25
COMPUTER SCIENCE PROJECT REPORT
ON
“GST BILLING SYSTEM”
SUBMITTED TO CBSE
SUBMITTED BY :
GUIDED BY :
ANSH MENARIA
VIJAY LAKSHKAR
XII A (SCIENCE/MATHS)
CERTIFICATE
This is to certify that ANSH MENARIA
of class XII A
(Science/Maths),CENTRAL ACADEMY
SR. SECONDARY School , Udaipur
has completed his project file under
my supervision he take proper care
and at most sincerity .
Project Overview
The GST Billing System project is designed to help students understand
the practical application of Python programming in real-world scenarios.
The system allows users to input item details, including the price and
GST rate, and calculates the total amount payable, including GST. The
project also includes features to generate a detailed bill and save it to a
file for future reference.
Key Objectives
1. User-Friendly Interface: Create an easy-to-use interface for adding
items and generating bills.
2. Accurate GST Calculations: Implement precise calculations for
GST based on user inputs.
3. File Handling: Save the generated bill to a text file for
recordkeeping and future reference.
4. Input Validation: Ensure robust validation of user inputs to prevent
errors and inaccuracies.
2. Project Structure
The project will have the following structure:
3.Coding
import datetime
import os
i: Product Class
class Product:
def __init__(self, category, name,
price, gst_rate):
self.category = category
self.name = name self.price
= price self.gst_rate =
gst_rate
def calculate_gst(self):
return self.price *
self.gst_rate / 100 def
total_price(self):
return self.price +
self.calculate_gst()
print("====================================
=")
print("Category | Product |
Quantity | Price | GST | Total Price")
for item in self.items:
product, quantity, total_price
= item
print(f"{product.category} |
{product.name} | {quantity} |
{product.price} | {product.gst_rate}% |
{total_price}")
print("====================================
=")
print(f"Total Amount:
{self.total}")
def
save(self):
filename =
f"Invoice_{self.date.strftime('%Y%m%d_%H%M%
S')}.txt" with open(filename, 'w')
as f:
f.write(f"Invoice Date:
{self.date}\n")
f.write(f"Customer Name:
{self.customer.name}\n")
f.write(f"Customer Address:
{self.customer.address}\n")
f.write(f"Customer Contact:
{self.customer.contact}\n")
f.write("=================================
=
===\n")
f.write("Category | Product |
Quantity | Price | GST | Total Price\n")
for item in self.items:
product, quantity,
total_price = item
f.write(f"{product.category} |
{product.name} | {quantity} |
{product.price} | {product.gst_rate}% |
{total_price}\n")
f.write("=================================
=
===\n")
f.write(f"Total Amount:
{self.total}\n")
v: Input Validation
def get_valid_input(prompt,
input_type, condition): while
True:
try:
value =
input_type(input(prompt))
if condition(value):
return value
else:
print("Invalid input.
Please try again.") except
ValueError:
print("Invalid input. Please
enter the correct type.")
def display_past_invoices():
print("\nPast Invoices:") for
filename in os.listdir('.'):
if filename.startswith("Invoice_")
and filename.endswith(".txt"):
print(filename) print()
vii: Main Function
def main():
products = [
Product("Electronics", "Laptop",
50000, 18),
Product("Electronics",
"Smartphone", 20000, 12),
Product("Electronics", "Tablet",
15000, 12),
Product("Accessories", "Monitor",
10000, 18),
Product("Accessories", "Keyboard",
1000, 18),
] billing_system =
BillingSystem()
choice = get_valid_input("Select a
product by number (or 0 to finish): ", int,
lambda x: 0 <= x <= len(products))
if choice == 0:
break
quantity = get_valid_input("Enter
quantity: ", int, lambda x: x > 0)
billing_system.add_product(products[choice -
1], quantity)
billing_system.generate_invoice()
4.Output
Enter Customer Details:
Customer Name: John Doe
Customer Address: 123 Elm Street
Customer Contact: 555-1234
Available products:
1. Electronics - Laptop - Price: 50000 - GST:
18%
2. Electronics - Smartphone - Price: 20000 -
GST: 12%
3. Electronics - Tablet - Price: 15000 - GST:
12%
4. Accessories - Monitor - Price: 10000 - GST:
18%
5. Accessories - Keyboard - Price: 1000 - GST:
18%
Available products:
1. Electronics - Laptop - Price: 50000 - GST:
18%
2. Electronics - Smartphone - Price: 20000 -
GST: 12%
3. Electronics - Tablet - Price: 15000 - GST:
12%
4. Accessories - Monitor - Price: 10000 - GST:
18%
5. Accessories - Keyboard - Price: 1000 - GST:
18%
Available products:
1. Electronics - Laptop - Price: 50000 - GST:
18%
2. Electronics - Smartphone - Price: 20000 -
GST: 12%
3. Electronics - Tablet - Price: 15000 - GST:
12%
4. Accessories - Monitor - Price: 10000 - GST:
18%
5. Accessories - Keyboard - Price: 1000 - GST:
18%
Past Invoices:
Invoice_20231221_103341.txt
5.Conclusion
2025. https://docs.python.org/3/library/
• "Classes." Python.org. Accessed July 2025.
https://docs.python.org/3/tutorial/classes.html
2. GST References:
• "Goods and Services Tax (GST)." Government of India,
https://cleartax.in/s/gst-law-goods-and-services-tax
3. Project-Specific References:
• "How to Create a Simple Billing System in Python."
https://www.tutorialspoint.com/python/python_basic_operators.
htm
4. Tools and Libraries:
• "Datetime Module." Python.org. Accessed July 2025.
https://docs.python.org/3/library/datetime.html