{% extends "base.html" %} {% block content %}
{{ invoice.client_name }}
{{ invoice.client_email }}
{{ invoice.client_address }}
Issue Date: {{ invoice.issue_date.strftime('%Y-%m-%d') }}
Due Date: {{ invoice.due_date.strftime('%Y-%m-%d') }}
Status: {{ invoice.status }}
{% if invoice.payment_reference %}{{ _('Payment Reference') }}: {% set link_template = link_templates_by_field.get('payment_reference') if link_templates_by_field else None %} {% if link_template %} {% set rendered_url = link_template.render_url(invoice.payment_reference) %} {% if rendered_url %} {{ invoice.payment_reference }} {% else %} {{ invoice.payment_reference }} {% endif %} {% elif invoice.payment_reference is string and (invoice.payment_reference.startswith('http://') or invoice.payment_reference.startswith('https://')) %} {{ invoice.payment_reference }} {% elif invoice.payment_reference is string and invoice.payment_reference.startswith('www.') %} {{ invoice.payment_reference }} {% else %} {{ invoice.payment_reference }} {% endif %}
{% endif %} {% if invoice.approvals %} {% set latest_approval = invoice.approvals|sort(attribute='created_at', reverse=true)|first %} {% if latest_approval %}{{ _('Approval Status') }}: {{ latest_approval.status|title }}
{% endif %} {% endif %}{{ _('Request approval before sending this invoice to the client.') }}
| Description | Quantity | Unit Price | Total |
|---|---|---|---|
| {{ item.description }} | {{ "%.2f"|format(item.quantity) }} | {{ "%.2f"|format(item.unit_price) }} {{ invoice.currency_code }} | {{ "%.2f"|format(item.total_amount) }} {{ invoice.currency_code }} |
| Title | Description | Category | Date | Vendor | Amount |
|---|---|---|---|---|---|
| {{ expense.title }} | {{ expense.description or '-' }} | {{ expense.category|capitalize }} | {{ expense.expense_date.strftime('%Y-%m-%d') if expense.expense_date else '-' }} | {{ expense.vendor or '-' }} | {{ "%.2f"|format(expense.total_amount) }} {{ expense.currency_code }} |
| Name | Description | Category | Quantity | Unit Price | Total |
|---|---|---|---|---|---|
| {{ good.name }} | {{ good.description or '-' }} | {{ good.category|capitalize }} | {{ "%.2f"|format(good.quantity) }} | {{ "%.2f"|format(good.unit_price) }} {{ invoice.currency_code }} | {{ "%.2f"|format(good.total_amount) }} {{ invoice.currency_code }} |
| Date | Amount | Method | Reference | Status | Actions |
|---|---|---|---|---|---|
| {{ payment.payment_date.strftime('%Y-%m-%d') if payment.payment_date else 'N/A' }} | {{ "%.2f"|format(payment.amount) }} {{ payment.currency or invoice.currency_code }} {% if payment.gateway_fee %} (Fee: {{ "%.2f"|format(payment.gateway_fee) }}) {% endif %} | {{ payment.method or 'N/A' }} | {% if payment.reference %} {% set link_template = link_templates_by_field.get('payment_reference') if link_templates_by_field else None %} {% if link_template %} {% set rendered_url = link_template.render_url(payment.reference) %} {% if rendered_url %} {{ payment.reference }} {% else %} {{ payment.reference }} {% endif %} {% elif payment.reference is string and (payment.reference.startswith('http://') or payment.reference.startswith('https://')) %} {{ payment.reference }} {% elif payment.reference is string and payment.reference.startswith('www.') %} {{ payment.reference }} {% else %} {{ payment.reference }} {% endif %} {% else %} — {% endif %} | {% if payment.status == 'completed' %} Completed {% elif payment.status == 'pending' %} Pending {% elif payment.status == 'failed' %} Failed {% elif payment.status == 'refunded' %} Refunded {% endif %} | View |
No payments recorded yet.
{{ _('Are you sure you want to delete invoice') }} ?
{{ _('All invoice items, extra goods, and payment records associated with this invoice will be permanently deleted.') }}
| Sent At | Recipient | Status | Subject | Actions |
|---|---|---|---|---|
| {{ email.sent_at.strftime('%Y-%m-%d %H:%M:%S') if email.sent_at else 'N/A' }} | {{ email.recipient_email }} | {{ email.status|title }} | {{ email.subject }} | |
| Error: {{ email.error_message }} | ||||