{% macro render_pagination(pagination, endpoint) %} {# 🌟 UNIVERSAL BULLET-PROOF PAGINATION MACRO #} {% if pagination and pagination.pages > 1 %} {% endif %} {% endmacro %} {% macro status_badge(status) %} {# 🌟 DYNAMIC ENTERPRISE STATUS BADGE MACRO #} {% set s = (status or '') | upper %} {% if s in ['PAID', 'COMPLETED', 'ACTIVE', 'POSTED', 'DELIVERED', 'RESOLVED', 'BALANCED'] %} {{ status }} {% elif s in ['PENDING', 'PARTIAL', 'WAITING', 'DRAFT', 'ORDERED', 'WARNING'] %} {{ status }} {% elif s in ['CANCELLED', 'VOID', 'RETURNED', 'EXPIRED', 'FAILED', 'REJECTED', 'UNBALANCED'] %} {{ status }} {% else %} {{ status or '-' }} {% endif %} {% endmacro %} {# ========================================================================= #} {# 🌟 BUSINESS MODEL & FEATURE ADAPTIVE RESOLUTION ENGINE #} {# ========================================================================= #} {% set _bcfg = branch_cfg if (branch_cfg is defined and branch_cfg is mapping) else {} %} {% set b_type = (_bcfg.get('business_type') or 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 {})) %} {# Branch-effective config (active branch) wins over tenant-level flags so menus follow the SELECTED branch's business type. #} {% set has_bom = _bcfg.get('has_recipe_bom', flag_dict.get('has_recipe_bom', false)) %} {% set has_imei = _bcfg.get('has_imei_serial', flag_dict.get('has_imei_serial', false)) %} {% set has_containers = _bcfg.get('enable_container_deposit', flag_dict.get('enable_container_deposit', b_type == 'LIQUOR')) %} {% set has_uom = _bcfg.get('has_multi_uom', flag_dict.get('has_multi_uom', true)) and b_type not in ['PHONE_IT', 'ELECTRONICS'] %} {% set has_tables = _bcfg.get('enable_pos_tables', flag_dict.get('enable_pos_tables', false)) or _bcfg.get('enable_pos_rooms', flag_dict.get('enable_pos_rooms', false)) %} {% set has_barcode = (b_type not in ['CAFE_RESTAURANT', 'FNB', 'RESTAURANT']) %} {% set has_expiry = (b_type not in ['PHONE_IT', 'ELECTRONICS']) %} {% block title %}myplayer Biz{% endblock %} - {{ tenant.brand_name or 'myplayer Biz' }} {# Core v45 module framework — defined at body scope so BOTH the sidebar and the app-grid launcher see it. #} {% set primary_module = (branch_cfg.primary_module if branch_cfg and branch_cfg.primary_module else 'POS') %} {% if session.get('user_id') %} {% set u_role = session.get('user_role', '') %} {% set is_impersonating = session.get('original_sysadmin_id') is not none %} {% if is_impersonating %}
DIAGNOSTIC MODE သင်သည် လက်ရှိတွင် {{ tenant.brand_name if tenant else 'Store' }} ၏ စနစ်အား စစ်ဆေးရန် Impersonation Mode ဖြင့် ဝင်ရောက်ထားပါသည်။
Platform Admin သို့ ပြန်သွားမည်
{% endif %} {% if liquor_license_warning_days is defined and liquor_license_warning_days is not none %}
အရက်လိုင်စင် သတိပေးချက်: {% if liquor_license_warning_days < 0 %}လိုင်စင် သက်တမ်းကုန်ဆုံးပြီး {{ -liquor_license_warning_days }} ရက် ရှိပါပြီ — အမြန် သက်တမ်းတိုးပါ။ {% else %}လိုင်စင် သက်တမ်းကုန်ဆုံးရန် {{ liquor_license_warning_days }} ရက် သာ ကျန်ရှိပါတော့သည်။{% endif %} (Settings → Company တွင် ပြင်ဆင်နိုင်သည်)
{% endif %} {% if security_defaults_warning and u_role in ['SUPER_ADMIN', 'OWNER'] %}
လုံခြုံရေး သတိပေးချက်: Built-in default လျှို့ဝှက်တန်ဖိုးများ (SECRET_KEY / SYS_ADMIN_PASSWORD) ကို သုံးနေဆဲ ဖြစ်ပါတယ် — ဆော့ဖ်ဝဲလ် ဖိုလ်ဒါရှိ .env ဖိုင်တွင် ကိုယ်ပိုင်တန်ဖိုးများ ပြောင်းလဲသတ်မှတ်ပါ။ ပြောင်းပြီးသည်အထိ ဤသတိပေးချက် ဆက်လက် ပေါ်နေပါမည်။
{% endif %} {% if deployment_mode != 'SAAS' %}{% if license_warning_days is defined and license_warning_days is not none and license_warning_days <= 7 %}
လိုင်စင် သတိပေးချက်: ဤဆော့ဖ်ဝဲလ် သက်တမ်းကုန်ဆုံးရန် {{ license_warning_days }} ရက် သာ ကျန်ရှိပါတော့သည် (လုပ်ငန်းလည်ပတ်မှု မပြတ်တောက်စေရန် အချိန်မီ သက်တမ်းတိုးပေးပါ)။
{% if u_role in ['SUPER_ADMIN', 'OWNER'] %} သက်တမ်းတိုးမည် {% endif %}{% endif %}
{% endif %} {% endif %} {% if session.get('user_id') %}
myplayerBiz APP LAUNCHER
စနစ်အတွင်းရှိ App & Modules အားလုံးကို လျင်မြန်စွာ ရွေးချယ်ပါ (Shortcut: Alt+H)
အရောင်းနှင့် ကောင်တာ (Sales & CRM)
ဝယ်ယူတင်သွင်းမှု (Procurement & AP)
ကုန်ပစ္စည်းနှင့် စတော့ခ် (Catalog & Stock)
{% if has_permission('products') %} {% endif %} {% if has_imei %} {% endif %} {% if has_permission('uoms') and has_uom %} {% endif %} {% if has_permission('assembly') and has_bom %} {% endif %} {% if has_permission('stock_transfers') %} {% endif %} {% if has_permission('damages') %} {% endif %} {% if has_permission('audits') %} {% endif %} {% if has_permission('print_barcodes') and has_barcode %} {% endif %}
ဘဏ္ဍာရေးနှင့် ငွေစာရင်း (Finance & Accounts)
{% if has_permission('employees') or has_permission('payroll') %}
လူ့စွမ်းအား အရင်းအမြစ် (HR & Payroll)
{% endif %}
အရောင်းဆိုင်ရာ အစီရင်ခံစာ (SALES REPORTS)
စတော့နှင့် ကုန်ပစ္စည်း (INVENTORY REPORTS)
ကိုက်ညီသော App / Report ရှာမတွေ့ပါ
စာလုံးပေါင်း မှန်/မမှန် ပြန်လည်စစ်ဆေးပါ
{% endif %}
{% if session.get('user_id') %}
{% if u_role == 'SUPER_ADMIN' and not is_impersonating %}
Platform Master Cloud
{% else %} {% set can_multi_branch = can_switch_branches|default(u_role in ['SUPER_ADMIN', 'OWNER'] and all_branches and all_branches|length > 1) %} {% set is_all_active = is_consolidated_active|default(false) %} {% if can_multi_branch %} {% else %}
{{ branch.name if branch else (tenant.brand_name if tenant else 'Main Store') }}
{% endif %} {% endif %}
{% if not is_desktop|default(false) %}
-- 00:00:00
{% endif %} {% if not is_desktop|default(false) %} လမ်းညွှန် {% endif %}
{% endif %}
{% block breadcrumb %}{% endblock %} {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %} {% endfor %}
{% endif %} {% endwith %} {% block content %}{% endblock %}