{% extends "core/report_base.html" %} {% load seizou_tags %} {% comment %} 請求書の帳票。context は billing.reports.invoice_context が作る。 金額と合計は context に入った値 (明細の写し) をそのまま出し、ここでは計算しない。 頭の「ご請求金額 (税込)」と支払期日の枠 (report-amount) は、得意先の経理の人が最初に探す「いくらをいつまでに」を宛名の下に出す (見つけ print-02)。 支払期日は枠にだけ出す (番号などの表には出さない = 2 か所に出さない。本人の決め 11-07 23:3x)。取引先の支払の欄が空の請求書では行ごと出さない。振込先の枠は土台 (report_base.html) が合計の下に出す。 品名の下の「注文番号 …」は得意先の注文番号 (受注の写し。見つけ print-03)。空なら出さない。列は増やさない。 pdf_notice は PDF を作れない環境で、印刷用の HTML に落としたときだけ入る。 {% endcomment %} {% block title %}請求書 {{ invoice.number }}{% endblock %} {% block report_title %}請求書{% endblock %} {% block head %} {% if pdf_notice %}

{{ pdf_notice }}

{% endif %}

{{ customer.name }} 御中

請求書番号{{ invoice.number }}
発行日{{ invoice.issued_on|date:"Y年n月j日" }}
期間{{ invoice.period_from|date:"Y年n月j日" }} 〜 {{ invoice.period_to|date:"Y年n月j日" }}

下記のとおりご請求申し上げます。

{% if invoice.due_on %}{% endif %}
ご請求金額 (税込){{ total|floatformat:"-2g"|yen }}
お支払期日{{ invoice.due_on|date:"Y年n月j日" }}
{% endblock %} {% block content %} {% for line in lines %} {% endfor %}
出荷日出荷番号品番品名数量単位単価金額
{{ line.shipped_at|date:"Y年n月j日" }} {{ line.shipment_no }} {{ line.item_code }} {{ line.item_name }}{% if line.customer_order_no %}

注文番号 {{ line.customer_order_no }}

{% endif %}
{{ line.quantity|floatformat:"-2g" }} {{ line.unit }} {{ line.unit_price|floatformat:"-2g"|yen }} / {{ line.price_unit }} {{ line.amount|floatformat:"-2g"|yen }}
小計{{ subtotal|floatformat:"-2g"|yen }}
消費税 ({{ tax_rate_percent }}%){{ tax|floatformat:"-2g"|yen }}
合計{{ total|floatformat:"-2g"|yen }}
{% endblock %}