You are on page 1of 18

JAIN HERITAGE SCHOOL

COMPUTER SCIENCE PROJECT

GAS BILLING SYSTEM

ASSICE PRACTICAL EXAMINATION 2023-24

Submitted by: Lekha Prasanth


Submitted to: Ms Sheethal Ravindran A

Date: 6-12-2023
Place: Bangalore
ACKNOWLEDGEMENT

I take this opportunity to express my profound sense of gratitude and respect to all those who
helped me throughout this venture.
I express sincere thanks to Mrs. Archana Vishwanath, Director of our school for their
unwavering support and encouragement throughout the project. Their guidance has been
instrumental in the project's success. I am grateful for the opportunity to learn and grow
under their leadership.
I owe my regards to Mrs. Jolly Joesph, Principal of our School for her cooperation and
valuable support and for giving us the opportunity to undertake this project work and
providing the necessary infrastructure.
I would like to express my heartfelt thanks to my revered teacher Ms. Sheethal Ravindran for
her valuable guidance, encouragement, and support throughout this project. This project is
her visualization and owes a lot of its functionality to her.
Last but not least, I owe my overwhelming gratitude to my family and friends who gave me
constant support and motivation to continue with this endeavor.
CONTENT

SL.No Topics Page No:

4
1. Introduction

7
2. System requirements

9
3. Source code

17
5. Output

20
6. Conclusion

21
7. bibliography
INTRODUCTION

Gas Billing System:


Effective billing and collection systems are a critical component for ensuring the viability of
a service provider. Improving billing and collection activities has an immediate impact on the
revenue streams of a service provider that can, in turn, help the service provider in improving
services. However, while effective billing and collection practices depend on many internal
factors (including customer databases, the extent of metered and unmetered service provision,
tariff and billing structures, delivery of bills, and facilities for customer payments), the
institutional arrangements under which service providers operate and provide services
determine whether such practices will remain sustainable in the long term. Efficient billing
and collection practices can set incentives for the provider to effectively charge and collect
gas bills while also fulfilling a commercial orientation to services.
The introduction of smart metering is one of the core elements in recent European policies
targeting the environmental sustainability and the competitiveness of gas and electricity
markets. Many utilities today are evaluating the potential benefits of Smart Metering for all
utility stakeholders. Smart Metering gives customer’s real-time consumption information via
display device that translate the meter reading into a form the customer can easily understand.
These devices help customers change their consumption, should they wish to do so, without
having to wait for the end of the month or the end of the quarter to view the results from
conservation initiatives. Displays tailored to the specific needs of the user, such as those
comparing current use with neighborhood averages or with consumption in previous months,
may help consumers further focus on conservation. Utilities can use time-of-use or interval
data to better analyze and manage supply portfolios and the scheduling of generation or
supply withdrawal from storage fields or reservoirs. Interval data matched to customer type
and location is particularly helpful in identifying needs for network or pipeline repairs or
changes. It can also point to the location and size of leaks or theft. Some Smart Metering
systems permit meters to send “last gasp” messages when they are going out of service.
These help utilities identify the location and extent of an electrical outage or a break in a gas
main.
Utilities frequently use a Smart Metering communications network to obtain an off-cycle,
“final” meter read for customers moving or leaving the area. It is common to couple these
real-time final meter reads with web sites for on-line bill payment or with call centers that
accept payment over the phone. Utilities frequently find it is easier and less costly to obtain
rapid final payments from customers before they leave the area. Remote meter disconnects
are another cost-saving feature of many Smart Metering systems. These reduce the costs to
send field crews to the premises of customers who have either requested a disconnect or who
are being disconnected (or ratcheted back) for bill nonpayment. Smart Metering applications
often permit utilities to check meter status (“ping the meter”) prior to sending a repair crew in
response to a customer call. These checks prevent needless field crew dispatch to customer
sites where problems are not the utility’s responsibility. Most Smart Metering applications
permit remote theft-detection tests geared to the type of meter and the type of utility service.
They can ensure that almost all bills are based on actual meter reads rather than on estimates;
this reduces calls to the contact center and improves customer satisfaction. However, at the
basic level most Gas companies that cannot utilize smart metering make use of database
applications to track customer billing records and also update it quickly. It is in view of the
numerous applications of computer in gas utility management that necessitated this study.
The computer system is a very important and powerful tool and organizations that have
realized its benefits are taking full advantage of it to get better operations and accurate
outputs. One of the major applications of computers is in billing. This is so because the
computer system is fast and accurate in the carrying out of computations. A computerized gas
billing system for is an application that will enable the gas company to carry out their billings
accurately. The overall objective of gas companies is to provide quality gas service to
consumers at reasonable charges. The present billing system has been in place from inception
and it is manually obtained. The profit or loss made by an organization is dependent on the
nature of its billing system. This therefore necessitates the use of more reliable, accurate and
efficient equipment such as the computer system for the processing of the bill of customers.
This shift from manual to digital will bring about positive growth in the operations of the
company.

