[Added] twig files

This commit is contained in:
MaxBuhe01 2024-09-03 18:35:45 +02:00
parent 8392de0566
commit 4bd3b75931
30 changed files with 877 additions and 0 deletions

View File

@ -0,0 +1,46 @@
{% set pagePadding = ","|explode("45,15,30,25") %} {# top, right, bottom, left #}
{% set showLogo = showLogo|default(true) %}
{% capture append = "pdfBlock_style" %}
{% block pdfStyles %}
{% include "@d3PdfDocuments/assets/d3pdfstyles.css" %}
{% endblock %}
{% endcapture %}
{% capture append = "pdfBlock_header" %}
{% block pdfHeader %}
{% include "@d3PdfDocuments/documents/inc/page/d3pdfheader.html.twig" with {showLogo: showLogo} %}
{% endblock %}
{% endcapture %}
{% capture append = "pdfBlock_content" %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdffoldmarks.html.twig" with {pagePadding: pagePadding} %}
{% block pdfAddressArea %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfaddressarea.html.twig" with {addressfile: "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_recipient.tpl"} %}
{% endblock %}
{% block pdfInformations %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfinformations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_informations.tpl"} %}
{% endblock %}
{% block pdfSalutation %}
{% include "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_salutation.html.twig" %}
{% endblock %}
{% block pdfArticleList %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfarticlelist.html.twig" with {showPrices: false} %}
{% endblock %}
{% block pdfConclusion %}
{% include "@d3PdfDocuments/documents/deliverynote/d3delnote_pdf_conclusion.html.twig" %}
{% endblock %}
{% endcapture %}
{% capture append = "pdfBlock_footer" %}
{% block pdfFooter %}
{% include "@d3PdfDocuments/documents/inc/page/d3pdffooter.html.twig" with {pagePadding: pagePadding} %}
{% endblock %}
{% endcapture %}
{% include "@d3PdfDocuments/documents/inc/page/d3pdfbase.html.twig" with {pagePadding: pagePadding} %}

View File

@ -0,0 +1 @@
{% include "@d3PdfDocuments/documents/deliverynote/d3deliverynote_pdf.html.twig" with {showLogo: false} %}

View File

@ -0,0 +1,6 @@
{% block conclusion %}
<nobreak>
{% block conclusion_thankyou %}
{% endblock %}
</nobreak>
{% endblock %}

View File

@ -0,0 +1,6 @@
[{block name="conclusion"}]
<nobreak>
[{block name="conclusion_thankyou"}]
[{/block}]
</nobreak>
[{/block}]

View File

@ -0,0 +1,10 @@
{% block informations %}
<div class="documentinformations">
{% block pdfDocumentInformations %}
<div>
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
{{ translate({ ident: "D3_PDFDOCUMENTS_DATE", suffix: "COLON" }) }} {{ smarty.now|date_format("dateFormat") }}
</div>
{% endblock %}
</div>
{% endblock %}

View File

@ -0,0 +1,10 @@
[{block name="informations"}]
<div class="documentinformations">
[{block name="pdfDocumentInformations"}]
<div>
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}]
[{oxmultilang ident="D3_PDFDOCUMENTS_DATE" suffix="COLON"}] [{$smarty.now|date_format:$dateFormat}]
</div>
[{/block}]
</div>
[{/block}]

View File

@ -0,0 +1,25 @@
{% block recipientaddress %}
{% if order.getFieldData('oxdellname') %}
{% if order.getFieldData('oxdelcompany') %}
<div class="company">{{ order.getFieldData('oxdelcompany') }}</div>
{% endif %}
<div class="name">{{ order.getFieldData('oxdelfname') }} {{ order.getFieldData('oxdellname') }}</div>
{% if order.getFieldData('oxdeladdinfo') %}
<div class="addinfo">{{ order.getFieldData('oxdeladdinfo') }}</div>
{% endif %}
<div class="street">{{ order.getFieldData('oxdelstreet') }} {{ order.getFieldData('oxdelstreetnr') }}</div>
<div class="location">{{ order.getFieldData('oxdelzip') }} {{ order.getFieldData('oxdelcity') }}</div>
<div class="country">{{ order.getFieldData('oxdelcountry') }}</div>
{% else %}
{% if order.getFieldData('oxbillcompany') %}
<div class="company">{{ order.getFieldData('oxbillcompany') }}</div>
{% endif %}
<div class="name">{{ order.getFieldData('oxbillfname') }} {{ order.getFieldData('oxbilllname') }}</div>
{% if order.getFieldData('oxbilladdinfo') %}
<div class="addinfo">{{ order.getFieldData('oxbilladdinfo') }}</div>
{% endif %}
<div class="street">{{ order.getFieldData('oxbillstreet') }} {{ order.getFieldData('oxbillstreetnr') }}</div>
<div class="location">{{ order.getFieldData('oxbillzip') }} {{ order.getFieldData('oxbillcity') }}</div>
<div class="country">{{ order.getFieldData('oxbillcountry') }}</div>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,25 @@
[{block name="recipientaddress"}]
[{if $order->getFieldData('oxdellname')}]
[{if $order->getFieldData('oxdelcompany')}]
<div class="company">[{$order->getFieldData('oxdelcompany')}]</div>
[{/if}]
<div class="name">[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]</div>
[{if $order->getFieldData('oxdeladdinfo')}]
<div class="addinfo">[{$order->getFieldData('oxdeladdinfo')}]</div>
[{/if}]
<div class="street">[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]</div>
<div class="location">[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]</div>
<div class="country">[{$order->getFieldData('oxdelcountry')}]</div>
[{else}]
[{if $order->getFieldData('oxbillcompany')}]
<div class="company">[{$order->getFieldData('oxbillcompany')}]</div>
[{/if}]
<div class="name">[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]</div>
[{if $order->getFieldData('oxbilladdinfo')}]
<div class="addinfo">[{$order->getFieldData('oxbilladdinfo')}]</div>
[{/if}]
<div class="street">[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]</div>
<div class="location">[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]</div>
<div class="country">[{$order->getFieldData('oxbillcountry')}]</div>
[{/if}]
[{/block}]

View File

@ -0,0 +1,12 @@
{% block salutation %}
<div class="salutation">
<div class="documenttype">{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERYNOTE" }) }}</div>
<div class="documentnumber">{{ translate({ ident: "D3_PDFDOCUMENTS_ORDERNR", suffix: "COLON" }) }} {{ order.getFieldData('oxordernr') }}</div>
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
{% set sArgs = order.getFieldData('oxorderdate')|date_format(dateFormat)|cat("//")|cat(shop.getFieldData('oxname')) %}
{% set aArgs = "//"|explode(sArgs) %}
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_ORDER_FROM_AT", args: aArgs }) }}</div>
</div>
{% endblock %}

View File

@ -0,0 +1,12 @@
[{block name="salutation"}]
<div class="salutation">
<div class="documenttype">[{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERYNOTE"}]</div>
<div class="documentnumber">[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR" suffix="COLON"}] [{$order->getFieldData('oxordernr')}]</div>
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}]
[{assign var="sArgs" value=$order->getFieldData('oxorderdate')|date_format:$dateFormat|cat:"//"|cat:$shop->getFieldData('oxname')}]
[{assign var="aArgs" value="//"|explode:$sArgs}]
<div>[{oxmultilang ident="D3_PDFDOCUMENTS_ORDER_FROM_AT" args=$aArgs}]</div>
</div>
[{/block}]

View File

@ -0,0 +1,13 @@
{% set backaddressfile = backaddressfile|default("@d3PdfDocuments/documents/inc/page/d3pdfreturnaddress.tpl") %}
{% set addressfile = addressfile|default("@d3PdfDocuments/documents/inc/elements/d3pdfrecipientaddress.tpl") %}
<div class="addressarea">
<div class="returnAddress">
<div>
{% include $backaddressfile %}
</div>
</div>
<div class="recipientAddress">
{% include $addressfile %}
</div>
</div>

View File

@ -0,0 +1,254 @@
{% capture name = "sumnetto" %}
{% block sumnetto %}
<tr class="sumnetto">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_SUMNETTO", suffix: "COLON" }) }}
</td>
<td class="values">
{{ order.getFormattedTotalNetSum() }} {{ currency.name }}
</td>
</tr>
{% endblock %}
{% endcapture %}
{% capture name = "discount" %}
{% block discount %}
<tr class="discount">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_DISCOUNT", suffix: "COLON" }) }}
</td>
<td class="values">
{{ order.getFormattedDiscount() }} {{ currency.name }}
</td>
</tr>
{% endblock %}
{% endcapture %}
{% capture name = "producttax" %}
{% block producttax %}
{% for VatKey, oVat in order.getProductVats(false) %}
<tr class="producttax">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_TAX", args: VatKey, suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency($oVat, currency) }} {{ currency.name }}
</td>
</tr>
{% endfor %}
{% endblock %}
{% endcapture %}
{% capture name = "sumbrutto" %}
{% block sumbrutto %}
<tr class="sumbrutto">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_SUMBRUTTO", suffix: "COLON" }) }}
</td>
<td class="values">
{{ order.getFormattedTotalBrutSum() }} {{ currency.name }}
</td>
</tr>
{% endblock %}
{% endcapture %}
{% if order.getFieldData('oxdiscount') %}
{% if order.isNettoMode() %}
{{ smarty.capture.sumnetto }}
{{ smarty.capture.discount }}
{{ smarty.capture.producttax }}
{{ smarty.capture.sumbrutto }}
{% else %}
{{ smarty.capture.sumbrutto }}
{{ smarty.capture.discount }}
{{ smarty.capture.sumnetto }}
{{ smarty.capture.producttax }}
{% endif %}
{% else %}
{{ smarty.capture.sumnetto }}
{{ smarty.capture.producttax }}
{{ smarty.capture.sumbrutto }}
{% endif %}
{% if order.getFieldData('oxvoucherdiscount') %}
{% block voucherdiscount %}
<tr class="voucherdiscount">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_VOUCHERDISCOUNT", suffix: "COLON" }) }}
</td>
<td class="values">
-{{ order.getFormattedTotalVouchers() }} {{ currency.name }}
</td>
</tr>
{% endblock %}
{% endif %}
{% block delivery %}
{% if config.getConfigParam('blShowVATForDelivery') %}
{% set deliveryPrice = order.getOrderDeliveryPrice() %}
<tr class="delivery">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERY_NET", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(deliveryPrice.getNettoPrice(), currency) }} {{ currency.name }}
</td>
</tr>
<tr class="deliverytax">
<td class="indent"></td>
<td class="description">
{% if config.getConfigParam('sAdditionalServVATCalcMethod') != 'proportional' %}
{{ translate({ ident: "D3_PDFDOCUMENTS_TAX", args: order.getFieldData('oxdelvat'), suffix: "COLON" }) }}
{% else %}
{{ translate({ ident: "D3_PDFDOCUMENTS_PROPORTIONAL_TAX", suffix: "COLON" }) }}
{% endif %}
</td>
<td class="values">
{{ lang.formatCurrency(deliveryPrice.getVATValue(), currency) }} {{ currency.name }}
</td>
</tr>
{% else %}
<tr class="delivery">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERY", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(order.getFieldData('oxdelcost'), currency) }} {{ currency.name }}
</td>
</tr>
{% endif %}
{% endblock %}
{% block payment %}
{% if config.getConfigParam('blShowVATForPayCharge') %}
{% set paymentPrice = order.getOrderPaymentPrice() %}
<tr class="payment">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_PAYMENT_NET", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(paymentPrice.getNettoPrice(), currency) }} {{ currency.name }}
</td>
</tr>
<tr class="paymenttax">
<td class="indent"></td>
<td class="description">
{% if config.getConfigParam('sAdditionalServVATCalcMethod') != 'proportional' %}
{{ translate({ ident: "D3_PDFDOCUMENTS_TAX", args: order.getFieldData('oxpayvat'), suffix: "COLON" }) }}
{% else %}
{{ translate({ ident: "D3_PDFDOCUMENTS_PROPORTIONAL_TAX", suffix: "COLON" }) }}
{% endif %}
</td>
<td class="values">
{{ lang.formatCurrency(paymentPrice.getVATValue(), currency) }} {{ currency.name }}
</td>
</tr>
{% else %}
<tr class="payment">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_PAYMENT", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(order.getFieldData('oxpaycost'), currency) }} {{ currency.name }}
</td>
</tr>
{% endif %}
{% endblock %}
{% block wrapping %}
{% if order.getFieldData('oxwrapcost') %}
{% if config.getConfigParam('blShowVATForWrapping') %}
{% set wrappingPrice = order.getOrderWrappingPrice() %}
<tr class="wrapping">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_WRAPPING_NET", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(wrappingPrice.getNettoPrice(), currency) }} {{ currency.name }}
</td>
</tr>
<tr class="wrappingtax">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_UNDEFINED_TAX", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(wrappingPrice.getVATValue(), currency) }} {{ currency.name }}
</td>
</tr>
{% else %}
<tr class="wrapping">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_WRAPPING", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(order.getFieldData('oxwrapcost'), currency) }} {{ currency.name }}
</td>
</tr>
{% endif %}
{% endif %}
{% endblock %}
{% block giftcard %}
{% if order.getFieldData('oxgiftcardcost') %}
{% if config.getConfigParam('blShowVATForWrapping') %}
{% set giftCardPrice = order.getOrderGiftCardPrice() %}
<tr class="giftcard">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_GIFTCARD_NET", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(giftCardPrice.getNettoPrice(), currency) }} {{ currency.name }}
</td>
</tr>
<tr class="wrappingtax">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_UNDEFINED_TAX", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(giftCardPrice.getVATValue(), currency) }} {{ currency.name }}
</td>
</tr>
{% else %}
<tr class="wrapping">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_GIFTCARD", suffix: "COLON" }) }}
</td>
<td class="values">
{{ lang.formatCurrency(order.getFieldData('oxgiftcardcost'), currency) }} {{ currency.name }}
</td>
</tr>
{% endif %}
{% endif %}
{% endblock %}
{% block totalsum %}
<tr class="totalseparator">
<td class="indent"></td>
<td class="description"></td>
<td class="values"></td>
</tr>
<tr class="totalsum">
<td class="indent"></td>
<td class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_TOTALSUMBRUT", suffix: "COLON" }) }}
</td>
<td class="values">
{{ order.getFormattedTotalOrderSum() }} {{ currency.name }}
</td>
</tr>
{% endblock %}

View File

@ -0,0 +1,62 @@
{% set currency = order.getOrderCurrency() %}
{% set showPrices = showPrices|default(true) %}
{% block articlelist %}
<table class="article_table{% if showPrices %}_prices{% endif %}">
<tr>
<th class="amount">
{{ translate({ ident: "D3_PDFDOCUMENTS_AMOUNT" }) }}
</th>
<th class="description">
{{ translate({ ident: "D3_PDFDOCUMENTS_DESCRIPTION" }) }}
</th>
{% if showPrices %}
<th class="tax">
{{ translate({ ident: "D3_PDFDOCUMENTS_USTPERCENTAGE" }) }}
</th>
<th class="unitPrice">
{{ translate({ ident: "D3_PDFDOCUMENTS_UNITPRICE" }) }}
</th>
<th class="totalPrice">
{{ translate({ ident: "D3_PDFDOCUMENTS_TOTALPRICE" }) }}
</th>
{% endif %}
</tr>
{% for orderArticle in order.getOrderArticles(true) %}
<tr>
<td class="amount">
{{ orderArticle.getFieldData('oxamount') }}
</td>
<td class="description">
{{ orderArticle.getFieldData('oxtitle') }} {{ orderArticle.getFieldData('oxselvariant') }}
<br>
<span class="artnr">
{{ translate({ ident: "D3_PDFDOCUMENTS_ARTNR" }) }} {{ orderArticle.getFieldData('oxartnum') }}
</span>
</td>
{% if showPrices %}
<td class="tax">
{{ orderArticle.getFieldData('oxvat') }}
</td>
<td class="unitPrice">
{{ orderArticle.getBrutPriceFormated() }} {{ currency.name }}
</td>
<td class="totalPrice">
{{ orderArticle.getTotalBrutPriceFormated() }} {{ currency.name }}
</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endblock %}
{% if showPrices %}
{% block articleCosts %}
<nobreak>
<table class="article_costs_table">
{% block d3_article_costs_summary %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfarticlecostsummary.html.twig" %}
{% endblock %}
</table>
</nobreak>
{% endblock %}
{% endif %}

View File

@ -0,0 +1,19 @@
{% block deliveryaddress %}
{% if order.getFieldData('oxdelstreet') %}
<div class="deliveryaddress">
<div class="headline">
{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERYADDRESS", suffix: "COLON" }) }}
</div>
{% if order.getFieldData('oxdelcompany') %}
<div class="company">{{ order.getFieldData('oxdelcompany') }}</div>
{% endif %}
<div class="name">{{ order.getFieldData('oxdelfname') }} {{ order.getFieldData('oxdellname') }}</div>
{% if order.getFieldData('oxdeladdinfo') %}
<div class="addinfo">{{ order.getFieldData('oxdeladdinfo') }}</div>
{% endif %}
<div class="street">{{ order.getFieldData('oxdelstreet') }} {{ order.getFieldData('oxdelstreetnr') }}</div>
<div class="location">{{ order.getFieldData('oxdelzip') }} {{ order.getFieldData('oxdelcity') }}</div>
<div class="country">{{ order.getFieldData('oxdelcountry') }}</div>
</div>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,32 @@
{% set defaultPagePadding = ","|explode("45,15,25,25") %} {# top, right, bottom, left #}
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
<style>
.marks {
position: absolute;
left: {{ 5 - pagePadding.3 }}mm ;
margin-left: 0;
width: 7px;
height: 0;
border-top: 1px solid silver;
}
.foldtop {
top: {{ 105 - pagePadding.0 }}mm
}
.foldbottom {
top: {{ 210 - pagePadding.0 }}mm
}
.punch {
top: {{ 148.5 - pagePadding.0 }}mm
}
</style>
{# fold marks #}
<div class="marks foldtop"></div>
<div class="marks foldbottom"></div>
{# punch mark #}
<div class="marks punch"></div>

View File

@ -0,0 +1,39 @@
<div class="informations">
<div class="contactinformations">
{% block pdfContactInformations %}
<div class="headline">
{{ translate({ ident: "D3_PDFDOCUMENTS_GET_IN_CONTACT" }) }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_TELEFON", suffix: "COLON" }) }} {{ shop.getFieldData('oxtelefon') }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_FAX", suffix: "COLON" }) }} {{ shop.getFieldData('oxtelefax') }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_EMAIL", suffix: "COLON" }) }} {{ shop.getFieldData('oxinfoemail') }}
</div>
{% endblock %}
</div>
<div class="bankaccountinformations">
{% block pdfBankaccountInformations %}
<div class="headline">
{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNT" }) }}
</div>
<div>
{{ shop.getFieldData('oxbankname') }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNTNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxibannumber') }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER", suffix: "COLON" }) }} {{ shop.getFieldData('oxbiccode') }}
</div>
{% endblock %}
</div>
{% if documentinformationfile %}
{% include $documentinformationfile %}
{% endif %}
</div>

View File

@ -0,0 +1,12 @@
{% block recipientaddress %}
{% if order.getFieldData('oxbillcompany') %}
<div class="company">{{ order.getFieldData('oxbillcompany') }}</div>
{% endif %}
<div class="name">{{ order.getFieldData('oxbillfname') }} {{ order.getFieldData('oxbilllname') }}</div>
{% if order.getFieldData('oxbilladdinfo') %}
<div class="addinfo">{{ order.getFieldData('oxbilladdinfo') }}</div>
{% endif %}
<div class="street">{{ order.getFieldData('oxbillstreet') }} {{ order.getFieldData('oxbillstreetnr') }}</div>
<div class="location">{{ order.getFieldData('oxbillzip') }} {{ order.getFieldData('oxbillcity') }}</div>
<div class="country">{{ order.getFieldData('oxbillcountry') }}</div>
{% endblock %}

View File

@ -0,0 +1,41 @@
{% set defaultPagePadding = ","|explode("45,15,25,25") %} {# top, right, bottom, left #}
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
{# rulers #}
{# include file="@d3PdfDocuments/documents/inc/helper/d3pdfrulers.tpl" pagePadding=$pagePadding #}
<style>
.rulerItemHorizontal {
position: absolute;
top: -{{ pagePadding.0 }}mm;
width: 0;
height: 7px;
color: blue;
border-left: 1px solid blue
}
.rulerItemVertical {
position: absolute;
left: -{{ pagePadding.3 }}mm;
width: 7px;
height: 0;
color: blue;
border-top: 1px solid blue
}
</style>
{# horizontal #}
{% for rulerItemsHorizontal in 10..600 %}
<div class="rulerItemHorizontal" style="left: {{ smarty.section.rulerItemsHorizontal.index - pagePadding.3 }}mm">
{{ loop.index0 }}
</div>
{% endfor %}
{# vertical #}
{% for rulerItemsVertical in 0..600 %}
<div class="rulerItemVertical" style="top: {{ smarty.section.rulerItemsVertical.index - pagePadding.0 }}mm">
{{ loop.index0 }}
</div>
{% endfor %}

View File

@ -0,0 +1,29 @@
{% set pageset = pageset|default("new") %}
{% set orientation = orientation|default("P") %}
{% set format = format|default("A4") %}
{% set defaultPagePadding = ","|explode("45,15,25,25") %} {# top, right, bottom, left #}
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
<style>
{% for _block in pdfBlock_style %}
{{ _block }}
{% endfor %}
</style>
<page backtop="{{ pagePadding.0 }}mm" backright="{{ pagePadding.1 }}mm" backbottom="{{ pagePadding.2 }}mm" backleft="{{ pagePadding.3 }}mm" pageset="{{ pageset }}" orientation="{{ orientation }}" format="{{ format }}">
<page_header>
{% for _block in pdfBlock_header %}
{{ _block }}
{% endfor %}
</page_header>
<page_footer>
{% for _block in pdfBlock_footer %}
{{ _block }}
{% endfor %}
</page_footer>
{% for _block in pdfBlock_content %}
{{ _block }}
{% endfor %}
</page>

View File

@ -0,0 +1,38 @@
{% set defaultPagePadding = ","|explode("45,15,25,25") %} {# top, right, bottom, left #}
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
{% block pdfFooter %}
<div class="footer" style="margin: 0 {{ pagePadding.1 }}mm 10mm {{ pagePadding.3 }}mm">
<table>
<tr>
{% block pdfFooterLeft %}
<td class="footerLeft">
<div>{{ shop.getFieldData('oxname') }}</div>
<div>{{ shop.getFieldData('oxstreet') }}</div>
<div>{{ shop.getFieldData('oxzip') }} {{ shop.getFieldData('oxcity') }}</div>
<div>{{ shop.getFieldData('oxcountry') }}</div>
<div>{{ shop.getFieldData('oxurl') }}</div>
<div>{{ shop.getFieldData('oxinfoemail') }}</div>
</td>
{% endblock %}
{% block pdfFooterCenter %}
<td class="footerCenter">
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_MANAGINGDIRECTOR", suffix: "COLON" }) }} {{ shop.getFieldData('oxfname') }} {{ shop.getFieldData('oxlname') }}</div>
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_COURT", suffix: "COLON" }) }} {{ shop.getFieldData('oxcourt') }}</div>
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_HRBNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxhrbnr') }}</div>
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_USTID", suffix: "COLON" }) }} {{ shop.getFieldData('oxvatnumber') }}</div>
</td>
{% endblock %}
{% block pdfFooterRight %}
<td class="footerRight">
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNT" }) }}</div>
<div>{{ shop.getFieldData('oxbankname') }}</div>
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNTNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxibannumber') }}</div>
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_BANKCODE", suffix: "COLON" }) }} {{ shop.getFieldData('oxbiccode') }}</div>
</td>
{% endblock %}
</tr>
</table>
</div>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% set showLogo = showLogo|default(true) %}
{% block pdfHeader %}
<div class="header">
{% if showLogo %}
{# pdf logo is available only in non admin theme #}
{% set isAdmin = viewConfig.isAdmin() %}
{{ viewConfig.setAdminMode(false) }}
<img class="logo" alt="Logo" src="{{ viewConfig.getImageUrl('pdf_logo.jpg') }}">
{{ viewConfig.setAdminMode(isAdmin) }}
{% endif %}
</div>
{% endblock %}

View File

@ -0,0 +1 @@
{{ shop.getFielddata('oxname') }} - {{ shop.getFielddata('oxstreet') }} - {{ shop.getFielddata('oxzip') }} {{ shop.getFielddata('oxcity') }} - {{ shop.getFieldData('oxcountry') }}

View File

@ -0,0 +1,19 @@
{% block conclusion %}
<nobreak>
{% block conclusion_paymethod %}
<div class="conclusion_payment">
{{ translate({ ident: "D3_PDFDOCUMENTS_USED_PAYMENTMETHOD", suffix: "COLON" }) }}
{{ payment.getFieldData('oxdesc') }}<br>
{% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf_payinfo.html.twig" %}
</div>
{% endblock %}
{% block conclusion_thankyou %}
<div class="conclusion_thankyou">
{{ translate({ ident: "D3_PDFDOCUMENTS_THANKYOU_1" }) }}<br>
{{ translate({ ident: "D3_PDFDOCUMENTS_THANKYOU_2", args: shop.getFieldData('oxname') }) }}
</div>
{% endblock %}
</nobreak>
{% endblock %}

View File

@ -0,0 +1,19 @@
{% block informations %}
<div class="documentinformations">
{% block pdfDocumentInformations %}
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_ORDERBILLNR", suffix: "COLON" }) }} {{ order.getFieldData('oxbillnr') }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_CUSTOMERNR", suffix: "COLON" }) }} {{ user.getFieldData('oxcustnr') }}
</div>
<div>
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
{{ translate({ ident: "D3_PDFDOCUMENTS_DATE", suffix: "COLON" }) }} {{ order.getFieldData('oxbilldate')|date_format("dateFormat") }}
</div>
<div>
{{ translate({ ident: "D3_PDFDOCUMENTS_USTIDNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxvatnumber') }}
</div>
{% endblock %}
</div>
{% endblock %}

View File

@ -0,0 +1,16 @@
{% block payinfo %}
{% if payment.getId() == 'oxidinvoice' %}
{% block payinfo_billable_till %}
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
{{ translate({ ident: "D3_PDFDOCUMENTS_PAYABLEUNTIL" }) }}
{{ document.getPayableUntilDate()|date_format("dateFormat") }}
{% endblock %}
{% elseif payment.getId() == 'oxidpayadvance' or payment.getId() == 'oxidcreditcard' %}
{% block payinfo_payed %}
{{ translate({ ident: "D3_PDFDOCUMENTS_RECEIVED_PAYMENT" }) }}
{% endblock %}
{% else %}
{% block payinfo_other %}
{% endblock %}
{% endif %}
{% endblock %}

View File

@ -0,0 +1,12 @@
{% block salutation %}
<div class="salutation">
<div class="documenttype">{{ translate({ ident: "D3_PDFDOCUMENTS_INVOICE" }) }}</div>
<div class="documentnumber">{{ translate({ ident: "D3_PDFDOCUMENTS_ORDERNR", suffix: "COLON" }) }} {{ order.getFieldData('oxordernr') }}</div>
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
{% set sArgs = order.getFieldData('oxorderdate')|date_format(dateFormat)|cat("//")|cat(shop.getFieldData('oxname')) %}
{% set aArgs = "//"|explode(sArgs) %}
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_ORDER_FROM_AT", args: aArgs }) }}</div>
</div>
{% endblock %}

View File

@ -0,0 +1,51 @@
{% set pagePadding = ","|explode("45,15,30,25") %} {# top, right, bottom, left #}
{% set showLogo = showLogo|default(true) %}
{% capture append = "pdfBlock_style" %}
{% block pdfStyles %}
{% include "@d3PdfDocuments/assets/d3pdfstyles.css" %}
{% endblock %}
{% endcapture %}
{% capture append = "pdfBlock_header" %}
{% block pdfHeader %}
{% include "@d3PdfDocuments/documents/inc/page/d3pdfheader.html.twig" with {showLogo: showLogo} %}
{% endblock %}
{% endcapture %}
{% capture append = "pdfBlock_content" %}
{# include file="@d3PdfDocuments/documents/inc/helper/d3pdfrulers.tpl" pagePadding=$pagePadding #}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdffoldmarks.html.twig" with {pagePadding: pagePadding} %}
{% block pdfAddressArea %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfaddressarea.html.twig" %}
{% endblock %}
{% block pdfInformations %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfinformations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/invoice/d3invoice_pdf_informations.tpl"} %}
{% endblock %}
{% block pdfDeliveryAddress %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfdeladdress.html.twig" %}
{% endblock %}
{% block pdfSalutation %}
{% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf_salutation.html.twig" %}
{% endblock %}
{% block pdfArticleList %}
{% include "@d3PdfDocuments/documents/inc/elements/d3pdfarticlelist.html.twig" %}
{% endblock %}
{% block pdfConclusion %}
{% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf_conclusion.html.twig" %}
{% endblock %}
{% endcapture %}
{% capture append = "pdfBlock_footer" %}
{% block pdfFooter %}
{% include "@d3PdfDocuments/documents/inc/page/d3pdffooter.html.twig" with {pagePadding: pagePadding} %}
{% endblock %}
{% endcapture %}
{% include "@d3PdfDocuments/documents/inc/page/d3pdfbase.html.twig" with {pagePadding: pagePadding} %}

View File

@ -0,0 +1 @@
{% include "@d3PdfDocuments/documents/invoice/d3invoice_pdf.html.twig" with {showLogo: false} %}

View File

@ -0,0 +1,46 @@
{% if edit and oView.d3CanExport() %}
<br>
<form name="d3CreatePdf" id="d3CreatePdf" action="{{ oViewConf.getSelfLink() }}" method="post" target="d3ExpPDF">
{{ oViewConf.getHiddenSid()|raw }}
<input type="hidden" name="cl" value="order_overview">
<input type="hidden" name="fnc" value="d3CreatePDF">
<input type="hidden" name="oxid" value="{{ oxid }}">
<fieldset style="padding: 5px">
<legend>{{ translate({ ident: "D3_PDFDOCUMENTS" }) }}</legend>
<table style="width: 100%">
<tr>
<td rowspan="3">
<img src="{{ oViewConf.getModuleUrl('d3PdfDocuments', 'out/img/pdf.svg') }}" style="height:4em;width:4em" alt="{{ translate({ ident: "D3_PDFDOCUMENTS" }) }}">
</td>
<td style="vertical-align: top; text-align: right" class="edittext">
<label for="pdftype">{{ translate({ ident: "D3_PDFDOCUMENTS_PDF_TYPE" }) }}</label>:&nbsp;
<select id="pdftype" name="pdftype" class="editinput" style="width:80px;">
{% block d3_pdfdocuments_order_overview_pdfTypeOptions %}
{% set generatorList = oView.d3getGeneratorList() %}
{% for generator in generatorList.getList() %}
<option value="{{ generator.getRequestId() }}">{{ translate({ ident: generator.getTitleIdent() }) }}</option>
{% endfor %}
{% endblock %}
</select>
</td>
</tr>
<tr>
<td style="text-align: right" class="edittext">
<label for="pdflanguage">{{ translate({ ident: "D3_PDFDOCUMENTS_LANGUAGE" }) }}</label>
<select id="pdflanguage" name="pdflanguage" class="saveinnewlanginput" style="width:80px;">
{% for lang, slang in alangs %}
<option value="{{ lang }}" {% if lang == "0" %}SELECTED{% endif %}>{{ slang }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td style="text-align: right" class="edittext"><br/>
<input type="submit" class="edittext" name="save" value="{{ translate({ ident: "D3_PDFDOCUMENTS_PDF_GENERATE" }) }}">
<iframe name="d3ExpPDF" style="width: 0; height: 0; border: none; display:none;"></iframe>
</td>
</tr>
</table>
</fieldset>
</form>
{% endif %}

View File

@ -0,0 +1,7 @@
{% extends "order_overview.html.twig" %}
{% block admin_order_overview_export %}
{{ parent() }}
{% include "@d3PdfDocuments/admin/orderoverview_pdfform.html.twig" %}
{% endblock %}