{% extends "base.html" %} {% block content %}
{{ l('All Customers','সব গ্রাহক') }}
{{ l('Customer Ledger','গ্রাহকের হিসাব') }}

{{ customer.name }}

{% if customer.phone %}{{ customer.phone }}{% endif %} {% if customer.address %}  ·  {{ customer.address }}{% endif %}
{{ l('Total Due','মোট বাকি') }}
৳ {{ '%.2f'|format(total_due) }}
{{ l('Advance','অগ্রিম') }}
৳ {{ '%.2f'|format(customer.advance_balance or 0) }}
{{ l('Points','পয়েন্ট') }}
{{ '%.0f'|format(customer.loyalty_points or 0) }}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}{% for cat, msg in messages %}
{{ msg }}
{% endfor %}{% endif %} {% endwith %}
{{ l('Collect Due','বাকি আদায়') }}
{{ l('Advance Payment','অগ্রিম পেমেন্ট') }}
{{ l('Invoices','ইনভয়েস') }}
{{ invoices|length }}
{% for inv in invoices %} {% else %} {% endfor %}
{{ l('Invoice','ইনভয়েস') }} {{ l('Date','তারিখ') }} {{ l('Total','মোট') }} {{ l('Paid','পরিশোধ') }} {{ l('Due','বাকি') }} {{ l('Status','অবস্থা') }}
{{ inv.invoice_no }} {{ inv.created_at.strftime('%d %b %Y') if inv.created_at else '—' }} ৳ {{ '%.2f'|format(inv.total_amount or 0) }} ৳ {{ '%.2f'|format(inv.paid_amount or 0) }} ৳ {{ '%.2f'|format(inv.due_amount or 0) }} {% if inv.payment_status == 'Paid' %}{{ l('Paid','পরিশোধ') }} {% elif inv.payment_status == 'Partial' %}{{ l('Partial','আংশিক') }} {% else %}{{ l('Due','বাকি') }}{% endif %}
{{ l('No invoices yet.','এখনও কোনো ইনভয়েস নেই।') }}
{% if request.args.get('print_receipt_id') %}
{{ l('Due collection successful!', 'বাকি আদায় সফল হয়েছে!') }} {{ l('Click below to print money receipt invoice.', 'মানি রিসিট ইনভয়েস প্রিন্ট করতে ডানে চাপুন।') }}
{{ l('Print Receipt / Invoice', 'ইনভয়েস প্রিন্ট করুন') }}
{% endif %}
{{ l('Payment History','পেমেন্টের ইতিহাস') }}
{{ payments|length }}
{% for p in payments %} {% else %} {% endfor %}
{{ l('Date','তারিখ') }} {{ l('Type','ধরন') }} {{ l('Amount','টাকা') }} {{ l('Method','মাধ্যম') }} {{ l('Note','নোট') }} {{ l('Action','অ্যাকশন') }}
{{ p.created_at.strftime('%d %b %Y, %I:%M %p') if p.created_at else '—' }} {% if p.payment_type == 'due_collection' %} {{ l('Due Collected','বাকি আদায়') }} {% else %} {{ l('Advance','অগ্রিম') }} {% endif %} ৳ {{ '%.2f'|format(p.amount) }} {{ p.method }} {{ p.note or '—' }} {{ l('Print', 'প্রিন্ট') }}
{{ l('No payments recorded yet.','এখনও কোনো পেমেন্ট নেই।') }}
{% endblock %}