{% load seizou_icons seizou_tags billing_tags %} {# 請求書の小窓 (受け渡しの seizou-部品の6案-20261107/指示書.md の 6。本人の決め 11-07 18:2x〜18:4x「5はmodalでいいかな」= 右の覗き窓でなく今の小窓 #seizou-modal)。請求書の一覧の行の「要点を見る」(目の印。core/_row_summary_link.html) が開く (口は InvoiceModalView)。 #} {# 形は受注の小窓 orders/_modal.html と同じ (題の横の印・項目・明細の先頭の数行・「閉じる」・「詳細を見る」)。読むだけ (小窓の中で保存しない)。請求書には編集の口 (_update) が無いので「編集」は出ない。 #} {# 題の横の印は請求書の詳細の見出しと同じ (取消なら状態の印、ほかは「入金」と入金の状態の印)。項目は土台の fields を使わずに手で描く (土台の先頭の 8 項目では「合計」と「状態」が切れるため)。見出しの字は model の verbose_name と同じ。 #} {# 「合計」と「残」は詳細の頭の札 (invoice_head_chips) と同じく、取消の請求書と金額の閲覧の権限が無い人 (seizou.hide_money) には出さない。明細の金額の列も金額の閲覧の権限が無い人には出さない。 #}

{{ object }}

{% if object.status == "cancelled" %}{% status_badge object dot=True %}{% else %}入金{% payment_badge object dot=True %}{% endif %}
得意先
{{ object.customer.name }}
発行日
{{ object.issued_on }}
締め期間の初め
{{ object.period_from }}
締め期間の終わり
{{ object.period_to }}
支払期日
{% if object.due_on %}{{ object.due_on }}{% else %}—{% endif %}
{% if not seizou.hide_money and object.status != "cancelled" %}
合計
{{ object.total|yen }}
残
{{ object.balance|yen }}
{% endif %}
{% with lines=object.lines.all %}

明細{{ lines|length }}

{% if lines %}
{% if not seizou.hide_money %}{% endif %} {% for line in lines|slice:":5" %} {% if not seizou.hide_money %}{% endif %} {% endfor %}
出荷番号部品数量金額
{% if line.shipment %}{{ line.shipment.shipment_no }}{% else %}一式{% endif %} {{ line.order_line.item.part_no }} {{ line.order_line.item.name }} {{ line.qty|comma }} {{ line.order_line.unit }}{{ line.amount|yen }}
{% if lines|length > 5 %}

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

{% endif %} {% else %}

明細はまだありません。

{% endif %} {% endwith %}