0% found this document useful (0 votes)
31 views43 pages

Billing Final

This document describes a restaurant bill calculator project created in Python using the Tkinter GUI module. The program allows users to select food and drink items, enter quantities, and view a total bill that includes taxes. It stores item data in a MySQL database and allows users to login, update item prices, and view or print receipts. Tkinter is used to create the graphical user interface, while Python handles processing user input and performing calculations.

Uploaded by

Vimal Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views43 pages

Billing Final

This document describes a restaurant bill calculator project created in Python using the Tkinter GUI module. The program allows users to select food and drink items, enter quantities, and view a total bill that includes taxes. It stores item data in a MySQL database and allows users to login, update item prices, and view or print receipts. Tkinter is used to create the graphical user interface, while Python handles processing user input and performing calculations.

Uploaded by

Vimal Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

1

ABOUT PROJECT

This Restaurant Bill Calculator design is written in


Python. The project record includes a python script (login.py,
question.py, and others). This is a easy GUI based statement
which is very simple to agree and manage. It uses Tkinter
module for the GUI. Speaking about the application, the user
just has to decide among the food and liquids items, enter the
amount and click on the complete button to see the whole
amount. This easy application also represents the whole
prices of each item without any charge and extra costs

Next working the program, the user has to login by providing


the username and pin number. Then the system requires
whether to continue to the application or exchange the
amount of foods. The user can see the total receipt of their
things which represents receipt number and number of their
food/liquids items with the total price. Here, the total charge
of the customer includes tax and duty charges too. In order to
improve the price of foods, the user just has to insert the
amount and click on the update button, it’ll improve that
special item’s cost.
2

OBJECTIVE OF PROJECT

The project that wehave undertaken aims to develop a


billing system that is clean, user-friendly and multi-
functional. Development of this applicationincludes a
number offields such that user feels comfortable and the
systemappears as dynamic to him.

The project "bill payment System" includes


the followingfunctionalities:

 Customer can register themselves online and can edit their


profile.

 All products or items are stored in database created in


mySQL.

 We can search item details with itemno.


3

 Add and maintain new entered category of items


 Provides a convenient solution of billing pattern
 Make an easy to use environment for users and customer
 This project intends to introduce more user friendliness in
the various activities such as record updating and
searching.

REQUIREMENT AND ANALYSIS

The application ‘bill payment System’ being a small,

portable and having good GUI, A computer system should

have the combination of following hardware and software-

1. Hardware Requirement:

 intel I3 Processor

 Minimum 2 GB RAM
4

 Atleast 500GB HDD

2. Software Requirement:

 Windows 7/8/10 OS

 Python 3.X IDLE

 Mysql

 Tkinter module

A BRIEF INTRODUCTION OF PYTHON

Python is a widely used general-purpose, high-level


programming language. It was initially designed by Guido
5

van Rossum in 1991 and developed by Python Software


Foundation. It was mainly developed for emphasis on code
readability, and its syntax allows programmers to express
concepts in fewer lines of code.
 Python laid its foundation in the late 1980s.
 The implementation of Python was started in the
December 1989 by Guido Van Rossum at CWI in
Netherland.
 In 1994, Python 1.0 was released with new features
like: lambda, map, filter, and reduce.
 Python 2.0 added new features like: list
comprehensions, garbage collection system.
 On December 3, 2008, Python 3.0 (also called
"Py3K") was released. It was designed to rectify
fundamental flaw of the language.
 ABC programming language is said to be the
predecessor of Python language which was capable
of Exception Handling and interfacing with Amoeba
Operating System.
 Python is influenced by following programming
languages
6

A BRIEF INTRODUCTION OF MYSQL

MySQL was created by a Swedish company, MySQL AB,


founded by David Axmark, Allan Larsson and Michael
"Monty" Widenius in 1995.

MySQL Features:

o Relational Database Management System


(RDBMS): MySQL is a relational database
management system.
7

o Easy to use: MySQL is easy to use. You have to get


only the basic knowledge of SQL. You can build and
interact with MySQL with only a few simple SQL
statements.

o It is secure: MySQL consist of a solid data security


layer that protects sensitive data from intruders.
Passwords are encrypted in MySQL.

o Client/ Server Architecture: MySQL follows a client


/server architecture. There is a database server
(MySQL) and arbitrarily many clients (application
programs), which communicate with the server; that is,
they query data, save changes, etc.

