{% extends "base.html" %} {% block title %}အရောင်းမှတ်တမ်းများ (Sales History) | myplayer Biz{% endblock %} {% block content %} {% set ns = namespace(due=0, paid=0) %} {% for o in orders %} {% set ns.due = ns.due + (o.due_amount or 0) %} {% set ns.paid = ns.paid + (o.paid_amount or 0) %} {% endfor %}

အရောင်းမှတ်တမ်းများ (Sales History)

{% if user_role == 'CASHIER' or session.get('user_role') == 'CASHIER' %} Cashier: {{ active_branch.name if active_branch else 'Assigned Branch' }} {% endif %}
အရောင်းဘောက်ချာများ၊ စားပွဲဝိုင်းများနှင့် ရောင်းချသူဝန်ထမ်း (Cashier) မှတ်တမ်းများ စစ်ဆေးခြင်း • ({{ branch_timezone or 'Asia/Yangon' }})
စုစုပေါင်း အရောင်းရငွေ (SALES REVENUE)

{{ "{:,.0f}".format(total_sales_sum) }} Ks

စစ်ထုတ်ထားသော အရောင်းရငွေ စုစုပေါင်း
ပေးချေပြီးငွေ (PAID TOTAL)

{{ "{:,.0f}".format(total_paid_sum if total_paid_sum is defined else ns.paid) }} Ks

ငွေသားနှင့် ဒစ်ဂျစ်တယ် လက်ခံရရှိငွေ
ကောက်ခံရန်ကျန် အကြွေး (ACCOUNTS RECEIVABLE)

{{ "{:,.0f}".format(total_due_sum if total_due_sum is defined else ns.due) }} Ks

ဖောက်သည်များထံမှ ရရန်ကျန် ကုန်ကြွေးငွေ
ဘောက်ချာစောင်ရေ စုစုပေါင်း

{{ total_invoices_count }} စောင်

ကာလအပိုင်းအခြားအတွင်း စာရင်း
{% if cashier_summary_list is defined and cashier_summary_list|length > 0 %}
ရောင်းချသူ (Cashier / User) အလိုက် ရောင်းအား အထောက်အထား အနှစ်ချုပ် (ဝန်ထမ်းအမည်ပေါ်နှိပ်၍ ၎င်းရောင်းထားသော ဘောက်ချာများကို စစ်ထုတ်နိုင်သည်) {% if selected_cashier is defined and selected_cashier != 'ALL' %} ✕ ဝန်ထမ်းအားလုံး ပြန်ပြမည် {% endif %}
{% for cs in cashier_summary_list %}
🧑‍💼 {{ cs.full_name }} {% if cs.username and cs.username != '-' %} (@{{ cs.username }}) {% endif %}
{{ cs.invoice_count }} စောင်
ရောင်းရငွေ: {{ "{:,.0f}".format(cs.total_sales) }} Ks လက်ငင်းရ: {{ "{:,.0f}".format(cs.total_collected) }} Ks
{% endfor %}
{% endif %}
{% if user_role == 'CASHIER' or session.get('user_role') == 'CASHIER' %}
{% else %} {% endif %}
မှ
အရောင်းဘောက်ချာစာရင်း
ပြသမှု: နောက်ဆုံး {{ orders|length }} စောင်
{% for o in orders %} {% else %} {% endfor %}
ဘောက်ချာအမှတ် ဆိုင်ခွဲ ရက်စွဲ & အချိန် ရောင်းချသူ (Cashier) ဖောက်သည် အမည် ကျသင့်ငွေ စုစုပေါင်း ပေးရန်ကျန် (Due) ငွေချေမှု လုပ်ဆောင်ချက်
{{ o.invoice_no }} {% if o.table_name %} {% if o.order_type == 'TAKEAWAY' %}🥡{% else %}🪑{% endif %} {{ o.table_name }} {% endif %} {{ o.branch.name if o.branch else '-' }} {{ o.created_at | format_time(branch_timezone) }} {% if o.cashier %}
{{ o.cashier.full_name[0] | upper }}
{{ o.cashier.full_name }}
@{{ o.cashier.username }}
{% else %} System / Owner {% endif %}
{{ o.customer.name if o.customer else 'အထွေထွေ ဖောက်သည်' }}
{% if o.customer and o.customer.phone %} {{ o.customer.phone }} {% endif %}
{{ "{:,.0f}".format(o.grand_total) }} Ks {% if o.due_amount and o.due_amount > 0 %} - {{ "{:,.0f}".format(o.due_amount) }} Ks {% else %} - {% endif %} {% if o.payment_method == 'COD' %} COD {% elif o.due_amount and o.due_amount > 0 and o.paid_amount > 0 %} PARTIAL {% elif (o.due_amount and o.due_amount > 0 and o.paid_amount == 0) or o.payment_status == 'UNPAID' or o.payment_method == 'CREDIT' %} CREDIT {% else %} {{ o.payment_method or 'CASH' }} {% endif %}
ရှာဖွေတွေ့ရှိသော အရောင်းဘောက်ချာ မရှိသေးပါ
{% endblock %}