def bill(): name3 = a5.get() name3 = parking.park(name3) if (a5.get() in parking.park.e): if (var3.get() == "two"): if (parking.park.two == 0): messagebox.showerror("Error", "No vehicles parked yet!!") else: if (a9.get() in parking.park.n): parking.park.bill(name3, "two", a9.get(), a6.get()) messagebox.showinfo( "Billing", "Billing done succesfully!!\n total=" + str(parking.park.twocost)) else: messagebox.showinfo("Error", "vehicle is not in parking lot") if (var3.get() == "four"): if (parking.park.two == 0): messagebox.showerror("Error", "No vehicles parked yet!!") else: if (a9.get() in parking.park.n): parking.park.bill(name3, "four", a9.get(), a6.get()) messagebox.showinfo( "Billing", "Billing done succesfully!!\n total=" + str(parking.park.fourcost)) else: messagebox.showerror("Error", "Vehicle is not in parking lot") else: messagebox.showerror("Autentication Error", "Employee Unregistered")
def park(): reg_no = request.args.get("carnumber") color = request.args.get("color") response = parking.park(reg_no, color) return response
def count(): name2 = a3.get() name2 = parking.park(name2) parking.park.n.append(a4.get()) if (a3.get() in parking.park.e): if (var2.get() == "two"): if (a4.get() in parking.park.n): parking.park.count(name2, "two", a4.get()) messagebox.showinfo("park vehicle", "successfuly parked!!") if (var2.get() == "four"): if (a4.get() in parking.park.n): parking.park.count(name2, "four", a4.get()) messagebox.showinfo("park vehicle", "successfuly parked!") else: messagebox.showerror("Authentication Error", "Employee Unregistered")
def bill(): name1 = s1.get() if name1 in parking.park.e: name1 = parking.park(name1) if (var1.get() == '2 Wheeler'): parking.park.bill(name1, 'twowheel', s2.get()) messagebox.showinfo( 'Bill', 'Vehicle \t Hours \t Amount(per hour)\n' + str(var1.get()) + '\t ' + str(s2.get()) + '\t $20\n\n\t\tTotal = $' + str(parking.park.tbill)) if (var1.get() == '4 Wheeler'): parking.park.bill(name1, 'fourwheel', s2.get()) messagebox.showinfo( 'Bill', 'Vehicle \t hours \t Amount(per hour)\n' + str(var1.get()) + '\t ' + str(s2.get()) + '\t $40\n\n\t\tTotal = $' + str(parking.park.tbill)) parking.park.total(name1) else: messagebox.showwarning( 'Authentication error', 'Authentication error\n' + s1.get() + ' is not an employee')
def done2(): name = a1.get() name = parking.park(a1.get(), a2.get()) messagebox.showinfo("Employee Added", "succesfully added") parking.park.e.append(a1.get())
def add(): name = s1.get() name = parking.park(name, s2.get()) messagebox.showinfo('Added employee', 'Successfully added')