def buy(): name3=s5.get() name3=fruitshop.fruit(name3) if(var3.get()=='Apple'): fruitshop.fruit.buy(name3,'Apple',s6.get()) if(var3.get()=='Mango'): fruitshop.fruit.buy(name3,'Mango',s6.get()) messagebox.showinfo('buy fruits','successful bought')
def buy(): name3 = a5.get() name3 = fruitshop.fruit(name3) if (a5.get() in fruitshop.fruit.e): if (var3.get() == "mango"): fruitshop.fruit.buy(name3, "mango", a6.get()) if (var3.get() == "kiwi"): fruitshop.fruit.sell(name3, "kiwi", a6.get()) messagebox.showinfo("buy sucesss!", "Fruits succesfully bought!!") else: messagebox.showerror("Authentication error", "Employee unregistered")
def sell(): name2=s3.get() name2=fruitshop.fruit(name2) if(var2.get()=='Apple'): if(s4.get()>fruitshop.fruit.apple): messagebox.showerror('sellapple',str(s4.get())+' apples are not available') if(s4.get()<=fruitshop.fruit.apple): fruitshop.fruit.sell(name2,'Apple',s4.get()) messagebox.showinfo('sell fruits','successfully sold') if(var2.get()=='Mango'): if(s4.get()>fruitshop.fruit.mango): messagebox.showerror('sell mango',str(s4.get())+' mangoes are not available') if(s4.get()<=fruitshop.fruit.mango): fruitshop.fruit.sell(name2,'Mango',s4.get()) messagebox.showinfo('sell fruits','successfully sold')
def sell(): name2 = a3.get() name2 = fruitshop.fruit(name2) if (a3.get() in fruitshop.fruit.e): if (var2.get() == "mango"): if (fruitshop.fruit.mango < a4.get()): messagebox.showerror("no stock", "mangoes out of stock!!") if (fruitshop.fruit.mango >= a4.get()): fruitshop.fruit.sell(name2, "mango", a4.get()) messagebox.showinfo("sell manoges", "successfuly sold mangoes!") if (var2.get() == "kiwi"): if (fruitshop.fruit.kiwi < a4.get()): messagebox.showerror("no stock", "kiwi fruits out of stock!!") if (fruitshop.fruit.mango <= a4.get()): fruitshop.fruit.sell(name2, "kiwi", a4.get()) messagebox.showinfo("sell kiwi!", "successfuly sold kiwi!") else: messagebox.showerror("Authentication error", "Employee unregistered!!")
def done2(): name = a1.get() name = fruitshop.fruit(a1.get(), a2.get()) messagebox.showinfo("Employee Added", "succesfully added") fruitshop.fruit.e.append(a1.get())
def done1(): name=s1.get() name=fruitshop.fruit(s1.get(),s2.get()) messagebox.showinfo('Added employe','successfully added')