{% extends "core/report_base.html" %} {% load seizou_qr seizou_tags %} {% comment %} 納品書の帳票。context は shipping.reports.delivery_note_context が作る (表を読むだけ)。 数量は出荷の数そのまま (R08)。金額と合計は context に入った値をそのまま出し、ここでは計算しない。 見た目は core の report.css だけを使う (画面の CSS は使わない)。 品名の下の「注文番号 …」は得意先の注文番号 (受注の写し。作者の決め)。空なら出さない。列は増やさない。 pdf_notice は、PDF を作れなかったときに PDF の口が渡す知らせ。 qr_notice は、QR が手元の PC の中だけの住所を指すときの黄色の 1 行 (view が core.reports.qr_url の結果から作る。空なら出さない)。 画面で見るときだけ出し、紙と PDF には出さない (report.css の .report-screen-notice)。PDF を作れなかったときの HTML にも出る。帳票の写しには入らない。 {% endcomment %} {% block title %}納品書 {{ note.number }}{% endblock %} {% block report_title %}納品書{% endblock %} {% block head %} {% if qr_notice %}

{{ qr_notice }}

{% endif %} {% if pdf_notice %}

{{ pdf_notice }}

{% endif %}

{{ customer.name }} 御中

納品書番号{{ note.number }}
発行日{{ note.date|date:"Y年n月j日" }}

下記のとおり納品いたします。

{% endblock %} {% block content %} {% if qr_text %} {# QR は納品書の詳細の URL (社内の人が控えから詳細を開くため)。得意先に渡す紙なので、中身の字は出さない。 #}
{% qr_svg qr_text %}
{% endif %} {% 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 }} {% if not hide_money %}{{ line.unit_price|floatformat:"-2g"|yen }} / {{ line.price_unit }}{% endif %} {% if not hide_money %}{{ line.amount|floatformat:"-2g"|yen }}{% endif %}
合計{% if not hide_money %}{{ total|floatformat:"-2g"|yen }}{% endif %}
{% endblock %}