Statement of the Problems


The following problems were identified:

1. Poor billing and collection practices primarily emanate from the lack of willingness of
the service provider to accurately charge for services being delivered and the lack of a
political will to set tariffs that would allow for recovering the costs incurred in
supplying the service.
2. Most service providers do not have well-defined and proper computerized or
automated systems to maintain financial records for gas billing.
3. The manual process of billing bring about arguments between customers and service
providers,
4. there is no adequate record management system to aid in the accurate computation
and updating of gas bill records.

This situation therefore warrants an automated gas billing system.

Aim and Objectives of the Study


The aim of the study is to develop an automated gas billing system that will help in
maintaining record of customers’ gas bill. The following are the specific objectives of the
study:

1. To design a database system that will help maintain record of customers’ gas bill
2. To implement a system that will accurately compute the gas bill of customers.
3. To design a system that will out-perform the manual way of recording and computing
the gas bill of customers
4. To design a system to facilitate easy updating of gas bill records and presentation of
gas bill reports.

Significance of the Project


The significance of the study is that it will facilitate accurate computation of gas bills and
also aid the easy management of customers’ gas bill records of God is Good gas company, it
will aid in eliminating errors associated with the computation of gas bill and provide an
instant means of updating gas billing records. The study will also serve as a useful reference
material to other researchers seeking for information relating to the subject.
SYSTEM REQUIREMENTS

 SOFTWARE REQUIREMENTS

Python: Python is a high-level, versatile programming language that is easy to learn and
understand. It is extensively used in automation, data science, and web development and
supports a number of programming paradigms. Python's popularity can be attributed to its
cross-platform interoperability, large standard library, and dynamic typing.
MySQL: One popular open-source relational database management system that is well-
known for its dependability and efficiency . MySQL effectively administers and works with
relational databases through SQL. It has ACID features for transactional integrity and is
commonly used in online applications for data retrieval and storage.
Integration of MySQL and Python: The mysql-connector-python library makes it easier to
integrate MySQL and Python, which fosters a strong collaborative environment for
developing scalable, data-driven applications. With MySQL's effective database management
and Python's expressive features, developers can work together seamlessly. This integration
is highly valued for its adaptability, making it a top option across a variety of sectors needing
a combination of a flexible programming language and a reliable relational database system.
It is perfect for dynamic data scenarios like web apps and analytics
Modules
Mysql.connector: The mysql.connector module is a Python driver for MySQL databases,
facilitating communication between Python applications and MySQL servers. With this
module, developers can perform various database operations such as connecting to a MySQL
server, executing SQL queries, and managing transactions. It provides a straightforward and
efficient interface for interacting with MySQL databases in Python programs. To use it, you
need to install the module first using the pip install mysql-connector-python command.
Random: The random module in Python provides tools for generating pseudorandom
numbers. It includes functions for randomizing sequences, choosing elements randomly, and
setting seed values for reproducibility. Developers often leverage this module for tasks like
shuffling lists or creating unpredictable behavior in their programs. The random module is
part of Python's standard library.
Datetime: The datetime module in Python provides classes for working with dates and times.
Developers can perform operations such as formatting dates, calculating time differences, and
extracting specific components like year, month, or day. This module is essential for working
with temporal data and is part of Python's standard library. It offers a versatile and convenient
interface for manipulating and representing dates and times in Python programs.
HARDWARE REQUIREMENTS

 OPERATING SYSTEM: WINDOWS 10 AND ABOVE


 PROCESSOR : PENTIUM(ANY) OR AMD ATHALON
(3800+- DUALCORE) 4200+
 MOTHERBOARD: 1.845 OR 915,995 FOR PENTIUM OR MSI
