{% extends "core/base.html" %} {% load seizou_tags seizou_icons %} {% block content %}{{ block.super }} {# 送った発注の変更: core の入力の画面と同じ形のカードに、備考の欄と明細の行の表。保存すると services が発注を直し、第 n 版の変更として相手へ送る。 #} {# 画面の全体で開く (小窓にしない = 明細の表が広いため)。形は発注の入力のカード (purchasing/_purchaseorder_card.html)。協力企業と発注日は字で出す (欄にしない)。 #} {# 既にある明細の行は部品と単位を字で出し (直せない)、足す行の単位は数量単位の一覧から選ぶ欄 (部品を選ぶと JS が部品の単位のコードを写す。開発の記録 docs/nights/20261107/N349.md)。相手が出荷した行は単価の欄と消す印を出さず「出荷済み s」を出す。明細の表に「出荷の知らせ」「受入の数」の列を足す (直せる限りが見えるように)。 #} {# 取り消した明細 (明細状態コード 2) は form に出さない。黄の確かめ (取適法) は右上の知らせに出て、ボタンが「このまま保存」になる。 #}
{% csrf_token %}

{% icon "info" "size-4" %}直した明細は、保存と同時に相手へ「第 {{ form.instance.revision_no|add:1 }} 版の変更」として送ります。相手が出荷した明細は、数を出荷済みの数より減らせず、単価は変えられず、取り消せません。

協力企業
{% master_link form.instance.partner %}
発注日
{{ form.instance.order_date|date:"Y-m-d" }}
{% for field in form.visible_fields %}
任意
{{ field }} {% if field.errors %}

{% icon "alert" "size-4" %}{{ field.errors|join:" " }}

{% endif %}
{% endfor %}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}

明細

「取り消す」に印を付けた明細は、行を残して取り消します。何も入れていない足す行は送りません。

{{ form.lines.management_form }} {% if form.lines.non_form_errors %}{% endif %}
{% if not form.hide_money %}{% endif %} {% for row in form.lines %} {% if not form.hide_money %}{% endif %} {% endfor %}
行番号 部品 数量 単位単価納期 備考 出荷の知らせ 受入の数 取り消す
{% for hidden in row.hidden_fields %}{{ hidden }}{% endfor %}{% if row.existing %}{{ row.existing.line_no }}{% endif %}{% if row.non_field_errors %}

{{ row.non_field_errors|join:" " }}

{% endif %}
{% if row.existing %}{% master_link row.existing.item %}{% else %}{{ row.item }}{% if row.item.errors %}

{{ row.item.errors|join:" " }}

{% endif %}{% endif %}
{{ row.qty }}{% if row.qty.errors %}

{{ row.qty.errors|join:" " }}

{% endif %}{% if row.shipped > 0 %}出荷済み {{ row.shipped_text }}{% endif %}
{% if row.existing %}{{ row.existing.unit }}{% else %}{{ row.unit }}{% if row.unit.errors %}

{{ row.unit.errors|join:" " }}

{% endif %}{% endif %}
{% if row.existing and row.shipped > 0 %}{{ row.existing.unit_price|yen }}{% else %}{{ row.unit_price }}{% if row.unit_price.errors %}

{{ row.unit_price.errors|join:" " }}

{% endif %}{% endif %}
{{ row.due_date }} {{ row.note }} {% if row.existing %}{{ row.existing.shipping_notice.total_text }}{% endif %} {% if row.existing %}{{ row.existing.received_total|comma }}{% endif %} {% if row.DELETE %}{{ row.DELETE }}{% endif %}
{% if not form.hide_money %}
{% endif %} {% if next_url %}{% endif %} {% if warnings %}{% endif %} {# 下の行 (キャンセルと保存)。発注の入力のカードと同じ形 (画面の全体は窓の下の端に貼り付けて左に書きかけの字)。キャンセルは発注の詳細へ戻る。 #}
{% if not warnings %}{% include "core/_save_bar.html" %}{% endif %}
{% icon "arrow-left" "size-4" %}キャンセル {% if warnings %} {% else %}{% endif %}
{% include "core/_enter_guard.html" %} {% endblock %}