{% extends "report/inventree_order_report_base.html" %}
{% comment %}
Quote PDF for inventree-woocommerce quote requests.
Edit this in InvenTree: Admin Center > Reports > "Quote (web shop)". Context:
reference, status, is_draft, created, quoted, valid_until, required_by, currency
customer_name, customer_company, customer_email, customer_phone, company (InvenTree Company or None)
business_details (multi-line text), terms (multi-line text), customer_notes
items - what was asked for: position, kind, description, oem_part_number, machine, quantity,
state ("quoted" / "cannot"), cannot_reason
lines - priced lines: position, item_position, part (InvenTree Part, None for a charge), part_name, ipn, description,
quantity, unit_price, total (Money), lead_time, charge (True for labour, freight... with no part)
subtotal, tax, total (Money), tax_rate (Decimal, %), tax_label ("GST")
{% endcomment %}
{% load i18n %}
{% load report %}
{% block page_margin %}
margin: 1.6cm;
margin-top: 4.2cm;
{% endblock page_margin %}
{% block bottom_left %}
content: "{{ reference }}";
{% endblock bottom_left %}
{% block bottom_center %}
content: "{% if valid_until %}Valid until {{ valid_until|date:'j M Y' }}{% endif %}";
{% endblock bottom_center %}
{% block style %}
{{ block.super }}
.header-right { text-align: right; float: right; }
.business { white-space: pre-line; }
.title { font-size: 20pt; font-weight: bold; letter-spacing: 1px; margin: 0; }
.draft { color: #b00; font-weight: bold; font-size: 11pt; border: 2px solid #b00; padding: 2px 8px; display: inline-block; }
.parties { width: 100%; margin: 0 0 14px 0; border: 0; font-size: 90%; }
.parties td { border: 0; vertical-align: top; padding: 0 12px 0 0; width: 50%; }
.label { color: #777; font-size: 80%; text-transform: uppercase; letter-spacing: 0.5px; }
table.lines th { background: #f2f2f2; text-align: left; padding: 4px; }
table.lines td { padding: 4px; vertical-align: top; }
table.lines td.num, table.lines th.num { text-align: right; white-space: nowrap; }
table.lines tr.totals td { border: 0; }
table.lines tr.grand td { font-weight: bold; border-top: 2px solid #333; }
.muted { color: #777; font-size: 85%; }
.cannot { color: #b00; }
.terms { white-space: pre-line; font-size: 80%; color: #444; margin-top: 18px; }
.notes { white-space: pre-line; }
{% endblock style %}
{% block header_content %}
{% trans "QUOTATION" %}
|
{% trans "From" %}
{% if business_details %}{{ business_details }}{% elif company %}{{ company.name }}{% endif %}
|
{% trans "Quote for" %}
{{ customer_company|default:customer_name }}
{% if customer_company and customer_name %}{{ customer_name }} {% endif %}
{% if customer_email %}{{ customer_email }} {% endif %}
{% if customer_phone %}{{ customer_phone }} {% endif %}
|
|
{% trans "Date" %}
{{ quoted|default:created|date:'j M Y' }}
|
{% if valid_until %} {% trans "Valid until" %} {{ valid_until|date:'j M Y' }} {% endif %}
{% if required_by %}{% trans "Required by" %} {{ required_by|date:'j M Y' }} {% endif %}
|
| # | {% trans "Description" %} | {% trans "Qty" %} | {% trans "Unit price" %} | {% trans "Total" %} | {% trans "Lead time" %} |
|---|---|---|---|---|---|
| {{ line.position }} |
{{ line.description }}
{% if line.part_name and line.part_name != line.description %} {{ line.part_name }}{% if line.ipn %} ({{ line.ipn }}){% endif %} {% endif %}
{% if line.item_position %}{% trans "For your item" %} {{ line.item_position }} {% endif %}
|
{{ line.quantity }} | {% render_currency line.unit_price decimal_places=2 max_decimal_places=2 %} | {% render_currency line.total decimal_places=2 max_decimal_places=2 %} | {{ line.lead_time }} |
| {% trans "No priced lines yet." %} | |||||
| {% trans "Subtotal (ex" %} {{ tax_label }}) | {% render_currency subtotal decimal_places=2 max_decimal_places=2 %} | ||||
| {{ tax_label }} {{ tax_rate|floatformat:"-2" }}% | {% render_currency tax decimal_places=2 max_decimal_places=2 %} | ||||
| {% trans "Total" %}{% if tax_rate %} ({% trans "inc" %} {{ tax_label }}){% endif %} | {% render_currency total decimal_places=2 max_decimal_places=2 %} | ||||
{% trans "Delivery is charged separately unless shown above." %}
{% for item in items %}{% if item.state == "cannot" %}{% trans "Item" %} {{ item.position }} ({{ item.description|default:item.oem_part_number|truncatechars:60 }}): {% trans "we can't supply this" %}{% if item.cannot_reason %} - {{ item.cannot_reason }}{% endif %}
{% endif %}{% endfor %} {% if customer_notes %}