{% extends 'base.html' %} {% load static %} {% block title %}Billing History - 3ncount{% endblock %} {% block page_pretitle %}Billing & Invoices{% endblock %} {% block page_title %}Billing History{% endblock %} {% block page_actions %} Back to Dashboard {% endblock %} {% block extra_css %} {% endblock %} {% block content %}
Total Invoices

{{ summary.total_count }}

Paid

RM {{ summary.paid_total|floatformat:2 }}

Pending

RM {{ summary.pending_total|floatformat:2 }}

Overdue

RM {{ summary.overdue_total|floatformat:2 }}

{% if invoices %} {% for invoice in invoices %}
{{ invoice.invoice_number }}
{{ invoice.created_at|date:"d M Y" }} {% if invoice.due_date %} Due: {{ invoice.due_date|date:"d M Y" }} {% endif %}
RM {{ invoice.total_amount|floatformat:2 }}
{{ invoice.get_status_display }}
Invoice Details
{% if invoice.line_items %}
Items:
    {% for item in invoice.line_items %}
  • {{ item.description }} - RM {{ item.amount|floatformat:2 }}
  • {% endfor %}
{% endif %} {% if invoice.notes %}
Notes: {{ invoice.notes }}
{% endif %}
Amount Breakdown
Subtotal RM {{ invoice.subtotal|floatformat:2 }}
{% if invoice.tax_amount > 0 %}
Tax ({{ invoice.tax_name }}) RM {{ invoice.tax_amount|floatformat:2 }}
{% endif %} {% if invoice.discount_amount > 0 %}
Discount - RM {{ invoice.discount_amount|floatformat:2 }}
{% endif %}
Total RM {{ invoice.total_amount|floatformat:2 }}
{% if invoice.status == 'PAID' and invoice.paid_at %}
Paid on {{ invoice.paid_at|date:"d M Y H:i" }} {% if invoice.payment_method %} via {{ invoice.payment_method.get_type_display }} ({{ invoice.payment_method.get_gateway_display }}) {% endif %}
{% elif invoice.status == 'OVERDUE' %}
This invoice is overdue. Please make payment to avoid service interruption.
{% elif invoice.status == 'FAILED' %}
Payment failed. Next retry: {{ invoice.next_retry_at|date:"d M Y H:i" }}
{% endif %}
View Details Download PDF {% if invoice.status != 'PAID' %} {% endif %}
{% endfor %} {% if is_paginated %} {% endif %} {% else %}

No invoices found

{% if request.GET.status and request.GET.status != 'all' %} No {{ request.GET.status|lower }} invoices at this time. View all invoices {% else %} Your billing history will appear here once you have invoices. {% endif %}

{% endif %} {% endblock %} {% block extra_js %} {% endblock %}