{% extends "base.html" %} {% block title %}လစဉ် စာရင်းချုပ်နှင့် စာရင်းပိတ်သိမ်းခြင်း | myplayer Biz{% endblock %} {% block content %} {# ========================================================================= #} {# 🌟 JINJA BULLET-PROOF ENGINE & THREE-STATE RESOLVER #} {# ========================================================================= #} {% set cur_year = today_year | default(2026) %} {% set cur_month = today_month | default(10) %} {# အခြေအနေ ၁: စာရင်းပိတ်ပြီး ဟုတ်/မဟုတ် #} {% set is_locked = (existing_closing and existing_closing.is_locked == 1) %} {# အခြေအနေ ၂: လမကုန်သေးသော လည်ပတ်ဆဲ လက်ရှိလ သို့မဟုတ် အနာဂတ်လ ဟုတ်/မဟုတ် #} {% set is_ongoing = (selected_year > cur_year) or (selected_year == cur_year and selected_month >= cur_month) %} {# အခြေအနေ ၃: စာရင်းပိတ်ရန် အမှန်တကယ် အသင့်ဖြစ်သော လဟောင်း ဟုတ်/မဟုတ် #} {% set is_ready_to_close = (not is_locked and not is_ongoing) %} {% set dmg_loss = total_damage_loss | default(0) %} {% set oth_inc = other_income | default(0) %}
| ကာလ (PERIOD) | ဆိုင်ခွဲ | အရောင်းအသားတင် | ရောင်းကုန်အရင်း + ပျက်စီး | ကုန်ကျစရိတ် + လစာ | အသားတင်အမြတ် (NET PROFIT) | အခြေအနေ | ပိတ်သိမ်းခဲ့သည့်ရက် |
|---|---|---|---|---|---|---|---|
| {{ h.closing_year }}-{{ "%02d"|format(h.closing_month) }} | {{ h.branch_name or 'ဆိုင်ခွဲအားလုံး ပေါင်းချုပ်' }} | {{ "{:,.0f}".format(h.total_sales or 0) }} Ks | {{ "{:,.0f}".format((h.total_cogs or 0) + (h.total_damage_loss or 0)) }} Ks | {{ "{:,.0f}".format((h.total_operating_expenses or 0) + (h.total_payroll or 0)) }} Ks | {{ "{:,.0f}".format(h.net_profit or 0) }} Ks | {% if h.is_locked == 1 %} LOCKED {% else %} UNLOCKED {% endif %} | {{ (h.closed_at | string)[:16] if h.closed_at else '-' }} |
| လချုပ်မှတ်တမ်း မရှိသေးပါ။ | |||||||