{% extends "erp_base.html" %} {% block head_extra %}{% endblock %} {%- macro won(v) -%} {%- if v is none -%} {%- elif v == 0 -%}– {%- else -%}{{ "{:,}".format(v) }}{%- endif -%} {%- endmacro -%} {#- 한 칸에 총매출/수수료/차감매출 세 값을 넣고, 보기 전환은 CSS(data-metric)로. -#} {%- macro m3(m) -%} {{ won(m.gross) }}{{ won(m.commission) }}{{ won(m.net) }} {%- endmacro -%} {% block content %}
{% include "performance/_tabs.html" %}
{% for q in nav.quick %} {{ q.label }} {% endfor %}
~ {% for c in codes %}{% if not selected_all %}{% endif %}{% endfor %}
쇼핑몰: {% if selected_all %}전체{% else %}{{ codes | length }}곳{% endif %}
{% if period_kind == 'custom' %} {% else %} {% endif %} {% for c in all_codes %} {% endfor %}
마지막 업데이트 {{ (last_update_at or '')[:16] | replace('T', ' ') or '—' }}
{% if no_marketplaces %}
매출에 포함된 쇼핑몰이 없습니다. {% if is_admin %}실적 설정에서 쇼핑몰 사용을 켜세요.{% endif %}
{% endif %} {% if problems %}
연결 오류 {% for p in problems %}{{ p.name }} · {{ p.label }}{% endfor %} — 해당 쇼핑몰은 마지막 정상 수집분까지만 반영됩니다. 나머지는 정상입니다.
{% endif %}
{% for k in kpis %}
{{ k.label }}
₩{{ "{:,}".format(k.value) }}
{% if k.delta is none %}{{ k.cmp }} 비교 없음 {% else %} {% set up = k.delta > 0 %} {% if k.delta > 0 %}▲{% elif k.delta < 0 %}▼{% else %}–{% endif %} {{ "%.1f" | format(k.delta | abs) }}% {{ k.cmp }} 대비 {% endif %}
{% endfor %}

{% if period_kind == 'year' %}월별 × 쇼핑몰{% else %}일자별 × 쇼핑몰{% endif %}

{% if manual_upload_names %} {% endif %}
{% for c in codes %}{% endfor %} {% for r in table %} {% for c in codes %} {% set m = r.cells[c] %} {% if r.kind == 'day' and c in manual_codes and not r.future %} {% set is_manual = (r.date ~ '|' ~ c) in manual_cells %} {% else %} {% endif %} {% endfor %} {% endfor %}
{% if period_kind == 'year' %}월{% else %}날짜{% endif %}{{ short_names[c] }}{% if c in manual_codes %} ✎{% endif %}{% if period_kind == 'year' %}월 합계{% else %}일 합계{% endif %}
{{ r.label }}{% if r.holiday %}{{ r.holiday }}{% endif %} {{ m3(m) }}{{ m3(m) }}{{ m3(r.total) }}
{% if manual_codes and period_kind != 'year' %}

✎ 표시 쇼핑몰은 날짜 칸을 눌러 총매출을 직접 입력합니다 — Enter 저장 후 아래 칸, Esc 취소, 비우고 저장하면 다시 API 수집값. 파란 숫자 = 수동 입력값. 수수료는 그날 수수료율로 계산되고, 입력을 마치면 합계·그래프가 다시 계산됩니다.

{% endif %}

{% if period_kind == 'year' %}월별{% else %}일별{% endif %} 매출 추이

쇼핑몰별 비중

{{ period.label }}

{{ month.label }} 쇼핑몰별 누적 실적

{% for r in month.rows %} {% endfor %}
쇼핑몰총매출수수료수수료 차감 매출매출 비중
{{ names[r.code] }} {{ won(r.gross) }} {{ won(r.commission) }} {{ won(r.net) }} {% if r.share is not none %}{{ "%.1f" | format(r.share) }}%{% else %}–{% endif %}
합계 {{ won(month.total.gross) }} {{ won(month.total.commission) }} {{ won(month.total.net) }} {% if month.total.share is not none %}100%{% else %}–{% endif %}

{{ year.year }}년 누적

총매출₩{{ "{:,}".format(year.total.gross) }}
수수료₩{{ "{:,}".format(year.total.commission) }}
수수료 차감 매출₩{{ "{:,}".format(year.total.net) }}
{% for r in year.rows %} {% endfor %}
월총매출수수료수수료 차감 매출
{{ r.label }} {{ won(r.gross) }} {{ won(r.commission) }} {{ won(r.net) }}
합계 {{ won(year.total.gross) }} {{ won(year.total.commission) }} {{ won(year.total.net) }}

매출 기준: 결제는 결제일, 취소·반품은 발생일에 반영(음수). 수수료는 그날 적용되는 쇼핑몰 수수료율로 계산하며 일·쇼핑몰 단위로 원 미만 반올림합니다. 금액을 누르면 주문 목록을 볼 수 있습니다.

{% endblock %} {% block scripts %}{% endblock %}