{% load seizou_icons seizou_tags orders_detail %} {# 受注の小窓 (受け渡しの seizou-部品の6案-20261107/指示書.md の 6。本人の決め 11-07 18:2x〜18:4x「5はmodalでいいかな」= 右の覗き窓でなく今の小窓 #seizou-modal)。受注の一覧の行の「要点を見る」(目の印。core/_row_summary_link.html) が開く (口は OrderModalView)。 #} {# core/_modal.html と同じ形 (題・項目・「閉じる」・「詳細を見る」・編集の権限のある人には「編集」) に、題の横の状態の印 (項目の「状態」は出さない = workorders/_modal.html と同じ) と、明細の先頭の数行と合計を足す。読むだけ (小窓の中で保存しない)。 #} {# 金額は閲覧の権限が無い人 (seizou.hide_money) に出さない (詳細の明細の表と同じ。項目の金額は土台 BaseModalView が外す)。明細は口 (OrderModalView.get_queryset) が出荷済みと残を付けて読んである。 #}

{{ object }}

{% status_badge object dot=True %}
{% for field in fields %}{% if field.label != "状態" %}
{{ field.label|without_yen_unit }}
{% if field.boolean %}{% bool_mark field.value %}{% elif field.value is None or field.value == "" %}—{% else %}{{ field.value|yen_if:field.money }}{% endif %}
{% endif %}{% endfor %}
{% with lines=object.lines.all %}

明細{{ lines|length }}

{% if lines %}
{% if not seizou.hide_money %}{% endif %} {% for line in lines|slice:":5" %} {% if not seizou.hide_money %}{% endif %} {% endfor %}
行番号部品数量金額納期残
{{ line.line_no }} {{ line.item.part_no }} {{ line.item.name }} {{ line.qty|comma }} {{ line.unit }}{{ line.amount|yen }}{% if line.due_date %}{{ line.due_date|date:"Y-m-d" }}{% else %}—{% endif %} {% if line.remaining_total < 0 %}{{ line.remaining_total|comma }}{% else %}{{ line.remaining_total|comma }}{% endif %}
{% if lines|length > 5 %}

先頭の 5 行を出しています (全 {{ lines|length }} 行)。残りは詳細で見られます。

{% endif %} {% if not seizou.hide_money %}{% order_total object as total %}

明細の合計{{ total|yen }}

{% endif %} {% else %}

明細はまだありません。

{% endif %} {% endwith %}