Coder Social home page Coder Social logo

sunayanajindal / restaurant-management-system Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 244 KB

An interactive python code using libraries as Flask, Flask-Session, SQLAlchemy where people can order food for pickup from the menu items that are persisted in a MySQL Database and displays output via command line.

Python 100.00%
flask flask-sqlalchemy flask-session mysql

restaurant-management-system's Introduction

Assignment 3B โ€“ Flask and SQLAlchemy

Signup, Login, Logout

  • Every customer will have his/her own account and new customers have the ability to create new ones.
  • These accounts are stored in sign_up database
  • Non logged in users can only access signup and login routes

Display Menu

  • The menu is read from a csv file and stored in the menu database.
  • Menu is in format ("Item no.", "Half plate price", "Full plate price")
  • It is displayed in tab separated format after the user login.

Adding Items to the Menu

  • One static account for chef have been created.
  • Only the user who login with the chef's username is allowed to add new items in the menu.

Input

The user is first prompted to input the number of dishes that he wishes to order

  • The user has the input the Item no, plate type and the quantity for each item.
  • The input for tip is to be entered along with a percentage sign (%)

Test your luck event

The user is asked to enter whether he/she wants to participate in the event. The input should be in small case letters as "yes" or "no"

  • If "yes", a random number is generated that computes the discount or increase amount on the overall bill
  • The pattern is printed only in the case when user inputs "yes"
  • If user inputs "no", the discount amount is set to 0.00 and directly the bill is generated.
  • The increase amount is a positive value. Hence, no sign is displayed before it.
  • The discount amount is displayed with a negative sign.

Bill

  • The total breakdown of the bill (Including the tip) is displayed in the specified format and all the values are rounded upto 2 decimal places.
  • The bill details and the transaction ID is saved in the transaction and bill table corresponding to the username.

View previous bill statements

  • The user will be displayed all the past bill record transaction IDs.
  • Thw user is asked to select a ID and the bill corresponding to it is displayed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.