{% extends 'base.html.twig' %}

{% block title %}Transaction index{% endblock %}

{% block body %}
    <h1>Transaction index</h1>

    <table class="table">
        <thead>
            <tr>
                <th>Id</th>
                <th>TitulaireCompte</th>
                <th>Nom</th>
                <th>Prenom</th>
                <th>DateNaissance</th>
                <th>Telephone</th>
                <th>TypeDocumentIdentification</th>
                <th>IsDocumentIdentification</th>
                <th>NumeroDocumentIdentification</th>
                <th>ValiditeDocumentIdentification</th>
                <th>ElementOperation</th>
                <th>IsTelephoneValidator</th>
                <th>TypeOperation</th>
                <th>Civility</th>
                <th>FirstName</th>
                <th>Surname</th>
                <th>DateBirth</th>
                <th>Phone</th>
                <th>Phone2</th>
                <th>IsPhone</th>
                <th>IsIdentificationdocument</th>
                <th>TypeOfIdentificationDocument</th>
                <th>IdentificationDocumentNumber</th>
                <th>IdentificationDocumentValidity</th>
                <th>TypeOfOperation</th>
                <th>DomiciliationInstitution</th>
                <th>AccountType</th>
                <th>AccountAction</th>
                <th>Amount</th>
                <th>AccountProprietor</th>
                <th>AccountNumber</th>
                <th>CardType</th>
                <th>CardAction</th>
                <th>CardProprietor</th>
                <th>CardNumber</th>
                <th>Currency</th>
                <th>Status</th>
                <th>DateCreated</th>
                <th>UserBank</th>
                <th>UserAgency</th>
                <th>actions</th>
            </tr>
        </thead>
        <tbody>
        {% for transaction in transactions %}
            <tr>
                <td>{{ transaction.id }}</td>
                <td>{{ transaction.titulaireCompte }}</td>
                <td>{{ transaction.nom }}</td>
                <td>{{ transaction.prenom }}</td>
                <td>{{ transaction.dateNaissance ? transaction.dateNaissance|date('Y-m-d') : '' }}</td>
                <td>{{ transaction.telephone }}</td>
                <td>{{ transaction.typeDocumentIdentification }}</td>
                <td>{{ transaction.isDocumentIdentification ? 'Yes' : 'No' }}</td>
                <td>{{ transaction.numeroDocumentIdentification }}</td>
                <td>{{ transaction.validiteDocumentIdentification ? transaction.validiteDocumentIdentification|date('Y-m-d') : '' }}</td>
                <td>{{ transaction.elementOperation }}</td>
                <td>{{ transaction.isTelephoneValidator ? 'Yes' : 'No' }}</td>
                <td>{{ transaction.typeOperation }}</td>
                <td>{{ transaction.civility }}</td>
                <td>{{ transaction.firstName }}</td>
                <td>{{ transaction.surname }}</td>
                <td>{{ transaction.dateBirth ? transaction.dateBirth|date('Y-m-d') : '' }}</td>
                <td>{{ transaction.phone }}</td>
                <td>{{ transaction.phone2 }}</td>
                <td>{{ transaction.isPhone ? 'Yes' : 'No' }}</td>
                <td>{{ transaction.isIdentificationdocument ? 'Yes' : 'No' }}</td>
                <td>{{ transaction.typeOfIdentificationDocument }}</td>
                <td>{{ transaction.identificationDocumentNumber }}</td>
                <td>{{ transaction.identificationDocumentValidity ? transaction.identificationDocumentValidity|date('Y-m-d') : '' }}</td>
                <td>{{ transaction.typeOfOperation }}</td>
                <td>{{ transaction.domiciliationInstitution }}</td>
                <td>{{ transaction.accountType }}</td>
                <td>{{ transaction.accountAction }}</td>
                <td>{{ transaction.amount }}</td>
                <td>{{ transaction.accountProprietor }}</td>
                <td>{{ transaction.accountNumber }}</td>
                <td>{{ transaction.cardType }}</td>
                <td>{{ transaction.cardAction }}</td>
                <td>{{ transaction.cardProprietor }}</td>
                <td>{{ transaction.cardNumber }}</td>
                <td>{{ transaction.currency }}</td>
                <td>{{ transaction.status }}</td>
                <td>{{ transaction.dateCreated ? transaction.dateCreated|date('Y-m-d H:i:s') : '' }}</td>
                <td>{{ transaction.userBank }}</td>
                <td>{{ transaction.userAgency }}</td>
                <td>
                    <a href="{{ path('app_transaction_show', {'id': transaction.id}) }}">show</a>
                    <a href="{{ path('app_transaction_edit', {'id': transaction.id}) }}">edit</a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="41">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <a href="{{ path('app_transaction_new') }}">Create new</a>
{% endblock %}
