diff --git a/Application/views/tpl/documents/inc/addressarea.tpl b/Application/views/tpl/documents/inc/addressarea.tpl new file mode 100644 index 0000000..8228061 --- /dev/null +++ b/Application/views/tpl/documents/inc/addressarea.tpl @@ -0,0 +1,12 @@ +[{assign var="backaddressfile" value=$backaddressfile|default:"d3pdfbackaddress.tpl"}] + +
+
+
+ [{include file=$backaddressfile}] +
+
+
+ [{include file=$addressfile}] +
+
\ No newline at end of file diff --git a/Application/views/tpl/documents/inc/backaddress.tpl b/Application/views/tpl/documents/inc/backaddress.tpl new file mode 100644 index 0000000..ce03804 --- /dev/null +++ b/Application/views/tpl/documents/inc/backaddress.tpl @@ -0,0 +1 @@ +[{$shop->getFielddata('oxname')}] - [{$shop->getFielddata('oxstreet')}] - [{$shop->getFielddata('oxzip')}] [{$shop->getFielddata('oxcity')}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/base.tpl b/Application/views/tpl/documents/inc/base.tpl new file mode 100644 index 0000000..cd71271 --- /dev/null +++ b/Application/views/tpl/documents/inc/base.tpl @@ -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"}] + + + + + + [{foreach from=$pdfBlock_header item="_block"}] + [{$_block}] + [{/foreach}] + + + + [{foreach from=$pdfBlock_footer item="_block"}] + [{$_block}] + [{/foreach}] + + + [{foreach from=$pdfBlock_content item="_block"}] + [{$_block}] + [{/foreach}] + \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/din5008.tpl b/Application/views/tpl/documents/inc/din5008.tpl index 9319a57..97c2aab 100644 --- a/Application/views/tpl/documents/inc/din5008.tpl +++ b/Application/views/tpl/documents/inc/din5008.tpl @@ -1,6 +1,17 @@ [{* fold marks *}] -
-
+
+
[{* punch mark *}] -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/header.tpl b/Application/views/tpl/documents/inc/header.tpl index cb26520..8886cc3 100644 --- a/Application/views/tpl/documents/inc/header.tpl +++ b/Application/views/tpl/documents/inc/header.tpl @@ -3,10 +3,7 @@ [{block name="pdfToping"}]
[{if $showLogo}] - [{assign var="logoUrl" value=$oViewConf->getImageUrl('Elektroversand-Schmidt_Logo_180.jpg')}] - [{if $logoUrl}] - - [{/if}] + [{/if}]
[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/rulers.tpl b/Application/views/tpl/documents/inc/rulers.tpl new file mode 100644 index 0000000..6eb998d --- /dev/null +++ b/Application/views/tpl/documents/inc/rulers.tpl @@ -0,0 +1,33 @@ +[{* rulers *}] + + + +[{* horizontal *}] +[{section name=rulerItemsHo start=10 step=10 loop=600}] +
[{$smarty.section.rulerItemsHo.index}]
+[{/section}] + +[{* vertical *}] +[{section name=rulerItemsVe start=0 step=10 loop=600}] +
[{$smarty.section.rulerItemsVe.index}]
+[{/section}] + + diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl index 0b34150..410d7bb 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl @@ -1,56 +1,9 @@ -[{block name="pdfHeading"}] - - [{block name="heading_owner_information"}] - - - - - [{/block}] - [{block name="heading_order_information"}] - - - - - [{/block}] -
-
[{$shop->getFielddata('oxname')}] - [{$shop->getFielddata('oxstreet')}] - [{$shop->getFielddata('oxzip')}] [{$shop->getFielddata('oxcity')}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->getFieldData('oxtelefon')}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->getFieldData('oxtelefax')}]
-
[{$shop->getFieldData('oxinfoemail')}]
-
- [{if $order->getFieldData('oxbillcompany')}] -
[{$order->getFieldData('oxbillcompany')}]
- [{/if}] -
[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]
-
[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]
-
[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]
-
[{$shop->getFieldData('oxcountry')}]
- - [{* +++++++Lieferadressen dynamisch+++++++ *}] - [{if $order->getFieldData('oxdelstreet')}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->getFieldData('oxdelcompany')}]
[{$order->getFieldData('oxdelcompany')}]
[{/if}] -
[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]
-
[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]
-
[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]
-
[{$shop->getFieldData('oxcountry')}]
-
[{$shop->getFieldData('oxdeladdinfo')}]
- [{/if}] - - [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]
- [{if $order->getFieldData('d3pdftextkostenstelle_kunden')}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->getFieldData('d3pdftextkostenstelle_kunden')}]
[{/if}] -
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
-
[{$shop->getFieldData('oxbankname')}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->getFieldData('oxibannumber')}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->getFieldData('oxbiccode')}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->getFieldData('oxbilldate')|date_format:"%d.%m.%Y"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]
-
+[{block name="recipientaddress"}] + [{if $order->getFieldData('oxbillcompany')}] +
[{$order->getFieldData('oxbillcompany')}]
+ [{/if}] +
[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]
+
[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]
+
[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]
+
[{$shop->getFieldData('oxcountry')}]
[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 21d62bf..0a28a23 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -2,29 +2,79 @@ [{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}] [{assign var="productVats" value= $order->getProductVats(false)}] - +[{capture append="pdfBlock_style"}] + [{include file="d3pdfstyle.css"}] +[{/capture}] - - - [{block name="pdfTopingFile"}] - [{include file="d3pdfheader.tpl" showLogo=true}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file="d3pdffooter.tpl"}] - [{/block}] - +[{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"}] + + [{block name="heading_owner_information"}] + + + + [{/block}] + [{block name="heading_order_information"}] + + + + + [{/block}] +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->getFieldData('oxtelefon')}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->getFieldData('oxtelefax')}]
+
[{$shop->getFieldData('oxinfoemail')}]
+
+ + + [{* +++++++Lieferadressen dynamisch+++++++ *}] + [{if $order->getFieldData('oxdelstreet')}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
+ [{if $order->getFieldData('oxdelcompany')}]
[{$order->getFieldData('oxdelcompany')}]
[{/if}] +
[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]
+
[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]
+
[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]
+
[{$shop->getFieldData('oxcountry')}]
+
[{$shop->getFieldData('oxdeladdinfo')}]
+ [{/if}] + + [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]
+ [{if $order->getFieldData('d3pdftextkostenstelle_kunden')}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->getFieldData('d3pdftextkostenstelle_kunden')}]
[{/if}] +
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
+
[{$shop->getFieldData('oxbankname')}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->getFieldData('oxibannumber')}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->getFieldData('oxbiccode')}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->getFieldData('oxbilldate')|date_format:"%d.%m.%Y"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]
+
+ [{/block}] + + + [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] @@ -34,33 +84,41 @@ - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_UNITPRICE"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TOTALPRICE"}]
[{$oOrderArticle->oxorderarticles__oxamount->value }]
- [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }] -
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] -
[{$oOrderArticle->oxorderarticles__oxvat->value }]
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->oxorderarticles__oxamount->value }]
+ [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }] +
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] +
[{$oOrderArticle->oxorderarticles__oxvat->value }]
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
[{/block}] - - [{block name="articleCosts"}] - - - [{block name="d3_article_costs_summary"}] - [{include file="d3_article_costs_summary.tpl"}] - [{/block}] - -
- [{/block}] - [{block name="pdfPastThankFile"}] - [{include file="d3invoice_pdf_conclusion.tpl"}] - [{/block}] -
-
+ + [{block name="articleCosts"}] + + + [{block name="d3_article_costs_summary"}] + [{include file="d3_article_costs_summary.tpl"}] + [{/block}] + +
+ [{/block}] + [{block name="pdfPastThankFile"}] + [{include file="d3invoice_pdf_conclusion.tpl"}] + [{/block}] +
+[{/capture}] + +[{capture append="pdfBlock_footer"}] + [{block name="pdfFooterFile"}] + [{include file="d3pdffooter.tpl"}] + [{/block}] +[{/capture}] + +[{include file="d3pdfbase.tpl"}] diff --git a/metadata.php b/metadata.php index 44baee0..5a61d66 100644 --- a/metadata.php +++ b/metadata.php @@ -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' => [], diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 11cf028..da6d6ad 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -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*/