change invoice pdf templates

This commit is contained in:
Daniel Seifert 2020-06-11 01:29:04 +02:00
parent 3fdc01a68b
commit eeb6283a96
10 changed files with 245 additions and 113 deletions

View File

@ -0,0 +1,12 @@
[{assign var="backaddressfile" value=$backaddressfile|default:"d3pdfbackaddress.tpl"}]
<div class="addressarea">
<div class="backaddress">
<div>
[{include file=$backaddressfile}]
</div>
</div>
<div class="recipientaddress">
[{include file=$addressfile}]
</div>
</div>

View File

@ -0,0 +1 @@
[{$shop->getFielddata('oxname')}] - [{$shop->getFielddata('oxstreet')}] - [{$shop->getFielddata('oxzip')}] [{$shop->getFielddata('oxcity')}]

View File

@ -0,0 +1,27 @@
[{assign var="pageset" value=$pageset|default:"new"}]
[{assign var="orientation" value=$orientation|default:"P"}]
[{assign var="format" value=$format|default:"A4"}]
<style type="text/css">
[{foreach from=$pdfBlock_style item="_block"}]
[{$_block}]
[{/foreach}]
</style>
<page pageset="[{$pageset}]" orientation="[{$orientation}]" format="[{$format}]">
<page_header>
[{foreach from=$pdfBlock_header item="_block"}]
[{$_block}]
[{/foreach}]
</page_header>
<page_footer>
[{foreach from=$pdfBlock_footer item="_block"}]
[{$_block}]
[{/foreach}]
</page_footer>
[{foreach from=$pdfBlock_content item="_block"}]
[{$_block}]
[{/foreach}]
</page>

View File

@ -1,6 +1,17 @@
[{* fold marks *}]
<div style="position: absolute; top: [{math equation="tpos - tpad" tpos=87 tpad=35}]mm; left: [{math equation="lpos - lpad" tpos=5 tpad=10}]mm; margin-left: -10mm; width: 7px; height: 0; border-top: 1px solid silver"></div>
<div style="position: absolute; top: [{math equation="tpos - tpad" tpos=192 tpad=35}]mm; left: [{math equation="lpos - lpad" tpos=5 tpad=10}]mm; margin-left: -10mm; width: 7px; height: 0; border-top: 1px solid silver"></div>
<div class="marks" style="top: 105mm"></div>
<div class="marks" style="top: 210mm"></div>
[{* punch mark *}]
<div style="position: absolute; top: [{math equation="tpos - tpad" tpos=148.5 tpad=35}]mm; left: [{math equation="lpos - lpad" tpos=5 tpad=10}]mm; margin-left: -10mm; width: 7px; height: 0; border-top: 1px solid silver"></div>
<div class="marks" style="top: 148.5mm"></div>
<style type="text/css">
.marks {
position: absolute;
left: 5mm;
margin-left: 0;
width: 7px;
height: 0;
border-top: 1px solid silver;
}
</style>

View File

@ -3,10 +3,7 @@
[{block name="pdfToping"}]
<div class="pdf_header_positioning">
[{if $showLogo}]
[{assign var="logoUrl" value=$oViewConf->getImageUrl('Elektroversand-Schmidt_Logo_180.jpg')}]
[{if $logoUrl}]
<img alt="" src="[{$logoUrl}]">
[{/if}]
<img alt="" src="[{$oViewConf->getImageUrl('pdf_logo.jpg')}]">
[{/if}]
</div>
[{/block}]

View File

