{% extends 'creme_core/bricks/base/paginated-list.html' %} {% load i18n creme_bricks creme_perms creme_widgets %} {% load and_op url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} billing-list-brick billing-payment-info-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Payment information') plural=_('{count} Payments information') empty=_('Payment information') icon='money_info' %} {% endblock %} {% block brick_header_actions %} {% if organisation and not field_hidden %} {% with can_edit=user|has_perm_to_change:object can_edit_orga=user|has_perm_to_change:organisation %} {% brick_header_action id='add' url='billing__create_related_payment_info'|url:object.id label=_('Add a payment information') enabled=can_edit|and_op:can_edit_orga %} {% endwith %} {% endif %} {% endblock %} {% block brick_list_content %} {% for payment_info in page.object_list %}
{{payment_info.name}}
{% blocktranslate with account=payment_info.account_number|default:'—' %}N° {{account}}{% endblocktranslate %}
{% if payment_info == object.payment_info %} {% translate 'Selected account for this document' %} {% else %}{% url 'billing__set_default_payment_info' payment_info.id object.id as set_default_url %} {% brick_action id='update' url=set_default_url label=_('Select this account') class='billing-select-account' icon='edit' display='both' %} {% endif %}
{% translate 'RIB' %}
{{payment_info.bank_code}}-{{payment_info.counter_code}}-{{payment_info.account_number}}-{{payment_info.rib_key}}
{% translate 'Banking domiciliation' %}
{{payment_info.banking_domiciliation|default:'—'}}
{% endfor %} {% endblock %} {% block brick_list_empty %} {% if field_hidden %} {% translate "The field «Payment information» is hidden; in order to use this block, you have to reactivate it (so please contact your administrator)." %} {% else %} {% translate 'No payment information for the moment' %} {% endif %} {% endblock %}