change invoice templates

This commit is contained in:
Daniel Seifert 2020-06-14 00:46:17 +02:00
parent d06c822126
commit 7de9a940cd
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
9 changed files with 134 additions and 99 deletions

View File

@ -1,13 +1,6 @@
[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}] [{assign var="defaultPagePadding" value=","|explode:"45,20,10,25"}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}] [{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
[{* fold marks *}]
<div class="marks foldtop">a</div>
<div class="marks foldbottom">b</div>
[{* punch mark *}]
<div class="marks punch">c</div>
<style type="text/css"> <style type="text/css">
.marks { .marks {
position: absolute; position: absolute;
@ -18,15 +11,22 @@
border-top: 1px solid silver; border-top: 1px solid silver;
} }
.marks.foldtop { .foldtop {
top: [{math equation="top - padding" top=105 padding=$pagePadding.0}]mm top: [{math equation="top - padding" top=105 padding=$pagePadding.0}]mm
} }
.marks.foldbottom { .foldbottom {
top: [{math equation="top - padding" top=210 padding=$pagePadding.0}]mm top: [{math equation="top - padding" top=210 padding=$pagePadding.0}]mm
} }
.marks.punch { .punch {
top: [{math equation="top - padding" top=148.5 padding=$pagePadding.0}]mm top: [{math equation="top - padding" top=148.5 padding=$pagePadding.0}]mm
} }
</style> </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,27 @@
<div class="informations">
<div>
[{block name="pdfContactInformations"}]
<div class="aligning"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]</strong></div>
<div class="aligning fontSize12">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->getFieldData('oxtelefon')}]</div>
<div class="aligning fontSize12">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->getFieldData('oxtelefax')}]</div>
<div class="aligning fontSize12">[{$shop->getFieldData('oxinfoemail')}]</div>
[{/block}]
</div>
<div>
[{block name="pdfBankaccountInformations"}]
<div class="aligning heading_order_paddingTop10"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]</strong></div>
<div class="aligning">[{$shop->getFieldData('oxbankname')}]</div>
<div class="aligning">[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->getFieldData('oxibannumber')}]</div>
<div class="aligning">[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->getFieldData('oxbiccode')}]</div>
[{/block}]
</div>
<div>
[{block name="pdfDocumentInformations"}]
<div class="aligning heading_order_paddingTop10">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}]</div>
<div class="aligning">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]</div>
<div class="aligning">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->getFieldData('oxbilldate')|date_format:"%d.%m.%Y"}]</div>
<div class="aligning">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]</div>
[{/block}]
</div>
</div>

View File

