um monte de coisas
This commit is contained in:
262
.gitignore
vendored
Normal file
262
.gitignore
vendored
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/python,flask
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=python,flask
|
||||||
|
|
||||||
|
### Flask ###
|
||||||
|
instance/*
|
||||||
|
!instance/.gitignore
|
||||||
|
.webassets-cache
|
||||||
|
.env
|
||||||
|
|
||||||
|
### Flask.Python Stack ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
#poetry.lock
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
#pdm.lock
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/#use-with-ide
|
||||||
|
.pdm.toml
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/#use-with-ide
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
|
||||||
|
### Python Patch ###
|
||||||
|
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
||||||
|
poetry.toml
|
||||||
|
|
||||||
|
# ruff
|
||||||
|
.ruff_cache/
|
||||||
|
|
||||||
|
# LSP config files
|
||||||
|
pyrightconfig.json
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/python,flask
|
||||||
5
Makefile
Normal file
5
Makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
install:
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
run:
|
||||||
|
python app.py
|
||||||
14
README.md
14
README.md
@@ -1 +1,15 @@
|
|||||||
# controles
|
# controles
|
||||||
|
|
||||||
|
## Para instalar
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Para executar
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make run
|
||||||
|
```
|
||||||
|
|
||||||
|
Acesse por: http://127.0.0.1:5000
|
||||||
|
|||||||
337
app.py
337
app.py
@@ -1,213 +1,262 @@
|
|||||||
from flask import Flask, request, render_template, redirect, url_for, jsonify
|
from flask import Flask, request, render_template, redirect, url_for
|
||||||
from functions.database import execute_query
|
from functions.database import execute_query
|
||||||
|
from functions.database import (
|
||||||
|
Base,
|
||||||
|
Militante,
|
||||||
|
CotaMensal,
|
||||||
|
TipoPagamento,
|
||||||
|
Pagamento,
|
||||||
|
MaterialVendido,
|
||||||
|
TipoMaterial,
|
||||||
|
VendaJornalAvulso,
|
||||||
|
engine,
|
||||||
|
AssinaturaAnual,
|
||||||
|
RelatorioCotasMensais,
|
||||||
|
RelatorioVendasMateriais,
|
||||||
|
engine,
|
||||||
|
)
|
||||||
|
from sqlalchemy import create_engine, and_
|
||||||
|
from sqlalchemy.orm import sessionmaker
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
Session = sessionmaker(bind=engine)
|
||||||
|
session = Session()
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def session_run(model):
|
||||||
|
session.add(model)
|
||||||
|
try:
|
||||||
|
session.commit()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
session.rollback()
|
||||||
|
|
||||||
|
|
||||||
# Rota para criar um novo militante
|
# Rota para criar um novo militante
|
||||||
@app.route('/militantes/novo', methods=['GET', 'POST'])
|
@app.route("/militantes/novo", methods=["GET", "POST"])
|
||||||
def novo_militante():
|
def novo_militante():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
nome = request.form['nome']
|
novo_militante = Militante(
|
||||||
cpf = request.form['cpf']
|
nome=request.form["nome"],
|
||||||
email = request.form['email']
|
cpf=request.form["cpf"],
|
||||||
telefone = request.form['telefone']
|
email=request.form["email"],
|
||||||
endereco = request.form['endereco']
|
telefone=request.form["telefone"],
|
||||||
filiado = request.form.get('filiado', False)
|
endereco=request.form["endereco"],
|
||||||
|
filiado=request.form.get("filiado", False),
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(novo_militante)
|
||||||
INSERT INTO militantes (nome, cpf, email, telefone, endereco, filiado)
|
# execute_query(query, (nome, cpf, email, telefone, endereco, filiado))
|
||||||
VALUES (%s, %s, %s, %s, %s, %s)
|
return redirect(url_for("listar_militantes"))
|
||||||
'''
|
|
||||||
execute_query(query, (nome, cpf, email, telefone, endereco, filiado))
|
return render_template("novo_militante.html")
|
||||||
return redirect(url_for('listar_militantes'))
|
|
||||||
|
|
||||||
return render_template('novo_militante.html')
|
|
||||||
|
|
||||||
# Rota para listar militantes
|
# Rota para listar militantes
|
||||||
@app.route('/militantes')
|
@app.route("/militantes")
|
||||||
def listar_militantes():
|
def listar_militantes():
|
||||||
query = 'SELECT * FROM militantes'
|
militantes = session.query(Militante).all()
|
||||||
militantes = execute_query(query)
|
return render_template("listar_militantes.html", militantes=militantes)
|
||||||
return render_template('listar_militantes.html', militantes=militantes)
|
|
||||||
|
|
||||||
# Rota para criar uma nova cota mensal
|
# Rota para criar uma nova cota mensal
|
||||||
@app.route('/cotas/novo', methods=['GET', 'POST'])
|
@app.route("/cotas/novo", methods=["GET", "POST"])
|
||||||
def nova_cota():
|
def nova_cota():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
militante_id = request.form['militante_id']
|
cotas_mensais = CotaMensal(
|
||||||
valor_antigo = request.form['valor_antigo']
|
militante_id=request.form["militante_id"],
|
||||||
valor_novo = request.form['valor_novo']
|
valor_antigo=request.form["valor_antigo"],
|
||||||
data_alteracao = request.form['data_alteracao']
|
valor_novo=request.form["valor_novo"],
|
||||||
|
data_alteracao=datetime.strptime(request.form["data_alteracao"], "%Y-%m-%d")
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(cotas_mensais)
|
||||||
INSERT INTO cotas_mensais (militante_id, valor_antigo, valor_novo, data_alteracao)
|
return redirect(url_for("listar_cotas"))
|
||||||
VALUES (%s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("nova_cota.html")
|
||||||
execute_query(query, (militante_id, valor_antigo, valor_novo, data_alteracao))
|
|
||||||
return redirect(url_for('listar_cotas'))
|
|
||||||
|
|
||||||
return render_template('nova_cota.html')
|
|
||||||
|
|
||||||
# Rota para listar cotas mensais
|
# Rota para listar cotas mensais
|
||||||
@app.route('/cotas')
|
@app.route("/cotas")
|
||||||
def listar_cotas():
|
def listar_cotas():
|
||||||
query = 'SELECT * FROM cotas_mensais'
|
cotas = session.query(CotaMensal).all()
|
||||||
cotas = execute_query(query)
|
return render_template("listar_cotas.html", cotas=cotas)
|
||||||
return render_template('listar_cotas.html', cotas=cotas)
|
|
||||||
|
|
||||||
# Rota para criar um novo pagamento
|
# Rota para criar um novo pagamento
|
||||||
@app.route('/pagamentos/novo', methods=['GET', 'POST'])
|
@app.route("/pagamentos/novo", methods=["GET", "POST"])
|
||||||
def novo_pagamento():
|
def novo_pagamento():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
militante_id = request.form['militante_id']
|
pagamentos = Pagamento(
|
||||||
tipo_pagamento_id = request.form['tipo_pagamento_id']
|
militante_id=request.form["militante_id"],
|
||||||
valor = request.form['valor']
|
tipo_pagamento_id=request.form["tipo_pagamento_id"],
|
||||||
data_pagamento = request.form['data_pagamento']
|
valor=request.form["valor"],
|
||||||
|
data_pagamento=datetime.strptime(request.form["data_pagamento"], "%Y-%m-%d")
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(pagamentos)
|
||||||
INSERT INTO pagamentos (militante_id, tipo_pagamento_id, valor, data_pagamento)
|
return redirect(url_for("listar_pagamentos"))
|
||||||
VALUES (%s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("novo_pagamento.html")
|
||||||
execute_query(query, (militante_id, tipo_pagamento_id, valor, data_pagamento))
|
|
||||||
return redirect(url_for('listar_pagamentos'))
|
|
||||||
|
|
||||||
return render_template('novo_pagamento.html')
|
|
||||||
|
|
||||||
# Rota para listar pagamentos
|
# Rota para listar pagamentos
|
||||||
@app.route('/pagamentos')
|
@app.route("/pagamentos")
|
||||||
def listar_pagamentos():
|
def listar_pagamentos():
|
||||||
query = 'SELECT * FROM pagamentos'
|
pagamentos = session.query(Pagamento).all()
|
||||||
pagamentos = execute_query(query)
|
return render_template("listar_pagamentos.html", pagamentos=pagamentos)
|
||||||
return render_template('listar_pagamentos.html', pagamentos=pagamentos)
|
|
||||||
|
|
||||||
# Rota para criar um novo material vendido
|
# Rota para criar um novo material vendido
|
||||||
@app.route('/materiais/novo', methods=['GET', 'POST'])
|
@app.route("/materiais/novo", methods=["GET", "POST"])
|
||||||
def novo_material():
|
def novo_material():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
militante_id = request.form['militante_id']
|
materiais_vendidos = MaterialVendido(
|
||||||
tipo_material_id = request.form['tipo_material_id']
|
militante_id=request.form["militante_id"],
|
||||||
descricao = request.form['descricao']
|
tipo_material_id=request.form["tipo_material_id"],
|
||||||
valor = request.form['valor']
|
descricao=request.form["descricao"],
|
||||||
data_venda = request.form['data_venda']
|
valor=request.form["valor"],
|
||||||
|
data_venda=datetime.strptime(request.form["data_venda"], "%Y-%m-%d"),
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(materiais_vendidos)
|
||||||
INSERT INTO materiais_vendidos (militante_id, tipo_material_id, descricao, valor, data_venda)
|
return redirect(url_for("listar_materiais"))
|
||||||
VALUES (%s, %s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("novo_material.html")
|
||||||
execute_query(query, (militante_id, tipo_material_id, descricao, valor, data_venda))
|
|
||||||
return redirect(url_for('listar_materiais'))
|
|
||||||
|
|
||||||
return render_template('novo_material.html')
|
|
||||||
|
|
||||||
# Rota para listar materiais vendidos
|
# Rota para listar materiais vendidos
|
||||||
@app.route('/materiais')
|
@app.route("/materiais")
|
||||||
def listar_materiais():
|
def listar_materiais():
|
||||||
query = 'SELECT * FROM materiais_vendidos'
|
materiais = session.query(MaterialVendido).all()
|
||||||
materiais = execute_query(query)
|
return render_template("listar_materiais.html", materiais=materiais)
|
||||||
return render_template('listar_materiais.html', materiais=materiais)
|
|
||||||
|
|
||||||
# Rota para criar uma nova venda de jornais avulsos
|
# Rota para criar uma nova venda de jornais avulsos
|
||||||
@app.route('/jornais/novo', methods=['GET', 'POST'])
|
@app.route("/jornais/novo", methods=["GET", "POST"])
|
||||||
def nova_venda_jornal():
|
def nova_venda_jornal():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
militante_id = request.form['militante_id']
|
vendas_jornais_avulsos = VendaJornalAvulso(
|
||||||
quantidade = request.form['quantidade']
|
militante_id=request.form["militante_id"],
|
||||||
valor_total = request.form['valor_total']
|
quantidade=request.form["quantidade"],
|
||||||
data_venda = request.form['data_venda']
|
valor_total=request.form["valor_total"],
|
||||||
|
data_venda=datetime.strptime(request.form["data_venda"], "%Y-%m-%d"),
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(VendaJornalAvulso)
|
||||||
INSERT INTO vendas_jornais_avulsos (militante_id, quantidade, valor_total, data_venda)
|
return redirect(url_for("listar_vendas_jornal"))
|
||||||
VALUES (%s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("nova_venda_jornal.html")
|
||||||
execute_query(query, (militante_id, quantidade, valor_total, data_venda))
|
|
||||||
return redirect(url_for('listar_vendas_jornal'))
|
|
||||||
|
|
||||||
return render_template('nova_venda_jornal.html')
|
|
||||||
|
|
||||||
# Rota para listar vendas de jornais avulsos
|
# Rota para listar vendas de jornais avulsos
|
||||||
@app.route('/jornais')
|
@app.route("/jornais")
|
||||||
def listar_vendas_jornal():
|
def listar_vendas_jornal():
|
||||||
query = 'SELECT * FROM vendas_jornais_avulsos'
|
vendas = session.query(VendaJornalAvulso).all()
|
||||||
vendas = execute_query(query)
|
return render_template("listar_vendas_jornal.html", vendas=vendas)
|
||||||
return render_template('listar_vendas_jornal.html', vendas=vendas)
|
|
||||||
|
|
||||||
# Rota para criar uma nova assinatura anual
|
# Rota para criar uma nova assinatura anual
|
||||||
@app.route('/assinaturas/novo', methods=['GET', 'POST'])
|
@app.route("/assinaturas/novo", methods=["GET", "POST"])
|
||||||
def nova_assinatura():
|
def nova_assinatura():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
militante_id = request.form['militante_id']
|
assinaturas_anuais = AssinaturaAnual(
|
||||||
tipo_material_id = request.form['tipo_material_id']
|
militante_id=request.form["militante_id"],
|
||||||
quantidade = request.form['quantidade']
|
tipo_material_id=request.form["tipo_material_id"],
|
||||||
valor_total = request.form['valor_total']
|
quantidade=request.form["quantidade"],
|
||||||
data_inicio = request.form['data_inicio']
|
valor_total=request.form["valor_total"],
|
||||||
data_fim = request.form['data_fim']
|
data_inicio=datetime.strptime(request.form["data_inicio"], "%Y-%m-%d"),
|
||||||
|
data_fim=datetime.strptime(request.form["data_fim"], "%Y-%m-%d")
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(assinaturas_anuais)
|
||||||
INSERT INTO assinaturas_anuais (militante_id, tipo_material_id, quantidade, valor_total, data_inicio, data_fim)
|
return redirect(url_for("listar_assinaturas"))
|
||||||
VALUES (%s, %s, %s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("nova_assinatura.html")
|
||||||
execute_query(query, (militante_id, tipo_material_id, quantidade, valor_total, data_inicio, data_fim))
|
|
||||||
return redirect(url_for('listar_assinaturas'))
|
|
||||||
|
|
||||||
return render_template('nova_assinatura.html')
|
|
||||||
|
|
||||||
# Rota para listar assinaturas anuais
|
# Rota para listar assinaturas anuais
|
||||||
@app.route('/assinaturas')
|
@app.route("/assinaturas")
|
||||||
def listar_assinaturas():
|
def listar_assinaturas():
|
||||||
query = 'SELECT * FROM assinaturas_anuais'
|
assinaturas = session.query(AssinaturaAnual).all()
|
||||||
assinaturas = execute_query(query)
|
return render_template("listar_assinaturas.html", assinaturas=assinaturas)
|
||||||
return render_template('listar_assinaturas.html', assinaturas=assinaturas)
|
|
||||||
|
|
||||||
# Rota para criar um novo relatório de cotas mensais
|
# Rota para criar um novo relatório de cotas mensais
|
||||||
@app.route('/relatorios/cotas/novo', methods=['GET', 'POST'])
|
@app.route("/relatorios/cotas/novo", methods=["GET", "POST"])
|
||||||
def novo_relatorio_cotas():
|
def novo_relatorio_cotas():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
setor_id = request.form['setor_id']
|
relatorio_cotas_mensais = RelatorioCotasMensais(
|
||||||
comite_id = request.form['comite_id']
|
setor_id=request.form["setor_id"],
|
||||||
total_cotas = request.form['total_cotas']
|
comite_id=request.form["comite_id"],
|
||||||
data_relatorio = request.form['data_relatorio']
|
total_cotas=request.form["total_cotas"],
|
||||||
|
data_relatorio=datetime.strptime(request.form["data_relatorio"], "%Y-%m-%d")
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(relatorio_cotas_mensais)
|
||||||
INSERT INTO relatorio_cotas_mensais (setor_id, comite_id, total_cotas, data_relatorio)
|
return redirect(url_for("listar_relatorios_cotas"))
|
||||||
VALUES (%s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("novo_relatorio_cotas.html")
|
||||||
execute_query(query, (setor_id, comite_id, total_cotas, data_relatorio))
|
|
||||||
return redirect(url_for('listar_relatorios_cotas'))
|
|
||||||
|
|
||||||
return render_template('novo_relatorio_cotas.html')
|
|
||||||
|
|
||||||
# Rota para listar relatórios de cotas mensais
|
# Rota para listar relatórios de cotas mensais
|
||||||
@app.route('/relatorios/cotas')
|
@app.route("/relatorios/cotas")
|
||||||
def listar_relatorios_cotas():
|
def listar_relatorios_cotas():
|
||||||
query = 'SELECT * FROM relatorio_cotas_mensais'
|
relatorios = session.query(RelatorioCotasMensais).all()
|
||||||
relatorios = execute_query(query)
|
return render_template("listar_relatorios_cotas.html", relatorios=relatorios)
|
||||||
return render_template('listar_relatorios_cotas.html', relatorios=relatorios)
|
|
||||||
|
|
||||||
# Rota para criar um novo relatório de vendas de materiais
|
# Rota para criar um novo relatório de vendas de materiais
|
||||||
@app.route('/relatorios/vendas/novo', methods=['GET', 'POST'])
|
@app.route("/relatorios/vendas/novo", methods=["GET", "POST"])
|
||||||
def novo_relatorio_vendas():
|
def novo_relatorio_vendas():
|
||||||
if request.method == 'POST':
|
if request.method == "POST":
|
||||||
setor_id = request.form['setor_id']
|
relatorio_vendas_materiais = RelatorioVendasMateriais(
|
||||||
comite_id = request.form['comite_id']
|
setor_id=request.form["setor_id"],
|
||||||
total_vendas = request.form['total_vendas']
|
comite_id=request.form["comite_id"],
|
||||||
data_relatorio = request.form['data_relatorio']
|
total_vendas=request.form["total_vendas"],
|
||||||
|
data_relatorio=datetime.strptime(request.form["data_relatorio"], "%Y-%m-%d")
|
||||||
|
)
|
||||||
|
|
||||||
query = '''
|
session_run(relatorio_vendas_materiais)
|
||||||
INSERT INTO relatorio_vendas_materiais (setor_id, comite_id, total_vendas, data_relatorio)
|
return redirect(url_for("listar_relatorios_vendas"))
|
||||||
VALUES (%s, %s, %s, %s)
|
|
||||||
'''
|
return render_template("novo_relatorio_vendas.html")
|
||||||
execute_query(query, (setor_id, comite_id, total_vendas, data_relatorio))
|
|
||||||
return redirect(url_for('listar_relatorios_vendas'))
|
|
||||||
|
|
||||||
return render_template('novo_relatorio_vendas.html')
|
|
||||||
|
|
||||||
# Rota para listar relatórios de vendas de materiais
|
# Rota para listar relatórios de vendas de materiais
|
||||||
@app.route('/relatorios/vendas')
|
@app.route("/relatorios/vendas")
|
||||||
def listar_relatorios_vendas():
|
def listar_relatorios_vendas():
|
||||||
query = 'SELECT * FROM relatorio_vendas_materiais'
|
relatorios = session.query(RelatorioVendasMateriais).all()
|
||||||
relatorios = execute_query(query)
|
return render_template("listar_relatorios_vendas.html", relatorios=relatorios)
|
||||||
return render_template('listar_relatorios_vendas.html', relatorios=relatorios)
|
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def home():
|
||||||
|
links = []
|
||||||
|
for rule in app.url_map.iter_rules():
|
||||||
|
# Filter out rules we can't navigate to in a browser
|
||||||
|
# and rules that require parameters
|
||||||
|
if "GET" in rule.methods and has_no_empty_params(rule):
|
||||||
|
url = url_for(rule.endpoint, **(rule.defaults or {}))
|
||||||
|
links.append((url, rule.endpoint))
|
||||||
|
l_html = ""
|
||||||
|
for l in links:
|
||||||
|
l_html += f'<a href="{l[0]}">{l[1].replace("_"," ")}</a><br>'
|
||||||
|
home_html = f"""
|
||||||
|
<p>Links</p>
|
||||||
|
{l_html}
|
||||||
|
"""
|
||||||
|
return home_html
|
||||||
|
|
||||||
|
|
||||||
|
def has_no_empty_params(rule):
|
||||||
|
defaults = rule.defaults if rule.defaults is not None else ()
|
||||||
|
arguments = rule.arguments if rule.arguments is not None else ()
|
||||||
|
return len(defaults) >= len(arguments)
|
||||||
|
|
||||||
|
|
||||||
# Iniciar o servidor Flask
|
# Iniciar o servidor Flask
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
|
|||||||
BIN
database.db
Normal file
BIN
database.db
Normal file
Binary file not shown.
@@ -1,8 +1,16 @@
|
|||||||
import mysql.connector
|
import mysql.connector
|
||||||
from mysql.connector import Error
|
from mysql.connector import Error
|
||||||
from config.db_config import db_config
|
# from config.db_config import db_config
|
||||||
|
from sqlalchemy import create_engine, Column, Integer, String, Boolean, Numeric, Date, ForeignKey
|
||||||
|
from sqlalchemy.orm import relationship
|
||||||
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
|
|
||||||
def get_db_connection():
|
Base = declarative_base()
|
||||||
|
|
||||||
|
engine = create_engine('sqlite:///database.db', echo=True)
|
||||||
|
Base = declarative_base()
|
||||||
|
|
||||||
|
def get_db_connection(db_config):
|
||||||
try:
|
try:
|
||||||
connection = mysql.connector.connect(**db_config)
|
connection = mysql.connector.connect(**db_config)
|
||||||
return connection
|
return connection
|
||||||
@@ -11,7 +19,7 @@ def get_db_connection():
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def execute_query(query, params=None):
|
def execute_query(query, params=None):
|
||||||
connection = get_db_connection()
|
connection = get_db_connection('')
|
||||||
if connection is None:
|
if connection is None:
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
@@ -25,4 +33,143 @@ def execute_query(query, params=None):
|
|||||||
finally:
|
finally:
|
||||||
if connection.is_connected():
|
if connection.is_connected():
|
||||||
cursor.close()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
class Militante(Base):
|
||||||
|
__tablename__ = 'militantes'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
nome = Column(String(100), nullable=False)
|
||||||
|
cpf = Column(String(14), unique=True)
|
||||||
|
email = Column(String(100), unique=True)
|
||||||
|
telefone = Column(String(15))
|
||||||
|
endereco = Column(String(255))
|
||||||
|
filiado = Column(Boolean, default=False)
|
||||||
|
|
||||||
|
cotas_mensais = relationship("CotaMensal", back_populates="militante")
|
||||||
|
pagamentos = relationship("Pagamento", back_populates="militante")
|
||||||
|
materiais_vendidos = relationship("MaterialVendido", back_populates="militante")
|
||||||
|
vendas_jornais = relationship("VendaJornalAvulso", back_populates="militante")
|
||||||
|
assinaturas = relationship("AssinaturaAnual", back_populates="militante")
|
||||||
|
|
||||||
|
class CotaMensal(Base):
|
||||||
|
__tablename__ = 'cotas_mensais'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
militante_id = Column(Integer, ForeignKey('militantes.id'))
|
||||||
|
valor_antigo = Column(Numeric(10, 2), nullable=False)
|
||||||
|
valor_novo = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_alteracao = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
militante = relationship("Militante", back_populates="cotas_mensais")
|
||||||
|
|
||||||
|
class TipoPagamento(Base):
|
||||||
|
__tablename__ = 'tipos_pagamento'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
descricao = Column(String(100), nullable=False)
|
||||||
|
|
||||||
|
pagamentos = relationship("Pagamento", back_populates="tipo_pagamento")
|
||||||
|
|
||||||
|
class Pagamento(Base):
|
||||||
|
__tablename__ = 'pagamentos'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
militante_id = Column(Integer, ForeignKey('militantes.id'))
|
||||||
|
tipo_pagamento_id = Column(Integer, ForeignKey('tipos_pagamento.id'))
|
||||||
|
valor = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_pagamento = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
militante = relationship("Militante", back_populates="pagamentos")
|
||||||
|
tipo_pagamento = relationship("TipoPagamento", back_populates="pagamentos")
|
||||||
|
|
||||||
|
class TipoMaterial(Base):
|
||||||
|
__tablename__ = 'tipos_materiais'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
descricao = Column(String(100), nullable=False)
|
||||||
|
|
||||||
|
materiais_vendidos = relationship("MaterialVendido", back_populates="tipo_material")
|
||||||
|
assinaturas = relationship("AssinaturaAnual", back_populates="tipo_material")
|
||||||
|
|
||||||
|
class MaterialVendido(Base):
|
||||||
|
__tablename__ = 'materiais_vendidos'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
militante_id = Column(Integer, ForeignKey('militantes.id'))
|
||||||
|
tipo_material_id = Column(Integer, ForeignKey('tipos_materiais.id'))
|
||||||
|
descricao = Column(String(255), nullable=False)
|
||||||
|
valor = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_venda = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
militante = relationship("Militante", back_populates="materiais_vendidos")
|
||||||
|
tipo_material = relationship("TipoMaterial", back_populates="materiais_vendidos")
|
||||||
|
|
||||||
|
class VendaJornalAvulso(Base):
|
||||||
|
__tablename__ = 'vendas_jornais_avulsos'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
militante_id = Column(Integer, ForeignKey('militantes.id'))
|
||||||
|
quantidade = Column(Integer, nullable=False)
|
||||||
|
valor_total = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_venda = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
militante = relationship("Militante", back_populates="vendas_jornais")
|
||||||
|
|
||||||
|
class AssinaturaAnual(Base):
|
||||||
|
__tablename__ = 'assinaturas_anuais'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
militante_id = Column(Integer, ForeignKey('militantes.id'))
|
||||||
|
tipo_material_id = Column(Integer, ForeignKey('tipos_materiais.id'))
|
||||||
|
quantidade = Column(Integer, nullable=False)
|
||||||
|
valor_total = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_inicio = Column(Date, nullable=False)
|
||||||
|
data_fim = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
militante = relationship("Militante", back_populates="assinaturas")
|
||||||
|
tipo_material = relationship("TipoMaterial", back_populates="assinaturas")
|
||||||
|
|
||||||
|
class Setor(Base):
|
||||||
|
__tablename__ = 'setores'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
nome = Column(String(100), nullable=False)
|
||||||
|
|
||||||
|
relatorios_cotas = relationship("RelatorioCotasMensais", back_populates="setor")
|
||||||
|
relatorios_vendas = relationship("RelatorioVendasMateriais", back_populates="setor")
|
||||||
|
|
||||||
|
class ComiteCentral(Base):
|
||||||
|
__tablename__ = 'comites_centrais'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
nome = Column(String(100), nullable=False)
|
||||||
|
|
||||||
|
relatorios_cotas = relationship("RelatorioCotasMensais", back_populates="comite")
|
||||||
|
relatorios_vendas = relationship("RelatorioVendasMateriais", back_populates="comite")
|
||||||
|
|
||||||
|
class RelatorioCotasMensais(Base):
|
||||||
|
__tablename__ = 'relatorio_cotas_mensais'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
setor_id = Column(Integer, ForeignKey('setores.id'))
|
||||||
|
comite_id = Column(Integer, ForeignKey('comites_centrais.id'))
|
||||||
|
total_cotas = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_relatorio = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
setor = relationship("Setor", back_populates="relatorios_cotas")
|
||||||
|
comite = relationship("ComiteCentral", back_populates="relatorios_cotas")
|
||||||
|
|
||||||
|
class RelatorioVendasMateriais(Base):
|
||||||
|
__tablename__ = 'relatorio_vendas_materiais'
|
||||||
|
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
setor_id = Column(Integer, ForeignKey('setores.id'))
|
||||||
|
comite_id = Column(Integer, ForeignKey('comites_centrais.id'))
|
||||||
|
total_vendas = Column(Numeric(10, 2), nullable=False)
|
||||||
|
data_relatorio = Column(Date, nullable=False)
|
||||||
|
|
||||||
|
setor = relationship("Setor", back_populates="relatorios_vendas")
|
||||||
|
comite = relationship("ComiteCentral", back_populates="relatorios_vendas")
|
||||||
|
|
||||||
|
Base.metadata.create_all(engine)
|
||||||
19
requirements.txt
Normal file
19
requirements.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
black==24.10.0
|
||||||
|
blinker==1.9.0
|
||||||
|
click==8.1.7
|
||||||
|
Flask==3.1.0
|
||||||
|
greenlet==3.1.1
|
||||||
|
importlib_metadata==8.5.0
|
||||||
|
itsdangerous==2.2.0
|
||||||
|
Jinja2==3.1.4
|
||||||
|
MarkupSafe==3.0.2
|
||||||
|
mypy-extensions==1.0.0
|
||||||
|
mysql-connector-python==9.1.0
|
||||||
|
packaging==24.2
|
||||||
|
pathspec==0.12.1
|
||||||
|
platformdirs==4.3.6
|
||||||
|
SQLAlchemy==2.0.36
|
||||||
|
tomli==2.2.1
|
||||||
|
typing_extensions==4.12.2
|
||||||
|
Werkzeug==3.1.3
|
||||||
|
zipp==3.21.0
|
||||||
@@ -33,5 +33,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -29,5 +29,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -31,5 +31,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -12,5 +12,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<a href="{{ url_for('novo_militante') }}">Adicionar Novo Militante</a>
|
<a href="{{ url_for('novo_militante') }}">Adicionar Novo Militante</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -29,5 +29,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -29,5 +29,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -29,5 +29,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -29,5 +29,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -34,5 +34,6 @@
|
|||||||
<button type="submit">Registrar Assinatura</button>
|
<button type="submit">Registrar Assinatura</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_assinaturas') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_assinaturas') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -26,5 +26,6 @@
|
|||||||
<button type="submit">Registrar Cota</button>
|
<button type="submit">Registrar Cota</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_cotas') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_cotas') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -26,5 +26,6 @@
|
|||||||
<button type="submit">Registrar Venda</button>
|
<button type="submit">Registrar Venda</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_vendas_jornal') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_vendas_jornal') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -30,5 +30,6 @@
|
|||||||
<button type="submit">Registrar Material</button>
|
<button type="submit">Registrar Material</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_materiais') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_materiais') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -15,5 +15,6 @@
|
|||||||
Filiado: <input type="checkbox" name="filiado"><br>
|
Filiado: <input type="checkbox" name="filiado"><br>
|
||||||
<input type="submit" value="Criar">
|
<input type="submit" value="Criar">
|
||||||
</form>
|
</form>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -26,5 +26,6 @@
|
|||||||
<button type="submit">Registrar Pagamento</button>
|
<button type="submit">Registrar Pagamento</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_pagamentos') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_pagamentos') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -26,5 +26,6 @@
|
|||||||
<button type="submit">Registrar Relatório</button>
|
<button type="submit">Registrar Relatório</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_relatorios_cotas') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_relatorios_cotas') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -26,5 +26,6 @@
|
|||||||
<button type="submit">Registrar Relatório</button>
|
<button type="submit">Registrar Relatório</button>
|
||||||
</form>
|
</form>
|
||||||
<a href="{{ url_for('listar_relatorios_vendas') }}">Voltar para Lista</a>
|
<a href="{{ url_for('listar_relatorios_vendas') }}">Voltar para Lista</a>
|
||||||
|
<a href="{{ url_for('home') }}">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user