# Benuzerdefinierte Tabellen im Druckformat ## Einleitung Verwenden wir im Druckformat benutzerdefinierte Tabellen... ## <div>s verwenden [](https://handbuch.tueit.de/uploads/images/gallery/2021-06/image-1622798852883.png) ### Ohne <div> ```
{{ _('Item Code') }} | {{ _('Description') }} | {{ _('Quantity') }} | {{ _('Price') }} | {{ _('Amount') }} |
---|---|---|---|---|
{% set item = frappe.get_doc("Item", row.item_code) %} {% if item.variant_of %} {{ item.variant_of }} {% else %} {{ item.name }} {% endif %} |
{{ row.description }} {{ _('Country of Origin') }}: {% if item.country_of_origin %} {{ item.country_of_origin }} {% else %} {{ _('None') }} {% endif %} {% for refs in item.customer_items %} {% if refs.customer_name == doc.customer %} {{ _('Your Itemcode')}}: {{ refs.ref_code }} {{ _('Your Itemname')}}: {{ refs.ref_name }} {% else %} {% endif %} {% endfor %} {% if row.batch_no %} {% set batch = frappe.get_doc("Batch", row.batch_no) %} {{ _('Charge') }}: {{ row.batch_no }} {% if batch.print_supplier_batch == 1 %} {{ _('Charge') }} {{ _('Producer') }}: {{ batch.supplier_batch_number }} {% endif %} {{ _('Manufacturing Date') }}: {% if batch.manufacturing_date %} {{ frappe.utils.get_datetime(batch.manufacturing_date).strftime('%d.%m.%Y') }}{% endif %} {{ _('BBE') }}: {% if batch.expiry_date %}{{ frappe.utils.get_datetime(batch.expiry_date).strftime('%d.%m.%Y') }}{% endif %} {% if batch.technical_data_sheet %} {% set tds = frappe.get_doc("Technical Data Sheet", batch.technical_data_sheet) %} {% if tds.certificates %} {{ _('Certificates') }}: {% endif %} {% for certificate in tds.certificates %} {% if certificate.certified == "Yes" %} {{ certificate.type }} {% if certificate.type == "Organic" %} {% if batch.country_of_origin %} {% set country = frappe.get_doc("Country", batch.country_of_origin) %} {% if country.eu_landwirtschaft %} CH-Bio-006 "EU-Landwirtschaft" {% else %} CH-Bio-006 "Nicht-EU-Landwirtschaft" {% endif %} {% endif %} {% endif %} {% endif %} {% endfor %} {% else %} - {% endif %} {% endif %} {{ _('Delivery Date') }}: {{ frappe.utils.get_datetime ( row.delivery_date ).strftime('%d.%m.%Y') }} |
{{ row.qty }} {{ row.uom }} |
{% if row.uom != row.stock_uom %}
{% set rate_in_stock_uom = row.rate * row.conversion_factor %}
{{'%0.2f'| format(rate_in_stock_uom|float) }} {{ currency.symbol }} / {{ row.stock_uom }} {{ row.conversion_factor }} {{ row.stock_uom }} ≘ 1 {{ row.uom}} {% else %} {{'%0.2f'| format(row.rate|float) }} {{ currency.symbol }} / {{ row.uom }} {% endif %} |
{{'%0.2f'| format(row.amount|float) }} {{ currency.symbol }} |
{{ _('Item Code') }} | {{ _('Description') }} | {{ _('Quantity') }} | {{ _('Price') }} | {{ _('Amount') }} |
---|---|---|---|---|
{% set item = frappe.get_doc("Item", row.item_code) %} {% if item.variant_of %} {{ item.variant_of }} {% else %} {{ item.name }} {% endif %} |
{{ row.description }}
{{ _('Country of Origin') }}: {% if item.country_of_origin %} {{ item.country_of_origin }} {% else %} {{ _('None') }} {% endif %} {% for refs in item.customer_items %} {% if refs.customer_name == doc.customer %} {{ _('Your Itemcode')}}: {{ refs.ref_code }} {{ _('Your Itemname')}}: {{ refs.ref_name }} {% else %} {% endif %} {% endfor %} {% if row.batch_no %} {% set batch = frappe.get_doc("Batch", row.batch_no) %} {{ _('Charge') }}: {{ row.batch_no }} {% if batch.print_supplier_batch == 1 %} {{ _('Charge') }} {{ _('Producer') }}: {{ batch.supplier_batch_number }} {% endif %} {{ _('Manufacturing Date') }}: {% if batch.manufacturing_date %} {{ frappe.utils.get_datetime(batch.manufacturing_date).strftime('%d.%m.%Y') }}{% endif %} {{ _('BBE') }}: {% if batch.expiry_date %}{{ frappe.utils.get_datetime(batch.expiry_date).strftime('%d.%m.%Y') }}{% endif %} {% if batch.technical_data_sheet %} {% set tds = frappe.get_doc("Technical Data Sheet", batch.technical_data_sheet) %} {% if tds.certificates %} {{ _('Certificates') }}: {% endif %} {% for certificate in tds.certificates %} {% if certificate.certified == "Yes" %} {{ certificate.type }} {% if certificate.type == "Organic" %} {% if batch.country_of_origin %} {% set country = frappe.get_doc("Country", batch.country_of_origin) %} {% if country.eu_landwirtschaft %} CH-Bio-006 "EU-Landwirtschaft" {% else %} CH-Bio-006 "Nicht-EU-Landwirtschaft" {% endif %} {% endif %} {% endif %} {% endif %} {% endfor %} {% else %} - {% endif %} {% endif %} {{ _('Delivery Date') }}: {{ frappe.utils.get_datetime ( row.delivery_date ).strftime('%d.%m.%Y') }} |
{{ row.qty }} {{ row.uom }} |
{% if row.uom != row.stock_uom %}
{% set rate_in_stock_uom = row.rate * row.conversion_factor %}
{{'%0.2f'| format(rate_in_stock_uom|float) }} {{ currency.symbol }} / {{ row.stock_uom }} {{ row.conversion_factor }} {{ row.stock_uom }} ≘ 1 {{ row.uom}} {% else %} {{'%0.2f'| format(row.rate|float) }} {{ currency.symbol }} / {{ row.uom }} {% endif %} |
{{'%0.2f'| format(row.amount|float) }} {{ currency.symbol }} |