{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_widgets creme_bricks %} {% load and_op format_amount has_perm_to print_field url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} billing-cnotes-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Credit Note') plural=_('{count} Credit Notes') empty=_('Credit Notes') icon='invoice' %} {% endblock %} {% block brick_header_actions %} {% has_perm_to link object as link_perm %} {% brick_header_action id='link' url='billing__link_to_cnotes'|url:object.id label=_('Link to existing credit notes') enabled=link_perm %} {% endblock %} {% block brick_table_columns %} {% brick_table_column title='#' %} {% brick_table_column title=_('Name') status='primary' %} {% brick_table_column title=_('Number') class='cnotes-number' %} {% brick_table_column title=_('Status') class='cnotes-status' %} {% if 'comment' not in hidden_fields %} {% brick_table_column title=_('Comment') class='cnotes-comment' %} {% endif %} {% if 'issuing_date' not in hidden_fields %} {% brick_table_column title=_('Issuing date') data_type='date' class='cnotes-issuing-date' %} {% endif %} {% if 'expiration_date' not in hidden_fields %} {% brick_table_column title=_('Expiration date') data_type='date' class='cnotes-expiration-date' %} {% endif %} {% brick_table_column title=_('Total (exclusive of tax)') data_type='money' class='cnotes-total-no-vat' %} {% brick_table_column title=_('Total (inclusive of tax)') data_type='money' class='cnotes-total-vat' %} {% brick_table_column title=_('Action') status='action' %} {% endblock %} {% block brick_table_rows %} {% has_perm_to unlink object as unlink_perm %} {% for credit_note in page.object_list %}{% has_perm_to view credit_note as credit_note_view_perm %} {% if credit_note_view_perm %}
{{credit_note.comment|linebreaksbr}}
{% else %}—{% endif %} {% brick_table_action id='edit' url='billing__edit_cnote_comment'|url:credit_note.id label=_('Edit this credit note') enabled=credit_note_edit_perm %}