{% extends "core/report_base.html" %} {% load seizou_tags %} {% comment %} 請求書の帳票。context は billing.reports.invoice_context が作る。 金額と合計は context に入った値 (明細の写し) をそのまま出し、ここでは計算しない。 頭の「ご請求金額 (税込)」と支払期日の枠 (report-amount) は、得意先の経理の人が最初に探す「いくらをいつまでに」を宛名の下に出す (作者の決め)。 支払期日は枠にだけ出す (番号などの表には出さない = 2 か所に出さない。本人の決め 11-07 23:3x)。取引先の支払の欄が空の請求書では行ごと出さない。振込先の枠は土台 (report_base.html) が合計の下に出す。 品名の下の「注文番号 …」は得意先の注文番号 (受注の写し。作者の決め)。空なら出さない。列は増やさない。 pdf_notice は PDF を作れない環境で、印刷用の HTML に落としたときだけ入る。 前回の残の写しのある請求書 (previous_balance が None でない。0 も写し) だけ、合計の行の後に「前回の残」と「今回のご請求額」(billed_now = 前回の残 + 合計) の行を出し、 頭の「ご請求金額 (税込)」の値を今回のご請求額にする (依頼書 N409b)。写しの無い請求書と、2 つの鍵の無い context (前に残した写しを描き直すとき) は今の字のまま。 {% 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 billed_now is not None %}{{ billed_now|floatformat:"-2g"|yen }}{% else %}{{ total|floatformat:"-2g"|yen }}{% endif %} |
|---|---|
| お支払期日 | {{ invoice.due_on|date:"Y年n月j日" }} |
| 出荷日 | 出荷番号 | 品番 | 品名 | 数量 | 単位 | 単価 | 金額 |
|---|---|---|---|---|---|---|---|
| {{ 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 }} | ||||||
| 前回の残 | {{ previous_balance|floatformat:"-2g"|yen }} | ||||||
| 今回のご請求額 | {{ billed_now|floatformat:"-2g"|yen }} | ||||||