{% extends "base.html" %} {% block title %}Sale #{{ sale.id }} — ArtNode{% endblock %} {% block content %}
{% for line in sale.line_items %}
Artwork
{% set img = line.artwork.images[0] if line.artwork.images else none %} {% if img and img.iiif_url %} {% endif %}
{{ line.artwork.title }}
{% if line.artwork.artist %}{{ (line.artwork.contact_artist.first_name if line.artwork.contact_artist else (line.artwork.artist.first_name if line.artwork.artist else "")) }} {{ (line.artwork.contact_artist.last_name if line.artwork.contact_artist else (line.artwork.artist.last_name if line.artwork.artist else "")) }}{% endif %}
{% macro row(label, value) %}
{{ label }} {{ value }}
{% endmacro %} {% if line.buyer %} {{ row("Buyer", line.buyer.last_name ~ " " ~ (line.buyer.first_name or "") if line.buyer.contact_type == "individual" else line.buyer.organisation) }} {% endif %} {{ row("Sale Price", line.price|ch_currency(line.currency)) }} {% if line.vat_rate %} {{ row("VAT (" ~ line.vat_rate ~ "%)", line.vat_amount|ch_currency(line.currency)) }} {% endif %} {% if line.consignor_net %} {{ row("Gallery Net", line.gallery_net|ch_currency(line.currency)) }} {{ row("Consignor Net", line.consignor_net|ch_currency(line.currency)) }} {% endif %}
Total {{ (line.price + (line.vat_amount or 0))|ch_currency(line.currency) }}
{% endfor %}
Summary
Status {{ sale.status|replace("_", " ") }}
Invoice No. {{ sale.invoice_number or "—" }}
Date {{ sale.created_at|ch_date }}
{% if sale.payment_link_url %}
Payment Link
{{ sale.payment_link_url }}
{% endif %} {% if sale.notes %}
Notes

{{ sale.notes }}

{% endif %}
{% endblock %}