o Free to download: MySQL is free to use and you can


download it from MySQL official website.

o It is scalable: MySQL can handle almost any amount


of data, up to as much as 50 million rows or more. The
default file size limit is about 4 GB. However, you can
increase this number to a theoretical limit of 8 TB of
data.
8

o Compatible on many operating systems: MySQL is


compatible to run on many operating systems, like
Novell NetWare, Windows* Linux*, many varieties of
UNIX* (such as Sun* Solaris*, AIX, and DEC*
UNIX), OS/2, FreeBSD*, and others. MySQL also
provides a facility that the clients can run on the same
computer as the server or on another computer
(communication via a local network or the Internet).

o Allows roll-back: MySQL allows transactions to be


rolled back, commit and crash recovery.

o High Performance: MySQL is faster, more reliable


and cheaper because of its unique storage engine
architecture.

o High Flexibility: MySQL supports a large number of


embedded applications which makes MySQL very
flexible.

o High Productivity: MySQL uses Triggers, Stored


procedures and views which allows the developer to
give a higher productivity.
9

A BRIEF INTRODUCTION TKINTER


MODULE

Graphical User Interface (GUI) is nothing but a desktop


application which helps you to interact with the computers.
They are used to perform different tasks in the desktops,
laptops and other electronic devices.

• GUI apps like Text-Editors are used to create, read,


update and delete different types of files.

• GUI apps like Sudoku, Chess and Solitaire are games


which you can play.

• GUI apps like Google Chrome, Firefox and Microsoft


Edge are used to browse through the Internet.

They are some different types of GUI apps which we daily use
on the laptops or desktops.
10

Python has a plethora of libraries and these 4 stands out mainly


when it comes to GUI. There are as follows:

 Kivy
 Python QT
 wxPython
 Tkinter

Tkinter is actually an inbuilt Python module used


to create simple GUI apps. It is the most commonly
used module for GUI apps in the Python.

DATABASE STRUCTURE
(RDBMS)

database name: bill_payment


11

Table name: price

Create table price (itemnoint(20) primarykey , itemname


varchar(20) , price int(20) , type varchar(20) ) ;
12

PYTHON CODING
13

from tkinter import *

import random

import os

import sys

from tkinter import messagebox

class Bill_App:

def __init__(self,root):

self.root=root

self.root.geometry("1350x700+0+0")

self.root.configure(bg="#5B2C6F")

self.root.title("Billing System")

title=Label(self.root,text="Billing
System",bd=12,relief=RIDGE,font=("Arial
Black",20),bg="#A569BD",fg="white").pack(fill=X)

#===================================variables==
14

============================================
=========================================

self.nutella=IntVar()

self.noodles=IntVar()

self.lays=IntVar()

self.oreo=IntVar()

self.muffin=IntVar()

self.silk=IntVar()

self.namkeen=IntVar()

self.atta=IntVar()

self.pasta=IntVar()

self.rice=IntVar()

self.oil=IntVar()

self.sugar=IntVar()

self.dal=IntVar()

self.tea=IntVar()

self.soap=IntVar()
15

self.shampoo=IntVar()

self.lotion=IntVar()

self.cream=IntVar()

self.foam=IntVar()

self.mask=IntVar()

self.sanitizer=IntVar()

self.total_sna=StringVar()

self.total_gro=StringVar()

self.total_hyg=StringVar()

self.a=StringVar()

self.b=StringVar()

self.c=StringVar()

self.c_name=StringVar()

self.bill_no=StringVar()

x=random.randint(1000,9999)

self.bill_no.set(str(x))

self.phone=StringVar()
16

#==========================================c
ustomer details label
frame========================================
=========

details=LabelFrame(self.root,text="Customer
Details",font=("Arial
Black",12),bg="#A569BD",fg="white",relief=GROOVE,bd=
10)

details.place(x=0,y=80,relwidth=1)

cust_name=Label(details,text="Customer
Name",font=("Arial
Black",14),bg="#A569BD",fg="white").grid(row=0,column=
0,padx=15)

cust_entry=Entry(details,borderwidth=4,width=30,textvariabl
e=self.c_name).grid(row=0,column=1,padx=8)

contact_name=Label(details,text="Contact
No.",font=("Arial
Black",14),bg="#A569BD",fg="white").grid(row=0,column=
2,padx=10)
17

contact_entry=Entry(details,borderwidth=4,width=30,textvari
able=self.phone).grid(row=0,column=3,padx=8)

bill_name=Label(details,text="Bill.No.",font=("Arial
Black",14),bg="#A569BD",fg="white").grid(row=0,column=
4,padx=10)

bill_entry=Entry(details,borderwidth=4,width=30,textvariable
=self.bill_no).grid(row=0,column=5,padx=8)

#=======================================snack
s label
frame========================================
=========================

snacks=LabelFrame(self.root,text="Snacks",font=("Arial
Black",12),bg="#E5B4F3",fg="#6C3483",relief=GROOVE,b
d=10)

snacks.place(x=5,y=180,height=380,width=325)
18

item1=Label(snacks,text="Nutella Choco
Spread",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=0,colum
n=0,pady=11)

item1_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.nutella).grid(row=0,column=1,padx=10)

item2=Label(snacks,text="Noodles(1
Pack)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=1,colum
n=0,pady=11)

item2_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.noodles).grid(row=1,column=1,padx=10)

