added new invoice status: canceled (#2922)
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
{% else %}
|
||||
{{ tables.datatable_header(tableName, columns, query, {}) }}
|
||||
{% for entry in entries %}
|
||||
<tr class="alternative-link open-edit" data-href="{{ path('admin_invoice_download', {'id': entry.id}) }}">
|
||||
<tr class="alternative-link open-edit{% if entry.canceled %} warning text-muted{% endif %}" data-href="{{ path('admin_invoice_download', {'id': entry.id}) }}">
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'date') }}">{{ entry.createdAt|date_short }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'user') }}">{{ widgets.user_avatar(entry.user) }} {{ widgets.username(entry.user) }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'customer') }}">{{ widgets.label_customer(entry.customer) }}</td>
|
||||
|
||||
@@ -12,12 +12,16 @@
|
||||
{{ widgets.label('status.pending'|trans, 'warning') }}
|
||||
{% elseif invoice.paid %}
|
||||
{{ widgets.label('status.paid'|trans, 'success') }}
|
||||
{% elseif invoice.canceled %}
|
||||
{{ widgets.label('status.canceled'|trans, 'gray') }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro invoice_due_date(invoice) %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% if invoice.overdue and not invoice.paid %}
|
||||
{% if invoice.canceled %}
|
||||
{{ widgets.label('status.canceled'|trans, 'gray') }}
|
||||
{% elseif invoice.overdue and not invoice.paid %}
|
||||
{{ widgets.label(invoice.dueDate|date_short, 'danger') }}
|
||||
{% else %}
|
||||
{{ widgets.label(invoice.dueDate|date_short, 'primary') }}
|
||||
|
||||
Reference in New Issue
Block a user