{% extends "base.html" %} {% from "_macros.html" import report_filters with context %} {% block title %}{{ t('Gross Margin') }}{% endblock %} {% block content %} {% set cur = currency %}

{{ t('Gross Margin') }}

{{ t('Sales less the cost of the goods sold, at average cost when the goods left the warehouse') }}
{% set extra %}{% endset %} {{ report_filters(f, False, extra) }}
{{ f.date_from }} → {{ f.date_to }}{{ t('Amounts in') }} {{ cur }}
{{ t('Revenue') }}
{{ total.revenue|money(cur) }}
{{ t('Cost of Goods Sold') }}
{{ total.cost|money(cur) }}
{{ t('Gross Margin') }}
{{ total.margin|money(cur) }}
{{ t('Margin %') }}
{{ '%.1f%%'|format(total.pct) if total.pct is not none else '—' }}
{% if group == 'product' %}{% endif %} {% for r in rows %} {% if group == 'product' %}{% endif %} {% else %}{% endfor %} {% if group == 'product' %}{% endif %}
{{ t({'product': 'Product', 'customer': 'Customer', 'branch': 'Branch', 'month': 'Month', 'category': 'Category'}[group]) }}{{ t('Quantity') }}{{ t('Revenue') }}{{ t('Cost of Goods Sold') }}{{ t('Gross Margin') }}{{ t('Margin %') }}
{{ r.label }}{{ '%g' % r.qty }}{{ r.revenue|money(cur) }}{{ r.cost|money(cur) }} {{ r.margin|money(cur) }} {{ '%.1f%%'|format(r.pct) if r.pct is not none else '—' }}
{{ t('Nothing yet.') }}
{{ t('Total') }}{{ total.revenue|money(cur) }}{{ total.cost|money(cur) }} {{ total.margin|money(cur) }}{{ '%.1f%%'|format(total.pct) if total.pct is not none else '—' }}

{{ t('Reconciliation to the Profit & Loss') }}

{{ t('Profit & Loss') }} →
{{ t('Revenue') }}{{ t('Cost of Revenue') }}{{ t('Gross Margin') }}
{{ t('Margin on goods and services sold (above)') }}{{ total.revenue|money(cur) }}{{ total.cost|money(cur) }}{{ total.margin|money(cur) }}
{{ t('Revenue in the ledger not on invoice lines or POS') }}{{ (gl.revenue - total.revenue)|money(cur) }}{{ (gl.revenue - total.revenue)|money(cur) }}
{{ t('Cost of revenue in the ledger not from goods movements') }}
{{ t('Vendor bills booked straight to cost of sales, price differences, landed costs, stock adjustments and write-offs') }}
{{ (gl.cost - total.cost)|money(cur) }}{{ (total.cost - gl.cost)|money(cur) }}
{{ t('Gross profit as in the Profit & Loss') }}{{ gl.revenue|money(cur) }}{{ gl.cost|money(cur) }} {{ gl.margin|money(cur) }}{% if gl.pct is not none %} ({{ '%.1f'|format(gl.pct) }}%){% endif %}

{{ t('Revenue: invoice lines on revenue accounts, less credit notes, plus closed POS sessions, without VAT. Cost: goods delivered or sold at POS less goods returned by customers. Services carry no cost of goods. Price differences on vendor bills and landed costs booked later to COGS are not included here; see the Profit & Loss for the full cost of sales.') }}

{% endblock %}