{% load static django_afip %} {# pdf is a ReceiptPDF object #} {# taxpayer is a TaxPayer object #} {# TODO: ¿How do we deal with multiple entries with different VAT types? #}
{% for page,page_entries in entries.items %}| Descripción | Cantidad | Precio Unitario | Monto | ||
|---|---|---|---|---|---|
| Subtotal anterior | {{page_entries.previous_subtotal}} | ||||
| {{ entry.description }} | {{ entry.quantity }} | {{ entry.unit_price }} | {{ entry.total_price|floatformat:2 }} | ||
| {% if forloop.last %} | Total | {{pdf.receipt.total_amount}} | {% else %}Subtotal | {{ page_entries.subtotal|floatformat:2 }} | {% endif %}