You are on page 1of 37

11

CHAPTER 1

INTRODUCTION

The client uses MS Excel, and maintains their product list, customer list, and prints
the invoice, however it is not possible them to share the data from multiple system in multi
user environment, there is lot of duplicate work, and chance of mistake. When the product
price are changed they need to update each and every excel file. There is no option to find
and print previous saved invoice. There is no security; any body can access any report and
sensitive data, also no reports to find out the sales volume, stock list, and summary report.
This eBilling and invoicing system is used to overcome the entire problem which they are
facing currently, and making complete atomization of manual billing and invoicing system.
The main objective of the billing system is to manage the details of bills. It manages all the
information of bills. The project is totally built at administrative end and thus the
administrator is guaranteed the access . the purpose of the project is to built an application
program to reduce the manual work for managing the bills.

Billing Software system is a project which aims in developing a computerized


billing system to maintain all the billing work of a grocery shop. It is a python based
project. We have developed Billing System using Python Tkinter and Sqlite. The main
modules available in this project are Calculate total module which manages the
functionality of total calculation with tax, Generate bill is normally used for generate
receipt of bill, Search bill used for searching previous bill of customer using bill number.
12

CHAPTER 2

OBJECTIVE

The main objective of the Billing Software System is to calculate total, generate bill
receipt and search previouas bill using bill number. It manages all the bill information in a
text file with a unique bill number. The project is totally built at administrative end and
thus only the administrator is guaranteed the access. The purpose of the project is to build
an application program to reduce the manual work for calculating bill in a grocery shop. It
provides easy interface to the admin user. Tax is also calculated in our project.
13

CHAPTER 3

MODULE DESCRIPTION

In this project three modules is used. i.e

1. Calculate total
2. Generate bill receipt
3. Search bill

3.1 Calculate total

It is the main module of our project. This module manages the functionality of total
calculation as well as tax implement on that. We will enter the quantity in front of the
products that we want and how much we want. After entering the quantity, we click on the
total button. Money is already written in back-end programming. so,it will fetch money of
that particular item and then multiply it by quantity and then show the result in particular
columns. It will show the total of cosmetic item purchased in cosmetic price’s column and
similarly in grocery price’s column and cold drink price’s column.
14

3.2 Generate Bill receipt

This module normally used for generate bill. It generates bill receipt with a unique
bill number. After clicking on GENERATE BILL button , Bill will be generated in bill
area. In bill area all the details of customer i.e. bill number, customer name, phone number
and also the product with their quantity and price will mentioned automatically. At last in
bill area there is total amount is also mentioned by adding the total of all product purchased
with tax implement on that.

3.3 Search Bill

This module is used for searching previous bills of customer using bill number.
After entering the bill number. When we press on search button then the previous bill will
appear on screen. When reading operation is performed then files from the database are
fetched from the database and displayed in the front-end or bill area.

There are 2 more buttons in billing software along with total, generate bill and search
button i.e. CLEAR button and EXIT button.

CLEAR The functionality of CLEAR button is to clear the bill area and then the bill
number will change, the new bill number will be created by itself.

EXIT We will exit the billing software by pressing the EXIT button.
15

CHAPTER 4

REQUIREMENTS

4.1 Hardware requirement

Minimum 1GB RAM is required for this software. 1GB harddisk is required and
the dual core and above is required for this project.

4.2 Software requirements

4.2.1 Python Interpreter

An interpreter is a kind of program that executes other programs. When you write
Python programs , it converts source code written by the developer into intermediate
language which is again translated into the native language / machine language that is
executed.
16

The interpreter operates somewhat like the Unix shell: when called with standard
input connected to a tty device, it reads and executes commands interactively; when called
with a file name argument or with a file as standard input, it reads and executes a script
from that file.

4.2.2 VS Code Editor

Visual Studio Code is a free source-code editor made by Microsoft for Windows,
Linux and macOS. Features include support for debugging, syntax highlighting, intelligent
code completion, snippets, code refactoring, and embedded Git.

Instead of a project system, it allows users to open one or more directories, which can then
be saved in workspaces for future reuse. This allows it to operate as a language-agnostic
code editor for any language. It supports a number of programming languages and a set of
features that differs per language. Unwanted files and folders can be excluded from the
project tree via the settings. Many Visual Studio Code features are not exposed through
menus or the user interface but can be accessed via the command palette.

