-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBillingSoftware.py
More file actions
608 lines (467 loc) · 23.5 KB
/
BillingSoftware.py
File metadata and controls
608 lines (467 loc) · 23.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
from tkinter import *
from tkinter import ttk
import random,os
from tkinter import messagebox
import tempfile
from time import strftime
class Bill_App:
def __init__(self,top):
self.top=top
self.top.title('Billing Software')
self.top.geometry('1536x836+0+0')
self.top.minsize(1536,836)
# Variables
self.c_name=StringVar()
self.c_phone=StringVar()
self.bill_no=StringVar()
z=random.randint(100,999)
self.bill_no.set(z)
self.c_email=StringVar()
self.search_bill=StringVar()
self.product=StringVar()
self.prices=IntVar()
self.qty=IntVar()
self.sub_total=StringVar()
self.tax_input=StringVar()
self.total=StringVar()
# Product Categories List
self.Category=['Select Option','Clothing','LifeStyle','Mobiles']
# SubCatClothing
self.SubCatClothing=['Pant','T-Shirt','Shirt']
self.pant=['Levis','Mufti','Sparky']
self.price_levis=5000
self.price_mufti=6000
self.price_sparky=1200
self.T_shirt=['Polo','Roadster','Jack&Jones']
self.price_polo=1500
self.price_Roadster=1800
self.price_JackJones=1700
self.Shirt=['Peter England','Louis Phillipe','Park Avenue']
self.price_Peter=2100
self.price_Louis=2700
self.price_Park=1740
# SubCatLifeStyle
self.SubCatLifeStyle=['Bath Soap','Face Cream','Hair Oil']
self.Bath_soap=['LifeBoy','Lux','Santoor','Pears']
self.price_life=20
self.price_lux=20
self.price_santoor=20
self.price_pears=30
self.Face_cream=['Fair&Lovely','Ponds','Olay','Garnier']
self.price_fair=20
self.price_ponds=20
self.price_olay=20
self.price_garnier=30
self.Hair_oil=['Parachute','Jashmin','Bajaj']
self.price_para=25
self.price_jashmin=22
self.price_bajaj=30
# SubCatMobiles
self.SubCatMobiles=['Iphone','Samsung','Xiaomi','RealMe','One+']
self.Iphone=['Iphone_11','Iphone_12','Iphone_13']
self.price_i11=60000
self.price_i12=95000
self.price_i13=115000
self.Samsung=['Samsung M16','Samsung M12','Samsung M21']
self.price_sm16=16000
self.price_sm12=12000
self.price_sm21=18000
self.Xiaomi=['Redmi 11','Redmi 12','Mi A3']
self.price_r11=11000
self.price_r12=12000
self.price_mia3=13000
self.RealMe=['RealMe 12','RealMe 13','RealMe Pro']
self.price_rel12=25000
self.price_rel13=22000
self.price_relpro=30000
self.OnePlus=['OnePlus1','OnePlus2','OnePlus3']
self.price_one1=45000
self.price_one2=60000
self.price_one3=45800
# title
lbl_title=Label(self.top,text='BILLING SOFTWARE BY UTTAM', font='Arial 45 bold', bg='white', fg='red')
lbl_title.place(x=0,y=0, width=1530,height=100)
def time():
string = strftime('%H:%M:%S %p')
lbl.config(text = string)
lbl.after(1000,time)
lbl=Label(lbl_title,font='Arial 18 bold', bg='white', fg='red')
lbl.place(x=0,y=(-15),width=150,height=50)
time()
Main_Frame=Frame(self.top,border=5,relief=GROOVE,bg='white')
Main_Frame.place(x=0,y=100,width=1530,height=700)
# Customer LabelFrame
Cust_Frame=LabelFrame(Main_Frame, text='Customer',font='Arial 12 bold', bg='white', fg='red')
Cust_Frame.place(x=10,y=5,width=900,height=200)
self.lbl_mob=Label(Cust_Frame,text='Mobile No:',font='Arial 15 bold', bg='white')
self.lbl_mob.grid(row=0,column=0,sticky=W,padx=50,pady=10)
self.entry_mob=ttk.Entry(Cust_Frame,textvariable=self.c_phone,font='Arial 12 bold',width=24)
self.entry_mob.grid(row=0,column=1)
self.lblCustName = Label(Cust_Frame, text='Customer Name:', font='Arial 15 bold', bg='white', border=4)
self.lblCustName.grid(row=1, column=0, sticky=W, padx=50,pady=10)
self.txtCustName = ttk.Entry(Cust_Frame,textvariable=self.c_name, font='Arial 12 bold', width=24)
self.txtCustName.grid(row=1, column=1)
self.lblEmail = Label(Cust_Frame, text='Email:', font='Arial 15 bold', bg='white', border=4)
self.lblEmail.grid(row=2, column=0, sticky=W, padx=50,pady=10)
self.txtEmail = ttk.Entry(Cust_Frame,textvariable=self.c_email, font='Arial 12 bold', width=24)
self.txtEmail.grid(row=2, column=1)
# Product LabelFrame
Product_Frame = LabelFrame(Main_Frame, text='Product', font='Arial 12 bold', bg='white', fg='red')
Product_Frame.place(x=10,y=215,width=900,height=260)
# Category
self.lblCategory = Label(Product_Frame, text='Select Categories:', font='Arial 15 bold', bg='white', border=4)
self.lblCategory.grid(row=0, column=0, sticky=W, padx=20, pady=15)
self.Combo_Category=ttk.Combobox(Product_Frame,values=self.Category,font='Arial 12 bold',width=24,state='readonly')
self.Combo_Category.current(0)
self.Combo_Category.grid(row=0,column=1,sticky=W,padx=5,pady=2)
self.Combo_Category.bind('<<ComboboxSelected>>',self.Categories)
# Sub Category
self.lblSubCategory = Label(Product_Frame, text='Sub Category:', font='Arial 15 bold', bg='white', border=4)
self.lblSubCategory.grid(row=1, column=0, sticky=W, padx=20, pady=15)
self.ComboSubCategory = ttk.Combobox(Product_Frame,values=[''], font='Arial 12 bold', width=24, state='readonly')
self.ComboSubCategory.grid(row=1, column=1, sticky=W, padx=5, pady=5)
self.ComboSubCategory.bind('<<ComboboxSelected>>',self.Product_add)
# Product Name
self.lblProduct = Label(Product_Frame, text='Product Name:', font='Arial 15 bold', bg='white', border=4)
self.lblProduct.grid(row=2, column=0, sticky=W, padx=20, pady=15)
self.ComboProduct = ttk.Combobox(Product_Frame,textvariable=self.product, font='Arial 12 bold', width=24, state='readonly')
self.ComboProduct.grid(row=2, column=1, sticky=W, padx=5, pady=5)
self.ComboProduct.bind('<<ComboboxSelected>>',self.price)
# Price
self.lblPrice = Label(Product_Frame, text='Price:', font='Arial 15 bold', bg='white', border=4)
self.lblPrice.grid(row=0, column=2, sticky=W, padx=20, pady=15)
self.ComboPrice = ttk.Combobox(Product_Frame,textvariable=self.prices, font='Arial 12 bold', width=24, state='readonly')
self.ComboPrice.grid(row=0, column=3, sticky=W, padx=5, pady=5)
# Qty
self.lblQty = Label(Product_Frame, text='Quantity:', font='Arial 15 bold', bg='white', border=4)
self.lblQty.grid(row=1, column=2, sticky=W, padx=20, pady=15)
self.ComboQty = ttk.Entry(Product_Frame,textvariable=self.qty, font='Arial 12 bold', width=26)
self.ComboQty.grid(row=1, column=3, sticky=W, padx=5, pady=5)
#Button Add To Cart
self.BtnAddToCart = Button(Product_Frame,command=self.AddItem, text='Add To Cart', font='Arial 15 bold', bg='orangered', fg='white',cursor='hand2')
self.BtnAddToCart.grid(row=2, column=3)
# Search
Search_Frame=Frame(Main_Frame,border=2,bg='white')
Search_Frame.place(x=945,y=10,width=560,height=40)
self.lblBill = Label(Search_Frame, text='Bill Number:', font='Arial 15 bold', bg='white',fg='black', border=4)
self.lblBill.grid(row=0, column=0, sticky=W, padx=1)
self.txt_Entry_Search = ttk.Entry(Search_Frame,textvariable=self.search_bill, font='Arial 13 bold', width=24)
self.txt_Entry_Search.grid(row=0, column=1, sticky=W, padx=2)
self.BtnSearch = Button(Search_Frame, text='Search',command=self.find_bill, font='Arial 15 bold', bg='orangered', fg='white',width=10, cursor='hand2')
self.BtnSearch.grid(row=0, column=2, padx=25)
# RightFrame Bill Area
RightLableFrame=LabelFrame(Main_Frame,text='Bill Area',font='Arial 12 bold', bg='white', fg='red')
RightLableFrame.place(x=925,y=55,width=580,height=420)
scroll_y=Scrollbar(RightLableFrame,orient=VERTICAL)
self.textarea=Text(RightLableFrame,yscrollcommand=scroll_y.set,bg="white",fg='blue',font='Arial 12 bold')
scroll_y.pack(side=RIGHT,fill=Y)
scroll_y.config(command=self.textarea.yview)
self.textarea.pack(fill=BOTH,expand=1)
# Bill Counter LabelFrame
Bottom_Frame = LabelFrame(Main_Frame, text='Bill Counter', font='Arial 12 bold', bg='white', fg='red')
Bottom_Frame.place(x=10, y=490, width=1495, height=180)
self.lblSubTotal = Label(Bottom_Frame, text='Sub Total:', font='Arial 15 bold', bg='white', border=4)
self.lblSubTotal.grid(row=0, column=0, sticky=W, padx=20, pady=5)
self.EntrySubTotal = ttk.Entry(Bottom_Frame,textvariable=self.sub_total, font='Arial 12 bold', width=24)
self.EntrySubTotal.grid(row=0, column=1, sticky=W, padx=5, pady=5)
self.lbl_tax = Label(Bottom_Frame, text='Govt Tax:', font='Arial 15 bold', bg='white', border=4)
self.lbl_tax.grid(row=1, column=0, sticky=W, padx=20, pady=5)
self.txt_tax = ttk.Entry(Bottom_Frame,textvariable=self.tax_input, font='Arial 12 bold', width=24)
self.txt_tax.grid(row=1, column=1, sticky=W, padx=5, pady=5)
self.lblAmountTotal = Label(Bottom_Frame, text='Total:', font='Arial 15 bold', bg='white', border=4)
self.lblAmountTotal.grid(row=2, column=0, sticky=W, padx=20, pady=5)
self.txtAmountTotal = ttk.Entry(Bottom_Frame,textvariable=self.total, font='Arial 12 bold', width=24)
self.txtAmountTotal.grid(row=2, column=1, sticky=W, padx=5, pady=5)
#Button Frame
Btn_Frame=Frame(Bottom_Frame, border=2, bg='white')
Btn_Frame.place(x=430,y=0)
self.Btngenerate_Bill=Button(Btn_Frame,height=2,text='Generate Bill',command=self.gen_bill, font='Arial 15 bold', bg='orangered',fg='white',width=16,cursor='hand2')
self.Btngenerate_Bill.grid(row=0,column=0, pady=30)
self.BtnSave = Button(Btn_Frame, height=2,command=self.save_bill, text='Save Bill', font='Arial 15 bold', bg='orangered',fg='white',width=16,cursor='hand2')
self.BtnSave.grid(row=0, column=1, pady=30)
self.BtnPrint = Button(Btn_Frame, height=2,command=self.iprint, text='Print', font='Arial 15 bold', bg='orangered',fg='white',width=16,cursor='hand2')
self.BtnPrint.grid(row=0, column=2, pady=30)
self.BtnClear = Button(Btn_Frame, height=2,command=self.clear, text='Clear', font='Arial 15 bold', bg='orangered',fg='white',width=16,cursor='hand2')
self.BtnClear.grid(row=0, column=3, pady=30)
self.BtnExit = Button(Btn_Frame, height=2,command=self.top.destroy, text='Exit', font='Arial 15 bold', bg='orangered',fg='white',width=16,cursor='hand2')
self.BtnExit.grid(row=0, column=4, pady=30)
self.welcome()
self.l=[]
# Function Declaration
def AddItem(self):
Tax=5
self.n=self.prices.get()
self.m=self.qty.get()*self.n
self.l.append(self.m)
if self.product.get()=='':
messagebox.showerror('Error','Please Select the Product Name')
else:
self.textarea.insert(END,f'\n {self.product.get()}\t\t\t{self.qty.get()}\t\t{self.m}')
self.sub_total.set(str('Rs.%.2f'%(sum(self.l))))
self.tax_input.set(str('Rs.%.2f'%((((sum(self.l)) - (self.prices.get()))*Tax)/100)))
self.total.set(str('Rs.%.2f'%(((sum(self.l)) + ((((sum(self.l)) - (self.prices.get()))*Tax)/100)))))
def gen_bill(self):
if self.product.get()=='':
messagebox.showerror('Error','Please Add to Cart Product')
else:
text=self.textarea.get(10.0,(10.0+float(len(self.l))))
self.welcome()
self.textarea.insert(END,text)
self.textarea.insert(END, '\n=============================================================')
self.textarea.insert(END,f'\n Sub Amount:\t\t\t{self.sub_total.get()}')
self.textarea.insert(END,f'\n Tax Amount:\t\t\t{self.tax_input.get()}')
self.textarea.insert(END,f'\n Total Amount:\t\t\t{self.total.get()}')
self.textarea.insert(END, '\n=============================================================')
def save_bill(self):
op=messagebox.askyesno('Save Bill','Do you want to save the Bill')
if op>0:
self.bill_data=self.textarea.get(1.0,END)
f1=open('C:/Users/VIBHAV/Desktop/bills/'+str(self.bill_no.get())+'.txt','w')
f1.write(self.bill_data)
op=messagebox.showinfo('Saved',f'Bill No:{self.bill_no.get()} saved successfully')
f1.close()
def iprint(self):
q=self.textarea.get(1.0,'end-1c')
filename=tempfile.mktemp('.txt')
open(filename,'w').write(q)
os.startfile(filename,'print')
def find_bill(self):
found='no'
for i in os.listdir('C:/Users/VIBHAV/Desktop/bills/'):
if i.split('.')[0]==self.search_bill.get():
f1=open(f'C:/Users/VIBHAV/Desktop/bills/{i}','r')
self.textarea.delete(1.0,END)
for d in f1:
self.textarea.insert(END,d)
f1.close()
found='yes'
if found=='no':
messagebox.showerror('Error','Invalid Bill No')
def clear(self):
self.textarea.delete(1.0,END)
self.c_name.set('')
self.c_phone.set('')
self.c_email.set('')
x=random.randint(100,999)
self.bill_no.set(x)
self.product.set('')
self.search_bill.set('')
self.prices.set(0)
self.qty.set(0)
self.l=[]
self.total.set('')
self.sub_total.set('')
self.tax_input.set('')
self.welcome()
def welcome(self):
self.textarea.delete(1.0,END)
self.textarea.insert(END,'\t\t\tWELCOME')
self.textarea.insert(END,f'\n Bill Number:\t\t{self.bill_no.get()}')
self.textarea.insert(END,f'\n Customer Name:{self.c_name.get()}')
self.textarea.insert(END,f'\n Mobile Number:{self.c_phone.get()}')
self.textarea.insert(END,f'\n Customer Email:{self.c_email.get()}')
self.textarea.insert(END, '\n=============================================================')
self.textarea.insert(END,f'\n Products\t\t\tQTY\t\tPrice')
self.textarea.insert(END, '\n=============================================================\n')
def Categories(self,event=''):
if self.Combo_Category.get()=='Clothing':
self.ComboSubCategory.config(values=self.SubCatClothing)
self.ComboSubCategory.current(0)
if self.Combo_Category.get()=='LifeStyle':
self.ComboSubCategory.config(values=self.SubCatLifeStyle)
self.ComboSubCategory.current(0)
if self.Combo_Category.get()=='Mobiles':
self.ComboSubCategory.config(values=self.SubCatMobiles)
self.ComboSubCategory.current(0)
def Product_add(self,event=''):
if self.ComboSubCategory.get()=='Pant':
self.ComboProduct.config(values=self.pant)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='T-Shirt':
self.ComboProduct.config(values=self.T_shirt)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='Shirt':
self.ComboProduct.config(values=self.Shirt)
self.ComboProduct.current(0)
# LifeStyle
if self.ComboSubCategory.get()=='Bath Soap':
self.ComboProduct.config(values=self.Bath_soap)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='Face Cream':
self.ComboProduct.config(values=self.Face_cream)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='Hair Oil':
self.ComboProduct.config(values=self.Hair_oil)
self.ComboProduct.current(0)
# Mobile
if self.ComboSubCategory.get()=='Iphone':
self.ComboProduct.config(values=self.Iphone)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='Samsung':
self.ComboProduct.config(values=self.Samsung)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='Xiaomi':
self.ComboProduct.config(values=self.Xiaomi)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='RealMe':
self.ComboProduct.config(values=self.RealMe)
self.ComboProduct.current(0)
if self.ComboSubCategory.get()=='One+':
self.ComboProduct.config(values=self.OnePlus)
self.ComboProduct.current(0)
def price(self,event=''):
# pant
if self.ComboProduct.get()=='Levis':
self.ComboPrice.config(values=self.price_levis)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Mufti':
self.ComboPrice.config(values=self.price_mufti)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Sparky':
self.ComboPrice.config(values=self.price_sparky)
self.ComboPrice.current(0)
self.qty.set(1)
# T-Shirt
if self.ComboProduct.get()=='Polo':
self.ComboPrice.config(values=self.price_polo)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Roadster':
self.ComboPrice.config(values=self.price_Roadster)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Jack&Jones':
self.ComboPrice.config(values=self.price_JackJones)
self.ComboPrice.current(0)
self.qty.set(1)
# Shirt
if self.ComboProduct.get()=='Peter England':
self.ComboPrice.config(values=self.price_Peter)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Louis Phillipe':
self.ComboPrice.config(values=self.price_Louis)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Park Avenue':
self.ComboPrice.config(values=self.price_Park)
self.ComboPrice.current(0)
self.qty.set(1)
# Bath Soap
if self.ComboProduct.get()=='LifeBoy':
self.ComboPrice.config(values=self.price_life)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Lux':
self.ComboPrice.config(values=self.price_lux)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Santoor':
self.ComboPrice.config(values=self.price_santoor)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Pears':
self.ComboPrice.config(values=self.price_pears)
self.ComboPrice.current(0)
self.qty.set(1)
# Face Cream
if self.ComboProduct.get()=='Fair&Lovely':
self.ComboPrice.config(values=self.price_fair)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Ponds':
self.ComboPrice.config(values=self.price_ponds)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Olay':
self.ComboPrice.config(values=self.price_olay)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Garnier':
self.ComboPrice.config(values=self.price_garnier)
self.ComboPrice.current(0)
self.qty.set(1)
# Hair Oil
if self.ComboProduct.get()=='Parachute':
self.ComboPrice.config(values=self.price_para)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Jashmin':
self.ComboPrice.config(values=self.price_jashmin)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Bajaj':
self.ComboPrice.config(values=self.price_bajaj)
self.ComboPrice.current(0)
self.qty.set(1)
# iphone
if self.ComboProduct.get()=='Iphone_11':
self.ComboPrice.config(values=self.price_i11)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Iphone_12':
self.ComboPrice.config(values=self.price_i12)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Iphone_13':
self.ComboPrice.config(values=self.price_i13)
self.ComboPrice.current(0)
self.qty.set(1)
# Samsung
if self.ComboProduct.get()=='Samsung M16':
self.ComboPrice.config(values=self.price_sm16)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Samsung M12':
self.ComboPrice.config(values=self.price_sm12)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Samsung M21':
self.ComboPrice.config(values=self.price_sm21)
self.ComboPrice.current(0)
self.qty.set(1)
# Xiaomi
if self.ComboProduct.get()=='Redmi 11':
self.ComboPrice.config(values=self.price_r11)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Redmi 12':
self.ComboPrice.config(values=self.price_r12)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='Mi A3':
self.ComboPrice.config(values=self.price_mia3)
self.ComboPrice.current(0)
self.qty.set(1)
# RealMe
if self.ComboProduct.get()=='RealMe 12':
self.ComboPrice.config(values=self.price_rel12)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='RealMe 13':
self.ComboPrice.config(values=self.price_rel13)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='RealMe Pro':
self.ComboPrice.config(values=self.price_relpro)
self.ComboPrice.current(0)
self.qty.set(1)
# One+
if self.ComboProduct.get()=='OnePlus1':
self.ComboPrice.config(values=self.price_one1)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='OnePlus2':
self.ComboPrice.config(values=self.price_one2)
self.ComboPrice.current(0)
self.qty.set(1)
if self.ComboProduct.get()=='OnePlus3':
self.ComboPrice.config(values=self.price_one3)
self.ComboPrice.current(0)
self.qty.set(1)
if __name__=='__main__':
top=Tk()
obj=Bill_App(top)
top.mainloop()