Exemplo n.º 1
0
def view_report():
    if 'user' in session:
        m = move_product.Move()
        loc = m.get_location()
        pro = m.get_product()
        m = move_product.Move()
        r = m.view_record()

        return render_template("view_report.html", report=r, lc=loc, po=pro)
    else:
        return redirect(url_for('index'))
Exemplo n.º 2
0
def view_move():
    if 'user' in session:
        m = move_product.Move()
        loc = m.get_location()
        pro = m.get_product()
        m = move_product.Move()
        r = m.view_movement()
        value = Markup(r)

        return render_template("view_move.html", report=value, lc=loc, po=pro)
    else:
        return redirect(url_for('index'))
Exemplo n.º 3
0
def add_movement():
    if 'user' in session:
        if request.method == 'POST':
            f = request.form['from']
            t = request.form['to']
            pro = request.form['pro']
            q = request.form['qty']
            m = move_product.Move()
            f = m.insert(f, t, pro, q)
            m = move_product.Move()
            loc = m.get_location()
            pro = m.get_product()
            return render_template("home.html", lc=loc, po=pro, flag=f)
    else:
        return redirect(url_for('index'))
Exemplo n.º 4
0
def home():
    if 'user' in session:
        m = move_product.Move()
        loc = m.get_location()
        pro = m.get_product()
        return render_template("home.html", lc=loc, po=pro)
    else:
        return redirect(url_for('index'))
Exemplo n.º 5
0
def show():
    if 'user' in session:
        m = move_product.Move()
        loc = m.get_location()
        pro = m.get_product()
        a = p_management.product()
        s = a.p_show()
        value = Markup(s)
        return render_template("pshow.html", str=value, lc=loc, po=pro)
    else:
        return redirect(url_for('index'))
Exemplo n.º 6
0
def update_movement():
    if 'user' in session:
        if request.method == 'POST':
            f = request.form['from']
            t = request.form['to']
            mid = request.form['mid']
            q = request.form['qty']

            m = move_product.Move()
            r = m.update_movement(f, t, q, mid)

        return redirect(url_for('view_move'))
    else:
        return redirect(url_for('index'))
Exemplo n.º 7
0
def add_product():
    if 'user' in session:
        if request.method == 'POST':
            p_name = request.form['p_name']
            p_type = request.form['type']
            p_weight = request.form['weight']

            a = p_management.product()
            f = a.p_add(p_name, p_type, p_weight)

            m = move_product.Move()
            loc = m.get_location()
            pro = m.get_product()
            return render_template("home.html", lc=loc, po=pro, flag=f)
    else:
        return redirect(url_for('index'))