{% extends "base.html" %} {% block content %} {% set b_type = (business_type or (tenant.business_type if tenant else 'RETAIL')) | upper %} {% set flag_dict = flags if flags is mapping else ((tenant.feature_flags | fromjson) if (tenant and tenant.feature_flags is string) else (tenant.feature_flags if tenant and tenant.feature_flags is mapping else {})) %} {# Core v60: fallback recipe-capable set = the types whose business_registry preset ∪ FORCED flags DECLARE has_recipe_bom — keep in sync with business_registry.py (the handler normally passes show_bom from the branch effective config, Core v59). #} {% set has_bom = show_bom if show_bom is defined else (flag_dict.get('has_recipe_bom', false) or b_type in ['PHONE_IT', 'ELECTRONICS', 'CAFE_FNB', 'CAFE_RESTAURANT', 'FNB', 'RESTAURANT', 'BAKERY', 'LIQUOR', 'KTV_LOUNGE', 'HYBRID', 'ENTERPRISE_HYBRID', 'FOOD_PRODUCTION']) %} {% set has_imei = show_imei if show_imei is defined else (flag_dict.get('has_imei_serial', false) or b_type in ['PHONE_IT', 'ELECTRONICS']) %} {% set has_uom = show_uom if show_uom is defined else (flag_dict.get('has_multi_uom', true) and b_type not in ['PHONE_IT', 'ELECTRONICS']) %}

{% if b_type in ['PHONE_IT', 'ELECTRONICS'] %} ဖုန်းနှင့် IT ပစ္စည်းများ စီမံခန့်ခွဲမှု (Hardware & IMEI Catalog) {% elif b_type in ['CAFE_FNB', 'CAFE_RESTAURANT', 'FNB', 'RESTAURANT', 'BAKERY'] %} မီနူး၊ ရောင်းချနိုင်မှု ကန့်သတ်ချက်နှင့် ကုန်ကြမ်း စီမံခန့်ခွဲမှု {% elif b_type in ['HYBRID', 'ENTERPRISE_HYBRID'] %} လုပ်ငန်းစုံ ကုန်ပစ္စည်း၊ မီနူးနှင့် စတော့ခ် စီမံခန့်ခွဲမှု {% else %} ကုန်ပစ္စည်းနှင့် စတော့ခ် စီမံခန့်ခွဲမှု (Catalog & Inventory) {% endif %}

{% if has_bom %} Recipe ပစ္စည်းများ၏ လက်ကျန် Badge ပေါ်နှိပ်၍ (လိုသလောက်ရောင်းမည် / အရေအတွက်ကန့်သတ်မည် / အရောင်းပိတ်မည်) ကို အချိန်မရွေး ပြောင်းလဲနိုင်ပါသည် {% else %} အရောင်းကုန်ပစ္စည်းများ၊ လက်လီ/လက်ကား Multi-UOM နှင့် ဆိုင်ခွဲစတော့ခ်လက်ကျန်များ စီမံပါ {% endif %}
{% if has_bom %} {% endif %}
စုစုပေါင်း ကုန်ပစ္စည်း / Menu

{{ total_count }}

လက်ကျန် စတော့ခ်တန်ဖိုး (Valuation)

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

စတော့ခ်ပြတ် / အရောင်းပိတ်ထားသော ပစ္စည်း

{{ out_of_stock_count }} မျိုး

လက်ရှိ ဆိုင်ခွဲ
{{ branch.name if branch else 'Main Store' }}
{% if below_cost_count and below_cost_count > 0 %} {% endif %}
ရှင်းမည်
{% if has_bom %} {% endif %}
{% if has_uom %} {% endif %} {% for p in products %} {% if has_uom %} {% endif %} {% else %} {% endfor %}
အမည် SKU / Barcode Categoryယူနစ် (UOM)ဝယ်ရင်းဈေး ရောင်းဈေး လက်ကျန် / ရောင်းချနိုင်မှု (Availability) လုပ်ဆောင်ချက်
{% if p.image_url %} {% else %} {% endif %}
{{ p.name }}
{% if p.has_serial_imei %} IMEI/Serial {% endif %} {% if p.is_produced %} Recipe Menu {% endif %} {% if has_uom and p.has_multi_uom %} 📦 {{ p.display_unit_name }} + 🏷️ {{ p.display_base_unit }} {% endif %}
{{ p.display_sku }}
{{ p.barcode or '-' }}
{{ p.category.name if p.category else 'အထွေထွေ' }} {% if p.has_multi_uom %} {{ p.display_unit_name }}
(1:{{ p.display_ratio }} {{ p.display_base_unit }})
{% else %} {{ p.display_unit_name }} {% endif %}
{% if p.is_produced %} BOM (0 Ks) {% else %} {{ "{:,.0f}".format(p.display_cost or 0) }} Ks {% endif %}
{{ "{:,.0f}".format(p.display_pack_price or 0) }} Ks
{% if has_uom and p.has_multi_uom and (p.display_piece_price or 0) > 0 %}
{{ "{:,.0f}".format(p.display_piece_price) }} Ks /{{ p.display_base_unit }}
{% endif %} {% if p.is_below_cost %}
အရှုံး (-{{ "{:,.0f}".format(p.loss_amount) }} Ks)
{% endif %}
{# 🌟 ၁။ Recipe ပစ္စည်းအတွက် 3-Mode Availability & Quota Control #} {% if p.is_produced %} {% set r_mode = p.recipe_mode if p.recipe_mode is defined else 'UNLIMITED' %} {% set r_qty = p.recipe_quota if p.recipe_quota is defined else 0 %} {% if r_mode == 'UNLIMITED' %} လိုသလောက်ရောင်းနိုင်သည် {% elif r_mode == 'LIMITED' and r_qty > 0 %} ကန့်သတ်ချက်: {{ r_qty }} {{ p.display_unit_name }} ကျန် {% else %} {% if r_mode == 'LIMITED' %}ကန့်သတ်ပမာဏ ကုန်သွားပြီ (0){% else %}အရောင်းပိတ်ထားသည် (Sold Out){% endif %} {% endif %} {# ၂။ သာမန် ကုန်ချောပစ္စည်းများ #} {% elif p.display_pack_stock > 0 or p.display_piece_stock > 0 %} {{ p.display_pack_stock }} {{ p.display_unit_name }} {% if p.display_remaining_pieces is defined and p.display_remaining_pieces > 0 %} + {{ p.display_remaining_pieces }} {{ p.display_base_unit }} {% endif %} {% if p.display_reserved_stock > 0 %}
({{ p.display_reserved_stock }} ဖယ်ထား)
{% endif %} {% else %} Out of Stock {% endif %}
{% set var_id = p.main_variant.id if p.main_variant else '' %}
{% if p.is_produced %} {% else %} {% endif %} {% if p.is_branch_active %} {% else %} {% endif %}
စာရင်း မရှိသေးပါ။
{% if total_pages and total_pages > 1 %}
စာမျက်နှာ {{ current_page }} / {{ total_pages }} (စုစုပေါင်း {{ total_count }} ခု)
{% endif %}
{% if has_bom %}
ကုန်ကြမ်းအသစ် ဝယ်ယူဖြည့်တင်းရာတွင် ငွေစာရင်းနှင့် Balance Sheet ကိုက်ညီစေရန် အဝယ်ဘောက်ချာ (/inventory/purchase-entry) မှ ဝယ်ယူသွင်းနိုင်ပါသည်။
{% for r in raw_materials %} {% set r_total_val = (r.current_stock or 0) * (r.cost_per_unit or 0) %} {% else %} {% endfor %}
ကုန်ကြမ်းအမည် ယူနစ် ဝယ်ရင်းဈေး (Cost / Unit) လက်ရှိလက်ကျန် စုစုပေါင်းတန်ဖိုး သတိပေးပမာဏ လုပ်ဆောင်ချက်
🥤 {{ r.name }} {{ r.unit }} {{ "{:,.2f}".format(r.cost_per_unit or 0) }} Ks {{ "{:,.2f}".format(r.current_stock or 0) }} {{ r.unit }} {% if r.usage_unit and r.count_stock is not none %}
{{ "{:,.0f}".format(r.count_stock) }} {{ r.usage_unit }} (အရေအတွက်)
{% elif r.usage_unit and r.usage_factor %}
≈ {{ "{:,.1f}".format((r.current_stock or 0) / r.usage_factor) }} {{ r.usage_unit }}
{% endif %}
{{ "{:,.0f}".format(r_total_val) }} Ks {{ "{:,.2f}".format(r.min_alert_stock or 0) }} {{ r.unit }}
ကုန်ကြမ်းစာရင်း မရှိသေးပါ။ "+ ကုန်ကြမ်းအသစ် (BOM)" ဖြင့် ထည့်သွင်းပါ။
{% endif %}
{% if has_bom %} {% endif %} {% endblock %}