{% load seizou_icons seizou_tags purchasing_tags %} {# 発注の小窓 (受け渡しの seizou-部品の6案-20261107/指示書.md の 6。本人の決め 11-07 18:2x〜18:4x「5はmodalでいいかな」= 右の覗き窓でなく今の小窓 #seizou-modal)。発注の一覧の行の「要点を見る」(目の印。core/_row_summary_link.html) が開く (口は PurchaseOrderModalView)。 #} {# 形は受注の小窓 orders/_modal.html と同じ (題の横の状態の印・項目・明細の先頭の数行・「閉じる」・「詳細を見る」)。読むだけ (小窓の中で保存しない)。発注には編集の口 (_update) が無いので「編集」は出ない (土台が edit_url を空にする)。 #} {# 項目の先頭に詳細の頭の札 (purchasing_tags の purchase_order_head_chips = 協力企業・一番早い納期・版・合計) を並べ、続けて土台の項目を並べる。「状態」(題の横の印) と「取引先」(partner の verbose_name。札の「協力企業」と同じ物) は出さない。 #} {# 明細の表は取り消した明細を外す (purchase_order_modal_lines = 頭の札と同じ数え方)。合計は札の「合計」に出るので表の下には置かない。金額は閲覧の権限が無い人 (seizou.hide_money) に出さない (札の合計も出ない。項目の金額は土台 BaseModalView が外す)。 #}

{{ object }}

{% status_badge object dot=True %}
{% purchase_order_head_chips object seizou.hide_money as chips %}
{% for chip in chips %}
{{ chip.label }}
{{ chip.value }}
{% endfor %} {% for field in fields %}{% if field.label != "状態" and 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 %}
{% purchase_order_modal_lines object as lines %}

明細{{ 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 %} {{ line.received_total|comma }}
{% if lines|length > 5 %}

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

{% endif %} {% else %}

明細はまだありません。

{% endif %}