{% if result.grouped %}
{% for g in result.groups %}
{{ g.label }}
| Product | Qty | Avg Rate |
Discount | Total |
{% if filters.show_weight %}Tonnage | {% endif %}
{% for r in g.rows %}
| {{ r.name }} |
{{ r.qty|floatformat:2 }} |
{{ r.avg_rate|floatformat:2 }} |
{{ r.discount|floatformat:2 }} |
{{ r.total|floatformat:2 }} |
{% if filters.show_weight %}{{ r.weight|floatformat:2 }} | {% endif %}
{% endfor %}
| Subtotal |
{{ g.subtotal.qty|floatformat:2 }} |
|
{{ g.subtotal.discount|floatformat:2 }} |
{{ g.subtotal.total|floatformat:2 }} |
{% if filters.show_weight %}{{ g.subtotal.weight|floatformat:2 }} | {% endif %}
{% endfor %}
{% else %}
| Product | Qty | Avg Rate |
Discount | Total |
{% if filters.show_weight %}Tonnage | {% endif %}
{% for r in result.rows %}
| {{ r.name }} |
{{ r.qty|floatformat:2 }} |
{{ r.avg_rate|floatformat:2 }} |
{{ r.discount|floatformat:2 }} |
{{ r.total|floatformat:2 }} |
{% if filters.show_weight %}{{ r.weight|floatformat:2 }} | {% endif %}
{% endfor %}
{% endif %}
Grand Total — Qty: {{ result.grand.qty|floatformat:2 }} |
Discount: {{ result.grand.discount|floatformat:2 }} |
Total: {{ result.grand.total|floatformat:2 }}
{% if filters.show_weight %}| Tonnage: {{ result.grand.weight|floatformat:2 }}{% endif %}