17 K9MM-V VIA K8M800+8237R
PLUS CHIPSET FOR AMD ATHALON
 RAM: 512MB+
 MONITOR: 14.1 OR 15-17 inch
 Key board and mouse
 Printer : (if print is required - [Hard copy])
SOURCE CODE

import mysql.connector as sql , datetime as dt


import datetime
conn=sql.connect(host='localhost',user='root',passwd='mysql12345',database='gas_inventory'
)
if conn.is_connected():
print("connected")
mycursor=conn.cursor()
#mycursor.execute("create table gasin(v_customer varchar(30) primary key , v_accno
bigint,v_date date,v_add varchar(40), v_cng bigint, v_lpg bigint, v_debit
bigint,v_amtobe_paid bigint , v_credit bigint)")
print("..............GAS INVENTORY MANAGEMENT SYSTEN.............")
print("..............GAS INVENTORY MANAGEMENT SYSTEN.............")
#mycursor.execute("create table user ( username varchar(10) not null primary key, password
varchar(10))")
#print("table is created")
while True:
print("\n1.NEW USER\n2.LOGIN\n3.EXIT")
choi=int(input("Enter your choice"))
if choi==1:
user=input("Enter the USERNAME:")
password=input("Enter the PASSWORD")
Confirm=input("Enter the RE-ENTER PASSWORD")
mycursor.execute("insert into user(username,password)
values('{}','{}')".format(user,password))
print("\nNEW USER CREATED")
conn.commit()
elif choi==2:
username=input("ENTER THE YOUR USERNAME TO LOGIN TO THE
SOFTWARE:")
password=input("ENTER YOUR PASSWORD IN 10 CHARACRTER TO LOGIN TO
THE SOFTWARE : ")
us="select username,password from user where username='%s' and password='%s'"%
(username,password)
mycursor.execute(us)
data=mycursor.fetchall()
for s in data:
usern=s[0]
passn=s[1]
print(usern)
print(passn)
if username ==usern and password ==passn:
print (" USER IS IDENTIFIED ")
print (" ")
print
("_________________________________________________________________________
____________________")
print("
")
print("
")
print (" YOU CAN PROCEED ")
while True:
print("1.CREATE ACCOUNT")
print("2.TO MAKE BILL")
print("3.TO GET DETAILS OF THE CUSTOMER")
print("4.TO GET THE DETAILE OF EVERY CUSTOMER")
print("5.TO GET DETAILS OF A PARTICULAR CUSTOMER")
print("6.TO INSERT MULTIPLE VALUES")
print("7.Exit")
choice=int(input("enter your choice as per the above information:"))
if choice==1:
v_customer=input("enter the name customer ")
v_accno=int(input("enter your account number:"))
v_date=datetime.datetime.now()
print(v_date)
v_add=input("enter your complete address:")
v_debit=int(input("enter your debit card number:"))
v_credit=int(input("enter your credit amount:"))
mycursor.execute("insert into
gasin(v_customer,v_accno,v_date,v_add,v_debit,v_credit) values('{}' , {} , '{}' , '{}' , {} ,
{} )".format(v_customer , v_accno , v_date, v_add , v_debit , v_credit ))
print ("account is created")

print("_____________________________________________________________________
__________")
conn.commit()
continue
elif choice==2:
mycursor.execute("select * from gasin")
re=mycursor.fetchall()
print("YOUR RESULT IS ")
for x in re:
print(x)

print("_____________________________________________________________________
__________")
print("
")
print("
")
continue
elif choice == 3:
customer_name=input("ENTER THE NAME OF CUSTOMER:")
import datetime
v_date=datetime.datetime.now()
date = v_date
print("the date & time is:",v_date)
print("CHOOSE A CHOICE FROM THE FOLLOWING AS PER THE GAS
IS BOUGHT BY THE CUSTOMER:")
print("1. C N G ......Rs.75/l")
print("2.L P G .......Rs.80/l")
print("3.both LPG.....Rs.75/l & CNG.... Rs.80/l")
print("
")
ch=int(input("enter your choice:"))
print("
")
print("
")
if ch==1:
cng=int(input("enter the quantity bought:"))
amount= 75*cng
print("THE AMOUNT TO BE PAID IS :",amount)
mycursor.execute("update gasin set v_cng='cng',v_amtobe_paid='amont'
where v_customer ='customer_name'")
cho=int(input("if transaction is to be done through the credit amount enter
1:"))
if cho==1:
print(v_credit)
remaining=v_credit-amount
mycursor.execute ("update gasin set v_credit='remaining',v_date='date'
where v_customer='customer_name'")
print("your record is updated")
else:
print("INVALID CODE")
if ch==2:
lpg=int(input("enter the amount bought by the customer:"))
pay = 80*lpg
print("the amount to be is: ",pay)
mycursor.execute("update gasin set v_lpg='lpg',v_amtobe_paid='pay' where
v_customer='customer_name'")
print("your record is updated")
choo=int(input("if transaction is to be done through the credit amount enter
1:"))
if choo==1:
remain=v_credit-pay
mycursor.execute("update gasin set v_credit='remain',v_date='date'where
v_customer ='customer_name'")
print("your record is updated")
print("
")
print("
")
if ch==3:
lpgas=int(input("enter the amount of LPG GAS bought:"))
cngas=int(input("enter the amount of CNG GAS bought:"))
total=80*lpgas+75*cngas
print("the amount to be is: ",total)
mycursor.execute("update gasin set
v_lpg='lpgas',v_cng='cngas',v_amtobe_paid='total' where v_customer='customer_name'")
print("your record is updated")

chio=int(input("if transaction is to be done through the credit amount enter


1:"))

if chio==1:
remaind=v_credit-total
mycursor.execute("update gasin set
v_credit='remaind',v_date='date'where v_customer ='customer_name'")
else:
print ("<<<<<< .............IT IS INVALID CODE..........>>>>>>>>>>>")
print("<<<<<<<...........Re-enter the suitable code........>>>>>>>>>>>")

print("_____________________________________________________________________
___________________________________________________")
print("
")
print("
")
continue
elif choice==4:
mycursor.execute("select * from gasin")
se = mycursor.fetchall()
print("........................... THE STORED DATA IS .............................")
print("
")
print("
")
print("
")

for x in se:
print(x)

print("_____________________________________________________________________
_______________________________")

continue
elif choice==5:
customer_name=input("ENTER YOUR NAME : ")
a="select v_credit , v_debit ,v_accno , v_add from gasin where
v_customer='%s'"%(customer_name,)
mycursor.execute(a)
record=mycursor.fetchall()
for x in record:
print("Credit Amount:",x[0])
print("Debit Amount:",x[1])
print("Account number:",x[2])
print("Address:",x[3])

print(" continue your work")


print("
")
print("
")
print("
")
continue
elif choice==6:
v_customer=input("enter the name customer ")
v_accno=int(input("enter your acount number:"))
import datetime
v_date=datetime.datetime.now()
date = v_date
v_add=input("enter your complete address:")
v_debit=int(input("enter your debit card number:"))
v_credit=int(input("enter your credit amount:"))
mycursor.execute("insert into gasin
values(v_customer,v_accno,'date','v_add',44453,1009900)")
print("inserted")
conn.commit()
elif choice==7:
break
#exit(0)
else:
print ("<<<<<< ...........IT IS INVALID CODE..........>>>>>>>>>>>")
print("<<<<<<<...........Re-enter the suitable code........>>>>>>>>>>>")

print("_____________________________________________________________________
__________")
continue
ch=input("Do you want to continu?<y/n>").lower()
if ch=='n':
break
else:
print (" SORRY!!! ......... THE PERSON IS UNIDETIFIED...........!!! ")
print (" SORRY!!! ......... YOU ARE NOT SUPPOSE TO USE THE
SOFTWARE......... !!!")
else:
break
conn.commit()
CONCLUSION

In conclusion, the presented Python code successfully implements an Gas Management


System(GMS) with MySQL database connectivity. The program offers a user-friendly
interface, allowing users to create new accounts, perform transactions, manage account
settings, and visualize transaction data through graphical representations. The integration of
MySQL ensures persistent data storage, making the system capable of handling user
information and transaction records efficiently.
The code demonstrates effective use of MySQL queries to insert, retrieve, and delete data
from the database. Error handling mechanisms are also implemented, ensuring the reliability
and security of user interactions, such as password confirmation validation and account
deletion confirmation.
The GMS provides a versatile platform for both new and existing users to manage their
electricity billing needs. Through the menu-driven structure, users can seamlessly navigate
various functionalities, enhancing the overall user experience.

Overall, this code provides a user-friendly interface for managing gas bills and allows for
efficient and convenient management of customer accounts.
BIBLIOGRAPHY

Sumita Arora computer science class11


Sumita Arora computer science class12

You might also like