@ -0,0 +1,33 @@
[{* rulers *}]
<style type="text/css">
.rulerItemHo {
position: absolute;
top: 0;
width: 0;
height: 7px;
color: blue;
border-left: 1px solid blue
}
.rulerItemVe {
position: absolute;
left: 0;
width: 7px;
height: 0;
color: blue;
border-top: 1px solid blue
}
</style>
[{* horizontal *}]
[{section name=rulerItemsHo start=10 step=10 loop=600}]
<div class="ruleritemHo" style="left: [{$smarty.section.rulerItemsHo.index}]mm">[{$smarty.section.rulerItemsHo.index}]</div>
[{/section}]
[{* vertical *}]
[{section name=rulerItemsVe start=0 step=10 loop=600}]
<div class="ruleritemVe" style="top: [{$smarty.section.rulerItemsVe.index}]mm">[{$smarty.section.rulerItemsVe.index}]</div>
[{/section}]

View File

@ -1,56 +1,9 @@
[{block name="pdfHeading"}]
<table class="fontSize12 pdf_heading_table marginBottom15" cellspacing="0">
[{block name="heading_owner_information"}]
<tr>
<td class="pdf_heading_width65">
<div class="pdf_heading_fontSize8">[{$shop->getFielddata('oxname')}] - [{$shop->getFielddata('oxstreet')}] - [{$shop->getFielddata('oxzip')}] [{$shop->getFielddata('oxcity')}]</div>
</td>
<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">
[{if $order->getFieldData('oxbillcompany')}]
<div>[{$order->getFieldData('oxbillcompany')}]</div>
[{/if}]
<div>[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]</div>
<div>[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]</div>
<div><strong>[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]</strong></div>
<div class="heading_order_paddingBottom15">[{$shop->getFieldData('oxcountry')}]</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}]
[{*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 name="recipientaddress"}]
[{if $order->getFieldData('oxbillcompany')}]
<div>[{$order->getFieldData('oxbillcompany')}]</div>
[{/if}]
<div>[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]</div>
<div>[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]</div>
<div><strong>[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]</strong></div>
<div class="heading_order_paddingBottom15">[{$shop->getFieldData('oxcountry')}]</div>
[{/block}]

View File

