diff --git a/aleksis/apps/tezor/templates/templated_email/invoice.email b/aleksis/apps/tezor/templates/templated_email/invoice.email index d6496f320baa0c33e2a132fa4dea7d0f971b5372..8fe6d0572efd6ff1786a71ce771e23e758818b3e 100644 --- a/aleksis/apps/tezor/templates/templated_email/invoice.email +++ b/aleksis/apps/tezor/templates/templated_email/invoice.email @@ -1,26 +1,21 @@ {% extends "templated_email/base.email" %} - {% load i18n %} -{% block subject %}{% trans "Invoice" %} {{ invoice }}{% endblock %} +{% block subject_content %}{% trans "Invoice" %} {{ invoice.number }}{% endblock %} -{% block plain %} - {% blocktrans with invoice=invoice %} - Please find attached invoice number {{ invoice.transaction_id }} for {{ - invoice.description }} please carefully read the PDF file concerning all - payment details. +{% block html_content %} +<p> + {% blocktrans with number=invoice.number description=invoice.description %} + Please find attached invoice number {{ number }} for {{ description }}. + Please carefully read the PDF file concerning all payment details. {% endblocktrans %} - -{% endblock %} - -{% block html %} - +</p> +{% if invoice.status == "waiting" %} <p> - {% blocktrans with invoice=invoice %} - Please find attached invoice number {{ invoice.transaction_id }} for {{ - invoice.description }} please carefully read the PDF file concerning all - payment details. + {% blocktrans %} + Please visit the following link to view and make the payment: {% endblocktrans %} </p> - +<a href="{{ BASE_URL }}{{ invoice.get_absolute_url }}">{{ BASE_URL }}{{ invoice.get_absolute_url}}</a> +{% endif %} {% endblock %} diff --git a/aleksis/apps/tezor/templates/tezor/invoice/full.html b/aleksis/apps/tezor/templates/tezor/invoice/full.html index 345aed939f0ef2ad1e2e8a15b58d18286c0c9eae..01576f32b22e02007bb7c4232c0079eb669c8645 100644 --- a/aleksis/apps/tezor/templates/tezor/invoice/full.html +++ b/aleksis/apps/tezor/templates/tezor/invoice/full.html @@ -12,6 +12,7 @@ {% has_perm 'tezor.display_purchased_items_rule' user object as can_view_purchased_items %} {% has_perm 'tezor.display_billing_rule' user object as can_view_billing_information %} {% has_perm 'tezor.print_invoice_rule' user object as can_print_invoice %} + {% has_perm 'tezor.send_invoice_email_rule' user object as can_send_invoice_email %} <h1>{% trans "Invoice" %} {{ object.number }} — {{ object.created.date }}</h1> @@ -21,6 +22,9 @@ {% if can_print_invoice %} <a class="btn colour-primary waves-effect waves-light" href="{% url 'print_invoice' object.token %}">{% trans "Print" %}</a> {% endif %} + {% if can_send_invoice_email %} + <a class="btn colour-primary waves-effect waves-light" href="{% url 'send_invoice_by_token' object.token %}">{% trans "Send Email" %}</a> + {% endif %} <div class="row"> {% if can_view_billing_information %}