{% extends "core/detail.html" %} {% load seizou_tags seizou_icons purchasing_tags %} {# 仕入明細の詳細 (作者の決め): core の詳細 (基本情報と「明細」のタブ) の上に、記録の今の状態の黄色の 1 行 (知らせの段 5。閉じるボタンと「確認してください」の頭を付けない) を出す: #} {# (a) 相手の登録番号が空 (b) 今の版が相手に届いていない (送った結果の字と「送り直す」。発注の権限のある人だけボタン。同じ番号で送り直す) (c) 支払期日が受領日から 60 日を超える (purchasing_tags の self_invoice_due_note。止めない)。 #} {# 「明細」のタブは、行番号・発注番号-行番号 (発注の詳細へ link)・品目・受領日・受領数量・単位・単価・金額・相手の答え・直した版の表。タブの後の枠に小計・消費税 (税率)・合計・受入の金額の合計・差。 #} {# 金額の閲覧の無い人には単価と金額の列と、金額の枠を見出しごと出さない。画面には EDI のコードの字を出さず、日本語の字を出す。 #} {# 確認できない明細 (RE) の答えの横に、発注の詳細 (会話のタブ) への link と次の手の字。合計の枠に確認済の金額 (承諾と直した内容の承諾の明細) と、答え待ち・確かめ中の金額 (小計 − 確認済)。 #} {# 「⋯」の「取消」(小窓) は、取消でなく相手の答えが届いていない仕入明細で、発注の権限のある人だけ (作者の決め)。 #} {# 取り消した仕入明細は上に取消の黄の 1 行。取り消した後に相手の前の版への答えが届いたら (行き違い) その黄の 1 行も出す (どちらの記録も消さず、状態を自動で戻さない)。 #} {# 頭の右の緑は「提案を受け入れる」(取消でなく、提案の答えの明細があり、発注の権限のある人だけ)。 #} {% block edit_button %}{% can_write "purchasing.SelfInvoice" as can_si %}{% if can_si and object.status != "cancelled" and object.has_proposal %}{% icon "check" "size-4" %}提案を受け入れる{% endif %}{% endblock %} {% block more %}{% can_write "purchasing.SelfInvoice" as can_si %}{% if can_si and object.status != "cancelled" and not object.has_reply %}{% url 'purchasing:selfinvoice_cancel' object.pk as cancel_url %}{% include "core/_detail_more.html" with more_url=cancel_url more_label="取消" more_modal=True %}{% endif %}{% endblock %} {% block content %}
{% if object.status == "cancelled" %} {% if object.reply_message_id %}{% endif %} {% endif %}{% if not object.supplier_registration_no and object.status != "cancelled" %} {% endif %}{% if object.sent_at is None %}{% can_write "purchasing.SelfInvoice" as can_si %} {% endif %}{% self_invoice_due_note object as due_note %}{% if due_note %} {% endif %}
{{ block.super }}{% endblock %} {% block tab_rows %}{% if tab.related == "lines" %}
{% if not seizou.hide_money %}{% endif %} {% for row in tab.rows %}{% with line=row.obj %} {% if not seizou.hide_money %}{% endif %} {% endwith %}{% endfor %}
行発注番号品目受領日受領数量単位単価金額相手の答え直した版
{{ line.line_no }} {{ line.receipt.line.purchase_order.po_no }}-{{ line.receipt.line.line_no }} {{ line.receipt.line.item }} {{ line.received_on|date:"Y-m-d" }} {{ line.qty|comma }} {{ line.unit }}{{ line.unit_price|yen }} / {{ line.price_unit_text }} {{ line.amount|yen }}{% self_invoice_line_answer line seizou.hide_money as answer %}{% if answer %}{{ answer }}{% else %}—{% endif %}{% if line.reply_type == "RE" %}発注の詳細 の「会話」で、相手と話して、相手に答え直してもらってください。{% endif %} {{ line.revised_in }}
{% else %}{{ block.super }}{% endif %}{% endblock %} {% block after_tabs %}{% if not seizou.hide_money %}{# 合計の枠: 小計・消費税 (税率)・合計と、受入の金額の合計・差 (仕入明細の小計 − 受入の金額の合計) #}

{% icon "yen" "size-5 text-base-content/70" %}合計

{% with receipt_total=object.receipt_total %}
小計
{{ object.subtotal|yen }}
消費税 (税率 {{ object.tax_rate|comma }}%)
{{ object.tax|yen }}
合計
{{ object.total|yen }}
受入の金額の合計
{{ receipt_total|yen }}
{% with confirmed=object.confirmed_subtotal %}
確認済の金額
{{ confirmed|yen }}
答え待ち・確かめ中の金額
{{ object.unconfirmed_subtotal|yen }}
{% endwith %}
差 (小計 − 受入の金額の合計)
{% with difference=object.receipt_difference %}{% if difference == 0 %}差はありません{% else %}{{ difference|yen }}{% endif %}{% endwith %}
{% endwith %}
{% endif %}{% endblock %}