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

{{ l('Supplier Ledger', 'সাপ্লায়ার হিসাব') }}

{{ l('Track purchase totals, payments, outstanding dues, and advance balances for each supplier', 'প্রতিটি সাপ্লায়ারের মোট ক্রয়, পরিশোধ, বকেয়া ও অগ্রিম জমার হিসাব রাখুন') }}
{{ l('Manage Suppliers', 'সাপ্লায়ার তালিকা') }}
{% set total_purchase_all = ledger | sum(attribute='purchase') %} {% set total_paid_all = ledger | sum(attribute='paid') %} {% set total_due_all = ledger | sum(attribute='due') %} {% set total_advance_all = ledger | sum(attribute='advance') %}
{{ l('Total Suppliers', 'মোট সাপ্লায়ার') }}
{{ ledger|length }}
{{ l('Total Purchase', 'মোট ক্রয়') }}
৳ {{ '%.2f'|format(total_purchase_all) }}
{{ l('Total Dues Outstanding', 'মোট বকেয়া') }}
৳ {{ '%.2f'|format(total_due_all) }}
{{ l('Total Advance Balance', 'মোট অগ্রিম জমা') }}
৳ {{ '%.2f'|format(total_advance_all) }}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}{% for cat, msg in messages %}
{{ msg }}
{% endfor %}{% endif %} {% endwith %}
{% for item in ledger %} {% else %} {% endfor %}
{{ l('Supplier Info', 'সাপ্লায়ারের তথ্য') }} {{ l('Total Purchase', 'মোট ক্রয়') }} {{ l('Total Paid', 'মোট পরিশোধ') }} {{ l('Current Due', 'বর্তমান বাকি') }} {{ l('Advance Credit', 'অগ্রিম জমা') }} {{ l('Status', 'অবস্থা') }} {{ l('Action', 'অ্যাকশন') }}
{{ item.supplier.name }}
{% if item.supplier.phone %}{{ item.supplier.phone }}{% endif %} {% if item.supplier.supplier_code %} {{ item.supplier.supplier_code }}{% endif %} {% if item.supplier.address %} · {{ item.supplier.address }}{% endif %}
৳ {{ '%.2f'|format(item.purchase) }} ৳ {{ '%.2f'|format(item.paid) }} ৳ {{ '%.2f'|format(item.due) }} {% if item.advance > 0 %} ৳ {{ '%.2f'|format(item.advance) }} {% else %} ৳ 0.00 {% endif %} {% if item.due > 0 %} {{ l('Due', 'বাকি') }} {% elif item.advance > 0 %} {{ l('Advance Credit', 'অগ্রিম জমা') }} {% else %} {{ l('Cleared', 'পরিষ্কার') }} {% endif %}
{{ l('No supplier records found.', 'কোনো সাপ্লায়ার রেকর্ড পাওয়া যায়নি।') }}
{% endblock %}