{% load seizou_icons seizou_tags %} {# 仕入明細を作る入力のカード (purchasing/selfinvoice_form.html の画面の全体が include する)。写した元: billing/_invoice_create_card.html (作者の決め)。 #} {# 欄の格子は form.head_fields (取引先・発行日と会社ごとの項目) だけにし、その下に受入の節を置く。見出しの行 (「受入」「必須」と合計の枠 core/_line_totals.html)・別の取引先の行に残った印の数の黄の 1 行 (selfinvoice_form.html の JS が hidden だけを出し入れする)・受入の表 (form.rows)・欄の誤りと案内の字。 #} {# 表の列 = 選ぶ・受入日・発注番号 (発注番号-行番号)・取引先・部品・数量・単位・金額 (税抜)。金額の閲覧の無い人には金額の列を見出しごと出さない。行が 0 のときは表の箱だけを外す。赤と黄の知らせは右上の知らせ (core/_toasts.html)。 #} {# 金額の閲覧の無い人には、この画面は開いた時点で断る (本人の決め 11-12 07:2x)。seizou.hide_money の分かれは、直に送って断られた時と欄の誤りの描き直しで、金額と単価を見せないための守りとして残す (本人の決め 11-12 14:0x。消さない。試験 = tests/test_money_forms_hide_on_post.py)。 #}
{% csrf_token %} {% if form|has_required %}

{% icon "info" "size-4" %}「必須」の欄を埋めて「{% firstof form.submit_label_plain form.submit_label "保存" %}」を押します。入れた値は、止まったときも消えません。

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

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

{% endif %} {% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% endfor %}
{% with field=form.receipts %}

{{ field.label }}{% if field.field.required %}必須{% endif %}

{% include "core/_line_totals.html" %}
{% if form.rows %}
{% if not form.hide_money %}{% endif %} {% for row in form.rows %} {% if not form.hide_money %}{% endif %} {% endfor %}
選ぶ 受入日 発注番号 取引先 部品 数量 単位金額 (税抜)
{{ row.receipt.received_on|date:"Y-m-d" }} {{ row.receipt.line.purchase_order.po_no }}-{{ row.receipt.line.line_no }} {{ row.receipt.line.purchase_order.partner }} {{ row.receipt.line.item }} {{ row.receipt.qty|comma }} {{ row.receipt.line.unit }}{{ row.amount|yen }}
{% endif %} {% if field.errors %}

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

{% endif %} {% if field.help_text %}

{{ field.help_text }}

{% endif %} {% endwith %} {% for field in form.hidden_fields %}{{ field }}{% endfor %} {% if next_url %}{% endif %} {% if warnings %}{% endif %} {% 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 "core/_enter_guard.html" %}