{% extends "cliente/base.php" %} {% block body %}

Plano: {{planoCliente.getIdPlanos is empty ? "" : planoCliente.getIdPlanos.getNome}} {{planoCliente.getIdPlanos is empty or planoCliente.getIdCreditos is empty ? "" : " | "}} {{planoCliente.getIdCreditos is empty ? "" : planoCliente.getIdCreditos.getQtd ~ " Créditos/mês"}}

{%if planoCliente != null%} {%endif%}
{%if planoCliente != null%} {%if planoCliente.getStatus == 'new'%} Novo {%endif%} {%if planoCliente.getStatus == 'active'%} Ativo {%endif%} {%if planoCliente.getStatus == 'new_charge'%} Cobrança enviada {%endif%} {%if planoCliente.getStatus == 'canceled'%} Cancelado {%endif%} {%if planoCliente.getStatus == 'expired'%} Expirado {%endif%} {%else%} {% if planoTeste %} Plano de teste {%else%} Nenhum plano ativo {%endif%} {%endif%}
Último pagamento: {{planoCliente.getPagamentos[planoCliente.getPagamentos|length-1].getData is empty ? "--/--/----" : planoCliente.getPagamentos[planoCliente.getPagamentos|length-1].getData|date("d/m/Y")}}
Vencimento: {%if planoTeste%} {{planoTeste.getDataVencimento is empty ? "--/--/----" : planoTeste.getDataVencimento|date("d/m/Y")}} {%else%} {{planoCliente.getDataVencimento is empty ? "--/--/----" : planoCliente.getDataVencimento|date("d/m/Y")}} {%endif%}
Valor: R$ {{planoCliente.getValor is empty ? "--,--" : (planoCliente.getValor + planoCliente.getIdCreditos.getValor)|number_format(2, ',', '.')}}/Mês
{%if planoCliente != null %} {%if planoCliente.getStatus == 'new' %} {%endif%} {%if planoCliente.getStatus == 'active' %} Cancelar plano {%endif%} {%if planoCliente.getStatus == 'new_charge' %} {%endif%} {%if planoCliente.getStatus == 'canceled' %} {%if 'now'|date('U') > planoCliente.getDataVencimento|date('U')%} Contratar Plano {%else%} Reativar Plano {%endif%} {%endif%} {%if planoCliente.getStatus == 'expired' %} Contratar Plano {%endif%} {%else%} Contratar Plano {%endif%}
{%if planoCliente.getStatus == 'active' %} Alterar pagamento {%endif%}

Últimos Pagamentos

# Data Status Descrição Valor Tipo
{% endblock %} {% block scripts %} {% endblock %}