item3=Label(snacks,text="Lays(10Rs)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=2,colum
n=0,pady=11)

item3_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.lays).grid(row=2,column=1,padx=10)
19

item4=Label(snacks,text="Oreo(20Rs)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=3,colum
n=0,pady=11)

item4_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.oreo).grid(row=3,column=1,padx=10)

item5=Label(snacks,text="Chocolate
Muffin",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=4,colum
n=0,pady=11)

item5_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.muffin).grid(row=4,column=1,padx=10)

item6=Label(snacks,text="Dairy Milk
Silk(60Rs)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=5,colum
n=0,pady=11)

item6_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.silk).grid(row=5,column=1,padx=10)
20

item7=Label(snacks,text="Namkeen(15Rs)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=6,colum
n=0,pady=11)

item7_entry=Entry(snacks,borderwidth=2,width=15,textvaria
ble=self.namkeen).grid(row=6,column=1,padx=10)

#===================================GROCERY
============================================
=========================================

grocery=LabelFrame(self.root,text="Grocery",font=("Arial
Black",12),relief=GROOVE,bd=10,bg="#E5B4F3",fg="#6C3
483")

grocery.place(x=340,y=180,height=380,width=325)

item8=Label(grocery,text="Aashirvaad
Atta(1kg)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=0,colum
n=0,pady=11)

item8_entry=Entry(grocery,borderwidth=2,width=15,textvaria
ble=self.atta).grid(row=0,column=1,padx=10)
21

item9=Label(grocery,text="Pasta(1kg)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=1,colum
n=0,pady=11)

item9_entry=Entry(grocery,borderwidth=2,width=15,textvaria
ble=self.pasta).grid(row=1,column=1,padx=10)

item10=Label(grocery,text="Basmathi
Rice(1kg)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=2,colum
n=0,pady=11)

item10_entry=Entry(grocery,borderwidth=2,width=15,textvar
iable=self.rice).grid(row=2,column=1,padx=10)

item11=Label(grocery,text="Sunflower
Oil(1ltr)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=3,colum
n=0,pady=11)

item11_entry=Entry(grocery,borderwidth=2,width=15,textvar
iable=self.oil).grid(row=3,column=1,padx=10)
22

item12=Label(grocery,text="Refined
Sugar(1kg)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=4,colum
n=0,pady=11)

item12_entry=Entry(grocery,borderwidth=2,width=15,textvar
iable=self.sugar).grid(row=4,column=1,padx=10)

item13=Label(grocery,text="Daal(1kg)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=5,colum
n=0,pady=11)

item13_entry=Entry(grocery,borderwidth=2,width=15,textvar
iable=self.dal).grid(row=5,column=1,padx=10)

item14=Label(grocery,text="Tea
Powder(1kg)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=6,colum
n=0,pady=11)

item14_entry=Entry(grocery,borderwidth=2,width=15,textvar
iable=self.tea).grid(row=6,column=1,padx=10)
23

#========================================beau
ty and
hygine=======================================
========================================

hygine=LabelFrame(self.root,text="Beauty &
Hygine",font=("Arial
Black",12),relief=GROOVE,bd=10,bg="#E5B4F3",fg="#6C3
483")

hygine.place(x=677,y=180,height=380,width=325)

item15=Label(hygine,text="Bathing Soap",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=0,colum
n=0,pady=11)

item15_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.soap).grid(row=0,column=1,padx=10)

item16=Label(hygine,text="Shampoo(1ltr)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=1,colum
n=0,pady=11)
24

item16_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.shampoo).grid(row=1,column=1,padx=10)

item17=Label(hygine,text="Body
Lotion(1ltr)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=2,colum
n=0,pady=11)

item17_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.lotion).grid(row=2,column=1,padx=10)