Visual Studio Code is a source-code editor that can be used with a variety of programming
languages, including Java, JavaScript, Go, Node.js, Python and C++.It is based on the
Electron framework, which is used to develop Node.js Web applications that run on the
Blink layout engine. Visual Studio Code employs the same editor component (codenamed
"Monaco") used in Azure DevOps (formerly called Visual Studio Online and Visual Studio
Team Services).
17

4.3 FrontEnd Used

4.3.1 Python Tkinter

Tkinter is a Python binding to the Tk GUI toolkit. Tk is the original GUI library for
the Tcl language. Tkinter is implemented as a Python wrapper around a complete Tcl
interpreter embedded in the Python interpreter. There are several other popular Python
GUI toolkits. Most popular are wxPython, PyQt, and PyGTK.
Python offers multiple options for developing GUI (Graphical User Interface). Out of all
the GUI methods, tkinter is the most commonly used method. It is a standard Python
interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and
easiest way to create the GUI applications. Creating a GUI using tkinter is an easy task.
18

CHAPTER 5

PROGRAMMING LANGUAGE USED

5.1 General Introduction of Python

We use python3 language .Python is an interpreted, object-oriented, high-level


programming language with dynamic semantics. Its high-level built in data structures,
combined with dynamic typing and dynamic binding, make it very attractive for Rapid
Application Development, as well as for use as a scripting or glue language to connect
existing components together. Python's simple, easy to learn syntax emphasizes readability
and therefore reduces the cost of program maintenance. Python supports modules and
packages, which encourages program modularity and code reuse. The Python interpreter
and the extensive standard library are available in source or binary form without charge for
all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it
provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast.
Debugging Python programs is easy: a bug or bad input will never cause a segmentation
fault. Instead, when the interpreter discovers an error, it raises an exception. When the
19

program doesn't catch the exception, the interpreter prints a stack trace. A source level
debugger allows inspection of local and global variables, evaluation of arbitrary
expressions, setting breakpoints, stepping through the code a line at a time, and so on. The
debugger is
written in Python itself, testifying to Python's introspective power. On the other hand, often
the quickest way to debug a program is to add a few print statements to the source: the fast
edit-test-debug cycle makes this simple approach very effective.

5.2 Features of Python3

There are many features in Python, some of which are discussed below –

5.2.1 Easy to code:

Python is a high-level programming language. Python is very easy to learn the


language as compared to other languages like C, C#, Javascript, Java, etc. It is very easy to
code in python language and anybody can learn python basics in a few hours or days. It is
also a developer-friendly language.

5.2.2 Free and Open Source:

Python language is freely available at the official website and you can download it
from the given download link below click on the Download Python keyword.
20

5.2.3 Object-Oriented Language:

One of the key features of python is Object-Oriented programming. Python


supports object-oriented language and concepts of classes, objects encapsulation, etc.

5.2.4 GUI Programming Support:

Graphical User interfaces can be made using a module such as PyQt5, PyQt4,
wxPython, or Tk in python. PyQt5 is the most popular option for creating graphical apps
with Python.

5.2.5 High-Level Language:

Python is a high-level language. When we write programs in python, we do not


need to remember the system architecture, nor do we need to manage the memory.

5.2.6 Extensible feature:

Python is a Extensible language. We can write us some Python code into C or C++
language and also we can compile that code in C/C++ language.
21

5.2.7 Python is Portable language:

Python language is also a portable language. For example, if we have python code
for windows and if we want to run this code on other platforms such as Linux, Unix, and
Mac then we do not need to change it, we can run this code on any platform.

5.2.8 Python is Integrated language:

Python is also an Integrated language because we can easily integrated python with
other languages like c, c++, etc.

5.2.9 Interpreted Language:

Python is an Interpreted Language because Python code is executed line by line at a


time. like other languages C, C++, Java, etc. there is no need to compile python code this
makes it easier to debug our code. The source code of python is converted into an
immediate form called bytecode.

5.2.10 Large Standard Library:

Python has a large standard library which provides a rich set of module and
functions so you do not have to write your own code for every single thing. There are
many libraries present in python for such as regular expressions, unit-testing, web
browsers, etc.
22

5.2.11 Dynamically Typed Language:

