{% load seizou_icons %} {# 発注の入力のカード (purchasing/purchaseorder_form.html の画面の全体と purchasing/_form_modal.html の小窓の両方が include する)。 #} {# 発注の欄と明細の行の表と「行を足す」の script。中身は purchaseorder_form.html にあった字のまま移した (N124)。 #} {# 小窓の形 (in_modal) の form は、core/_form_card.html と同じ属性で同じ URL (GET の from_line と line を含む) へ htmx で送り、返った中身で小窓の箱を差し替える。 #} {# 小窓の中の「行を足す」の script は、htmx が差し替えた中身の script を実行するので動く見込み (ブラウザで未確認)。 #} {# 頭の 1 文の後ろの「…保存と同時に注文を送ります。」は、練習モードでは出さない (練習のサーバーは相手へ送らず、上の黄の帯と食い違うため。初見テスト R5 の V08)。 #} {# 2 文目は、送った発注の変更と取消 (相手が出荷し終えるまで送れる) に合わせた字 (C01-2 = a)。 #} {# 工程の列は協力企業に出す工程のある会社だけ (form.has_process)。単価の枡の中に見積の番号と「単価表から選ぶ」(masters/_price_pick_dialog.html の小窓。枠は form の外。部品が空の行は押せない形。C100)。 #}
{% csrf_token %}

{% icon "info" "size-4" %}「必須」の欄と明細を 1 行以上入れて「{{ form.submit_label_plain }}」を押します。入れた値は、止まったときも消えません。{% if not seizou.practice %}つながりのある取引先には、「{{ form.submit_label_plain }}」を押すと保存と同時に注文を送ります。送った発注は、相手が出荷し終えるまでは、変更と取消を相手へ送れます。{% endif %}

{% for field in form.visible_fields %}
{% if field.field.required %}必須{% else %}任意{% endif %}
{{ field }} {% if field.errors %}

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

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

明細

{% include "core/_line_totals.html" %}

何も入れていない行は保存しません。単位が空なら部品の単位を写します。単価は協力企業と決めた値を打ちます (部品の標準単価は写しません)。「単価の単位」を「式」にした行は、数量を掛けずに単価を金額にします。

{{ form.lines.management_form }} {% if form.lines.non_form_errors %}{% endif %}
{% if form.has_process %}{% endif %} {% for row in form.lines %} {% for field in row.visible_fields %}{% if field.name != "quote_no" %} {% endif %}{% endfor %} {% endfor %}
部品 必須工程数量 必須 単位 単価の単位 単価 必須 納期 備考
{{ field }}{% if field.errors %}

{{ field.errors|join:" " }}

{% endif %}{% if field.name == "unit_price" %} {% if row.quote_no %}
{{ row.quote_no }}{% if row.quote_no.errors %}

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

{% endif %}
{% endif %} {% if not seizou.hide_money %}{% endif %} {% endif %}
{% if warnings %}{% endif %} {# 下の行 (キャンセルと保存)。core/_form_card.html と同じ形 (画面の全体は窓の下の端に貼り付けて左に書きかけの字。小窓は今の形のまま。C21)。 #} {% if in_modal %}
{% else %}
{% if not warnings %}{% include "core/_save_bar.html" %}{% endif %}
{% endif %} {% if cancel_url %}{% icon "arrow-left" "size-4" %}キャンセル{% endif %} {% if warnings %} {% else %}{% endif %}
{% include "masters/_price_pick_dialog.html" %} {% include "core/_enter_guard.html" %}