@ -1,4 +1,4 @@
[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}] [{assign var="defaultPagePadding" value=","|explode:"45,20,10,25"}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}] [{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
[{* rulers *}] [{* rulers *}]

View File

@ -1,7 +1,7 @@
[{assign var="pageset" value=$pageset|default:"new"}] [{assign var="pageset" value=$pageset|default:"new"}]
[{assign var="orientation" value=$orientation|default:"P"}] [{assign var="orientation" value=$orientation|default:"P"}]
[{assign var="format" value=$format|default:"A4"}] [{assign var="format" value=$format|default:"A4"}]
[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}] [{assign var="defaultPagePadding" value=","|explode:"45,20,10,25"}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}] [{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
<style type="text/css"> <style type="text/css">

View File

@ -1,32 +1,38 @@
[{assign var="defaultPagePadding" value=","|explode:"45,20,10,25"}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
[{block name="pdfFooter"}] [{block name="pdfFooter"}]
<table class="pdf_footer_table"> <div class="footer" style="padding: 0 [{$pagePadding.1}]mm [{$pagePadding.2}]mm [{$pagePadding.3}]mm">
<tr> <table>
[{block name="shop_basic_information"}] <tr>
<td class="footer_parts"> [{block name="pdfFooterLeft"}]
<div>[{$shop->oxshops__oxname->value}]</div> <td class="footerLeft">
<div>[{$shop->oxshops__oxstreet->value}]</div> <div>[{$shop->oxshops__oxname->value}]</div>
<div>[{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]</div> <div>[{$shop->oxshops__oxstreet->value}]</div>
<div>[{$shop->oxshops__oxcountry->value}]</div> <div>[{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]</div>
<div>[{$shop->oxshops__oxurl->value}]</div> <div>[{$shop->oxshops__oxcountry->value}]</div>
<div>[{$shop->oxshops__oxinfoemail->value}]</div> <div>[{$shop->oxshops__oxurl->value}]</div>
</td> <div>[{$shop->oxshops__oxinfoemail->value}]</div>
[{/block}] </td>
[{block name="owner_basic_information"}] [{/block}]
<td class="vertical-a footer_parts"> [{block name="pdfFooterCenter"}]
<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_MANAGINGDIRECTOR"}][{$shop->oxshops__oxfname->value}] [{$shop->oxshops__oxlname->value}]</div> <td class="footerCenter">
<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_COURT"}] [{$shop->oxshops__oxcourt->value}]</div> <div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_MANAGINGDIRECTOR"}][{$shop->oxshops__oxfname->value}] [{$shop->oxshops__oxlname->value}]</div>
<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_HRBNR"}][{$shop->oxshops__oxhrbnr->value}]</div> <div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_COURT"}] [{$shop->oxshops__oxcourt->value}]</div>
<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTID"}][{$shop->oxshops__oxvatnumber->value}]</div> <div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_HRBNR"}][{$shop->oxshops__oxhrbnr->value}]</div>
</td> <div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTID"}][{$shop->oxshops__oxvatnumber->value}]</div>
[{/block}] </td>
[{block name="bank_basic_information"}] [{/block}]
<td class="vertical-a footer_parts"> [{block name="pdfFooterRight"}]
<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]</div> <td class="footerRight">
<div>[{$shop->oxshops__oxbankname->value}]</div> <div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]</div>
<div>[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]</div> <div>[{$shop->oxshops__oxbankname->value}]</div>
<div>[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE"}][{$shop->oxshops__oxbiccode->value}]</div> <div>[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]</div>
</td> <div>[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE"}][{$shop->oxshops__oxbiccode->value}]</div>
[{/block}] </td>
</tr> [{/block}]
</table> </tr>
</table>
</div>
[{/block}] [{/block}]

View File

@ -3,7 +3,11 @@
[{block name="pdfHeader"}] [{block name="pdfHeader"}]
<div class="header"> <div class="header">
[{if $showLogo}] [{if $showLogo}]
[{* pdf logo is available only in non admin theme *}]
[{assign var="isAdmin" value=$oViewConf->isAdmin()}]
[{$oViewConf->setAdminMode(false)}]
<img class="logo" alt="Logo" src="[{$oViewConf->getImageUrl('pdf_logo.jpg')}]"> <img class="logo" alt="Logo" src="[{$oViewConf->getImageUrl('pdf_logo.jpg')}]">
[{$oViewConf->setAdminMode($isAdmin)}]
[{/if}] [{/if}]
</div> </div>
[{/block}] [{/block}]

View File

@ -1,7 +1,7 @@
[{assign var="currency" value=$order->getOrderCurrency()}] [{assign var="currency" value=$order->getOrderCurrency()}]
[{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}] [{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}]
[{assign var="productVats" value= $order->getProductVats(false)}] [{assign var="productVats" value= $order->getProductVats(false)}]
[{assign var="pagePadding" value=","|explode:"45,20,20,25"}] [{assign var="pagePadding" value=","|explode:"45,20,10,25"}]
[{capture append="pdfBlock_style"}] [{capture append="pdfBlock_style"}]
[{block name="pdfStyles"}] [{block name="pdfStyles"}]
@ -17,60 +17,35 @@
[{capture append="pdfBlock_content"}] [{capture append="pdfBlock_content"}]
[{*include file="d3pdfrulers.tpl" pagePadding=$pagePadding*}] [{*include file="d3pdfrulers.tpl" pagePadding=$pagePadding*}]
[{include file="d3foldmarks.tpl" pagePadding=$pagePadding}] [{include file="d3pdffoldmarks.tpl" pagePadding=$pagePadding}]
[{block name="pdfAddressArea"}] [{block name="pdfAddressArea"}]
[{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}] [{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}]
[{/block}] [{/block}]
[{block name="pdfInformations"}] [{block name="pdfInformations"}]
<table class="fontSize12 pdf_heading_table marginBottom15" cellspacing="0"> [{include file="d3pdfinformations.tpl"}]
[{block name="pdfContactInformations"}]
<tr>
<td class="pdf_heading_width35">
<div class="aligning"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]</strong></div>
<div class="aligning fontSize12">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->getFieldData('oxtelefon')}]</div>
<div class="aligning fontSize12">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->getFieldData('oxtelefax')}]</div>
<div class="aligning fontSize12">[{$shop->getFieldData('oxinfoemail')}]</div>
</td>
</tr>
[{/block}]
[{block name="heading_order_information"}]
<tr>
<td class="vertical-a heading_order_width65 heading_order_paddingTopSub5">
[{* +++++++Lieferadressen dynamisch+++++++ *}]
[{if $order->getFieldData('oxdelstreet')}]
<div class="heading_order_fontSize10 heading_order_paddingBottom8">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]</div>
[{if $order->getFieldData('oxdelcompany')}]<div>[{$order->getFieldData('oxdelcompany')}]</div>[{/if}]
<div>[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]</div>
<div>[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]</div>
<div><strong>[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]</strong></div>
<div>[{$shop->getFieldData('oxcountry')}]</div>
<div>[{$shop->getFieldData('oxdeladdinfo')}]</div>
[{/if}]
[{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}]
<div class="heading_order_paddingTop22 heading_order_fontSize15"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]</strong></div>
[{if $order->getFieldData('d3pdftextkostenstelle_kunden')}]<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->getFieldData('d3pdftextkostenstelle_kunden')}]</div>[{/if}]
<div class="heading_order_paddingTop1">[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]</div>
</td>
<td class="vertical-a heading_order_width35 heading_order_paddingTopSub5">
<div class="aligning heading_order_paddingTop10"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]</strong></div>
<div class="aligning">[{$shop->getFieldData('oxbankname')}]</div>
<div class="aligning">[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->getFieldData('oxibannumber')}]</div>
<div class="aligning">[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->getFieldData('oxbiccode')}]</div>
<div class="aligning heading_order_paddingTop10">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}]</div>
<div class="aligning">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]</div>
<div class="aligning">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->getFieldData('oxbilldate')|date_format:"%d.%m.%Y"}]</div>
<div class="aligning">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]</div>
</td>
</tr>
[{/block}]
</table>
[{/block}] [{/block}]
<div>
[{* +++++++Lieferadressen dynamisch+++++++ *}]
[{if $order->getFieldData('oxdelstreet')}]
<div class="heading_order_fontSize10 heading_order_paddingBottom8">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]</div>
[{if $order->getFieldData('oxdelcompany')}]<div>[{$order->getFieldData('oxdelcompany')}]</div>[{/if}]
<div>[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]</div>
<div>[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]</div>
<div><strong>[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]</strong></div>
<div>[{$shop->getFieldData('oxcountry')}]</div>
<div>[{$shop->getFieldData('oxdeladdinfo')}]</div>
[{/if}]
</div>
<div>
[{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}]
<div class="heading_order_paddingTop22 heading_order_fontSize15"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]</strong></div>
[{if $order->getFieldData('d3pdftextkostenstelle_kunden')}]<div>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->getFieldData('d3pdftextkostenstelle_kunden')}]</div>[{/if}]
<div class="heading_order_paddingTop1">[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]</div>
</div>
[{* +++++Artikeltabelle+++++*}] [{* +++++Artikeltabelle+++++*}]
[{block name="articleListing"}] [{block name="articleListing"}]
@ -115,7 +90,7 @@
[{capture append="pdfBlock_footer"}] [{capture append="pdfBlock_footer"}]
[{block name="pdfFooter"}] [{block name="pdfFooter"}]
[{include file="d3pdffooter.tpl"}] [{include file="d3pdffooter.tpl" pagePadding=$pagePadding}]
[{/block}] [{/block}]
[{/capture}] [{/capture}]

View File

@ -68,7 +68,8 @@ $aModule = [
'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl', 'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl',
'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl', 'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl',
'd3foldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl', 'd3pdfinformations.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/informations.tpl',
'd3pdffoldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl',
'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css', 'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css',

View File

@ -39,6 +39,34 @@
background-color: lightcyan; background-color: lightcyan;
} }
.informations {
width: 75mm;
background-color: greenyellow;
left: 100mm;
top: 5mm;
position: absolute;
}
.footer{
width: 100%;
font-size: 9px;
margin: 0;
position: relative;
}
.footer table {
border-top: solid 1px #000;
width: 165mm;
position: relative;
}
.footerLeft,
.footerCenter,
.footerRight {
width: 33%;
padding: 0 2mm;
}
/*debug hilfe*/ /*debug hilfe*/
.eraseBug{ .eraseBug{
border: dashed blueviolet 1px; border: dashed blueviolet 1px;
@ -78,12 +106,6 @@ table{
/*pdf_footer*/ /*pdf_footer*/
.pdf_footer_table{
width: 688px;
font-size: 9px;
margin: 0 30px 0 30px;
border-top: solid 1px #000;
}
/*pdf_heading*/ /*pdf_heading*/
.pdf_heading_table{ .pdf_heading_table{