Python is a dynamically-typed language. That means the type (for example- int,
double, long, etc.) for a variable is decided at run time not in advance because of this
feature we don’t need to specify the type of variable.
23

CHAPTER 6

CODE OF PROJECT

from tkinter import*


import math,random,os
from tkinter import messagebox
class Bill_App:
def _init_(self,root):
self.root=root
self.root.geometry("1350x700+0+0")
self.root.title("BILLING SOFTWARE")
bg_color="dark blue"
title=Label(self.root,text="BILLING
SOFTWARE",bd=12,relief=GROOVE,bg=bg_color,fg="ORANGE",font=("ALGERIAN"
,30,"bold"),pady=2).pack(fill=X)

#=============variables=============

#=============cosmetics=============
self.soap=IntVar()
self.face_cream=IntVar()
self.spray=IntVar()
self.face_wash=IntVar()
self.gell=IntVar()
self.lotion=IntVar()
24

#============grocery================
self.rice=IntVar()
self.food_oil=IntVar()
self.pulses=IntVar()
self.wheat=IntVar()
self.sugar=IntVar()
self.tea=IntVar()

#===========cold drinks=============
self.Maaza=IntVar()
self.Coke=IntVar()
self.frooti=IntVar()
self.thumbsup=IntVar()
self.limca=IntVar()
self.sprite=IntVar()

#============total product prize and tax variable======


self.cosmetic_price=StringVar()
self.grocery_price=StringVar()
self.cold_drink_price=StringVar()

self.cosmetic_tax=StringVar()
self.grocery_tax=StringVar()
self.cold_drink_tax=StringVar()
25

#=============variables=============

#=============cosmetics=============
self.soap=IntVar()
self.face_cream=IntVar()
self.spray=IntVar()
self.face_wash=IntVar()
self.gell=IntVar()
self.lotion=IntVar()

#============grocery================
self.rice=IntVar()
self.food_oil=IntVar()
self.pulses=IntVar()
self.wheat=IntVar()
self.sugar=IntVar()
self.tea=IntVar()

#===========cold drinks=============
self.Maaza=IntVar()
self.Coke=IntVar()
self.frooti=IntVar()
self.thumbsup=IntVar()
self.limca=IntVar()
self.sprite=IntVar()

#============total product prize and tax variable======


self.cosmetic_price=StringVar()
self.grocery_price=StringVar()
self.cold_drink_price=StringVar()

self.cosmetic_tax=StringVar()
26

self.grocery_tax=StringVar()
self.cold_drink_tax=StringVar()

#============customer===============
self.c_name=StringVar()
self.c_phon=StringVar()
self.bill_no=StringVar()
x=random.randint(1000,9999)
self.bill_no.set(str(x))
self.search_bill=StringVar()

#=============customer detail frame


