{% extends 'MDS/GreenPatioBundle/base-events.html.twig' %}
{% block pagetitleinterno %}
<div class="page-title">
<h4><i class="icon-calendar3 position-left"></i> <span class="text-semibold">{% trans %}Events{% endtrans %}</span></h4>
</div>
{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumb">
<li><a href="/"><i class="icon-home2 position-left"></i>{% trans %}Home{% endtrans %}</a></li>
</ul>
{% endblock %}
{% block contentProposal %}
{% for flashMessage in app.session.flashbag.get('mensajeproposaldestinationservices') %}
<div class="hidden alertFlashMensaje" data-mensaje="{{ flashMessage }}"></div>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('mensajeproposaldestinationserviceserror') %}
<div class="hidden alertFlashMensajeError" data-mensajeerror="{{ flashMessage }}"></div>
{% endfor %}
<div class="proposals" id="proposal-add">
{#<div class="container">#}
<div class="row">
{#<input type="hidden" value="{{ idLounges }}" id="idLounges" name="idLounges">#}
<input type="hidden" value="{{ loungesBoolToInvoice }}" id="loungesBoolToInvoice" name="loungesBoolToInvoice">
<div class="col-xs-12">
<div class="panel">
<div class="panel-heading bg-teal-300" style="height: 60px">
<div class="col-sm-10">
<h5 class="panel-title">{% trans %}Add Payments{% endtrans %}</h5>
</div>
{#<a target="_self" class="btn bg-green-800 btn-block icon-file-empty padding-3" href="/reservations-greenpatio/editsimple/{{ id }}"></a>#}
<div class="col-sm-2">
<a target="_self" class="btn bg-green-800 btn-block padding-3" href="/reservations-greenpatio/editsimple/{{ id }}">Volver a la reserva</a>
</div>
</div>
<div class="panel-body">
<div class="col-xs-12">
{{ form_start(form, { 'attr' : {'class': 'form-horizontal', 'novalidate': 'novalidate', 'role' : 'form', 'autocomplete': 'off'} }) }}
{{ form_widget(form.reservationId, { 'attr' : {'class' : 'form-control hidden' } }) }}
{#<input type="hidden" value="{{ id }}" id="reservationId" name="reservationId">#}
<div class="col-md-3">
<div class="form-group form-group-material {% if form_errors(form.amount)|length > 0 %}has-error{% endif %}">
<label class="control-label is-visible">
{{ form_label(form.amount, 'Amount', {'label_attr': {'class': 'control-label is-visible'}}) }}
</label>
<div class="input-group col-lg-11 col-xs-11">
{{ form_widget(form.amount, {'attr': { 'class': 'form-control', 'placeholder' : '0.00'}}) }}
</div>
<span class="help-block">{{ form_errors(form.amount) }}</span>
</div>
</div>
<div class="col-md-3" >
<div class="form-group form-group-material {% if form_errors(form.datePayAt)|length > 0 %}has-error{% endif %}">
<label class="control-label is-visible">
{{ form_label(form.datePayAt, 'Date payment', {'label_attr': {'class': 'control-label is-visible'}}) }}
</label>
<div class="input-group col-lg-11 col-xs-11">
{{ form_widget(form.datePayAt, {'attr': { 'class': 'form-control', 'placeholder' : '0.00'}}) }}
</div>
<span class="help-block">{{ form_errors(form.datePayAt) }}</span>
</div>
</div>
<div class="col-md-4" >
<div class="form-group form-group-material {% if form_errors(form.wayToPay)|length > 0 %}has-error{% endif %}">
<label class="control-label is-visible">
{{ form_label(form.wayToPay, 'Way To Pay', {'label_attr': {'class': 'control-label is-visible'}}) }}
</label>
<div class="input-group col-lg-11 col-xs-11">
{{ form_widget(form.wayToPay, {'attr': { 'class': 'form-control'}}) }}
</div>
<span class="help-block">{{ form_errors(form.wayToPay) }}</span>
</div>
</div>
<div class="col-md-2" style="padding-top: 32px; padding-left: 15px;padding-right: 15px">
<div class="form-group form-group-material">
<div class="input-group teal">
<span class="input-group-addon bg-teal-800"><i class="icon-floppy-disk"></i></span>
{{ form_widget(form.save, {'label' : 'Save', 'attr': {'class': 'btn bg-teal-600 btn-block'}}) }}
</div>
</div>
</div>
{{ form_end(form) }}
</div>
{% if payments is not empty %}
<div class="col-xs-12">
<hr>
</div>
<div class="col-xs-12">
<div class="col-sm-3">
{% trans %}Amount{% endtrans %}:
</div>
<div class="col-sm-3">
{% trans %}Date payment{% endtrans %}:
</div>
<div class="col-sm-5">
{% trans %}Way to Pay{% endtrans %}:
</div>
<div class="col-sm-1 text-center">
{% trans %}Deleted{% endtrans %}:
</div>
</div>
<div class="col-xs-12 margen-10">
{% for pay in payments %}
<div class="col-sm-3 margen-5">
{{ pay.amount|number_format(2, '.', ',') }}
</div>
<div class="col-sm-3 margen-5">
{{ pay.datePayAt|date('d/m/Y') }}
</div>
<div class="col-sm-5 margen-5">
{{ pay.waytopay }}
</div>
<div class="col-sm-1 margen-5">
<a target="_self" class="btn bg-danger-300 btn-block icon-trash padding-3" href="/reservations-greenpatio/payment/delete/{{ pay.id }}"></a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
<div class="panel">
<div class="panel-heading bg-teal-300" style="height: 60px">
<div class="col-sm-10">
<h5 class="panel-title">{% trans %}Agregar Proforma de deposito{% endtrans %}</h5>
</div>
<div class="col-sm-2">
<a target="_self" class="btn bg-green-800 btn-block padding-3" href="/reservations-greenpatio/editsimple/{{ id }}">Volver a la reserva</a>
</div>
</div>
<div class="panel-body">
<div class="col-xs-12" style="margin-left: 10px">
{#href="/reservations-greenpatio/editsimple/#}
<form name="AddDepositInvoice" method="post" action="/reservations-greenpatio/reservations/newinvoicedeposit/proforma/{{ id }}" class="form-horizontal" autocomplete="off">
<div class="col-md-5">
<div class="form-group form-group-material">
<input type="text" id="invoice_deposit_name" name="invoicedep[name]" class="form-control input-sombra input-lg" placeholder="Concepto">
</div>
</div>
{#<div class="col-md-3 margen-5">#}
{#<div class="form-group form-group-material">#}
{#<input type="text" id="invoice_deposit_datePayAt" name="invoicedep[datePayAt]" class="form-control input-sombra input-lg" placeholder="Fecha">#}
{#</div>#}
{#</div>#}
<div class="col-md-2" style="margin-left: 20px">
<div class="form-group form-group-material">
<input type="text" id="invoice_deposit_amount" name="invoicedep[amount]" class="form-control input-sombra input-lg" placeholder="{% trans %}Amount{% endtrans %}">
</div>
</div>
<div class="col-md-1" style="margin-left: 20px">
<div class="form-group form-group-material">
<input type="text" id="invoice_deposit_iva" name="invoicedep[iva]" class="form-control input-sombra input-lg" placeholder="{% trans %}Iva{% endtrans %}(%)">
</div>
</div>
<div class="col-md-3" style="margin-left: 20px">
<div class="form-group form-group-material">
<button type="submit" id="invoice_deposit_sumit" name="invoicedep[send]" class="btn bg-orange-300 btn-block btn-lg">{% trans %}Generar Proforma de deposito{% endtrans %}</button>
</div>
</div>
</form>
</div>
{% if allInvoiceDeposit is not empty %}
<div class="col-xs-12">
<hr>
</div>
<div class="col-xs-12">
<div class="col-sm-7">
{% trans %}Concepto{% endtrans %}:
</div>
{#<div class="col-sm-3">#}
{#{% trans %}Date{% endtrans %}:#}
{#</div>#}
<div class="col-sm-3">
{% trans %}Amount{% endtrans %}:
</div>
<div class="col-sm-1">
{% trans %}IVA{% endtrans %}:
</div>
<div class="col-sm-1 text-center">
{% trans %}Action{% endtrans %}:
</div>
</div>
<div class="col-xs-12 margen-10">
{% for pay in allInvoiceDeposit %}
<div class="col-sm-7 margen-5">
{{ pay.name }}
</div>
{#<div class="col-sm-3 margen-5">#}
{#{{ pay.dateAt|date('d/m/Y') }}#}
{#</div>#}
<div class="col-sm-3 margen-5">
{{ pay.amount|number_format(2, '.', ',') }}
</div>
<div class="col-sm-1 margen-5">
{{ pay.iva }} %
</div>
<div class="col-sm-1 margen-5">
<a target="_self" class="btn bg-success-600 btn-block padding-3" href="/reservations-greenpatio/reservations/newinvoicedeposit/viewproforma/{{ pay.itemId }}">Ir</a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript" src="{{ asset('assets/js/plugins/editors/summernote/summernote.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/plugins/forms/styling/switchery.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/pages/proposal/switchery-proposal.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/plugins/forms/selects/select2.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/pages/components_popups.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/plugins/notifications/sweet_alert.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/pages/greenpatio/proforma-invoice-reservation.js') }}"></script>
{% endblock %}