{% 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

{% for pg in pagamentos %} {%endfor%}
# Data Status Descrição Valor Tipo
{{pg.getChargeId}} {{pg.getData|date("d/m/Y")}} {% if pg.getStatus == 'new' %} NOVO {% elseif pg.getStatus == 'waiting' %} AGUARDANDO PAGAMENTO {% elseif pg.getStatus == 'paid' %} PAGAMENTO APROVADO {% elseif pg.getStatus == 'approved' %} PAGAMENTO APROVADO {% elseif pg.getStatus == 'unpaid' %} PAGAMENTO NÃO APROVADO {% elseif pg.getStatus == 'refunded' %} PAGAMENTO DEVOLVIDO {% elseif pg.getStatus == 'contested' %} PAGAMENTO EM CONTESTAÇÃO {% elseif pg.getStatus == 'canceled' %} COBRANÇA CANCELADA {% elseif pg.getStatus == 'settled' %} PAGAMENTO APROVADO {% endif %} {% if pg.getIdPlanos != null %} Plano {{pg.getIdPlanos.getNome}} {% endif %} {% if pg.getIdCreditos != null %} {{pg.getCreditos}} Créditos {% endif %} {% if pg.getIdPlanosClientes != null %} {{pg.getIdPlanosClientes.getIdPlanos is empty ? "" : pg.getIdPlanosClientes.getIdPlanos.getNome}} {{pg.getIdPlanosClientes.getIdPlanos is empty or pg.getIdPlanosClientes.getIdCreditos is empty ? "" : " | "}} {{pg.getIdPlanosClientes.getIdCreditos is empty ? "" : pg.getIdPlanosClientes.getIdCreditos.getQtd ~ " Créditos/mês"}} {% endif %} R$ {{pg.getValor|number_format(2, ',', '.')}} {{pg.getTipo == "PIX" ? "BOLETO/PIX" : pg.getTipo}} {% if (pg.getTipo == 'PIX') and (pg.getStatus == 'waiting' or pg.getStatus == 'unpaid')%} Pagar {% endif %}
{% endblock %} {% block scripts %} {% endblock %}