{% 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 %}
{{ town.town_name }}
{% for area in town.areas %}
{{ area.area_name }}
{% for comp in area.companies %}
{{ comp.company_name }}
{% if comp.sales %} {% for inv in comp.sales %}
#{{ inv.invoice_no }}{{ inv.date }}{{ inv.customer }}{{ inv.invoice_total }}
{% for it in inv.items %}{% endfor %}
ProductQtyPriceDiscTotal
{{ it.product_name }}{{ it.quantity }}{{ it.item_price }}{{ it.discount }}{{ it.total_price }}
Invoice Total:{{ inv.invoice_total }}
{% endfor %} {% endif %} {% if comp.returns %} {% for inv in comp.returns %}
#{{ inv.invoice_no }}RET{{ inv.date }}{{ inv.customer }}-{{ inv.invoice_total }}
{% for it in inv.items %}{% endfor %}
ProductQtyPriceDiscTotal
{{ it.product_name }}{{ it.quantity }}{{ it.item_price }}{{ it.discount }}{{ it.total_price }}
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 %}