{% extends "base.html" %} {% block title %}Sale #{{ sale.invoice_number }} - AsapLoads POS{% endblock %} {% block header_title %}Sale Details: #{{ sale.invoice_number }}{% endblock %} {% block content %} {% if messages %}
{% for message in messages %} {% endfor %}
{% endif %}
Sale Information
View Receipt {% if sale.payment_status != 'cancelled' and sale.payment_status != 'paid' %} Add Payment {% endif %} {% if sale.payment_status != 'cancelled' and user.role == 'admin' %} Cancel Sale {% endif %} Back to Sales
Sale Details
Invoice Number: {{ sale.invoice_number }}
Date: {{ sale.created_at|date:"F d, Y - H:i" }}
Status: {{ sale.payment_status|title }}
Cashier: {{ sale.cashier.get_full_name }}
Branch: {{ sale.branch.name }}
Customer Information
{% if sale.customer %}
Name: {{ sale.customer.full_name }}
Email: {{ sale.customer.email|default:"-" }}
Phone: {{ sale.customer.phone|default:"-" }}
Address: {{ sale.customer.address|default:"-" }}
View Customer
{% else %}
Walk-in customer (no details provided)
{% endif %}
Items Purchased
{% for item in items %} {% endfor %} {% if sale.tax_amount > 0 %} {% endif %} {% if sale.discount_amount > 0 %} {% endif %}
# Product Price Quantity Discount Total
{{ forloop.counter }} {% if item.product %} {{ item.product.name }}
SKU: {{ item.product.sku }} {% else %} {{ item.product_name }} (deleted) {% endif %}
{{ company_settings.currency_symbol }} {{ item.price|floatformat:2 }} {{ item.quantity }} {% if item.discount > 0 %} {{ item.discount|floatformat:2 }}% {% else %} - {% endif %} {{ company_settings.currency_symbol }} {{ item.total|floatformat:2 }}
Subtotal: {{ company_settings.currency_symbol }} {{ sale.subtotal|floatformat:2 }}
Tax ({{ sale.tax_rate }}%): {{ company_settings.currency_symbol }} {{ sale.tax_amount|floatformat:2 }}
Discount: -{{ company_settings.currency_symbol }} {{ sale.discount_amount|floatformat:2 }}
Total: {{ company_settings.currency_symbol }} {{ sale.total_amount|floatformat:2 }}
Payment Information
{% if payments %}
{% for payment in payments %} {% endfor %} {% if sale.payment_status != 'paid' and sale.payment_status != 'cancelled' %} {% endif %}
# Date Method Reference Amount
{{ forloop.counter }} {{ payment.payment_date|date:"F d, Y - H:i" }} {{ payment.payment_method|title }} {{ payment.reference_number|default:"-" }} {{ company_settings.currency_symbol }} {{ payment.amount|floatformat:2 }}
Total Paid: {{ company_settings.currency_symbol }} {{ sale.amount_paid|floatformat:2 }}
Balance Due: {{ company_settings.currency_symbol }} {{ sale.balance_due|floatformat:2 }}
{% else %}
No payments have been recorded for this sale.
{% endif %} {% if sale.notes %}
Notes
{{ sale.notes|linebreaks }}
{% endif %}
{% endblock %}