change invoice templates

This commit is contained in:
Daniel Seifert 2020-06-13 22:43:57 +02:00
parent eeb6283a96
commit be18728024
14 changed files with 154 additions and 131 deletions

View File

@ -249,7 +249,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
*/ */
public function renderTemplateFromAdmin() public function renderTemplateFromAdmin()
{ {
return false; return true;
} }
public function output(Html2Pdf $oPdf, $sFilename, $target, $html) public function output(Html2Pdf $oPdf, $sFilename, $target, $html)

View File

@ -1,17 +0,0 @@
[{* fold marks *}]
<div class="marks" style="top: 105mm"></div>
<div class="marks" style="top: 210mm"></div>
[{* punch mark *}]
<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

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

View File

@ -0,0 +1,32 @@
[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}]
[{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">
.marks {
position: absolute;
left: [{math equation="left - padding" left=5 padding=$pagePadding.3}]mm ;
margin-left: 0;
width: 7px;
height: 0;
border-top: 1px solid silver;
}
.marks.foldtop {
top: [{math equation="top - padding" top=105 padding=$pagePadding.0}]mm
}
.marks.foldbottom {
top: [{math equation="top - padding" top=210 padding=$pagePadding.0}]mm
}
.marks.punch {
top: [{math equation="top - padding" top=148.5 padding=$pagePadding.0}]mm
}
</style>

View File

@ -1,9 +0,0 @@
[{assign var="showLogo" value=$showLogo|default:true}]
[{block name="pdfToping"}]
<div class="pdf_header_positioning">
[{if $showLogo}]
<img alt="" src="[{$oViewConf->getImageUrl('pdf_logo.jpg')}]">
[{/if}]
</div>
[{/block}]

View File

@ -0,0 +1,39 @@
[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
[{* rulers *}]
[{* include file="d3pdfrulers.tpl" pagePadding=$pagePadding *}]
<style type="text/css">
.rulerItemHorizontal {
position: absolute;
top: 0;
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 *}]
[{section name=rulerItemsHorizontal start=10 step=10 loop=600}]
<div class="rulerItemHorizontal" style="left: [{math equation="left - padding" left=$smarty.section.rulerItemsHorizontal.index padding=$pagePadding.3}]mm">
[{$smarty.section.rulerItemsHorizontal.index}]
</div>
[{/section}]
[{* vertical *}]
[{section name=rulerItemsVertical start=0 step=10 loop=600}]
<div class="rulerItemVertical" style="top: [{$smarty.section.rulerItemsVe.index}]mm">[{$smarty.section.rulerItemsVertical.index}]</div>
[{/section}]

View File

@ -1,6 +1,8 @@
[{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="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
<style type="text/css"> <style type="text/css">
[{foreach from=$pdfBlock_style item="_block"}] [{foreach from=$pdfBlock_style item="_block"}]
@ -8,7 +10,7 @@
[{/foreach}] [{/foreach}]
</style> </style>
<page pageset="[{$pageset}]" orientation="[{$orientation}]" format="[{$format}]"> <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> <page_header>
[{foreach from=$pdfBlock_header item="_block"}] [{foreach from=$pdfBlock_header item="_block"}]
[{$_block}] [{$_block}]

View File

@ -0,0 +1,9 @@
[{assign var="showLogo" value=$showLogo|default:true}]
[{block name="pdfHeader"}]
<div class="header">
[{if $showLogo}]
<img class="logo" alt="Logo" src="[{$oViewConf->getImageUrl('pdf_logo.jpg')}]">
[{/if}]
</div>
[{/block}]

View File

@ -1,33 +0,0 @@
[{* 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,33 +1,31 @@
[{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"}]
[{capture append="pdfBlock_style"}] [{capture append="pdfBlock_style"}]
[{include file="d3pdfstyle.css"}] [{block name="pdfStyles"}]
[{include file="d3pdfstyles.css"}]
[{/block}]
[{/capture}] [{/capture}]
[{capture append="pdfBlock_header"}] [{capture append="pdfBlock_header"}]
[{block name="pdfTopingFile"}] [{block name="pdfHeader"}]
[{include file="d3pdfheader.tpl" showLogo=true}] [{include file="d3pdfheader.tpl" showLogo=true}]
[{/block}] [{/block}]
[{/capture}] [{/capture}]
[{capture append="pdfBlock_content"}] [{capture append="pdfBlock_content"}]
[{include file="d3pdfrulers.tpl"}] [{*include file="d3pdfrulers.tpl" pagePadding=$pagePadding*}]
[{include file="d3din5008.tpl"}] [{include file="d3foldmarks.tpl" pagePadding=$pagePadding}]
[{* +++++ main page part +++++ *}] [{block name="pdfAddressArea"}]
[{block name="pdfHeadingFile"}]
[{block name="pdfHeaderFile"}]
[{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}] [{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}]
[{/block}] [{/block}]
[{/block}]
[{block name="pdfInformations"}]
[{block name="pdfHeading"}]
<table class="fontSize12 pdf_heading_table marginBottom15" cellspacing="0"> <table class="fontSize12 pdf_heading_table marginBottom15" cellspacing="0">
[{block name="heading_owner_information"}] [{block name="pdfContactInformations"}]
<tr> <tr>
<td class="pdf_heading_width35"> <td class="pdf_heading_width35">
<div class="aligning"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]</strong></div> <div class="aligning"><strong>[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]</strong></div>
@ -116,9 +114,9 @@
[{/capture}] [{/capture}]
[{capture append="pdfBlock_footer"}] [{capture append="pdfBlock_footer"}]
[{block name="pdfFooterFile"}] [{block name="pdfFooter"}]
[{include file="d3pdffooter.tpl"}] [{include file="d3pdffooter.tpl"}]
[{/block}] [{/block}]
[{/capture}] [{/capture}]
[{include file="d3pdfbase.tpl"}] [{include file="d3pdfbase.tpl" pagePadding=$pagePadding}]

View File

@ -35,8 +35,8 @@ $sModuleId = 'd3PdfDocuments';
$aModule = [ $aModule = [
'id' => $sModuleId, 'id' => $sModuleId,
'title' => [ 'title' => [
'de' => $logo.' PDF-Dokumente aus HTML-Templates', 'de' => $logo.' PDF-Dokumente',
'en' => $logo.' PDF documents from HTML templates', 'en' => $logo.' PDF documents',
], ],
'version' => '1.0', 'version' => '1.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)', 'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
@ -62,14 +62,17 @@ $aModule = [
'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl', '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', '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', 'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl',
'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl', 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl',
'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl', 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/footer.tpl',
'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/addressarea.tpl', 'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl',
'd3pdfbackaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/backaddress.tpl',
'd3din5008.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/din5008.tpl', 'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl',
'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/rulers.tpl', 'd3foldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl',
'd3pdfstyle.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css'
'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css',
'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/helper/rulers.tpl',
], ],
'events' => [], 'events' => [],
'blocks' => [ 'blocks' => [

View File

@ -1,3 +1,44 @@
.header {
padding: 5mm;
height: 35mm;
width: 100%;
background-color: lightgreen;
position: relative;
}
.header img.logo {
float: right;
margin: 10mm;
}
.addressarea {
left: 0;
width: 80mm;
height: 45mm;
background-color: lightpink;
position: relative;
}
.addressarea .returnAddress,
.addressarea .recipientAddress {
position: relative;
}
.addressarea .returnAddress {
height: 17.7mm;
background-color: lightyellow;
font-size: 8px;
}
.addressarea .returnAddress div {
padding-top: 3mm;
}
.addressarea .recipientAddress {
height: 27.3mm;
background-color: lightcyan;
}
/*debug hilfe*/ /*debug hilfe*/
.eraseBug{ .eraseBug{
border: dashed blueviolet 1px; border: dashed blueviolet 1px;
@ -35,48 +76,6 @@ table{
padding-top: 5px; padding-top: 5px;
} }
/*pdf_header*/
.pdf_header_positioning{
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*/ /*pdf_footer*/
.pdf_footer_table{ .pdf_footer_table{