F1=LabelFrame(self.root,bd=10,relief=GROOVE,text="CUSTOMER
DETAILS",font=("ALGERIAN",15,"bold"),fg="gold",bg=bg_color)
F1.place(x=0,y=80,relwidth=1)

cname_lbl=Label(F1,text="Customer Name",bg=bg_color,fg="white",font=("times
new roman",18,"bold")).grid(row=0,column=0,padx=20,pady=5)
cname_txt=Entry(F1,width=15,textvariable=self.c_name,font="arial
15",bd=7,relief=SUNKEN).grid(row=0,column=1,pady=5,padx=10)

cphn_lbl=Label(F1,text="Phone No. ",bg=bg_color,fg="white",font=("times new


roman",18,"bold")).grid(row=0,column=2,padx=20,pady=5)
cphn_txt=Entry(F1,width=15,textvariable=self.c_phon,font="arial
15",bd=7,relief=SUNKEN).grid(row=0,column=3,pady=5,padx=10)

c_bill_lbl=Label(F1,text="Bill Number",bg=bg_color,fg="white",font=("times new


roman",18,"bold")).grid(row=0,column=4,padx=20,pady=5)
c_bill_txt=Entry(F1,width=15,textvariable=self.search_bill,font="arial
15",bd=7,relief=SUNKEN).grid(row=0,column=5,pady=5,padx=10)
27

bill_btn=Button(F1,text="Search",command=self.find_bill,width=10,bd=7,font="arial
12 bold").grid(row=0,column=6,padx=10,pady=10)

#============COSMETICS FRAME===============

F2=LabelFrame(self.root,bd=10,relief=GROOVE,text="COSMETICS",font=("ALGERIA
N",15,"bold"),fg="gold",bg=bg_color)
F2.place(x=5,y=180,width=325,height=380)

bath_lbl=Label(F2,text="Bath Soap",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=0,column=0,padx=10,pady=10,
sticky="w")
bath_txt=Entry(F2,width=10,textvariable=self.soap,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=0,column=1,padx=10,pady=10)

Face_cream_lbl=Label(F2,text="Face Cream",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=1,column=0,padx=10,pady=10,
sticky="w")
Face_cream_txt=Entry(F2,width=10,textvariable=self.face_cream,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=1,column=1,padx=10,pady=10)

Face_w_lbl=Label(F2,text="Face Wash",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=2,column=0,padx=10,pady=10,
sticky="w")
Face_w_txt=Entry(F2,width=10,textvariable=self.face_wash,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=2,column=1,padx=10,pady=10)

Hair_s_lbl=Label(F2,text="Hair Spray",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=3,column=0,padx=10,pady=10,
sticky="w")
28

Hair_s_txt=Entry(F2,width=10,textvariable=self.spray,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=3,column=1,padx=10,pady=10)

Hair_g_lbl=Label(F2,text="Hair Gel",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=4,column=0,padx=10,pady=10,
sticky="w")
Hair_g_txt=Entry(F2,width=10,textvariable=self.gell,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=4,column=1,padx=10,pady=10)

Body_lbl=Label(F2,text="Body lotion",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=5,column=0,padx=10,pady=10,
sticky="w")
Body_txt=Entry(F2,width=10,textvariable=self.lotion,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=5,column=1,padx=10,pady=10)

#=============Grocery Frame===============

F3=LabelFrame(self.root,bd=10,relief=GROOVE,text="GROCERY",font=("ALGERIAN"
,15,"bold"),fg="gold",bg=bg_color)
F3.place(x=340,y=180,width=325,height=380)

g1_lbl=Label(F3,text="Rice",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=0,column=0,padx=10,pady=10,
sticky="w")
g1_txt=Entry(F3,width=10,textvariable=self.rice,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=0,column=1,padx=10,pady=10)

g2_lbl=Label(F3,text="Food Oil",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=1,column=0,padx=10,pady=10,
sticky="w")
29

g2_txt=Entry(F3,width=10,textvariable=self.food_oil,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=1,column=1,padx=10,pady=10)

g3_lbl=Label(F3,text="pulses",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=2,column=0,padx=10,pady=10,
sticky="w")
g3_txt=Entry(F3,width=10,textvariable=self.pulses,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=2,column=1,padx=10,pady=10)

g4_lbl=Label(F3,text="Wheat",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=3,column=0,padx=10,pady=10,
sticky="w")
g4_txt=Entry(F3,width=10,textvariable=self.wheat,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=3,column=1,padx=10,pady=10)

g5_lbl=Label(F3,text="Sugar",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=4,column=0,padx=10,pady=10,
sticky="w")
g5_txt=Entry(F3,width=10,textvariable=self.sugar,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=4,column=1,padx=10,pady=10)

g6_lbl=Label(F3,text="Tea",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=5,column=0,padx=10,pady=10,
sticky="w")
g6_txt=Entry(F3,width=10,textvariable=self.tea,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=5,column=1,padx=10,pady=10)

#=============Cold Drinks==================

F4=LabelFrame(self.root,bd=10,relief=GROOVE,text="COLD
DRINKS",font=("ALGERIAN",15,"bold"),fg="gold",bg=bg_color)
F4.place(x=670,y=180,width=325,height=380)
30

c1_lbl=Label(F4,text="Maaza",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=0,column=0,padx=10,pady=10,
sticky="w")
c1_txt=Entry(F4,width=10,textvariable=self.Maaza,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=0,column=1,padx=10,pady=10)

c2_lbl=Label(F4,text="Coke",font=("times snew
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=1,column=0,padx=10,pady=10,
sticky="w")
c2_txt=Entry(F4,width=10,textvariable=self.Coke,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=1,column=1,padx=10,pady=10)

c3_lbl=Label(F4,text="Frooti",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=2,column=0,padx=10,pady=10,
sticky="w")
c3_txt=Entry(F4,width=10,textvariable=self.frooti,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=2,column=1,padx=10,pady=10)

c4_lbl=Label(F4,text="Thumbs Up",font=("times new


roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=3,column=0,padx=10,pady=10,
sticky="w")
c4_txt=Entry(F4,width=10,textvariable=self.thumbsup,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=3,column=1,padx=10,pady=10)

c5_lbl=Label(F4,text="Limca",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=4,column=0,padx=10,pady=10,
sticky="w")
c5_txt=Entry(F4,width=10,textvariable=self.limca,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=4,column=1,padx=10,pady=10)
31

c6_lbl=Label(F4,text="Sprite",font=("times new
roman",16,"bold"),bg=bg_color,fg="lightgreen").grid(row=5,column=0,padx=10,pady=10,
sticky="w")
c6_txt=Entry(F4,width=10,textvariable=self.sprite,font=("times new
roman",16,"bold"),bd=5,relief=SUNKEN).grid(row=5,column=1,padx=10,pady=10)

#===============Bill Area==================

F5=Frame(self.root,bd=10,relief=GROOVE)
F5.place(x=1010,y=180,width=340,height=380)
bill_title=Label(F5,text="BILL
AREA",font="ALGERIAN",bd=7,relief=GROOVE).pack(fill=X)
scrol_y=Scrollbar(F5,orient=VERTICAL)
self.txtarea=Text(F5,yscrollcommand=scrol_y.set)
scrol_y.pack(side=RIGHT,fill=Y)
scrol_y.config(command=self.txtarea.yview)
self.txtarea.pack(fill=BOTH,expand=1)

#==============button frame================

F6=LabelFrame(self.root,bd=10,relief=GROOVE,text="BILL
MENU",font=("ALGERIAN",15,"bold"),fg="gold",bg=bg_color)
F6.place(x=0,y=560,relwidth=1,height=140)

m1_lbl=Label(F6,text="Total Cosmetic Price",bg=bg_color,fg="PINK",font=("times


new roman",14,"bold")).grid(row=0,column=0,padx=20,pady=1,sticky="w")
m1_txt=Entry(F6,width=18,textvariable=self.cosmetic_price,font="arial 10
bold",bd=7,relief=SUNKEN).grid(row=0,column=1,padx=10,pady=1)

m2_lbl=Label(F6,text="Total Grocery Price",bg=bg_color,fg="PINK",font=("times


new roman",14,"bold")).grid(row=1,column=0,padx=20,pady=1,sticky="w")
32

m2_txt=Entry(F6,width=18,textvariable=self.grocery_price,font="arial 10
bold",bd=7,relief=SUNKEN).grid(row=1,column=1,padx=10,pady=1)

m3_lbl=Label(F6,text="Total Cold Drink


Price",bg=bg_color,fg="PINK",font=("times new
roman",14,"bold")).grid(row=2,column=0,padx=20,pady=1,sticky="w")
m3_txt=Entry(F6,width=18,textvariable=self.cold_drink_price,font="arial 10
bold",bd=7,relief=SUNKEN).grid(row=2,column=1,padx=10,pady=1)

c1_lbl=Label(F6,text="Cosmetic Tax",bg=bg_color,fg="PINK",font=("times new


roman",14,"bold")).grid(row=0,column=2,padx=20,pady=1,sticky="w")
c1_txt=Entry(F6,width=18,font="arial 10
bold",textvariable=self.cosmetic_tax,bd=7,relief=SUNKEN).grid(row=0,column=3,padx=
10,pady=1)

c2_lbl=Label(F6,text="Grocery Tax",bg=bg_color,fg="PINK",font=("times new


roman",14,"bold")).grid(row=1,column=2,padx=20,pady=1,sticky="w")
c2_txt=Entry(F6,width=18,font="arial 10
bold",textvariable=self.grocery_tax,bd=7,relief=SUNKEN).grid(row=1,column=3,padx=1
0,pady=1)

c3_lbl=Label(F6,text="Cold Drink Tax",bg=bg_color,fg="PINK",font=("times new


roman",14,"bold")).grid(row=2,column=2,padx=20,pady=1,sticky="w")
c3_txt=Entry(F6,width=18,font="arial 10
bold",textvariable=self.cold_drink_tax,bd=7,relief=SUNKEN).grid(row=2,column=3,padx
=10,pady=1)

btn_F=Frame(F6,bd=7,relief=GROOVE)
btn_F.place(x=740,width=585,height=105)
33

total_btn=Button(btn_F,command=self.total,text="Total",bg="cadetblue",fg="white",
bd=3,pady=15,width=10,font="arial 15 bold").grid(row=0,column=0,padx=5,pady=5)
GBill_btn=Button(btn_F,text="Generate
Bill",command=self.bill_area,bg="cadetblue",fg="white",bd=3,pady=15,width=10,font="a
rial 15 bold").grid(row=0,column=1,padx=5,pady=5)
Clear_btn=Button(btn_F,text="Clear",command=self.clear_data,bg="cadetblue",fg="
white",bd=3,pady=15,width=10,font="arial 15
bold").grid(row=0,column=2,padx=5,pady=5)
Exit_btn=Button(btn_F,text="Exit",command=self.Exit_app,bg="cadetblue",fg="whit
e",bd=3,pady=15,width=10,font="arial 15 bold").grid(row=0,column=3,padx=5,pady=5)
self.welcome_bill()

def total(self):
self.c_s_p=self.soap.get()*40
self.c_fc_p=self.face_cream.get()*120
self.c_fw_p=self.face_wash.get()*60
self.c_hs_p=self.spray.get()*180
self.c_hg_p=self.gell.get()*140
self.c_bl_p=self.lotion.get()*180
self.total_cosmetic_price=float(
self.c_s_p+
self.c_fc_p+
self.c_fw_p+
self.c_hs_p+
self.c_hg_p+
self.c_bl_p

)
self.cosmetic_price.set("Rs. "+str(self.total_cosmetic_price))
self.c_tax=round((self.total_cosmetic_price*0.05),2)
self.cosmetic_tax.set("Rs."+str(self.c_tax))

self.g_r_p=self.rice.get()*80
34

self.g_f_p=self.food_oil.get()*180
self.g_d_p=self.pulses.get()*60
self.g_w_p=self.wheat.get()*240
self.g_s_p=self.sugar.get()*45
self.g_t_p=self.tea.get()*150
self.total_grocery_price=float(
self.g_r_p+
self.g_f_p+
self.g_d_p+
self.g_w_p+
self.g_s_p+
self.g_t_p
)

self.grocery_price.set("Rs. "+str(self.total_grocery_price))
self.g_tax=round((self.total_grocery_price*0.1),2)
self.grocery_tax.set("Rs."+str(self.g_tax))

self.d_m_p=self.Maaza.get()*60
self.d_c_p=self.Coke.get()*60
self.d_f_p=self.frooti.get()*50
self.d_t_p=self.thumbsup.get()*45
self.d_l_p=self.limca.get()*40
self.d_s_p=self.sprite.get()*60
self.total_drinks_price=float(
self.d_m_p+
self.d_c_p+
self.d_f_p+
self.d_t_p+
self.d_l_p+
self.d_s_p
)
self.cold_drink_price.set("Rs. "+str(self.total_drinks_price))
35

self.d_tax=round((self.total_drinks_price*0.05),2)
self.cold_drink_tax.set("Rs."+str(self.d_tax))

self.Total_bill=float(self.total_cosmetic_price+
self.total_grocery_price+
self.total_drinks_price+
self.c_tax+
self.g_tax+
self.d_tax
)

def welcome_bill(self):
self.txtarea.delete('1.0',END)
self.txtarea.insert(END,"\twelcome GCC store\n")
self.txtarea.insert(END,f"\nBill Number: {self.bill_no.get()}")
self.txtarea.insert(END,f"\nCustomer Name: {self.c_name.get()}")
self.txtarea.insert(END,f"\nPhone Number: {self.c_phon.get()}")
self.txtarea.insert(END,f"\n*************")
self.txtarea.insert(END,f"\nProduct\t\tQTY\t\tPrice")
self.txtarea.insert(END,f"\n*************")

def bill_area(self):
if self.c_name.get()==""or self.c_phon.get()=="":
messagebox.showerror("Error","Customer Details are must")
elif self.cosmetic_price.get()=="Rs. 0.0"and self.grocery_price.get()=="Rs. 0.0"and
self.cold_drink_price.get()=="Rs. 0.0":
messagebox.showerror("Error","No Product Purchased")
else:
self.welcome_bill()
#==========cosmetics==========
if self.soap.get()!=0:
36

self.txtarea.insert(END,f"\n Bath Soap\t\t{self.soap.get()}\t\t{self.c_s_p}")


if self.face_cream.get()!=0:
self.txtarea.insert(END,f"\n Face
Cream\t\t{self.face_cream.get()}\t\t{self.c_fc_p}")
if self.face_wash.get()!=0:
self.txtarea.insert(END,f"\n Face
Wash\t\t{self.face_wash.get()}\t\t{self.c_fw_p}")
if self.spray.get()!=0:
self.txtarea.insert(END,f"\n Spray\t\t{self.spray.get()}\t\t{self.c_hs_p}")
if self.gell.get()!=0:
self.txtarea.insert(END,f"\n Gell\t\t{self.gell.get()}\t\t{self.c_hg_p}")
if self.lotion.get()!=0:
self.txtarea.insert(END,f"\n lotion\t\t{self.lotion.get()}\t\t{self.c_bl_p}")

#============grocery===========
if self.rice.get()!=0:
self.txtarea.insert(END,f"\n Rice\t\t{self.rice.get()}\t\t{self.g_r_p}")
if self.food_oil.get()!=0:
self.txtarea.insert(END,f"\n Food Oil\t\t{self.food_oil.get()}\t\t{self.g_f_p}")
if self.pulses.get()!=0:
self.txtarea.insert(END,f"\n pulses\t\t{self.pulses.get()}\t\t{self.g_d_p}")
if self.wheat.get()!=0:
self.txtarea.insert(END,f"\n wheat\t\t{self.wheat.get()}\t\t{self.g_w_p}")
if self.sugar.get()!=0:
self.txtarea.insert(END,f"\n sugar\t\t{self.sugar.get()}\t\t{self.g_s_p}")
if self.tea.get()!=0:
self.txtarea.insert(END,f"\n tea\t\t{self.tea.get()}\t\t{self.g_t_p}")

#=============cold drinks===========
if self.Maaza.get()!=0:
self.txtarea.insert(END,f"\n Maaza\t\t{self.Maaza.get()}\t\t{self.d_m_p}")
if self.Coke.get()!=0:
self.txtarea.insert(END,f"\n Coke\t\t{self.Coke.get()}\t\t{self.d_c_p}")
37

if self.frooti.get()!=0:
self.txtarea.insert(END,f"\n Frooti\t\t{self.frooti.get()}\t\t{self.d_f_p}")
if self.thumbsup.get()!=0:
self.txtarea.insert(END,f"\n Thumbsup\t\t{self.thumbsup.get()}\t\t{self.d_t_p}")
if self.limca.get()!=0:
self.txtarea.insert(END,f"\n Limca\t\t{self.limca.get()}\t\t{self.d_l_p}")
if self.sprite.get()!=0:
self.txtarea.insert(END,f"\n Sprite\t\t{self.sprite.get()}\t\t{self.d_s_p}")

self.txtarea.insert(END,f"\n=====================================")
if self.cosmetic_tax.get()!="Rs.0.0":
self.txtarea.insert(END,f"\nCosmetic Tax\t\t\t{self.cosmetic_tax.get()}")
if self.grocery_tax.get()!="Rs.0.0":
self.txtarea.insert(END,f"\nGrocery Tax\t\t\t{self.grocery_tax.get()}")
if self.cold_drink_tax.get()!="Rs.0.0":
self.txtarea.insert(END,f"\nCold Drink Tax\t\t\t{self.cold_drink_tax.get()}")

self.txtarea.insert(END,f"\nTotal Bill :\t\t\tRs.{self.Total_bill}")


self.txtarea.insert(END,f"\n=====================================")
self.save_bill()

def save_bill(self):
op=messagebox.askyesno("Save Bill","Do you want to save the Bill?")
if op>0:
self.bill_data=self.txtarea.get('1.0',END)
f1=open("bills/"+str(self.bill_no.get())+".txt","w")
f1.write(self.bill_data)
f1.close()
messagebox.showinfo("Saved",f"Bill no. : {self.bill_no.get()} Saved Successfully")
else:
return
def find_bill(self):
38

present="no"
for i in os.listdir("bills/"):
if i.split('.')[0]==self.search_bill.get():
f1=open(f"bills/{i}","r")
self.txtarea.delete('1.0',END)
for d in f1:
self.txtarea.insert(END,d)
f1.close()
present="yes"
if present=="no":
messagebox.showerror("Error","Invalid Bill No.")

def clear_data(self):
op=messagebox.askyesno("Clear","Do you really want to clear?")
if op>0:

#=============cosmetics=============
self.soap.set(0)
self.face_cream.set(0)
self.spray.set(0)
self.face_wash.set(0)
self.gell.set(0)
self.lotion.set(0)

#============grocery================
self.rice.set(0)
self.food_oil.set(0)
self.pulses.set(0)
self.wheat.set(0)
self.sugar.set(0)
self.tea.set(0)
39

#===========cold drinks=============
self.Maaza.set(0)
self.Coke.set(0)
self.frooti.set(0)
self.thumbsup.set(0)
self.limca.set(0)
self.sprite.set(0)

#============total product prize and tax variable======


self.cosmetic_price.set("")
self.grocery_price.set("")
self.cold_drink_price.set("")

self.cosmetic_tax.set("")
self.grocery_tax.set("")
self.cold_drink_tax.set("")

#============customer===============
self.c_name.set("")
self.c_phon.set("")
self.bill_no.set("")
x=random.randint(1000,9999)
self.bill_no.set(str(x))
self.search_bill.set("")
self.welcome_bill()

def Exit_app(self):
op=messagebox.askyesno("Exit","Do you really want to exit?")
if op>0:
self.root.destroy()
40

root=Tk()
obj=Bill_App(root)
root.mainloop()
41

CHAPTER 7

SCREENSHOT OF OUTPUT

Fig 7.1:-Billing Software


42

CHAPTER 8

VALIDATION OR MESSAGE BOX

8.1 Validation

:- If we do not enter the customer name or customer phone number. And if both are
not inserted , the message box will pop out and it will have a message written on it that
“CUSTOMER DETAILS ARE MUST”.

:- If we do not buy any product, the message box will pop out and it will have a message
written on it that “NO PRODUCT PURCHASED”.

8.2 Message Box

:-After the bill is generated, a message box will pop out and the message written on it
that “DO YOU WANT TO SAVE THE BILL” , basically the question arises whether we
have to save the bill or not.
43

:-After pressing the clear button ,the message box will pop out and the message written on
it that “DO YOU REALLY WANT TO CLEAR” ,basically a question arises whether we
have to clear the bill or not.

:-After pressing on exit botton ,the message box will pop out and the message written on it
that “DO YOU REALLY WANT TO EXIT” , basically the question arises whether we
have to exit the software or not.

:-When we find the bill by entering wrong bill number then also the message box appear
and the message written on it that “INVALID BILL NO”.
44

CHAPTER 9

LIMITATIONS

1.There was also a label called total in which total money would came.

2. The rupees of all the products is not written in front of them. Money should be written in
front of everything ,so we will easily know which item is worth how much.

3. If we are writing a number instead of an alphabet in the customer name , then it is also
accepting.

4. if we are writting an alphabets instead of a number in phone number, then it is also


accepting.

5. Bill number itself is being generated and any number is comes randomly.
45

CHAPTER 10

CONCLUSION

The project entitled “Billing Software System" is developed using


Python tkinter as front end to computerize the process of total calculation and
bill generation. This project covers only the basic features required.

The outcome of all the time hard work is here. We have a system which takes
the necessary choice of the customers according to the filter like category of
the food.This is achieved through an easy to use graphical interface menu
options.
46

CHAPTER 11

FUTURE SCOPE

This desktop application involves almost all the basic features of the billing
software. The future implementation will be help for admin to add and manage new
products.

1.Add and maintain records of available products.

2.Add and maintain customer details

3.Add and maintain description of new products.

4.Add and maintain new entered category of products.

5. Provides econOmic financial reports to the owner monthly or weekly and yearly.
47

REFERENCES

FOR PYTHON INSTALLATION

https://www.python.org

• FOR PYTHON TKINTER BASICS

• wwW.W3schools.com

www.javatpoint.com

You might also like