item18=Label(hygine,text="Face Cream",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=3,colum
n=0,pady=11)

item18_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.cream).grid(row=3,column=1,padx=10)

item19=Label(hygine,text="Shaving Foam",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=4,colum
n=0,pady=11)
25

item19_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.foam).grid(row=4,column=1,padx=10)

item20=Label(hygine,text="Face
Mask(1piece)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=5,colum
n=0,pady=11)

item20_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.mask).grid(row=5,column=1,padx=10)

item21=Label(hygine,text="Hand
Sanitizer(50ml)",font=("Arial
Black",11),bg="#E5B4F3",fg="#6C3483").grid(row=6,colum
n=0,pady=11)

item21_entry=Entry(hygine,borderwidth=2,width=15,textvari
able=self.sanitizer).grid(row=6,column=1,padx=10)

#===========================================
==========billarea=============================
26

============================================
=====

billarea=Frame(self.root,bd=10,relief=GROOVE,bg="#E5B4
F3")

billarea.place(x=1010,y=188,width=330,height=372)

bill_title=Label(billarea,text="Bill Area",font=("Arial
Black",17),bd=7,relief=GROOVE,bg="#E5B4F3",fg="#6C34
83").pack(fill=X)

scrol_y=Scrollbar(billarea,orient=VERTICAL)

self.txtarea=Text(billarea,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)

#===========================================
======billing
menu========================================
27

============================================
=====

billing_menu=LabelFrame(self.root,text="Billing
Summery",font=("Arial
Black",12),relief=GROOVE,bd=10,bg="#A569BD",fg="whit
e")

billing_menu.place(x=0,y=560,relwidth=1,height=137)

total_snacks=Label(billing_menu,text="Total Snacks
Price",font=("Arial
Black",11),bg="#A569BD",fg="white").grid(row=0,column=
0)

total_snacks_entry=Entry(billing_menu,width=30,borderwidt
h=2,textvariable=self.total_sna).grid(row=0,column=1,padx=
10,pady=7)

total_grocery=Label(billing_menu,text="Total Grocery
Price",font=("Arial
Black",11),bg="#A569BD",fg="white").grid(row=1,column=
0)

total_grocery_entry=Entry(billing_menu,width=30,borderwid
28

th=2,textvariable=self.total_gro).grid(row=1,column=1,padx=
10,pady=7)

total_hygine=Label(billing_menu,text="Total Beauty &


Hygine Price",font=("Arial
Black",11),bg="#A569BD",fg="white").grid(row=2,column=
0)

total_hygine_entry=Entry(billing_menu,width=30,borderwidt
h=2,textvariable=self.total_hyg).grid(row=2,column=1,padx=
10,pady=7)

tax_snacks=Label(billing_menu,text="Snacks
Tax",font=("Arial
Black",11),bg="#A569BD",fg="white").grid(row=0,column=
2)

tax_snacks_entry=Entry(billing_menu,width=30,borderwidth
=2,textvariable=self.a).grid(row=0,column=3,padx=10,pady=
7)
29

tax_grocery=Label(billing_menu,text="Grocery
Tax",font=("Arial
Black",11),bg="#A569BD",fg="white").grid(row=1,column=
2)

tax_grocery_entry=Entry(billing_menu,width=30,borderwidth
=2,textvariable=self.b).grid(row=1,column=3,padx=10,pady=
7)

tax_hygine=Label(billing_menu,text="Beauty & Hygine


Tax",font=("Arial
Black",11),bg="#A569BD",fg="white").grid(row=2,column=
2)

tax_hygine_entry=Entry(billing_menu,width=30,borderwidth
=2,textvariable=self.c).grid(row=2,column=3,padx=10,pady=
7)

button_frame=Frame(billing_menu,bd=7,relief=GROOVE,bg
="#6C3483")

button_frame.place(x=830,width=500,height=95)
30

button_total=Button(button_frame,text="Total
Bill",font=("Arial
Black",15),pady=10,bg="#E5B4F3",fg="#6C3483",command
=lambda:total(self)).grid(row=0,column=0,padx=12)

button_clear=Button(button_frame,text="Clear
Field",font=("Arial
Black",15),pady=10,bg="#E5B4F3",fg="#6C3483",command
=lambda:clear(self)).grid(row=0,column=1,padx=10,pady=6)

button_exit=Button(button_frame,text="Exit",font=("Arial
Black",15),pady=10,bg="#E5B4F3",fg="#6C3483",width=8,c
ommand=lambda:exit1(self)).grid(row=0,column=2,padx=10,
pady=6)

intro(self)

def total(self):

if (self.c_name.get=="" or self.phone.get()==""):

messagebox.showerror("Error", "Fill the complete


Customer Details!!")
31

self.nu=self.nutella.get()*120

self.no=self.noodles.get()*40

self.la=self.lays.get()*10

self.ore=self.oreo.get()*20

self.mu=self.muffin.get()*30

self.si=self.silk.get()*60

self.na=self.namkeen.get()*15

total_snacks_price=(

self.nu+

self.no+

self.la+

self.ore+

self.mu+

self.si+

self.na)

self.total_sna.set(str(total_snacks_price)+" Rs")

self.a.set(str(round(total_snacks_price*0.05,3))+" Rs")
32

self.at=self.atta.get()*42

self.pa=self.pasta.get()*120

self.oi=self.oil.get()*113

self.ri=self.rice.get()*160

self.su=self.sugar.get()*55

self.te=self.tea.get()*480

self.da=self.dal.get()*76

total_grocery_price=(

self.at+

self.pa+

self.oi+

self.ri+

self.su+

self.te+

self.da)
33

self.total_gro.set(str(total_grocery_price)+" Rs")

self.b.set(str(round(total_grocery_price*0.01,3))+" Rs")

self.so=self.soap.get()*30

self.sh=self.shampoo.get()*180

self.cr=self.cream.get()*130

self.lo=self.lotion.get()*500

self.fo=self.foam.get()*85

self.ma=self.mask.get()*100

self.sa=self.sanitizer.get()*20

total_hygine_price=(

self.so+

self.sh+

self.cr+

self.lo+

self.fo+
34

self.ma+

self.sa)

self.total_hyg.set(str(total_hygine_price)+" Rs")

self.c.set(str(round(total_hygine_price*0.10,3))+" Rs")

self.total_all_bill=(total_snacks_price+

total_grocery_price+

total_hygine_price+

(round(total_grocery_price*0.01,3))+

(round(total_hygine_price*0.10,3))+

(round(total_snacks_price*0.05,3)))

self.total_all_bil=str(self.total_all_bill)+" Rs"

billarea(self)

def intro(self):

self.txtarea.delete(1.0,END)

self.txtarea.insert(END,"\tWELCOME TO SUPER
MARKET\n\tPhone-No.739275410")
35

self.txtarea.insert(END,f"\n\nBill no. : {self.bill_no.get()}")

self.txtarea.insert(END,f"\nCustomer Name :
{self.c_name.get()}")

self.txtarea.insert(END,f"\nPhone No. : {self.phone.get()}")

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

self.txtarea.insert(END,"\nProduct\t\tQty\tPrice\n")

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

def billarea(self):

intro(self)

if self.nutella.get()!=0:

self.txtarea.insert(END,f"Nutella\t\t
{self.nutella.get()}\t{self.nu}\n")

if self.noodles.get()!=0:

self.txtarea.insert(END,f"Noodles\t\t
{self.noodles.get()}\t{self.no}\n")

if self.lays.get()!=0:
36

self.txtarea.insert(END,f"Lays\t\t
{self.lays.get()}\t{self.la}\n")

if self.oreo.get()!=0:

self.txtarea.insert(END,f"Oreo\t\t
{self.oreo.get()}\t{self.ore}\n")

if self.muffin.get()!=0:

self.txtarea.insert(END,f"Muffins\t\t
{self.muffin.get()}\t{self.mu}\n")

if self.silk.get()!=0:

self.txtarea.insert(END,f"Silk\t\t
{self.silk.get()}\t{self.si}\n")

if self.namkeen.get()!=0:

self.txtarea.insert(END,f"Namkeen\t\t
{self.namkeen.get()}\t{self.na}\n")

if self.atta.get()!=0:

self.txtarea.insert(END,f"Atta\t\t
{self.atta.get()}\t{self.at}\n")

if self.pasta.get()!=0:

self.txtarea.insert(END,f"Pasta\t\t
{self.pasta.get()}\t{self.pa}\n")
37

if self.rice.get()!=0:

self.txtarea.insert(END,f"Rice\t\t
{self.rice.get()}\t{self.ri}\n")

if self.oil.get()!=0:

self.txtarea.insert(END,f"Oil\t\t
{self.oil.get()}\t{self.oi}\n")

if self.sugar.get()!=0:

self.txtarea.insert(END,f"Sugar\t\t
{self.sugar.get()}\t{self.su}\n")

if self.dal.get()!=0:

self.txtarea.insert(END,f"Daal\t\t
{self.dal.get()}\t{self.da}\n")

if self.tea.get()!=0:

self.txtarea.insert(END,f"Tea\t\t
{self.tea.get()}\t{self.te}\n")

if self.soap.get()!=0:

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

if self.shampoo.get()!=0:
38

self.txtarea.insert(END,f"Shampoo\t\t
{self.shampoo.get()}\t{self.sh}\n")

if self.lotion.get()!=0:

self.txtarea.insert(END,f"Lotion\t\t
{self.lotion.get()}\t{self.lo}\n")

if self.cream.get()!=0:

self.txtarea.insert(END,f"Cream\t\t
{self.cream.get()}\t{self.cr}\n")

if self.foam.get()!=0:

self.txtarea.insert(END,f"Foam\t\t
{self.foam.get()}\t{self.fo}\n")

if self.mask.get()!=0:

self.txtarea.insert(END,f"Mask\t\t
{self.mask.get()}\t{self.ma}\n")

if self.sanitizer.get()!=0:

self.txtarea.insert(END,f"Sanitizer\t\t
{self.sanitizer.get()}\t{self.sa}\n")

self.txtarea.insert(END,f"------------------------------------\n")
39

if self.a.get()!="0.0 Rs":

self.txtarea.insert(END,f"Total Snacks Tax :


{self.a.get()}\n")

if self.b.get()!="0.0 Rs":

self.txtarea.insert(END,f"Total Grocery Tax :


{self.b.get()}\n")

if self.c.get()!="0.0 Rs":

self.txtarea.insert(END,f"Total Beauty&Hygine Tax :


{self.c.get()}\n")

self.txtarea.insert(END,f"Total Bill Amount :


{self.total_all_bil}\n")

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

def clear(self):

self.txtarea.delete(1.0,END)

self.nutella.set(0)

self.noodles.set(0)

self.lays.set(0)

self.oreo.set(0)

self.muffin.set(0)
40

self.silk.set(0)

self.namkeen.set(0)

self.atta.set(0)

self.pasta.set(0)

self.rice.set(0)

self.oil.set(0)

self.sugar.set(0)

self.dal.set(0)

self.tea.set(0)

self.soap.set(0)

self.shampoo.set(0)

self.lotion.set(0)

self.cream.set(0)

self.foam.set(0)

self.mask.set(0)

self.sanitizer.set(0)

self.total_sna.set(0)
41

self.total_gro.set(0)

self.total_hyg.set(0)

self.a.set(0)

self.b.set(0)

self.c.set(0)

self.c_name.set(0)

self.bill_no.set(0)

self.bill_no.set(0)

self.phone.set(0)

def exit1(self):

self.root.destroy()

root=Tk()

obj=Bill_App(root)

root.mainloop()
42

OUTPUT
43

CONCLUSION OF RESTAURANT BILLING


SYSTEM

Finally in restaurant billing system source code, the outcome


of all the time hard work is here. We have a system which
takes the necessary choices of the customer according to the
various filter like price, category of the food and popularity ,

then he is able to place the order accordingly and then system


calculate all the total of the order with taxes and then it can
dispatch the bill that is handed over to customer.

Customer according to the choice pay bill via cash or debit


card or credit card method.
Hence all the process works perfect, full filling the demands.

You might also like