@ -2,29 +2,79 @@
[{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}]
[{assign var="productVats" value= $order->getProductVats(false)}]
<style type="text/css">
[{include file="d3pdfstyle.css"}]
</style>
[{capture append="pdfBlock_style"}]
[{include file="d3pdfstyle.css"}]
[{/capture}]
<page backtop="30mm" backbottom="30mm" backleft="10mm" backright="10mm" pageset="new" orientation="P" format="A4">
<page_header>
[{block name="pdfTopingFile"}]
[{include file="d3pdfheader.tpl" showLogo=true}]
[{/block}]
</page_header>
<page_footer>
[{block name="pdfFooterFile"}]
[{include file="d3pdffooter.tpl"}]
[{/block}]
</page_footer>
[{capture append="pdfBlock_header"}]
[{block name="pdfTopingFile"}]
[{include file="d3pdfheader.tpl" showLogo=true}]
[{/block}]
[{/capture}]
[{* +++++ main page part +++++ *}]
[{block name="pdfHeadingFile"}]
[{block name="pdfHeaderFile"}]
[{include file="d3invoice_pdf_addressarea.tpl"}]
[{/block}]
[{capture append="pdfBlock_content"}]
[{include file="d3pdfrulers.tpl"}]
[{include file="d3din5008.tpl"}]
[{* +++++ main page part +++++ *}]
[{block name="pdfHeadingFile"}]
[{block name="pdfHeaderFile"}]
[{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}]
[{/block}]
[{* +++++Artikeltabelle+++++*}]
[{/block}]
[{block name="pdfHeading"}]
<table class="fontSize12 pdf_heading_table marginBottom15" cellspacing="0">
[{block name="heading_owner_information"}]
<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}]
[{* +++++Artikeltabelle+++++*}]
[{block name="articleListing"}]
<table class="order_article_marginTop10" cellspacing="0">
<tr>
@ -34,33 +84,41 @@
<td class="border-bottom order_article_PaddingBottom5 "><div class="aligning order_article_listing_fontSize order_article_listing_width_unitPrice">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_UNITPRICE"}]</div></td>
<td class="border-bottom order_article_PaddingBottom5 "><div class="aligning order_article_listing_fontSize order_article_listing_width_total_Price">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TOTALPRICE"}]</div></td>
</tr>
[{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
<tr>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='fontSize12 aligning order_article_listing_width_amount order_article_listing_paddingRight52'>[{$oOrderArticle->oxorderarticles__oxamount->value }]</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='fontSize12 order_article_listing_width_desc'>
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
<br>
<span class="order_article_listing_fontSize9">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }]</span>
</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='aligning fontSize12 order_article_listing_width_ust'>[{$oOrderArticle->oxorderarticles__oxvat->value }]</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='aligning fontSize12 order_article_listing_width_unitPrice'>[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='aligning fontSize12 order_article_listing_width_total_Price'>[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]</div></td>
</tr>
[{/foreach}]
[{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
<tr>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='fontSize12 aligning order_article_listing_width_amount order_article_listing_paddingRight52'>[{$oOrderArticle->oxorderarticles__oxamount->value }]</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='fontSize12 order_article_listing_width_desc'>
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
<br>
<span class="order_article_listing_fontSize9">[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }]</span>
</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='aligning fontSize12 order_article_listing_width_ust'>[{$oOrderArticle->oxorderarticles__oxvat->value }]</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='aligning fontSize12 order_article_listing_width_unitPrice'>[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]</div></td>
<td class="order_article_PaddingTop5 vertical-a order_article_PaddingBottom5"><div class='aligning fontSize12 order_article_listing_width_total_Price'>[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]</div></td>
</tr>
[{/foreach}]
</table>
[{/block}]
<nobreak>
[{block name="articleCosts"}]
<table class="article_costs_table border-bottom">
<tr>
[{block name="d3_article_costs_summary"}]
[{include file="d3_article_costs_summary.tpl"}]
[{/block}]
</tr>
</table>
[{/block}]
[{block name="pdfPastThankFile"}]
[{include file="d3invoice_pdf_conclusion.tpl"}]
[{/block}]
</nobreak>
</page>
<nobreak>
[{block name="articleCosts"}]
<table class="article_costs_table border-bottom">
<tr>
[{block name="d3_article_costs_summary"}]
[{include file="d3_article_costs_summary.tpl"}]
[{/block}]
</tr>
</table>
[{/block}]
[{block name="pdfPastThankFile"}]
[{include file="d3invoice_pdf_conclusion.tpl"}]
[{/block}]
</nobreak>
[{/capture}]
[{capture append="pdfBlock_footer"}]
[{block name="pdfFooterFile"}]
[{include file="d3pdffooter.tpl"}]
[{/block}]
[{/capture}]
[{include file="d3pdfbase.tpl"}]

View File

@ -62,9 +62,13 @@ $aModule = [
'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl',
'd3_article_costs_summary.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl',
'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/base.tpl',
'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl',
'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl',
'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/addressarea.tpl',
'd3pdfbackaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/backaddress.tpl',
'd3din5008.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/din5008.tpl',
'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/rulers.tpl',
'd3pdfstyle.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css'
],
'events' => [],

View File

@ -37,9 +37,45 @@ table{
/*pdf_header*/
.pdf_header_positioning{
position: absolute;
top: 30px;
right: 44px;
padding: 5mm;
height: 35mm;
width: 100%;
background-color: lightgreen;
position: relative;
}
.pdf_header_positioning img {
float: right;
margin: 10mm;
}
.addressarea {
left: 20mm;
width: 85mm;
height: 45mm;
background-color: lightpink;
position: relative;
}
page .addressarea .backaddress,
page .addressarea .recipientaddress {
position: relative;
margin-left: 5mm;
}
page .addressarea .backaddress {
height: 17.7mm;
background-color: lightyellow;
font-size: 8px;
}
page .addressarea .backaddress div {
padding-top: 3mm;
}
page .addressarea .recipientaddress {
height: 27.3mm;
background-color: lightcyan;
}
/*pdf_footer*/