<div class="row">
<div class="col">
<h2>Adresse de facturation</h2>
</div>
{% if company.billingAddress is null and company.locked == 0 %}
<div class="pr-3">
<a href="{{ path('billing_address_new', {'id_company': company.id}) }}" class="btn btn-sm btn-secondary">
<i class="fa fa-plus"></i> Ajouter une adresse de facturation
</a>
</div>
{% endif %}
</div>
{% if company.billingAddress is null %}
<div class="alert alert-secondary" role="alert">
Vous n'avez pas encore défini d'adresse de facturation
</div>
{% else %}
<div class="card card-address mb-4">
<div class="card-header">
<div class="row">
<div class="col">
<h5 class="m-0 p-0">
{{ company.billingAddress.name }}
</h5>
</div>
<div class="row">
<div class="col inline-inside">
{% if company.billingAddress is null %}
<a href="{{ path('billing_address_new', {'id_company': company.id}) }}">
<i class="far fa-plus-square"></i>
<span class="sr-only">
Ajouter
</span>
</a>
{% else %}
{% if ((not is_granted('ROLE_ACCOUNTANT')) or is_granted('ROLE_ADMIN')) and company.locked == 0 %}
<a
href="{{ path('billing_address_edit', {'id': company.billingAddress.id}) }}"
class="btn-sm btn-secondary btn-action"
>
<i class="fas fa-pencil-alt"></i>
<span class="sr-only">
Editer
</span>
</a>
{% endif %}
{% if (not is_granted('ROLE_ACCOUNTANT') or is_granted('ROLE_ADMIN')) and company.locked == 0 %}
{{ include('billing_address/_delete_form.html.twig') }}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
<div class="card-body">
<ul>
<li>
<span class="font-weight-bold">
Raion sociale :
</span>
{{ company.billingAddress.name }}
</li>
<li>
<span class="font-weight-bold">
Rue :
</span>
{{ company.billingAddress.street }}
</li>
<li>
<span class="font-weight-bold">
Ville :
</span>
{{ company.billingAddress.city }}
</li>
<li>
<span class="font-weight-bold">
Code postal :
</span>
{{ company.billingAddress.postcode }}
</li>
<li>
<span class="font-weight-bold">
Pays :
</span>
{{ company.billingAddress.country }}
</li>
<li>
<span class="font-weight-bold">
Téléphone :
</span>
{{ company.billingAddress.phone }}
</li>
<li>
<span class="font-weight-bold">
Télécopie
</span>
{{ company.billingAddress.fax }}
</li>
<li>
<span class="font-weight-bold">
Méthode de paiement :
</span>
{{ company.billingAddress.paymentMethod }}
</li>
{% if company.billingAddress.paymentMethod == 'PRELEVEMENT' %}
<li>
<span class="font-weight-bold">
Nom de la banque :
</span>
{{ company.billingAddress.bankName }}
</li>
<li>
<span class="font-weight-bold">
Banque :
</span>
{{ company.billingAddress.bankCode }}
</li>
<li>
<span class="font-weight-bold">
Guichet :
</span>
{{ company.billingAddress.bankCounter }}
</li>
<li>
<span class="font-weight-bold">
N° de compte :
</span>
{{ company.billingAddress.accountNumber }}
</li>
<li>
<span class="font-weight-bold">
Clé :
</span>
{{ company.billingAddress.accountKey }}
</li>
<li>
<span class="font-weight-bold">
Code BIC :
</span>
{{ company.billingAddress.codeBic }}
{% endif %}
<li>
<span class="font-weight-bold">
Envoi de la facture par mail :
</span>
{% if company.billingAddress.sendInvoiceMail %} Oui {% else %} Non {% endif %}
</li>
{% if company.billingAddress.sendInvoiceMail %}
<li>
<span class="font-weight-bold">
Email de facturation :
</span>
{{ company.billingAddress.billingEmail }}
</li>
{% endif %}
</ul>
</div>
</div>
{% endif %}