{% extends "pos/base.html" %}
{% load static %}
{% block title %}Company & Area Sales Report{% endblock %}
{% block stylesheets %}
{% endblock %}
{% block content %}
{% if report_data is None %}
Select companies, towns/areas, then click Generate.
{% elif not report_data %}
No data found for the selected filters.
{% else %}
{% for town in report_data %}
{% for area in town.areas %}
{% for comp in area.companies %}
{% if comp.sales %}
Sales
{% for inv in comp.sales %}
#{{ inv.invoice_no }}{{ inv.date }}{{ inv.customer }}{{ inv.invoice_total }}
| Product | Qty | Price | Disc | Total |
{% for it in inv.items %}| {{ it.product_name }} | {{ it.quantity }} | {{ it.item_price }} | {{ it.discount }} | {{ it.total_price }} |
{% endfor %}
| Invoice Total: | {{ inv.invoice_total }} |
{% endfor %}
{% endif %}
{% if comp.returns %}
RETURN Returns
{% for inv in comp.returns %}
#{{ inv.invoice_no }}RET{{ inv.date }}{{ inv.customer }}-{{ inv.invoice_total }}
| Product | Qty | Price | Disc | Total |
{% for it in inv.items %}| {{ it.product_name }} | {{ it.quantity }} | {{ it.item_price }} | {{ it.discount }} | {{ it.total_price }} |
{% endfor %}
| Return Total: | -{{ inv.invoice_total }} |
{% endfor %}
{% endif %}
Sales: {{ comp.sale_total }}Returns: {{ comp.return_total }}Net: {{ comp.company_total }}
{% endfor %}
Area Total - {{ area.area_name }}{{ area.area_total }}
{% endfor %}
Town Total - {{ town.town_name }}{{ town.town_total }}
{% endfor %}
Grand Total - All Towns{{ grand_total_all }}
{% endif %}
{% endblock %}
{% block javascripts %}
{% endblock %}