{% extends "admin/base_site.html" %} {% load i18n admin_urls %} {% block extrastyle %}{{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content %}

{{ product.name }}

{% translate "User" %}: {{ customer.get_full_name|default:customer.username }} (ID: {{ customer.id }})
{% translate "Current balance" %}: {{ totals.balance }}

{# Totals row (top) #} {% for batch_group in batch_groups %} {# Batch header row with totals #} {# Batch transaction rows #} {% for row in batch_group.rows %} {# Transaction #} {# Purchased #} {# Used #} {# Balance #} {% endfor %} {% empty %} {% endfor %}
{% translate "Document" %} {% translate "Transaction" %} {% translate "Purchased" %} {% translate "Used" %} {% translate "Balance" %}
{% translate "Qty" %} {% translate "Amount" %} {% translate "Qty" %} {% translate "Amount" %}
{% translate "TOTAL" %} +{{ totals.credit_qty }} {{ totals.credit_cost|floatformat:2 }} -{{ totals.debit_qty }} {{ totals.debit_cost|floatformat:2 }} {{ totals.balance }}
{{ batch_group.batch_header|safe }} +{{ batch_group.batch_totals.credit_qty }} {{ batch_group.batch_totals.credit_cost|floatformat:2 }} -{{ batch_group.batch_totals.debit_qty }} {{ batch_group.batch_totals.debit_cost|floatformat:2 }} {{ batch_group.batch_totals.balance }}
{{ row.date|date:"d.m.Y H:i" }}{% if row.doc_link %} {{ row.doc_link|safe }}{% endif %} {% if row.transaction_link %} {{ row.transaction_link|safe }} {% endif %} {% if row.credit %}+{{ row.credit.qty }}{% endif %} {% if row.credit %}{{ row.credit.cost|floatformat:2 }}{% endif %}{% if row.debit %}-{{ row.debit.qty }}{% endif %} {% if row.debit %}{{ row.debit.cost|floatformat:2 }}{% endif %}{{ row.balance }}
{% translate "No transactions for this product." %}
{% endblock %}