{% extends "base.html" %} {% block content %}

{{ l('Sales History', 'বিক্রয়ের ইতিহাস') }}

{{ l('Search and review all customer invoices and due records', 'সকল কাস্টমার ইনভয়েস ও বাকির হিসাব খুঁজুন') }}
CSV Excel PDF
{{ l('Total Invoices', 'মোট ইনভয়েস') }}
{{ total_invoices }}
{{ l('Total Sales', 'মোট বিক্রি') }}
৳ {{ "%.2f"|format(total_sales_amount) }}
{{ l('Total Paid', 'মোট পরিশোধ') }}
৳ {{ "%.2f"|format(total_paid_amount) }}
{{ l('Total Dues', 'মোট বাকি') }}
৳ {{ "%.2f"|format(total_due_amount) }}
{{ l('Total Items', 'মোট আইটেম') }}
{{ total_items }}
{{ l('Avg Invoice', 'গড় ইনভয়েস') }}
৳ {{ "%.2f"|format(average_invoice) }}
{{ l('Filter:', 'ফিল্টার:') }} {{ l('All Invoices', 'সকল ইনভয়েস') }} {{ l('Paid Invoices', 'পরিশোধিত') }} {{ l('Due Invoices', 'বাকি') }}
{% if status == 'due' %}
{{ l('Showing Due Customers & Invoices List', 'বাকি থাকা কাস্টমার ও ইনভয়েস তালিকা') }}
{{ sales|length }} {{ l('Records', 'টি রেকর্ড') }}
{% elif status == 'paid' %}
{{ l('Showing Paid Customers & Invoices List', 'পরিশোধিত কাস্টমার ও ইনভয়েস তালিকা') }}
{{ sales|length }} {{ l('Records', 'টি রেকর্ড') }}
{% endif %}
{% for invoice in sales %} {% else %} {% endfor %}
{{ l('Invoice No', 'ইনভয়েস নং') }} {{ l('Date / Time', 'তারিখ ও সময়') }} {{ l('Customer', 'গ্রাহক বিবরণ') }} {{ l('Items', 'আইটেম') }} {{ l('Total', 'মোট') }} {{ l('Paid', 'পরিশোধ') }} {{ l('Due', 'বাকি') }} {{ l('Status', 'অবস্থা') }} {{ l('Action', 'অ্যাকশন') }}
{{ invoice.invoice_no }}
{{ invoice.created_at.strftime("%d %b %Y") if invoice.created_at else '-' }}
{{ invoice.created_at.strftime("%I:%M %p") if invoice.created_at else '' }}
{% if invoice.customer %} {{ invoice.customer.name }} {% if invoice.customer.phone %}
{{ invoice.customer.phone }}
{% endif %} {% else %} {{ l('Walk-in Customer', 'সাধারণ গ্রাহক') }} {% endif %}
{{ invoice.items|length }} pcs ৳ {{ "%.2f"|format(invoice.total_amount or 0) }} ৳ {{ "%.2f"|format(invoice.paid_amount or 0) }} ৳ {{ "%.2f"|format(invoice.due_amount or 0) }} {% if invoice.due_amount and invoice.due_amount > 0 %} {{ l('Due', 'বাকি') }} {% elif invoice.return_status == "Returned" %} {{ l('Returned', 'ফেরতকৃত') }} {% elif invoice.return_status == "Partial Return" %} {{ l('Partial', 'আংশিক') }} {% else %} {{ l('Paid', 'পরিশোধিত') }} {% endif %}
{{ l('View', 'দেখুন') }} {% if invoice.customer and invoice.due_amount and invoice.due_amount > 0 %} {{ l('Collect', 'আদায়') }} {% endif %}
{{ l('No sales record found matching filter.', 'কোনো বিক্রয়ের রেকর্ড পাওয়া যায়নি।') }}
{% if pagination.pages > 1 %}
{% endif %}
{% endblock %}