{% extends "base.html" %} {% block title %}Invoice {{ invoice['invoice_number'] }} - Vera Medical CMS{% endblock %} {% block content %}

Invoice {{ invoice['invoice_number'] }}

{% if invoice['file_case_id'] %} Case #{{ invoice['file_case_id'] }} - {{ invoice['claimant_first_name'] }} {{ invoice['claimant_last_name'] }} {% else %} No case linked {% endif %}

Financial Summary

Status

{% if invoice['status'] == 'paid' %} Paid {% elif invoice['status'] == 'sent' %} Sent {% elif invoice['status'] == 'overdue' %} Overdue {% elif invoice['status'] == 'cancelled' %} Cancelled {% else %} Draft {% endif %}

Fee

${{ "%.2f"|format(invoice['fee']) }} CAD

Tax ({{ "%.0f"|format(invoice['tax_rate']) }}%)

${{ "%.2f"|format(invoice['tax_amount']) }} CAD

Total Amount

${{ "%.2f"|format(invoice['total_amount']) }} CAD

Invoice Details

Invoice Date

{{ invoice['invoice_date'] }}

Service Date

{{ invoice['service_date'] or 'Not specified' }}

Service Code

{{ invoice['service_code'] or 'N/A' }}

Description

{{ invoice['service_description'] or 'N/A' }}

{% if invoice['case_id'] %}

Case & Claimant

Client File Number

{{ invoice['client_file_number'] or 'N/A' }}

Claimant Name

{{ invoice['claimant_first_name'] }} {{ invoice['claimant_last_name'] }}

Client Company

{{ invoice['client_company_name'] or 'N/A' }}

{% if invoice['client_phone'] %}

Client Phone

{{ invoice['client_phone'] }}

{% endif %}
{% endif %} {% if invoice['appointment_id'] %}

Linked Appointment

Appointment Date

{{ invoice['appointment_date'] }}

Time

{{ invoice['appointment_time'] or 'N/A' }}

Location

{{ invoice['appointment_location'] or 'N/A' }}

Appointment Status

{{ invoice['appointment_status'] or 'N/A' }}

{% endif %} {% if invoice['specialist_id'] %}

Specialist Information

Specialist Name

{{ invoice['specialist_name'] or 'N/A' }}

Specialty

{{ invoice['specialist_specialty'] or 'N/A' }}

{% endif %} {% if invoice['payment_date'] or invoice['payment_method'] %}

Payment Information

{% if invoice['payment_date'] %}

Payment Date

{{ invoice['payment_date'] }}

{% endif %} {% if invoice['payment_method'] %}

Payment Method

{{ invoice['payment_method'] }}

{% endif %} {% if invoice['payment_reference'] %}

Payment Reference

{{ invoice['payment_reference'] }}

{% endif %}
{% endif %} {% if invoice['notes'] or invoice['internal_notes'] %}

Notes

{% if invoice['notes'] %}

Invoice Notes (Visible to Client)

{{ invoice['notes'] }}

{% endif %} {% if invoice['internal_notes'] %}

Internal Notes (Private)

{{ invoice['internal_notes'] }}

{% endif %}
{% endif %}

Quick Actions

Print Invoice Edit Invoice {% if invoice['appointment_id'] %} View Appointment {% endif %} {% if invoice['case_id'] %} View Case {% endif %}

Invoice Information

Created At

{{ invoice['created_at'] }}

{% if invoice['updated_at'] %}

Last Updated

{{ invoice['updated_at'] }}

{% endif %} {% if invoice['sent_at'] %}

Sent At

{{ invoice['sent_at'] }}

{% endif %} {% if invoice['created_by'] %}

Created By

{{ invoice['created_by'] }}

{% endif %}

Danger Zone

{% endblock %}