{% extends "base.html" %} {% block title %}Tabelas de Preço - CapeServer{% endblock %} {% block content %}
Gerencie suas tabelas de preço por empresa
| Código | Nome | Empresa | Tipo | Cálculo | Ajuste % | Vigência | Prioridade | Status | Ações |
|---|---|---|---|---|---|---|---|---|---|
{{ tabela.codigo or '-' }} |
{{ tabela.nome }}
{% if tabela.descricao %}
{{ tabela.descricao[:50] }}{% if tabela.descricao|length > 50 %}...{% endif %} {% endif %} |
{% if tabela.empresa %} {% set nome_empresa_reduzido = tabela.empresa.nome_fantasia or tabela.empresa.nome or tabela.empresa.razao_social or ('Empresa ' ~ tabela.empresa.id) %} {{ nome_empresa_reduzido[:24] }}{% if nome_empresa_reduzido|length > 24 %}...{% endif %} {% else %} - {% endif %} | {% if tabela.tipo == 'padrao' %} Padrão {% elif tabela.tipo == 'promocao' %} Promoção {% elif tabela.tipo == 'atacado' %} Atacado {% elif tabela.tipo == 'especial' %} Especial {% else %} {{ tabela.tipo }} {% endif %} |
{% if tabela.tipo_calculo == 'fixo' %}
Fixo
{% elif tabela.tipo_calculo == 'percentual_aumento' %}
Aumento
{% if tabela.tabela_base %}
s/ {{ tabela.tabela_base.nome }} {% else %} s/ preço base {% endif %} {% elif tabela.tipo_calculo == 'percentual_desconto' %} Desconto {% if tabela.tabela_base %} s/ {{ tabela.tabela_base.nome }} {% else %} s/ preço base {% endif %} {% endif %} |
{% if tabela.percentual_ajuste %} {{ "%.2f"|format(tabela.percentual_ajuste) }}% {% else %} - {% endif %} | {% if tabela.data_inicio or tabela.data_fim %} {% if tabela.data_inicio %}{{ tabela.data_inicio.strftime('%d/%m/%Y') }}{% else %}...{% endif %} até {% if tabela.data_fim %}{{ tabela.data_fim.strftime('%d/%m/%Y') }}{% else %}...{% endif %} {% if tabela.esta_vigente() %} Vigente {% endif %} {% else %} Sem limite {% endif %} | {{ tabela.prioridade }} | {% if tabela.ativo %} Ativo {% else %} Inativo {% endif %} | |
|
Nenhuma tabela de preço cadastrada Criar Primeira Tabela |
|||||||||