From 62bd39a1a1027bbcd454a3d3b8b12995f578ec42 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 26 May 2020 15:28:36 +0200 Subject: [PATCH 001/134] move files to current pdf documents branch structure --- .../d3/pdfdocuments/src/Application}/views/tpl/deliverynote.tpl | 0 .../src/Application}/views/tpl/includingFiles/pdfFooter.tpl | 0 .../src/Application}/views/tpl/includingFiles/pdfHeader.tpl | 0 .../src/Application}/views/tpl/includingFiles/pdfPastThank.tpl | 0 .../src/Application}/views/tpl/includingFiles/pdfToping.tpl | 0 .../src/Modules}/Application/Model/d3_Order_PdfDocuments.php | 0 .../modules/d3/pdfdocuments/src/Modules}/out/src/deliverynote.css | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename {Application => source/modules/d3/pdfdocuments/src/Application}/views/tpl/deliverynote.tpl (100%) rename {Application => source/modules/d3/pdfdocuments/src/Application}/views/tpl/includingFiles/pdfFooter.tpl (100%) rename {Application => source/modules/d3/pdfdocuments/src/Application}/views/tpl/includingFiles/pdfHeader.tpl (100%) rename {Application => source/modules/d3/pdfdocuments/src/Application}/views/tpl/includingFiles/pdfPastThank.tpl (100%) rename {Application => source/modules/d3/pdfdocuments/src/Application}/views/tpl/includingFiles/pdfToping.tpl (100%) rename {Modules => source/modules/d3/pdfdocuments/src/Modules}/Application/Model/d3_Order_PdfDocuments.php (100%) rename {Modules => source/modules/d3/pdfdocuments/src/Modules}/out/src/deliverynote.css (100%) diff --git a/Application/views/tpl/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote.tpl similarity index 100% rename from Application/views/tpl/deliverynote.tpl rename to source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote.tpl diff --git a/Application/views/tpl/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfFooter.tpl similarity index 100% rename from Application/views/tpl/includingFiles/pdfFooter.tpl rename to source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfFooter.tpl diff --git a/Application/views/tpl/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfHeader.tpl similarity index 100% rename from Application/views/tpl/includingFiles/pdfHeader.tpl rename to source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfHeader.tpl diff --git a/Application/views/tpl/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfPastThank.tpl similarity index 100% rename from Application/views/tpl/includingFiles/pdfPastThank.tpl rename to source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfPastThank.tpl diff --git a/Application/views/tpl/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfToping.tpl similarity index 100% rename from Application/views/tpl/includingFiles/pdfToping.tpl rename to source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfToping.tpl diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php similarity index 100% rename from Modules/Application/Model/d3_Order_PdfDocuments.php rename to source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php diff --git a/Modules/out/src/deliverynote.css b/source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css similarity index 100% rename from Modules/out/src/deliverynote.css rename to source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css From f2180a6ad376d5c7356f2daa16c430929c8d5c63 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 15 May 2020 15:36:43 +0200 Subject: [PATCH 002/134] add: pdfDocuments_EVS module and it's correspoding files # Conflicts: # source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php # source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css --- .../views/tpl/deliverynote/deliverynote.tpl | 91 +++++++++ .../deliverynote/includingFiles/pdfFooter.tpl | 32 ++++ .../deliverynote/includingFiles/pdfHeader.tpl | 52 ++++++ .../includingFiles/pdfPastThank.tpl | 16 ++ .../deliverynote/includingFiles/pdfToping.tpl | 5 + .../tpl/invoice/includingFiles/pdfFooter.tpl | 32 ++++ .../tpl/invoice/includingFiles/pdfHeader.tpl | 56 ++++++ .../invoice/includingFiles/pdfPastThank.tpl | 16 ++ .../tpl/invoice/includingFiles/pdfToping.tpl | 5 + .../Application/views/tpl/invoice/invoice.tpl | 87 +++++++++ .../tpl/invoiceCorrection/deliverynote.tpl | 101 ++++++++++ .../includingFiles/pdfFooter.tpl | 32 ++++ .../includingFiles/pdfHeader.tpl | 48 +++++ .../includingFiles/pdfPastThank.tpl | 16 ++ .../includingFiles/pdfToping.tpl | 5 + .../views/tpl/offers/deliverynote.tpl | 87 +++++++++ .../tpl/offers/includingFiles/pdfFooter.tpl | 32 ++++ .../tpl/offers/includingFiles/pdfHeader.tpl | 56 ++++++ .../offers/includingFiles/pdfPastThank.tpl | 16 ++ .../tpl/offers/includingFiles/pdfToping.tpl | 5 + .../tpl/orderConfirmation/deliverynote.tpl | 87 +++++++++ .../includingFiles/pdfFooter.tpl | 32 ++++ .../includingFiles/pdfHeader.tpl | 56 ++++++ .../includingFiles/pdfPastThank.tpl | 16 ++ .../includingFiles/pdfToping.tpl | 5 + .../Model/d3_Order_PdfDocuments.php | 66 ++----- .../Application/Model/deliverynotePdf.php | 111 +++++++++++ .../Modules/Application/Model/invoicePdf.php | 111 +++++++++++ .../Application/Model/pdfDocuments.php | 118 ++++++++++++ .../Model/pdfDocuments_interface.php | 9 + .../src/Modules/out/src/deliverynote.css | 176 +----------------- .../Modules/out/src/pdfInvoiceCorrection.css | 32 ++++ .../src/Modules/out/src/pdfStyling.css | 173 +++++++++++++++++ .../modules/d3/pdfdocuments/src/metadata.php | 55 ++++++ 34 files changed, 1616 insertions(+), 221 deletions(-) create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfHeader.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfFooter.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfHeader.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfToping.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfPastThank.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfFooter.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfToping.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl create mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php create mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php create mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php create mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php create mode 100644 source/modules/d3/pdfdocuments/src/Modules/out/src/pdfInvoiceCorrection.css create mode 100644 source/modules/d3/pdfdocuments/src/Modules/out/src/pdfStyling.css create mode 100644 source/modules/d3/pdfdocuments/src/metadata.php diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl new file mode 100644 index 0000000..e30a6ff --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl @@ -0,0 +1,91 @@ +[{assign var= currency value= $order->getOrderCurrency()}] +[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] + + + + + [{block name="pdfTopingFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfToping.tpl')}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfFooter.tpl')}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfHeader.tpl')}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + [{* + + + + + + *}] + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{$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__oxartnum->value }]
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{$oOrderArticle->oxorderarticles__oxselvariant->getRawValue()}]
+ [{/block}] + + [{block name="articleCosts"}] + [{* + + [{ ++++++Artikelzusammenfassung++++++ }] + + [{ ++++++Kosten der Bestellung++++++ }] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$order->getVats() key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
*}] + [{/block}] + [{block name="pdfPastThankFile"}] + [{include file=$oViewConf->getModulePath('d3InvoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfPastThank.tpl')}] + [{/block}] +
+
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl new file mode 100644 index 0000000..d625e44 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl @@ -0,0 +1,32 @@ +[{block name="pdfFooter"}] + + + [{block name="shop_basic_information"}] + + [{/block}] + [{block name="owner_basic_information"}] + + [{/block}] + [{block name="bank_basic_information"}] + + [{/block}] + + +[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfHeader.tpl new file mode 100644 index 0000000..93f2d94 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfHeader.tpl @@ -0,0 +1,52 @@ +[{block name="pdfHeading"}] + + [{block name="heading_owner_information"}] + + + [{**}] + + [{/block}] + [{block name="heading_order_information"}] + + + + + [{/block}] +
+
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
+
[{$shop->oxshops__oxinfoemail->value}]
+
+ [{if $order->oxorder__oxbillcompany->value}] +
[{$order->oxorder__oxbillcompany->value}]
+ [{/if}] +
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
+
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
+
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+ + [{* +++++++Lieferadressen dynamisch+++++++ *}] + [{if $order->oxorder__oxdelstreet->value}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
+ [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] +
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
+
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
+
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{/if}] + + [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYNOTE"}][{$order->oxorder__oxordernr->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
+
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_QUOTECUSTMNR"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
+
[{$shop->oxshops__oxcity->value}], [{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
+
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl new file mode 100644 index 0000000..907388c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl @@ -0,0 +1,16 @@ +[{block name="pdfPastThankFile"}] + + + + [{* +++++++Individueller Zahlungstext+++++++ *}] + [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] + + [{else}] + + [{/if}] + [{*+++++++++++*}] + + + +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl new file mode 100644 index 0000000..77a8ed7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl @@ -0,0 +1,5 @@ +[{block name="pdfToping"}] +
+ +
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfFooter.tpl new file mode 100644 index 0000000..2600cc7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfFooter.tpl @@ -0,0 +1,32 @@ +[{block name="pdfFooter"}] + + + [{block name="shop_basic_information"}] + + [{/block}] + [{block name="owner_basic_information"}] + + [{/block}] + [{block name="bank_basic_information"}] + + [{/block}] + + +[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfHeader.tpl new file mode 100644 index 0000000..a4aaa3c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfHeader.tpl @@ -0,0 +1,56 @@ +[{block name="pdfHeading"}] + + [{block name="heading_owner_information"}] + + + + + [{/block}] + [{block name="heading_order_information"}] + + + + + [{/block}] +
+
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
+
[{$shop->oxshops__oxinfoemail->value}]
+
+ [{if $order->oxorder__oxbillcompany->value}] +
[{$order->oxorder__oxbillcompany->value}]
+ [{/if}] +
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
+
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
+
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+ + [{* +++++++Lieferadressen dynamisch+++++++ *}] + [{if $order->oxorder__oxdelstreet->value}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
+ [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] +
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
+
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
+
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{/if}] + + [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
+
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
+
[{$shop->oxshops__oxbankname->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
+
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl new file mode 100644 index 0000000..907388c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl @@ -0,0 +1,16 @@ +[{block name="pdfPastThankFile"}] + + + + [{* +++++++Individueller Zahlungstext+++++++ *}] + [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] + + [{else}] + + [{/if}] + [{*+++++++++++*}] + + + +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfToping.tpl new file mode 100644 index 0000000..77a8ed7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfToping.tpl @@ -0,0 +1,5 @@ +[{block name="pdfToping"}] +
+ +
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl new file mode 100644 index 0000000..cb91e0d --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl @@ -0,0 +1,87 @@ +[{assign var= currency value= $order->getOrderCurrency()}] +[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] + + + + + [{block name="pdfTopingFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfToping.tpl"}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfFooter.tpl"}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfHeader.tpl"}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
+ [{/block}] + + [{block name="articleCosts"}] + + + [{* ++++++Artikelzusammenfassung++++++ *}] + + [{* ++++++Kosten der Bestellung++++++ *}] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$order->getVats() key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
+ [{/block}] + [{block name="pdfPastThankFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfPastThank.tpl"}] + [{/block}] +
+
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl new file mode 100644 index 0000000..5da9d06 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl @@ -0,0 +1,101 @@ +[{assign var= currency value= $order->getOrderCurrency()}] +[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] + + + + + [{block name="pdfTopingFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl')}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl')}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl')}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
+ [{/block}] + + [{block name="articleCosts"}] + + + [{* ++++++Artikelzusammenfassung++++++ *}] + + [{* ++++++Kosten der Bestellung++++++ *}] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+ [{*if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$order->getVats() key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
*}] +
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+ [{*if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
*}] +
+ + + + + +
+
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_SUM_EXCL_TAX"}]
+
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_CONTAININGTAX"}]
+
+
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
+ [{/block}] + [{block name="pdfPastThankFile"}] +
+
hier müssen auch noch die Werte von 'te' ausgegriffen werden [Gesamtsumme; Gesamtsumme (excl. MwSt); enthaltene Mehrwertsteuer]
+
oben die Rechnungskorrekturnummer muss ausgegriffen werden
+
+ [{/block}] +
+
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl new file mode 100644 index 0000000..d625e44 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl @@ -0,0 +1,32 @@ +[{block name="pdfFooter"}] + + + [{block name="shop_basic_information"}] + + [{/block}] + [{block name="owner_basic_information"}] + + [{/block}] + [{block name="bank_basic_information"}] + + [{/block}] + + +[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl new file mode 100644 index 0000000..1d6d92b --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl @@ -0,0 +1,48 @@ +[{block name="pdfHeading"}] + + [{block name="heading_owner_information"}] + + + + + [{/block}] + [{block name="heading_order_information"}] + + + +
+
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
+
+
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_QUOTECUSTMNR"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
+
+ [{if $order->oxorder__oxbilllname->value}] + [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] +
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
+
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
+
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{else}] + [{if $order->oxorder__oxbillcompany->value}]
[{$order->oxorder__oxbillcompany->value}]
[{/if}] +
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
+
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
+
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+ [{/if}] +
+ + + + + + [{/block}] +
+
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_INVOICECORRECTION"}] 0000 [{oxmultilang ident="D3_DELIVERYNOTE_PDF_TOINVOICE"}][{$order->oxorder__oxbillnr->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}]
+
[{$shop->oxshops__oxcity->value}], [{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
+
+ [{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfPastThank.tpl new file mode 100644 index 0000000..907388c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfPastThank.tpl @@ -0,0 +1,16 @@ +[{block name="pdfPastThankFile"}] + + + + [{* +++++++Individueller Zahlungstext+++++++ *}] + [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] + + [{else}] + + [{/if}] + [{*+++++++++++*}] + + + +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl new file mode 100644 index 0000000..77a8ed7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl @@ -0,0 +1,5 @@ +[{block name="pdfToping"}] +
+ +
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl new file mode 100644 index 0000000..cb91e0d --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl @@ -0,0 +1,87 @@ +[{assign var= currency value= $order->getOrderCurrency()}] +[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] + + + + + [{block name="pdfTopingFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfToping.tpl"}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfFooter.tpl"}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfHeader.tpl"}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
+ [{/block}] + + [{block name="articleCosts"}] + + + [{* ++++++Artikelzusammenfassung++++++ *}] + + [{* ++++++Kosten der Bestellung++++++ *}] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$order->getVats() key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
+ [{/block}] + [{block name="pdfPastThankFile"}] + [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfPastThank.tpl"}] + [{/block}] +
+
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfFooter.tpl new file mode 100644 index 0000000..2600cc7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfFooter.tpl @@ -0,0 +1,32 @@ +[{block name="pdfFooter"}] + + + [{block name="shop_basic_information"}] + + [{/block}] + [{block name="owner_basic_information"}] + + [{/block}] + [{block name="bank_basic_information"}] + + [{/block}] + + +[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl new file mode 100644 index 0000000..a4aaa3c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl @@ -0,0 +1,56 @@ +[{block name="pdfHeading"}] + + [{block name="heading_owner_information"}] + + + + + [{/block}] + [{block name="heading_order_information"}] + + + + + [{/block}] +
+
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
+
[{$shop->oxshops__oxinfoemail->value}]
+
+ [{if $order->oxorder__oxbillcompany->value}] +
[{$order->oxorder__oxbillcompany->value}]
+ [{/if}] +
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
+
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
+
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+ + [{* +++++++Lieferadressen dynamisch+++++++ *}] + [{if $order->oxorder__oxdelstreet->value}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
+ [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] +
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
+
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
+
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{/if}] + + [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
+
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
+
[{$shop->oxshops__oxbankname->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
+
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl new file mode 100644 index 0000000..907388c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl @@ -0,0 +1,16 @@ +[{block name="pdfPastThankFile"}] + + + + [{* +++++++Individueller Zahlungstext+++++++ *}] + [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] + + [{else}] + + [{/if}] + [{*+++++++++++*}] + + + +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfToping.tpl new file mode 100644 index 0000000..77a8ed7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfToping.tpl @@ -0,0 +1,5 @@ +[{block name="pdfToping"}] +
+ +
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl new file mode 100644 index 0000000..f4c9c15 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl @@ -0,0 +1,87 @@ +[{assign var= currency value= $order->getOrderCurrency()}] +[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] + + + + + [{block name="pdfTopingFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfToping.tpl')}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfFooter.tpl')}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfHeader.tpl')}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
+ [{/block}] + + [{block name="articleCosts"}] + + + [{* ++++++Artikelzusammenfassung++++++ *}] + + [{* ++++++Kosten der Bestellung++++++ *}] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$order->getVats() key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
+ [{/block}] + [{block name="pdfPastThankFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfPastThank.tpl')}] + [{/block}] +
+
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl new file mode 100644 index 0000000..2600cc7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl @@ -0,0 +1,32 @@ +[{block name="pdfFooter"}] + + + [{block name="shop_basic_information"}] + + [{/block}] + [{block name="owner_basic_information"}] + + [{/block}] + [{block name="bank_basic_information"}] + + [{/block}] + + +[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl new file mode 100644 index 0000000..a4aaa3c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl @@ -0,0 +1,56 @@ +[{block name="pdfHeading"}] + + [{block name="heading_owner_information"}] + + + + + [{/block}] + [{block name="heading_order_information"}] + + + + + [{/block}] +
+
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
+
[{$shop->oxshops__oxinfoemail->value}]
+
+ [{if $order->oxorder__oxbillcompany->value}] +
[{$order->oxorder__oxbillcompany->value}]
+ [{/if}] +
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
+
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
+
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+ + [{* +++++++Lieferadressen dynamisch+++++++ *}] + [{if $order->oxorder__oxdelstreet->value}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
+ [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] +
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
+
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
+
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
+
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{/if}] + + [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
+
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
+
[{$shop->oxshops__oxbankname->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
+
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl new file mode 100644 index 0000000..907388c --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl @@ -0,0 +1,16 @@ +[{block name="pdfPastThankFile"}] + + + + [{* +++++++Individueller Zahlungstext+++++++ *}] + [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] + + [{else}] + + [{/if}] + [{*+++++++++++*}] + + + +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl new file mode 100644 index 0000000..77a8ed7 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl @@ -0,0 +1,5 @@ +[{block name="pdfToping"}] +
+ +
+[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php index 14be5a9..711b98c 100644 --- a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,6 +17,7 @@ namespace D3\PdfDocuments\Modules\Application\Model; +use D3\PdfDocuments\Modules\Application\Model\dev\deliverynotePdf; use OxidEsales\EshopCommunity\Application\Model\User; use OxidEsales\EshopCommunity\Application\Model\Payment; use OxidEsales\Eshop\Core\Registry; @@ -33,59 +34,16 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') { - self::$_blIsAdmin = false; + switch (Registry::getRequest()->getRequestParameter('pdftype')) { + case ('dnote'): + case ('dnote_without_logo'): + $Pdf = oxNew(deliverynotePdf::class); + break; + default: + $Pdf = oxNew(invoicePdf::class); + } - $oSmarty = Registry::getUtilsView()->getSmarty(); - $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); - $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); - $oSmarty->assign('order', $this); - $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); - $oSmarty->assign('lang', Registry::getLang()); - - $oUser= oxNew(User::Class); - $oUser->load($this->oxorder__oxuserid->value); - $oSmarty->assign('user', $oUser); - - $oPayment= oxNew(Payment::class); - $oPayment->load($this->oxorder__oxpaymenttype->value); - $oSmarty->assign('payment', $oPayment); - - //in eigene Funktion auslagern// - $blIsNewOrder = 0; - // setting invoice number - if (!$this->oxorder__oxbillnr->value) { - $this->oxorder__oxbillnr->setValue($this->getNextBillNum()); - $blIsNewOrder = 1; - } - // setting invoice date - if ($this->oxorder__oxbilldate->value == '0000-00-00') { - $this->oxorder__oxbilldate->setValue(date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))); - $blIsNewOrder = 1; - } - // saving order if new number or date - if ($blIsNewOrder) { - $this->save(); - } - - - switch (Registry::getRequest()->getRequestParameter('pdftype')) { - case ('dnote'): - case ('dnote_without_logo'): - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); - break; - default: - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); - } - - $sFilename = str_replace( $this->oxorder__oxordernr->value, $this->oxorder__oxbillnr->value, $sFilename); - - $oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); - $oPdf->writeHTML($sContent); - $oPdf->output($sFilename, $target); + $Pdf->setOrder($this); + $Pdf->genPdf($sFilename, $iSelLang = 0, $target = 'I'); } - - public function getDeliveryNoteTemplate() - { - return 'd3deliverynote.tpl'; - } -} \ No newline at end of file +} diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php new file mode 100644 index 0000000..2e7d047 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php @@ -0,0 +1,111 @@ +getSmarty(); + $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); + $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $oSmarty->assign('order', $this); + $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); + $oSmarty->assign('lang', Registry::getLang()); + + $oUser= oxNew(User::Class); + $oUser->load($this->getOrder()->getFieldData('oxuserid')); + $oSmarty->assign('user', $oUser); + + $oPayment= oxNew(Payment::class); + $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); + $oSmarty->assign('payment', $oPayment); + + $this->setInvoiceNumber(); + $this->setInvoiceDate(); + $this->saveOrderOnChanges(); + + switch (Registry::getRequest()->getRequestParameter('pdftype')) { + case ('dnote'): + case ('dnote_without_logo'): + $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + break; + default: + $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + } + } + + /** + * @param OrderModel $order + */ + public function setOrder(OrderModel $order){ + $this->oOrder= $order; + } + + /** + * @return OrderModel + */ + public function getOrder(){ + return $this->oOrder; + } + + public function setFilename($sContent, $target, $sFilename){ + $ordernr= $this->getOrder()->getFieldData('oxordernr'); + $billnr= $this->getOrder()->getFieldData('oxbillnr');; + + $sFilename = str_replace( $ordernr, $billnr, $sFilename); + + $oPdf= oxNew(Html2Pdf::class, 'P', 'A4', 'de'); + $oPdf->writeHTML($sContent); + $oPdf->output($sFilename, $target); + } + + public function setInvoiceNumber(){ + $this->blIsNewOrder = 0; + + if (!$this->getOrder()->getFieldData('oxbillnr')) { + $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); + + $this->blIsNewOrder = 1; + } + } + + public function setInvoiceDate(){ + if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { + $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); + + $this->blIsNewOrder = 1; + } + } + + public function saveOrderOnChanges(){ + if ($this->blIsNewOrder) { + $this->getOrder()->save(); + } + } + + public function getDeliveryNoteTemplate(){ + return 'd3deliverynote.tpl'; + } +} \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php new file mode 100644 index 0000000..2b022e1 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php @@ -0,0 +1,111 @@ +getSmarty(); + $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); + $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $oSmarty->assign('order', $this); + $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); + $oSmarty->assign('lang', Registry::getLang()); + + $oUser= oxNew(User::Class); + $oUser->load($this->getOrder()->getFieldData('oxuserid')); + $oSmarty->assign('user', $oUser); + + $oPayment= oxNew(Payment::class); + $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); + $oSmarty->assign('payment', $oPayment); + + $this->setInvoiceNumber(); + $this->setInvoiceDate(); + $this->saveOrderOnChanges(); + + switch (Registry::getRequest()->getRequestParameter('pdftype')) { + case ('dnote'): + case ('dnote_without_logo'): + $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + break; + default: + $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + } + } + + /** + * @param OrderModel $order + */ + public function setOrder(OrderModel $order){ + $this->oOrder= $order; + } + + /** + * @return OrderModel + */ + public function getOrder(){ + return $this->oOrder; + } + + public function setFilename($sContent, $target, $sFilename){ + $ordernr= $this->getOrder()->getFieldData('oxordernr'); + $billnr= $this->getOrder()->getFieldData('oxbillnr');; + + $sFilename = str_replace( $ordernr, $billnr, $sFilename); + + $oPdf= oxNew(Html2Pdf::class, 'P', 'A4', 'de'); + $oPdf->writeHTML($sContent); + $oPdf->output($sFilename, $target); + } + + public function setInvoiceNumber(){ + $this->blIsNewOrder = 0; + + if (!$this->getOrder()->getFieldData('oxbillnr')) { + $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); + + $this->blIsNewOrder = 1; + } + } + + public function setInvoiceDate(){ + if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { + $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); + + $this->blIsNewOrder = 1; + } + } + + public function saveOrderOnChanges(){ + if ($this->blIsNewOrder) { + $this->getOrder()->save(); + } + } + + public function getDeliveryNoteTemplate(){ + return 'd3deliverynote.tpl'; + } +} \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php new file mode 100644 index 0000000..127a017 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php @@ -0,0 +1,118 @@ +getSmarty(); + $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); + $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $oSmarty->assign('order', $this); + $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); + $oSmarty->assign('lang', Registry::getLang()); + + $oUser = oxNew(User::Class); + $oUser->load($this->getOrder()->getFieldData('oxuserid')); + $oSmarty->assign('user', $oUser); + + $oPayment = oxNew(Payment::class); + $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); + $oSmarty->assign('payment', $oPayment); + + $this->setInvoiceNumber(); + $this->setInvoiceDate(); + $this->saveOrderOnChanges(); + + switch (Registry::getRequest()->getRequestParameter('pdftype')) { + case ('dnote'): + case ('dnote_without_logo'): + $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + break; + default: + $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + } + } + + /** + * @param Order $order + */ + public function setOrder(Order $order) + { + $this->oOrder = $order; + } + + /** + * @return OrderModel + */ + public function getOrder() + { + return $this->oOrder; + } + + public function setFilename($sContent, $target, $sFilename) + { + $ordernr = $this->getOrder()->getFieldData('oxordernr'); + $billnr = $this->getOrder()->getFieldData('oxbillnr');; + + $sFilename = str_replace($ordernr, $billnr, $sFilename); + + $oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); + $oPdf->writeHTML($sContent); + $oPdf->output($sFilename, $target); + } + + public function setInvoiceNumber() + { + $this->blIsNewOrder = 0; + + if (!$this->getOrder()->getFieldData('oxbillnr')) { + $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); + + $this->blIsNewOrder = 1; + } + } + + public function setInvoiceDate() + { + if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { + $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); + + $this->blIsNewOrder = 1; + } + } + + public function saveOrderOnChanges() + { + if ($this->blIsNewOrder) { + $this->getOrder()->save(); + } + } + + abstract public function getDeliveryNoteTemplate(); +} + +class invoicePdf extends pdfDocuments{ + public function getDeliveryNoteTemplate(){ + return 'deliverynote.tpl'; + } +} + +class deliverynotePdf extends pdfDocuments{ + public function getDeliveryNoteTemplate(){ + return 'invoice.tpl'; + } +} \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php new file mode 100644 index 0000000..b4edb7b --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php @@ -0,0 +1,9 @@ + + * @link http://www.oxidmodule.com + */ + +use D3\ModCfg\Application\Model\d3utils; +use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments as d3_pdfdocs_OrderModel; +use OxidEsales\Eshop\Application\Model as OxidModel; + +/** + * Metadata version + */ +$sMetadataVersion = '2.0'; + +$logo = (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D³'); + +$sModuleId = 'pdfDocuments'; +/** + * Module information + */ +$aModule = [ + 'id' => $sModuleId, + 'title' => [ + 'de' => $logo.' PDF-Dokumente aus HTML-Templates', + 'en' => $logo.' PDF documents from HTML templates', + ], + 'thumbnail' => 'picture.png', + 'version' => '1.0', + 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', + 'email' => 'support@shopmodule.com', + 'url' => 'http://www.oxidmodule.com/', + 'extend' => [ + OxidModel\Order::class => d3_pdfdocs_OrderModel::class, + 'oxorder' => d3_pdfdocs_OrderModel::class + ], + 'controllers' => [], + 'templates' => [ + 'd3deliverynote.tpl' => 'd3/pdfdocuments/Application/views/tpl/deliverynote.tpl', + 'd3tplheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/header.tpl' + ], + 'events' => [], + 'blocks' => [] +]; From 2aefa5a154a1bdef68cef47f234ae53b0eea6527 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 14:30:17 +0200 Subject: [PATCH 003/134] changing included file's path; add: css classes; reorderung header; including new oxmultilang idents --- .../views/tpl/offers/deliverynote.tpl | 93 +++++++++---------- .../tpl/offers/includingFiles/pdfHeader.tpl | 71 +++++++------- .../offers/includingFiles/pdfPastThank.tpl | 21 ++--- 3 files changed, 93 insertions(+), 92 deletions(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl index cb91e0d..386a17f 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl @@ -2,51 +2,50 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] - [{block name="pdfTopingFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfToping.tpl"}] - [{/block}] + [{block name="pdfTopingFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfToping.tpl')}] + [{/block}] - [{block name="pdfFooterFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfFooter.tpl"}] - [{/block}] + [{block name="pdfFooterFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfFooter.tpl')}] + [{/block}] [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfHeader.tpl"}] - [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
- [{/block}] + [{block name="pdfHeaderFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfHeader.tpl')}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
+ [{/block}] [{block name="articleCosts"}] @@ -54,13 +53,13 @@ [{* ++++++Artikelzusammenfassung++++++ *}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] + [{if $order->getFormattedDiscount() != 0}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] + [{/if}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] + [{foreach from=$order->getVats() key=VatKey item=oVat}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] + [{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
@@ -68,9 +67,9 @@ [{* ++++++Kosten der Bestellung++++++ *}]
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] + [{if $order->getFormattedDiscount() != 0}]
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] + [{/if}]
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
@@ -79,9 +78,9 @@
- [{/block}] - [{block name="pdfPastThankFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfPastThank.tpl"}] - [{/block}] + [{/block}] + [{block name="pdfPastThankFile"}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfPastThank.tpl')}] + [{/block}]
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl index a4aaa3c..57df2d5 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfHeader.tpl @@ -1,56 +1,61 @@ [{block name="pdfHeading"}] - - [{block name="heading_owner_information"}] - - - - - [{/block}] +
-
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
-
[{block name="heading_order_information"}] - + + [{/block}] + [{/block}] +
- [{if $order->oxorder__oxbillcompany->value}] -
[{$order->oxorder__oxbillcompany->value}]
- [{/if}] -
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
-
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
-
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
- - [{* +++++++Lieferadressen dynamisch+++++++ *}] +
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] - [{$shop->oxshops__oxcity->value}]
[{if $order->oxorder__oxdelstreet->value}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] + [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}]
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
[{$shop->oxshops__oxcountry->value}]
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{else}] + [{if $order->oxorder__oxbillcompany->value}] +
[{$order->oxorder__oxbillcompany->value}]
+ [{/if}] +
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
+
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
+
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
+
[{$shop->oxshops__oxcountry->value}]
[{/if}] - - [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
-
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
+ [{block name="heading_owner_information"}] +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
+
[{$shop->oxshops__oxinfoemail->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
[{$shop->oxshops__oxbankname->value}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
+
+ + [{block name="table_toping_information"}] + + + +
+
[{oxmultilang ident="D3_OFFER_PDF_OFFERN"}][0000]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
+ + + + [{/block}]
+
[{oxmultilang ident="D3_OFFER_PDF_THANKINTEREST"}]
+
[{oxmultilang ident="D3_OFFER_PDF_OFFERTEXT"}]
+
[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl index 907388c..a2f4330 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl @@ -1,16 +1,13 @@ [{block name="pdfPastThankFile"}] - +
- - [{* +++++++Individueller Zahlungstext+++++++ *}] - [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] - - [{else}] - - [{/if}] - [{*+++++++++++*}] - - - + [{* material info *}] + + [{* price is inkl. *}] + + + [{* offer delay *}] + +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
[{oxmultilang ident="D3_OFFER_PDF_INFO"}][{$payment->oxpayments__oxdesc->value}]
[{oxmultilang ident="D3_OFFER_PDF_PRICEINFO"}]
[{oxmultilang ident="D3_OFFER_PDF_OFFERTIME"}]
[{oxmultilang ident="D3_OFFER_PDF_OFFER"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
[{/block}] \ No newline at end of file From fc9ddd97db8f931ae2e934b5c7da7f6a087cb0e3 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 14:32:54 +0200 Subject: [PATCH 004/134] modifying path of inlcuded files --- .../views/tpl/orderConfirmation/deliverynote.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl index f4c9c15..d572986 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl @@ -7,19 +7,19 @@ [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfToping.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] @@ -81,7 +81,7 @@ [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmationincludingFiles/pdfPastThank.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file From e27ce83d4b948437a399a5964ef9ae3b9353b445 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 14:35:46 +0200 Subject: [PATCH 005/134] rm unneseccary files and an unnesecarry folder --- .../Application/views/tpl/deliverynote.tpl | 87 ------------------- .../views/tpl/includingFiles/pdfFooter.tpl | 32 ------- .../views/tpl/includingFiles/pdfHeader.tpl | 56 ------------ .../views/tpl/includingFiles/pdfPastThank.tpl | 16 ---- .../views/tpl/includingFiles/pdfToping.tpl | 5 -- 5 files changed, 196 deletions(-) delete mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote.tpl delete mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfFooter.tpl delete mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfHeader.tpl delete mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfPastThank.tpl delete mode 100644 source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfToping.tpl diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote.tpl deleted file mode 100644 index 17d2436..0000000 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote.tpl +++ /dev/null @@ -1,87 +0,0 @@ -[{assign var= currency value= $order->getOrderCurrency()}] -[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] - - - - - [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfToping.tpl')}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfHeader.tpl')}] - [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
- [{/block}] - - [{block name="articleCosts"}] - - - [{* ++++++Artikelzusammenfassung++++++ *}] - - [{* ++++++Kosten der Bestellung++++++ *}] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
- [{/block}] - [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3InvoicePdf', 'Application/views/tpl/includingFiles/pdfPastThank.tpl')}] - [{/block}] -
-
\ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfFooter.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfFooter.tpl deleted file mode 100644 index d625e44..0000000 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfFooter.tpl +++ /dev/null @@ -1,32 +0,0 @@ -[{block name="pdfFooter"}] - - - [{block name="shop_basic_information"}] - - [{/block}] - [{block name="owner_basic_information"}] - - [{/block}] - [{block name="bank_basic_information"}] - - [{/block}] - - -[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfHeader.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfHeader.tpl deleted file mode 100644 index a4aaa3c..0000000 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfHeader.tpl +++ /dev/null @@ -1,56 +0,0 @@ -[{block name="pdfHeading"}] - - [{block name="heading_owner_information"}] - - - - - [{/block}] - [{block name="heading_order_information"}] - - - - - [{/block}] -
-
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
-
- [{if $order->oxorder__oxbillcompany->value}] -
[{$order->oxorder__oxbillcompany->value}]
- [{/if}] -
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
-
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
-
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
- - [{* +++++++Lieferadressen dynamisch+++++++ *}] - [{if $order->oxorder__oxdelstreet->value}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] -
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
-
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
-
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
-
[{$shop->oxshops__oxdeladdinfo->value}]
- [{/if}] - - [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
-
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
-
[{$shop->oxshops__oxbankname->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
-
-[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfPastThank.tpl deleted file mode 100644 index 907388c..0000000 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfPastThank.tpl +++ /dev/null @@ -1,16 +0,0 @@ -[{block name="pdfPastThankFile"}] - - - - [{* +++++++Individueller Zahlungstext+++++++ *}] - [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] - - [{else}] - - [{/if}] - [{*+++++++++++*}] - - - -
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
-[{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfToping.tpl deleted file mode 100644 index 77a8ed7..0000000 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/includingFiles/pdfToping.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{block name="pdfToping"}] -
- -
-[{/block}] \ No newline at end of file From 0f061bb80923b10d0bd1a4a054f35f434bf396dc Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 14:53:56 +0200 Subject: [PATCH 006/134] modifying path of included file's --- .../src/Application/views/tpl/invoice/invoice.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl index cb91e0d..421cded 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl @@ -7,19 +7,19 @@ [{block name="pdfTopingFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfToping.tpl"}] + [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfTopping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfFooter.tpl"}] + [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfHeader.tpl"}] + [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] @@ -81,7 +81,7 @@ [{/block}] [{block name="pdfPastThankFile"}] - [{include file="/home/elegltyp/schmidtshop.wkgisp.de/source/modules/d3/pdfdocuments/Application/views/tpl/includingFiles/pdfPastThank.tpl"}] + [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl')}]] [{/block}] \ No newline at end of file From d9e38d3e48baa373e942341d8ccc97fbc7732820 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 15:08:17 +0200 Subject: [PATCH 007/134] rm path routing misstakes --- .../src/Application/views/tpl/invoice/invoice.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl index 421cded..01eff17 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl @@ -7,19 +7,19 @@ [{block name="pdfTopingFile"}] - [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfTopping.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfTopping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] @@ -81,7 +81,7 @@ [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl')}]] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file From 9e486dc9f181409b35d98a494edfeb9979b075df Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 15:17:53 +0200 Subject: [PATCH 008/134] add: .css files --- .../Modules/out/src/deliverynote.css | 15 ++ .../pdfdocuments/Modules/out/src/offers.css | 24 +++ .../Modules/out/src/pdfInvoiceCorrection.css | 32 ++++ .../Modules/out/src/pdfStyling.css | 173 ++++++++++++++++++ 4 files changed, 244 insertions(+) create mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css create mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/offers.css create mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css create mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css b/source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css new file mode 100644 index 0000000..424846e --- /dev/null +++ b/source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css @@ -0,0 +1,15 @@ +.deliverynote_width_amount{ + width: 20px; +} +.deliverynote_width_artnum{ + width: 80px; +} +.deliverynote_width_desc{ + width: 469.5px; +} +.textAlignLeft{ + text-align: left; +} +.paddingLeft{ + padding-left: 2.4px; +} \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/offers.css b/source/modules/d3/pdfdocuments/Modules/out/src/offers.css new file mode 100644 index 0000000..b5c01c2 --- /dev/null +++ b/source/modules/d3/pdfdocuments/Modules/out/src/offers.css @@ -0,0 +1,24 @@ +.offers_subTitle_font14{ + font-size: 14px; +} +.helvetica{ + font-family: helvetica; +} +.offers_width50{ + width: 50%; +} +.offers_width100{ + width: 100%; +} +.offers_margin_top20{ + margin-top: 20px; +} +.offers_margin_bottom20{ + margin-bottom: 20px; +} +.offers_pstThank_margin_top20{ + margin-top: 20px; +} +.offers_pstThank_font20{ + font-size: 20px; +} diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css b/source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css new file mode 100644 index 0000000..2c2ec33 --- /dev/null +++ b/source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css @@ -0,0 +1,32 @@ +.invoiceCorrection_width_40{ + width: 40%; +} +.invoiceCorrection_width_60{ + width: 60%; +} +.invoiceCorrection_font8{ + font-size: 8px; +} +.invoiceCorrection_font9{ + font-size: 9px; +} +.invoiceCorrection_tableMarginTop15{ + margin-top: 15px; +} +.invoiceCorrection_spacingLeft20{ + margin-left: 73.6px; +} + +.invoiceCorrectionPaddingTop4{ + padding-top: 4px; +} +.invoiceCorrectionPaddingTop5{ + padding-top: 5px; +} + +.invoiceCorrectionPaddingBottom20{ + padding-bottom: 20px; +} +.invoiceCorrectionPaddingBottom16{ + padding-bottom: 16px; +} diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css b/source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css new file mode 100644 index 0000000..8b9c9a1 --- /dev/null +++ b/source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css @@ -0,0 +1,173 @@ +/*debug hilfe*/ +.eraseBug{ + border: dashed blueviolet 1px; +} + +table{ + font-family: "helvetica"; +} +.aligning{ + text-align: right; +} +.vertical-a{ + vertical-align: top; +} +.fontSize12{ + font-size: 12px; +} +.order_sum{ + margin-left: 181px; +} +.order_sumNum{ + margin-right: -2.2px; +} +.border-bottom{ + border-bottom: solid 0.15mm #000; +} +.hermes{ + padding-top: 5px; +} +.mercurius{ + padding-bottom: 5px; +} +.spacing_order_info{ + padding-bottom: 5px; + padding-top: 5px; +} + +/*pdf_header*/ +.pdf_header_positioning{ + position: absolute; + top: 30px; + right: 44px; +} + +/*pdf_footer*/ +.pdf_footer_table{ + width: 688px; + font-size: 9px; + margin: 0 30px 0 30px; + border-top: solid 1px #000; +} + +/*pdf_heading*/ +.pdf_heading_table{ + width: 100%; + margin-top: 8mm; +} +.pdf_heading_width35{ + width: 35%; +} +.pdf_heading_fontSize8{ + font-size: 8px; +} +.pdf_heading_width65{ + width: 65%; +} +.pdf_heading_fontSize12{ + font-size: 12px; +} + +/*heading_order_information*/ +.heading_order_paddingTop10{ + padding-top: 10px; +} +.heading_order_width35{ + width: 35%; +} +.heading_order_paddingTopSub5{ + padding-top: -5px; +} +.heading_order_paddingTop1{ + padding-top: 1mm; +} +.heading_order_fontSize15{ + font-size: 15px; +} +.heading_order_paddingTop22{ + padding-top: 22px; +} +.heading_order_paddingBottom8{ + padding-bottom: 8px; +} +.heading_order_paddingBottom15{ + padding-bottom: 15px; +} +.heading_order_fontSize10{ + font-size: 10px; +} +.heading_order_paddingTopSub5{ + padding-top: -5px; +} +.heading_order_width65{ + width: 65%; +} + +/*order_article_listing*/ +.order_article_listing_width_amount{ + width: 20px; +} +.order_article_listing_width_desc{ + width: 398px; +} +.order_article_listing_width_ust{ + width: 10px; +} +.order_article_listing_width_unitPrice{ + width: 90px; +} +.order_article_listing_width_total_Price{ + width: 100px; +} +.order_article_listing_paddingRight52{ + padding-right: 52.1px; +} +.order_article_listing_fontSize{ + font-size: 11px; +} +.order_article_PaddingBottom5{ + padding-bottom: 5px; +} +.order_article_PaddingTop5{ + padding-top: 5px; +} +.order_article_marginTop10{ + margin-top: 10px; +} +.order_article_costs_marginLeftSub3{ + margin-left: -3px; +} +.order_article_costs_paddingRight66{ + padding-right: 65.9px; +} +.order_article_listing_fontSize9{ + font-size: 9px; +} +.order_article_listing_fontSize12{ + font-size: 12px; +} + +/* order_article_costs */ +.article_costs_table{ + width: 100%; + border-top: solid 0.15mm #000; +} +.article_costs_table_td_width50{ + width: 50%; +} +.article_costs_table_paddingRight{ + padding-right: -3px; +} +.order_article_costs_fontSize12{ + font-size: 12px; +} + +/*order_shop_past_thank*/ +.past_thank_width100{ + width: 100%; +} + +/* footer styling */ +.footer_parts{ + width: 33.33%; +} From a04c9824dfd454015861b7ea9f3127564e8845e5 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 15:20:48 +0200 Subject: [PATCH 009/134] extended file --- .../src/Modules/out/src/offers.css | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 source/modules/d3/pdfdocuments/src/Modules/out/src/offers.css diff --git a/source/modules/d3/pdfdocuments/src/Modules/out/src/offers.css b/source/modules/d3/pdfdocuments/src/Modules/out/src/offers.css new file mode 100644 index 0000000..b5c01c2 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/out/src/offers.css @@ -0,0 +1,24 @@ +.offers_subTitle_font14{ + font-size: 14px; +} +.helvetica{ + font-family: helvetica; +} +.offers_width50{ + width: 50%; +} +.offers_width100{ + width: 100%; +} +.offers_margin_top20{ + margin-top: 20px; +} +.offers_margin_bottom20{ + margin-bottom: 20px; +} +.offers_pstThank_margin_top20{ + margin-top: 20px; +} +.offers_pstThank_font20{ + font-size: 20px; +} From 2406d270a0d75bd6dce1e1c86c626401ea028be5 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 15:22:31 +0200 Subject: [PATCH 010/134] rm: unneseccary folder --- .../Modules/out/src/deliverynote.css | 15 -- .../pdfdocuments/Modules/out/src/offers.css | 24 --- .../Modules/out/src/pdfInvoiceCorrection.css | 32 ---- .../Modules/out/src/pdfStyling.css | 173 ------------------ 4 files changed, 244 deletions(-) delete mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css delete mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/offers.css delete mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css delete mode 100644 source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css b/source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css deleted file mode 100644 index 424846e..0000000 --- a/source/modules/d3/pdfdocuments/Modules/out/src/deliverynote.css +++ /dev/null @@ -1,15 +0,0 @@ -.deliverynote_width_amount{ - width: 20px; -} -.deliverynote_width_artnum{ - width: 80px; -} -.deliverynote_width_desc{ - width: 469.5px; -} -.textAlignLeft{ - text-align: left; -} -.paddingLeft{ - padding-left: 2.4px; -} \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/offers.css b/source/modules/d3/pdfdocuments/Modules/out/src/offers.css deleted file mode 100644 index b5c01c2..0000000 --- a/source/modules/d3/pdfdocuments/Modules/out/src/offers.css +++ /dev/null @@ -1,24 +0,0 @@ -.offers_subTitle_font14{ - font-size: 14px; -} -.helvetica{ - font-family: helvetica; -} -.offers_width50{ - width: 50%; -} -.offers_width100{ - width: 100%; -} -.offers_margin_top20{ - margin-top: 20px; -} -.offers_margin_bottom20{ - margin-bottom: 20px; -} -.offers_pstThank_margin_top20{ - margin-top: 20px; -} -.offers_pstThank_font20{ - font-size: 20px; -} diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css b/source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css deleted file mode 100644 index 2c2ec33..0000000 --- a/source/modules/d3/pdfdocuments/Modules/out/src/pdfInvoiceCorrection.css +++ /dev/null @@ -1,32 +0,0 @@ -.invoiceCorrection_width_40{ - width: 40%; -} -.invoiceCorrection_width_60{ - width: 60%; -} -.invoiceCorrection_font8{ - font-size: 8px; -} -.invoiceCorrection_font9{ - font-size: 9px; -} -.invoiceCorrection_tableMarginTop15{ - margin-top: 15px; -} -.invoiceCorrection_spacingLeft20{ - margin-left: 73.6px; -} - -.invoiceCorrectionPaddingTop4{ - padding-top: 4px; -} -.invoiceCorrectionPaddingTop5{ - padding-top: 5px; -} - -.invoiceCorrectionPaddingBottom20{ - padding-bottom: 20px; -} -.invoiceCorrectionPaddingBottom16{ - padding-bottom: 16px; -} diff --git a/source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css b/source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css deleted file mode 100644 index 8b9c9a1..0000000 --- a/source/modules/d3/pdfdocuments/Modules/out/src/pdfStyling.css +++ /dev/null @@ -1,173 +0,0 @@ -/*debug hilfe*/ -.eraseBug{ - border: dashed blueviolet 1px; -} - -table{ - font-family: "helvetica"; -} -.aligning{ - text-align: right; -} -.vertical-a{ - vertical-align: top; -} -.fontSize12{ - font-size: 12px; -} -.order_sum{ - margin-left: 181px; -} -.order_sumNum{ - margin-right: -2.2px; -} -.border-bottom{ - border-bottom: solid 0.15mm #000; -} -.hermes{ - padding-top: 5px; -} -.mercurius{ - padding-bottom: 5px; -} -.spacing_order_info{ - padding-bottom: 5px; - padding-top: 5px; -} - -/*pdf_header*/ -.pdf_header_positioning{ - position: absolute; - top: 30px; - right: 44px; -} - -/*pdf_footer*/ -.pdf_footer_table{ - width: 688px; - font-size: 9px; - margin: 0 30px 0 30px; - border-top: solid 1px #000; -} - -/*pdf_heading*/ -.pdf_heading_table{ - width: 100%; - margin-top: 8mm; -} -.pdf_heading_width35{ - width: 35%; -} -.pdf_heading_fontSize8{ - font-size: 8px; -} -.pdf_heading_width65{ - width: 65%; -} -.pdf_heading_fontSize12{ - font-size: 12px; -} - -/*heading_order_information*/ -.heading_order_paddingTop10{ - padding-top: 10px; -} -.heading_order_width35{ - width: 35%; -} -.heading_order_paddingTopSub5{ - padding-top: -5px; -} -.heading_order_paddingTop1{ - padding-top: 1mm; -} -.heading_order_fontSize15{ - font-size: 15px; -} -.heading_order_paddingTop22{ - padding-top: 22px; -} -.heading_order_paddingBottom8{ - padding-bottom: 8px; -} -.heading_order_paddingBottom15{ - padding-bottom: 15px; -} -.heading_order_fontSize10{ - font-size: 10px; -} -.heading_order_paddingTopSub5{ - padding-top: -5px; -} -.heading_order_width65{ - width: 65%; -} - -/*order_article_listing*/ -.order_article_listing_width_amount{ - width: 20px; -} -.order_article_listing_width_desc{ - width: 398px; -} -.order_article_listing_width_ust{ - width: 10px; -} -.order_article_listing_width_unitPrice{ - width: 90px; -} -.order_article_listing_width_total_Price{ - width: 100px; -} -.order_article_listing_paddingRight52{ - padding-right: 52.1px; -} -.order_article_listing_fontSize{ - font-size: 11px; -} -.order_article_PaddingBottom5{ - padding-bottom: 5px; -} -.order_article_PaddingTop5{ - padding-top: 5px; -} -.order_article_marginTop10{ - margin-top: 10px; -} -.order_article_costs_marginLeftSub3{ - margin-left: -3px; -} -.order_article_costs_paddingRight66{ - padding-right: 65.9px; -} -.order_article_listing_fontSize9{ - font-size: 9px; -} -.order_article_listing_fontSize12{ - font-size: 12px; -} - -/* order_article_costs */ -.article_costs_table{ - width: 100%; - border-top: solid 0.15mm #000; -} -.article_costs_table_td_width50{ - width: 50%; -} -.article_costs_table_paddingRight{ - padding-right: -3px; -} -.order_article_costs_fontSize12{ - font-size: 12px; -} - -/*order_shop_past_thank*/ -.past_thank_width100{ - width: 100%; -} - -/* footer styling */ -.footer_parts{ - width: 33.33%; -} From c242488ec86bd680507b25d4b213bc8d0eecb504 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 16:08:05 +0200 Subject: [PATCH 011/134] add: padding class # Conflicts: # source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css --- .../d3/pdfdocuments/src/Modules/out/src/deliverynote.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css b/source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css index f648694..900f0ea 100644 --- a/source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css +++ b/source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css @@ -13,3 +13,6 @@ .paddingLeft{ padding-left: 2.4px; } +.deliveryNote_paddingTop20{ + padding-top: 20px; +} \ No newline at end of file From 7a7cc02f5cfc169d67fb4b6a14a8b042183d7ebf Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 16:09:57 +0200 Subject: [PATCH 012/134] reword module id in include request --- .../src/Application/views/tpl/deliverynote/deliverynote.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl index e30a6ff..3da79bd 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl @@ -85,7 +85,7 @@ *}] [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3InvoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfPastThank.tpl')}] + [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file From 1bf29be1d32eee9a5d4fa6ab87dfc2b7439ea7ed Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 18 May 2020 16:11:19 +0200 Subject: [PATCH 013/134] rm: unneseccary table_rows and adding new oxmultilang ident --- .../deliverynote/includingFiles/pdfPastThank.tpl | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl index 907388c..ff3ee3e 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/includingFiles/pdfPastThank.tpl @@ -1,16 +1,5 @@ [{block name="pdfPastThankFile"}] - - - [{* +++++++Individueller Zahlungstext+++++++ *}] - [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] - - [{else}] - - [{/if}] - [{*+++++++++++*}] - - - +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_PAYABLEUNTIL"}] 20.05.2020
[{/block}] \ No newline at end of file From 36db6b8f536b0e4a0a11b28dc43a3833cc59e387 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Tue, 19 May 2020 16:06:32 +0200 Subject: [PATCH 014/134] add: new file; modified --- .../Model/d3_Order_PdfDocuments.php | 35 ++++-- .../Application/Model/deliverynotePdf.php | 110 +----------------- .../Modules/Application/Model/invoicePdf.php | 110 +----------------- .../Application/Model/pdfDocuments.php | 30 +---- .../d3_overview_controller_pdfdocuments.php | 50 ++++++++ 5 files changed, 88 insertions(+), 247 deletions(-) create mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php index 711b98c..643937e 100644 --- a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Modules\Application\Model; -use D3\PdfDocuments\Modules\Application\Model\dev\deliverynotePdf; +use D3\PdfDocuments\Modules\Application\Model\deliverynotePdf; use OxidEsales\EshopCommunity\Application\Model\User; use OxidEsales\EshopCommunity\Application\Model\Payment; use OxidEsales\Eshop\Core\Registry; @@ -34,16 +34,33 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') { - switch (Registry::getRequest()->getRequestParameter('pdftype')) { - case ('dnote'): - case ('dnote_without_logo'): - $Pdf = oxNew(deliverynotePdf::class); - break; - default: - $Pdf = oxNew(invoicePdf::class); - } + $Pdf= $this->getPdfClass(); + die(); $Pdf->setOrder($this); $Pdf->genPdf($sFilename, $iSelLang = 0, $target = 'I'); } + public function getPdfClass(){ + switch (Registry::getRequest()->getRequestParameter('pdftype')) { + case ('dnote'): + case ('dnote_without_logo'): + return oxNew(deliverynotePdf::class); + case ('standart'): + case('standart_without_logo'): + return oxNew(invoicePdf::class); + default: + dumpVar(get_class($this)); + return $this->getCustomPdfClass(); + } + } + + /** + * @return albatros + * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException + * @throws \oxSystemComponentException + */ + public function getCustomPdfClass() + { + return oxNew(invoicePdf::class); + } } diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php index 2e7d047..bbe15f4 100644 --- a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/deliverynotePdf.php @@ -1,111 +1,9 @@ getSmarty(); - $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); - $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); - $oSmarty->assign('order', $this); - $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); - $oSmarty->assign('lang', Registry::getLang()); - - $oUser= oxNew(User::Class); - $oUser->load($this->getOrder()->getFieldData('oxuserid')); - $oSmarty->assign('user', $oUser); - - $oPayment= oxNew(Payment::class); - $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); - $oSmarty->assign('payment', $oPayment); - - $this->setInvoiceNumber(); - $this->setInvoiceDate(); - $this->saveOrderOnChanges(); - - switch (Registry::getRequest()->getRequestParameter('pdftype')) { - case ('dnote'): - case ('dnote_without_logo'): - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); - break; - default: - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); - } - } - - /** - * @param OrderModel $order - */ - public function setOrder(OrderModel $order){ - $this->oOrder= $order; - } - - /** - * @return OrderModel - */ - public function getOrder(){ - return $this->oOrder; - } - - public function setFilename($sContent, $target, $sFilename){ - $ordernr= $this->getOrder()->getFieldData('oxordernr'); - $billnr= $this->getOrder()->getFieldData('oxbillnr');; - - $sFilename = str_replace( $ordernr, $billnr, $sFilename); - - $oPdf= oxNew(Html2Pdf::class, 'P', 'A4', 'de'); - $oPdf->writeHTML($sContent); - $oPdf->output($sFilename, $target); - } - - public function setInvoiceNumber(){ - $this->blIsNewOrder = 0; - - if (!$this->getOrder()->getFieldData('oxbillnr')) { - $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); - - $this->blIsNewOrder = 1; - } - } - - public function setInvoiceDate(){ - if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { - $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); - - $this->blIsNewOrder = 1; - } - } - - public function saveOrderOnChanges(){ - if ($this->blIsNewOrder) { - $this->getOrder()->save(); - } - } - - public function getDeliveryNoteTemplate(){ - return 'd3deliverynote.tpl'; +class deliverynotePdf extends pdfDocuments{ + public function getTemplate(){ + return 'deliverynote.tpl'; } } \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php index 2b022e1..546d8c8 100644 --- a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/invoicePdf.php @@ -1,111 +1,9 @@ getSmarty(); - $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); - $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); - $oSmarty->assign('order', $this); - $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); - $oSmarty->assign('lang', Registry::getLang()); - - $oUser= oxNew(User::Class); - $oUser->load($this->getOrder()->getFieldData('oxuserid')); - $oSmarty->assign('user', $oUser); - - $oPayment= oxNew(Payment::class); - $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); - $oSmarty->assign('payment', $oPayment); - - $this->setInvoiceNumber(); - $this->setInvoiceDate(); - $this->saveOrderOnChanges(); - - switch (Registry::getRequest()->getRequestParameter('pdftype')) { - case ('dnote'): - case ('dnote_without_logo'): - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); - break; - default: - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); - } - } - - /** - * @param OrderModel $order - */ - public function setOrder(OrderModel $order){ - $this->oOrder= $order; - } - - /** - * @return OrderModel - */ - public function getOrder(){ - return $this->oOrder; - } - - public function setFilename($sContent, $target, $sFilename){ - $ordernr= $this->getOrder()->getFieldData('oxordernr'); - $billnr= $this->getOrder()->getFieldData('oxbillnr');; - - $sFilename = str_replace( $ordernr, $billnr, $sFilename); - - $oPdf= oxNew(Html2Pdf::class, 'P', 'A4', 'de'); - $oPdf->writeHTML($sContent); - $oPdf->output($sFilename, $target); - } - - public function setInvoiceNumber(){ - $this->blIsNewOrder = 0; - - if (!$this->getOrder()->getFieldData('oxbillnr')) { - $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); - - $this->blIsNewOrder = 1; - } - } - - public function setInvoiceDate(){ - if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { - $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); - - $this->blIsNewOrder = 1; - } - } - - public function saveOrderOnChanges(){ - if ($this->blIsNewOrder) { - $this->getOrder()->save(); - } - } - - public function getDeliveryNoteTemplate(){ - return 'd3deliverynote.tpl'; +class invoicePdf extends pdfDocuments{ + public function getTemplate(){ + return 'invoice.tpl'; } } \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php index 127a017..e053c21 100644 --- a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments.php @@ -1,17 +1,9 @@ getRequestParameter('pdftype')) { case ('dnote'): case ('dnote_without_logo'): - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + $sContent = $oSmarty->fetch($this->getTemplate()); break; default: - $sContent = $oSmarty->fetch($this->getDeliveryNoteTemplate()); + $sContent = $oSmarty->fetch($this->getTemplate()); } } @@ -101,18 +93,4 @@ abstract class pdfDocuments implements albatros, \pdfDocuments_interface $this->getOrder()->save(); } } - - abstract public function getDeliveryNoteTemplate(); -} - -class invoicePdf extends pdfDocuments{ - public function getDeliveryNoteTemplate(){ - return 'deliverynote.tpl'; - } -} - -class deliverynotePdf extends pdfDocuments{ - public function getDeliveryNoteTemplate(){ - return 'invoice.tpl'; - } } \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php b/source/modules/d3/pdfdocuments/src/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php new file mode 100644 index 0000000..b0d13df --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php @@ -0,0 +1,50 @@ +getEditObjectId(); + + $viewNameGenerator = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\TableViewNameGenerator::class); + $sTable = $viewNameGenerator->getViewName("oxorderarticles"); + + $sQ = "select count(oxid) from {$sTable} where oxorderid = " . $masterDb->quote($sOrderId) . " and oxstorno = 0"; + $blCan = (bool) $masterDb->getOne($sQ); + + return $blCan; + } + + public function createPDF() + { + echo __LINE__; + $soxId = $this->getEditObjectId(); + if ($soxId != "-1" && isset($soxId)) { + echo __LINE__; + // load object + $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class); + if ($oOrder->load($soxId)) { + echo __LINE__; + $oUtils = \OxidEsales\Eshop\Core\Registry::getUtils(); + $sTrimmedBillName = trim($oOrder->oxorder__oxbilllname->getRawValue()); + $sFilename = $oOrder->oxorder__oxordernr->value . "_" . $sTrimmedBillName . ".pdf"; + $sFilename = $this->makeValidFileName($sFilename); + //ob_start(); + echo __LINE__; + $oOrder->genPDF($sFilename, \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("pdflanguage")); + die(); + $sPDF = ob_get_contents(); + ob_end_clean(); + $oUtils->setHeader("Pragma: public"); + $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + $oUtils->setHeader("Expires: 0"); + $oUtils->setHeader("Content-type: application/pdf"); + $oUtils->setHeader("Content-Disposition: attachment; filename=" . $sFilename); + \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit($sPDF); + } + } + } +} \ No newline at end of file From 2bee99ed713fcbed0edf66d6c763306c471e6eb9 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 20 May 2020 09:32:20 +0200 Subject: [PATCH 015/134] add: interface --- .../src/Modules/Application/Model/albatros.php | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/Model/albatros.php diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/albatros.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/albatros.php new file mode 100644 index 0000000..06c4cb8 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/albatros.php @@ -0,0 +1,10 @@ + Date: Wed, 20 May 2020 09:33:56 +0200 Subject: [PATCH 016/134] rm: unneseccary interface file --- .../Modules/Application/Model/pdfDocuments_interface.php | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php diff --git a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php b/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php deleted file mode 100644 index b4edb7b..0000000 --- a/source/modules/d3/pdfdocuments/src/Modules/Application/Model/pdfDocuments_interface.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Wed, 20 May 2020 10:42:04 +0200 Subject: [PATCH 017/134] add: block and it's corresponding metadata entry --- .../modules/d3/pdfdocuments/src/metadata.php | 13 +++- .../src/views/admin/blocks/order_overview.tpl | 49 +++++++++++++ .../admin/de/auftragsbestaetigung_lang.php | 72 +++++++++++++++++++ 3 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 source/modules/d3/pdfdocuments/src/views/admin/blocks/order_overview.tpl create mode 100644 source/modules/d3/pdfdocuments/src/views/admin/de/auftragsbestaetigung_lang.php diff --git a/source/modules/d3/pdfdocuments/src/metadata.php b/source/modules/d3/pdfdocuments/src/metadata.php index 75acbc2..37f2674 100644 --- a/source/modules/d3/pdfdocuments/src/metadata.php +++ b/source/modules/d3/pdfdocuments/src/metadata.php @@ -16,7 +16,9 @@ */ use D3\ModCfg\Application\Model\d3utils; +use D3\PdfDocuments\Modules\Application\controllers\d3_overview_controller_pdfdocuments; use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments as d3_pdfdocs_OrderModel; +use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; use OxidEsales\Eshop\Application\Model as OxidModel; /** @@ -43,13 +45,20 @@ $aModule = [ 'url' => 'http://www.oxidmodule.com/', 'extend' => [ OxidModel\Order::class => d3_pdfdocs_OrderModel::class, - 'oxorder' => d3_pdfdocs_OrderModel::class + OrderOverview::class => d3_overview_controller_pdfdocuments::class ], 'controllers' => [], 'templates' => [ 'd3deliverynote.tpl' => 'd3/pdfdocuments/Application/views/tpl/deliverynote.tpl', + 'invoice.tpl' => 'd3/pdfdocuments/Application/views/tpl/invoice/invoice.tpl', 'd3tplheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/header.tpl' ], 'events' => [], - 'blocks' => [] + 'blocks' => [ + [ + 'template' => 'order_overview.tpl', + 'block' => 'admin_order_overview_export', + 'file' => 'views/admin/blocks/order_overview.tpl' + ], + ] ]; diff --git a/source/modules/d3/pdfdocuments/src/views/admin/blocks/order_overview.tpl b/source/modules/d3/pdfdocuments/src/views/admin/blocks/order_overview.tpl new file mode 100644 index 0000000..45f29b5 --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/views/admin/blocks/order_overview.tpl @@ -0,0 +1,49 @@ +[{$smarty.block.parent}] +[{if $edit && $oView->canExport()}] +
+
+ [{$oViewConf->getHiddenSid()}] + + + + + + + + + + + + + + + +
+ + + [{oxmultilang ident="ORDER_OVERVIEW_PDF_TYPE"}]:  +
+ [{oxmultilang ident="GENERAL_LANGUAGE"}] +

+ + +
+
+[{/if}] diff --git a/source/modules/d3/pdfdocuments/src/views/admin/de/auftragsbestaetigung_lang.php b/source/modules/d3/pdfdocuments/src/views/admin/de/auftragsbestaetigung_lang.php new file mode 100644 index 0000000..ef5505d --- /dev/null +++ b/source/modules/d3/pdfdocuments/src/views/admin/de/auftragsbestaetigung_lang.php @@ -0,0 +1,72 @@ + + * @link http://www.oxidmodule.com + */ +$sLangName = "Deutsch"; +$aLang = array( + 'charset' => 'utf-8', + 'ORDER_OVERVIEW_PDF_auftragsbestaetigung' => 'Auftragsbestätigung', + 'ORDER_OVERVIEW_PDF_auftragsbestaetigung_TEXTAREA' => 'Text für Auftragsbestätigung', + 'ORDER_OVERVIEW_PDF_AUFTRAGSNUMMER' => 'Auftragsbestätigung:', + //'ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1' => 'Herzlichen Dank für Ihre Bestellung! Bitte empfehlen Sie uns weiter.', + 'ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1' => 'Vielen Dank für Ihren Einkauf!', + 'ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2' => 'Ihr Elektroversand Schmidt', + //'ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2' => '', + 'ORDER_OVERVIEW_PDF_auftragsbestaetigung_Alternativtext' => 'Alle Artikel sind ab Lager lieferbar und gehen schnellstmöglich in den Versand.', + 'ORDER_OVERVIEW_PDF_bestellbestaetitung_TEXTAREA' => 'Individueller Zahlungstext', + 'PAYMENT_MAIN_D3SHORTDESCPDF' => 'Rechnungstext', + 'D3_OFFERPDF_FINAL_1' => 'Die hier angegebene Materialzusammenstellung dient lediglich der Unterstützung Ihrer Planung. Sie wurde nach bestem Wissen erstellt, erhebt jedoch keinen Anspruch auf Richtigkeit und Vollständigkeit und ersetzt auch nicht Ihre individuelle Planung. Eine Haftung unsererseits für Richtigkeit und Vollständigkeit wird nicht übernommen.', + 'D3_OFFERPDF_FINAL_2' => 'Alle Preisangaben sind inkl. Kupfer- und Metallzuschlägen.', + 'D3_OFFERPDF_FINAL_3' => 'Dieses Angebot ist 14 Tage gültig.', + 'D3_OFFERPDF_FINAL_4' => 'Wir hoffen, dass Ihnen unser Angebot zusagt und würden uns über Ihren Auftrag freuen.', + + 'ORDER_OVERVIEW_PDF_d3pdftextkostenstelle_kunden' => 'kundenspezifischer Kostenstellen', + 'ORDER_OVERVIEW_PDF_d3pdftextkostenstelle_kunden_PDF' => 'Rechnungsvermerk:', + 'D3_ORDERCONFIRMATION_ACTION_ORDERGENERATEPDFORDERCONFIRMATION' => 'Auftragsbestätigung', + //pdf + 'ORDER_OVERVIEW_PDF_ORDERSAT' => ' beim Elektroversand Schmidt', + 'ORDER_OVERVIEW_PDF_ORDERSINCERELY' => 'Ihre Bestellung vom ', + 'D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG' => 'Bankverbindung:', + 'ORDER_OVERVIEW_PDF_ACCOUNTNR' => 'IBAN: ', + 'ORDER_OVERVIEW_PDF_BANKCODE' => 'BIC-/SWIFT-Code: ', + 'ORDER_OVERVIEW_PDF_BANKCODE_HEADER' => 'BIC: ', + 'D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT' => 'So erreichen Sie uns:', + 'D3_ORDER_OVERVIEW_PDF_GESCHAEFTSFUEHRER' => 'Geschäftsführer: Denis Schmidt', + 'D3_ORDER_OVERVIEW_PDF_COURT' => 'Amtsgericht ', + 'D3_ORDER_OVERVIEW_PDF_HRBNR' => 'HRB ', + 'D3_AUFTRAGSBESTAETIGUNG_PDF_PRETEXT' => 'Auf Grundlage unserer allgemeinen Liefer- und Geschäftsbedingungen bestätigen wir Ihnen folgenden Auftrag:', + 'D3_ORDER_OVERVIEW_PDF_USTID' => 'Ust.-ID: ', + 'D3_ORDER_OVERVIEW_PDF_USTIDNR' => 'Ust.-ID-Nr: ', + 'D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE' => 'Ust. %: ', + 'D3_ORDER_OVERVIEW_PDF_TELEFON' => 'Telefon: ', + 'D3_ORDER_OVERVIEW_PDF_FAX' => 'Fax: ', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILLNR' => 'Rechnungs-Nr.: ', + 'D3_ORDER_OVERVIEW_PDF_ORDERNR' => 'Bestellnr.: ', + 'D3_ORDER_OVERVIEW_PDF_DATE' => 'Datum: ', + 'D3_ORDER_OVERVIEW_PDF_AMOUNT' => 'Menge', + 'D3_ORDER_OVERVIEW_PDF_ARTNR' => 'Art.-Nr.', + 'D3_ORDER_OVERVIEW_PDF_DESCRIPTION' => 'Beschreibung', + 'D3_ORDER_OVERVIEW_PDF_UNITPRICE' => 'Einzelpreise', + 'D3_ORDER_OVERVIEW_PDF_TOTALPRICE' => 'Gesamtpreis', + 'D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise: ', + 'D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER' => 'Den Rechnungsbetrag haben wir dankend erhalten.', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO' => 'Summe Artikel (brutto)', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT' => 'Rabatt', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO' => 'Summe Artikel (netto)', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX' => 'zzgl. MwSt. ', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE' => '%', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE' => ' Betrag', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY' => 'Versandkosten (netto)', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', + 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR' => 'Kundennummer: ', +); From 0142b1603891375c31fa61ea771d59689f7e2af8 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 20 May 2020 11:04:59 +0200 Subject: [PATCH 018/134] mv: d3invoicePdf pdfDocuments --- .../views/tpl/deliverynote/deliverynote.tpl | 12 ++++++------ .../src/Application/views/tpl/invoice/invoice.tpl | 10 +++++----- .../views/tpl/invoiceCorrection/deliverynote.tpl | 10 +++++----- .../Application/views/tpl/offers/deliverynote.tpl | 12 ++++++------ .../views/tpl/orderConfirmation/deliverynote.tpl | 10 +++++----- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl index 3da79bd..00c4b3c 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/deliverynote/deliverynote.tpl @@ -2,25 +2,25 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfToping.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfToping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] @@ -85,7 +85,7 @@ *}] [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/deliveryNote/includingFiles/pdfPastThank.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl index 01eff17..ec4cca3 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl @@ -2,24 +2,24 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfTopping.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoice/includingFiles/pdfTopping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoice/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] @@ -81,7 +81,7 @@ [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoice/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl index 5da9d06..b587430 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoiceCorrection/deliverynote.tpl @@ -2,25 +2,25 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl index 386a17f..68999f8 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/offers/deliverynote.tpl @@ -2,24 +2,24 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfToping.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfToping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfHeader.tpl')}] [{/block}] [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] @@ -80,7 +80,7 @@ [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/offers/includingFiles/pdfPastThank.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl index d572986..1db0460 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/orderConfirmation/deliverynote.tpl @@ -2,24 +2,24 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] @@ -81,7 +81,7 @@ [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('d3invoicePdf', 'Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl')}] [{/block}] \ No newline at end of file From 2389109fdb49d32d1d5aa06a7586899c9407a90b Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 20 May 2020 11:50:48 +0200 Subject: [PATCH 019/134] rm: unnecessary entries, changing modId in entry --- .../invoice/includingFiles/{pdfToping.tpl => pdfTopping.tpl} | 0 .../src/Application/views/tpl/invoice/invoice.tpl | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/{pdfToping.tpl => pdfTopping.tpl} (100%) diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfToping.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfTopping.tpl similarity index 100% rename from source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfToping.tpl rename to source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/includingFiles/pdfTopping.tpl diff --git a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl index ec4cca3..3fc4b99 100644 --- a/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl +++ b/source/modules/d3/pdfdocuments/src/Application/views/tpl/invoice/invoice.tpl @@ -1,5 +1,7 @@ [{assign var= currency value= $order->getOrderCurrency()}] [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] +[{assign var= productVats value= $order->getProductVats(false)}] + - - - [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfToping.tpl')}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfFooter.tpl')}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfHeader.tpl')}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
- [{/block}] - - [{block name="articleCosts"}] - - - [{* ++++++Artikelzusammenfassung++++++ *}] - - [{* ++++++Kosten der Bestellung++++++ *}] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
- [{/block}] - [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/offers/includingFiles/pdfPastThank.tpl')}] - [{/block}] -
-
\ No newline at end of file diff --git a/Application/views/tpl/offers/includingFiles/pdfFooter.tpl b/Application/views/tpl/offers/includingFiles/pdfFooter.tpl deleted file mode 100644 index 2600cc7..0000000 --- a/Application/views/tpl/offers/includingFiles/pdfFooter.tpl +++ /dev/null @@ -1,32 +0,0 @@ -[{block name="pdfFooter"}] - - - [{block name="shop_basic_information"}] - - [{/block}] - [{block name="owner_basic_information"}] - - [{/block}] - [{block name="bank_basic_information"}] - - [{/block}] - - -[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/offers/includingFiles/pdfHeader.tpl b/Application/views/tpl/offers/includingFiles/pdfHeader.tpl deleted file mode 100644 index 57df2d5..0000000 --- a/Application/views/tpl/offers/includingFiles/pdfHeader.tpl +++ /dev/null @@ -1,61 +0,0 @@ -[{block name="pdfHeading"}] - - [{block name="heading_order_information"}] - - - [{block name="heading_owner_information"}] - - - [{/block}] - [{/block}] -
-
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] - [{$shop->oxshops__oxcity->value}]
- [{if $order->oxorder__oxdelstreet->value}] - [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] -
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
-
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
-
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
-
[{$shop->oxshops__oxdeladdinfo->value}]
- [{else}] - [{if $order->oxorder__oxbillcompany->value}] -
[{$order->oxorder__oxbillcompany->value}]
- [{/if}] -
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
-
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
-
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
- [{/if}] -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
-
[{$shop->oxshops__oxbankname->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
-
- - [{block name="table_toping_information"}] - - - - -
-
[{oxmultilang ident="D3_OFFER_PDF_OFFERN"}][0000]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
-
- - - - - [{/block}] -
-
[{oxmultilang ident="D3_OFFER_PDF_THANKINTEREST"}]
-
[{oxmultilang ident="D3_OFFER_PDF_OFFERTEXT"}]
-
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl b/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl deleted file mode 100644 index a2f4330..0000000 --- a/Application/views/tpl/offers/includingFiles/pdfPastThank.tpl +++ /dev/null @@ -1,13 +0,0 @@ -[{block name="pdfPastThankFile"}] - - - [{* material info *}] - - [{* price is inkl. *}] - - - [{* offer delay *}] - - -
 
[{oxmultilang ident="D3_OFFER_PDF_INFO"}][{$payment->oxpayments__oxdesc->value}]
[{oxmultilang ident="D3_OFFER_PDF_PRICEINFO"}]
[{oxmultilang ident="D3_OFFER_PDF_OFFERTIME"}]
[{oxmultilang ident="D3_OFFER_PDF_OFFER"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/offers/includingFiles/pdfToping.tpl b/Application/views/tpl/offers/includingFiles/pdfToping.tpl deleted file mode 100644 index 77a8ed7..0000000 --- a/Application/views/tpl/offers/includingFiles/pdfToping.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{block name="pdfToping"}] -
- -
-[{/block}] \ No newline at end of file From 2b69f27d5017b4265e54ad51639681254846fe81 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 26 May 2020 15:52:30 +0200 Subject: [PATCH 023/134] remove order confirmation pdf template --- .../tpl/orderConfirmation/deliverynote.tpl | 87 ------------------- .../includingFiles/pdfFooter.tpl | 32 ------- .../includingFiles/pdfHeader.tpl | 56 ------------ .../includingFiles/pdfPastThank.tpl | 16 ---- .../includingFiles/pdfToping.tpl | 5 -- 5 files changed, 196 deletions(-) delete mode 100644 Application/views/tpl/orderConfirmation/deliverynote.tpl delete mode 100644 Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl delete mode 100644 Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl delete mode 100644 Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl delete mode 100644 Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl diff --git a/Application/views/tpl/orderConfirmation/deliverynote.tpl b/Application/views/tpl/orderConfirmation/deliverynote.tpl deleted file mode 100644 index 1db0460..0000000 --- a/Application/views/tpl/orderConfirmation/deliverynote.tpl +++ /dev/null @@ -1,87 +0,0 @@ -[{assign var= currency value= $order->getOrderCurrency()}] -[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] - - - - - [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl')}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl')}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl')}] - [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
- [{/block}] - - [{block name="articleCosts"}] - - - [{* ++++++Artikelzusammenfassung++++++ *}] - - [{* ++++++Kosten der Bestellung++++++ *}] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
- [{/block}] - [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl')}] - [{/block}] -
-
\ No newline at end of file diff --git a/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl b/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl deleted file mode 100644 index 2600cc7..0000000 --- a/Application/views/tpl/orderConfirmation/includingFiles/pdfFooter.tpl +++ /dev/null @@ -1,32 +0,0 @@ -[{block name="pdfFooter"}] - - - [{block name="shop_basic_information"}] - - [{/block}] - [{block name="owner_basic_information"}] - - [{/block}] - [{block name="bank_basic_information"}] - - [{/block}] - - -[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl b/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl deleted file mode 100644 index a4aaa3c..0000000 --- a/Application/views/tpl/orderConfirmation/includingFiles/pdfHeader.tpl +++ /dev/null @@ -1,56 +0,0 @@ -[{block name="pdfHeading"}] - - [{block name="heading_owner_information"}] - - - - - [{/block}] - [{block name="heading_order_information"}] - - - - - [{/block}] -
-
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
-
- [{if $order->oxorder__oxbillcompany->value}] -
[{$order->oxorder__oxbillcompany->value}]
- [{/if}] -
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
-
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
-
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
- - [{* +++++++Lieferadressen dynamisch+++++++ *}] - [{if $order->oxorder__oxdelstreet->value}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] -
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
-
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
-
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
-
[{$shop->oxshops__oxdeladdinfo->value}]
- [{/if}] - - [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->oxorder__oxordernr->value}]
-
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
-
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
-
[{$shop->oxshops__oxbankname->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
-
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl b/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl deleted file mode 100644 index 907388c..0000000 --- a/Application/views/tpl/orderConfirmation/includingFiles/pdfPastThank.tpl +++ /dev/null @@ -1,16 +0,0 @@ -[{block name="pdfPastThankFile"}] - - - - [{* +++++++Individueller Zahlungstext+++++++ *}] - [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] - - [{else}] - - [{/if}] - [{*+++++++++++*}] - - - -
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl b/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl deleted file mode 100644 index 77a8ed7..0000000 --- a/Application/views/tpl/orderConfirmation/includingFiles/pdfToping.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{block name="pdfToping"}] -
- -
-[{/block}] \ No newline at end of file From a1cc1f0dcc60357a465cc6fbfd1605ba9f582d99 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 26 May 2020 15:59:10 +0200 Subject: [PATCH 024/134] refector generic pdf documents interface --- Application/Model/pdfdocuments_generic.php | 31 ++++++++++++++++++++++ Modules/Application/Model/albatros.php | 10 ------- 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 Application/Model/pdfdocuments_generic.php delete mode 100644 Modules/Application/Model/albatros.php diff --git a/Application/Model/pdfdocuments_generic.php b/Application/Model/pdfdocuments_generic.php new file mode 100644 index 0000000..37d2763 --- /dev/null +++ b/Application/Model/pdfdocuments_generic.php @@ -0,0 +1,31 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Interfaces; + +interface pdfdocuments_generic +{ + public function setFilename($sContent, $target, $sFilename); + + public function setInvoiceNumber(); + + public function setInvoiceDate(); + + public function saveOrderOnChanges(); + + public function getTemplate(); +} \ No newline at end of file diff --git a/Modules/Application/Model/albatros.php b/Modules/Application/Model/albatros.php deleted file mode 100644 index 06c4cb8..0000000 --- a/Modules/Application/Model/albatros.php +++ /dev/null @@ -1,10 +0,0 @@ - Date: Tue, 26 May 2020 16:12:17 +0200 Subject: [PATCH 025/134] refactor class structure --- .../Model/Documents}/deliverynotePdf.php | 0 Application/Model/Documents/invoicePdf.php | 28 ++++++++++++++++++ .../Model/Interfaces/pdfdocuments_generic.php | 29 +++++++++++++++++++ .../Model/Interfaces/pdfdocuments_order.php | 25 ++++++++++++++++ .../pdfdocuments_orderinvoice.php} | 8 +---- .../Model/pdfDocuments_abstract.php | 21 ++++++++++++-- Modules/Application/Model/invoicePdf.php | 9 ------ 7 files changed, 102 insertions(+), 18 deletions(-) rename {Modules/Application/Model => Application/Model/Documents}/deliverynotePdf.php (100%) create mode 100644 Application/Model/Documents/invoicePdf.php create mode 100644 Application/Model/Interfaces/pdfdocuments_generic.php create mode 100644 Application/Model/Interfaces/pdfdocuments_order.php rename Application/Model/{pdfdocuments_generic.php => Interfaces/pdfdocuments_orderinvoice.php} (78%) rename Modules/Application/Model/pdfDocuments.php => Application/Model/pdfDocuments_abstract.php (78%) delete mode 100644 Modules/Application/Model/invoicePdf.php diff --git a/Modules/Application/Model/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php similarity index 100% rename from Modules/Application/Model/deliverynotePdf.php rename to Application/Model/Documents/deliverynotePdf.php diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php new file mode 100644 index 0000000..1befb18 --- /dev/null +++ b/Application/Model/Documents/invoicePdf.php @@ -0,0 +1,28 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Modules\Application\Model; + +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice; +use D3\PdfDocuments\Application\Model\pdfDocuments_abstract; + +class invoicePdf extends pdfDocuments_abstract implements pdfdocuments_orderinvoice +{ + public function getTemplate(){ + return 'invoice.tpl'; + } +} \ No newline at end of file diff --git a/Application/Model/Interfaces/pdfdocuments_generic.php b/Application/Model/Interfaces/pdfdocuments_generic.php new file mode 100644 index 0000000..d636533 --- /dev/null +++ b/Application/Model/Interfaces/pdfdocuments_generic.php @@ -0,0 +1,29 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Interfaces; + +interface pdfdocuments_generic +{ + public function setFilename($sContent, $target, $sFilename); + + public function saveOrderOnChanges(); + + public function getTemplate(); + + public function genPdf($sFilename, $iSelLang = 0, $target = 'I'); +} \ No newline at end of file diff --git a/Application/Model/Interfaces/pdfdocuments_order.php b/Application/Model/Interfaces/pdfdocuments_order.php new file mode 100644 index 0000000..d5f3b72 --- /dev/null +++ b/Application/Model/Interfaces/pdfdocuments_order.php @@ -0,0 +1,25 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Interfaces; + +interface pdfdocuments_order extends pdfdocuments_generic +{ + public function setOrder(Order $order); + + public function getOrder(); +} \ No newline at end of file diff --git a/Application/Model/pdfdocuments_generic.php b/Application/Model/Interfaces/pdfdocuments_orderinvoice.php similarity index 78% rename from Application/Model/pdfdocuments_generic.php rename to Application/Model/Interfaces/pdfdocuments_orderinvoice.php index 37d2763..11564d4 100644 --- a/Application/Model/pdfdocuments_generic.php +++ b/Application/Model/Interfaces/pdfdocuments_orderinvoice.php @@ -17,15 +17,9 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; -interface pdfdocuments_generic +interface pdfdocuments_orderinvoice extends pdfdocuments_order { - public function setFilename($sContent, $target, $sFilename); - public function setInvoiceNumber(); public function setInvoiceDate(); - - public function saveOrderOnChanges(); - - public function getTemplate(); } \ No newline at end of file diff --git a/Modules/Application/Model/pdfDocuments.php b/Application/Model/pdfDocuments_abstract.php similarity index 78% rename from Modules/Application/Model/pdfDocuments.php rename to Application/Model/pdfDocuments_abstract.php index 091d33e..ac68c49 100644 --- a/Modules/Application/Model/pdfDocuments.php +++ b/Application/Model/pdfDocuments_abstract.php @@ -1,6 +1,23 @@ + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model; + +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic; use \OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Application\Model\Payment; use OxidEsales\Eshop\Application\Model\User; @@ -8,7 +25,7 @@ use OxidEsales\Eshop\Core\Base; use OxidEsales\Eshop\Core\Registry; use Spipu\Html2Pdf\Html2Pdf; -abstract class pdfDocuments implements albatros +abstract class pdfDocuments_abstract implements pdfdocuments_generic { public $oOrder; protected $blIsNewOrder; diff --git a/Modules/Application/Model/invoicePdf.php b/Modules/Application/Model/invoicePdf.php deleted file mode 100644 index 546d8c8..0000000 --- a/Modules/Application/Model/invoicePdf.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Tue, 26 May 2020 16:32:22 +0200 Subject: [PATCH 026/134] refactor class structure --- .../AbstractClasses/pdfDocuments_generic.php | 74 ++++++++++++ .../AbstractClasses/pdfDocuments_order.php | 42 +++++++ Application/Model/Documents/invoicePdf.php | 35 +++++- .../Model/Interfaces/pdfdocuments_order.php | 2 + Application/Model/pdfDocuments_abstract.php | 112 ------------------ .../Model/d3_Order_PdfDocuments.php | 9 +- 6 files changed, 154 insertions(+), 120 deletions(-) create mode 100644 Application/Model/AbstractClasses/pdfDocuments_generic.php create mode 100644 Application/Model/AbstractClasses/pdfDocuments_order.php delete mode 100644 Application/Model/pdfDocuments_abstract.php diff --git a/Application/Model/AbstractClasses/pdfDocuments_generic.php b/Application/Model/AbstractClasses/pdfDocuments_generic.php new file mode 100644 index 0000000..3b09a93 --- /dev/null +++ b/Application/Model/AbstractClasses/pdfDocuments_generic.php @@ -0,0 +1,74 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\AbstractClasses; + +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic as genericInterface; +use \OxidEsales\Eshop\Application\Model\Order; +use OxidEsales\Eshop\Application\Model\Payment; +use OxidEsales\Eshop\Application\Model\User; +use OxidEsales\Eshop\Core\Base; +use OxidEsales\Eshop\Core\Registry; +use Spipu\Html2Pdf\Html2Pdf; + +abstract class pdfDocuments_generic implements genericInterface +{ + public function genPdf($sFilename, $iSelLang = 0, $target = 'I') + { + $oSmarty = Registry::getUtilsView()->getSmarty(); + + $oSmarty = $this->setSmartyVars($oSmarty); + + $this->setInvoiceNumber(); + $this->setInvoiceDate(); + $this->saveOrderOnChanges(); + + $sContent = $oSmarty->fetch($this->getTemplate()); + $this->setFilename($sContent, $target, $sFilename); + } + + public function setSmartyVars($smarty) + { + $smarty->assign('oConfig', Registry::getSession()->getConfig()); + $smarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $smarty->assign('order', $this->getOrder()); + $smarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); + $smarty->assign('lang', Registry::getLang()); + + $oUser = oxNew(User::Class); + $oUser->load($this->getOrder()->getFieldData('oxuserid')); + $smarty->assign('user', $oUser); + + $oPayment = oxNew(Payment::class); + $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); + $smarty->assign('payment', $oPayment); + + return $smarty; + } + + public function setFilename($sContent, $target, $sFilename) + { + $ordernr = $this->getOrder()->getFieldData('oxordernr'); + $billnr = $this->getOrder()->getFieldData('oxbillnr');; + + $sFilename = str_replace($ordernr, $billnr, $sFilename); + + $oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); + $oPdf->writeHTML($sContent); + $oPdf->output($sFilename, $target); + } +} \ No newline at end of file diff --git a/Application/Model/AbstractClasses/pdfDocuments_order.php b/Application/Model/AbstractClasses/pdfDocuments_order.php new file mode 100644 index 0000000..17cf9ab --- /dev/null +++ b/Application/Model/AbstractClasses/pdfDocuments_order.php @@ -0,0 +1,42 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\AbstractClasses; + +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order as orderInterface; +use \OxidEsales\Eshop\Application\Model\Order; + +abstract class pdfDocuments_order extends pdfDocuments_generic implements orderInterface +{ + public $oOrder; + + /** + * @param Order $order + */ + public function setOrder(Order $order) + { + $this->oOrder = $order; + } + + /** + * @return Order + */ + public function getOrder() + { + return $this->oOrder; + } +} \ No newline at end of file diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 1befb18..72ba075 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -15,13 +15,42 @@ * @link http://www.oxidmodule.com */ -namespace D3\PdfDocuments\Modules\Application\Model; +namespace D3\PdfDocuments\Modules\Application\Model\Documents; +use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice; -use D3\PdfDocuments\Application\Model\pdfDocuments_abstract; -class invoicePdf extends pdfDocuments_abstract implements pdfdocuments_orderinvoice +class invoicePdf extends pdfDocuments_order implements pdfdocuments_orderinvoice { + protected $blIsNewOrder = false; + + public function setInvoiceNumber() + { + $this->blIsNewOrder = false; + + if (!$this->getOrder()->getFieldData('oxbillnr')) { + $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); + + $this->blIsNewOrder = true; + } + } + + public function setInvoiceDate() + { + if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { + $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); + + $this->blIsNewOrder = true; + } + } + + public function saveOrderOnChanges() + { + if ($this->blIsNewOrder) { + $this->getOrder()->save(); + } + } + public function getTemplate(){ return 'invoice.tpl'; } diff --git a/Application/Model/Interfaces/pdfdocuments_order.php b/Application/Model/Interfaces/pdfdocuments_order.php index d5f3b72..690061d 100644 --- a/Application/Model/Interfaces/pdfdocuments_order.php +++ b/Application/Model/Interfaces/pdfdocuments_order.php @@ -17,6 +17,8 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; +use OxidEsales\Eshop\Application\Model\Order; + interface pdfdocuments_order extends pdfdocuments_generic { public function setOrder(Order $order); diff --git a/Application/Model/pdfDocuments_abstract.php b/Application/Model/pdfDocuments_abstract.php deleted file mode 100644 index ac68c49..0000000 --- a/Application/Model/pdfDocuments_abstract.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @link http://www.oxidmodule.com - */ - -namespace D3\PdfDocuments\Application\Model; - -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic; -use \OxidEsales\Eshop\Application\Model\Order; -use OxidEsales\Eshop\Application\Model\Payment; -use OxidEsales\Eshop\Application\Model\User; -use OxidEsales\Eshop\Core\Base; -use OxidEsales\Eshop\Core\Registry; -use Spipu\Html2Pdf\Html2Pdf; - -abstract class pdfDocuments_abstract implements pdfdocuments_generic -{ - public $oOrder; - protected $blIsNewOrder; - - public function genPdf($sFilename, $iSelLang = 0, $target = 'I') - { - $oSmarty = Registry::getUtilsView()->getSmarty(); - $oSmarty->assign('oConfig', Registry::getSession()->getConfig()); - $oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); - $oSmarty->assign('order', $this->getOrder()); - $oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); - $oSmarty->assign('lang', Registry::getLang()); - - $oUser = oxNew(User::Class); - $oUser->load($this->getOrder()->getFieldData('oxuserid')); - $oSmarty->assign('user', $oUser); - - $oPayment = oxNew(Payment::class); - $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); - $oSmarty->assign('payment', $oPayment); - - $this->setInvoiceNumber(); - $this->setInvoiceDate(); - $this->saveOrderOnChanges(); - - $sContent = $oSmarty->fetch($this->getTemplate()); - $this->setFilename($sContent, $target, $sFilename); - } - - /** - * @param Order $order - */ - public function setOrder(Order $order) - { - $this->oOrder = $order; - } - - /** - * @return Order - */ - public function getOrder() - { - return $this->oOrder; - } - - public function setFilename($sContent, $target, $sFilename) - { - $ordernr = $this->getOrder()->getFieldData('oxordernr'); - $billnr = $this->getOrder()->getFieldData('oxbillnr');; - - $sFilename = str_replace($ordernr, $billnr, $sFilename); - - $oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); - $oPdf->writeHTML($sContent); - $oPdf->output($sFilename, $target); - } - - public function setInvoiceNumber() - { - $this->blIsNewOrder = 0; - - if (!$this->getOrder()->getFieldData('oxbillnr')) { - $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); - - $this->blIsNewOrder = 1; - } - } - - public function setInvoiceDate() - { - if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { - $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); - - $this->blIsNewOrder = 1; - } - } - - public function saveOrderOnChanges() - { - if ($this->blIsNewOrder) { - $this->getOrder()->save(); - } - } -} \ No newline at end of file diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index aee3e9c..bc8dfa9 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,12 +17,10 @@ namespace D3\PdfDocuments\Modules\Application\Model; -use D3\PdfDocuments\Modules\Application\Model\deliverynotePdf; -use OxidEsales\EshopCommunity\Application\Model\User; -use OxidEsales\EshopCommunity\Application\Model\Payment; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic; +use D3\PdfDocuments\Modules\Application\Model\Documents\invoicePdf; use OxidEsales\Eshop\Core\Registry; use Spipu\Html2Pdf\Exception\Html2PdfException; -use Spipu\Html2Pdf\Html2Pdf; class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent { @@ -57,7 +55,7 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent } /** - * @return albatros + * @return pdfdocuments_generic * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException * @throws \oxSystemComponentException */ @@ -65,6 +63,7 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent { $pdfInvoice= oxNew(invoicePdf::class); $pdfInvoice->setOrder($this); + return $pdfInvoice; } } From 98a34d05f39edb0754285868c8770aec0a2267c5 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Wed, 27 May 2020 09:46:44 +0200 Subject: [PATCH 027/134] extract type specific lines from generic to specific clases --- .../AbstractClasses/pdfDocuments_generic.php | 108 ++++++++++++------ .../AbstractClasses/pdfDocuments_order.php | 71 +++++++++--- .../Model/Documents/deliverynotePdf.php | 28 ++++- Application/Model/Documents/invoicePdf.php | 9 ++ .../Model/Interfaces/pdfdocuments_generic.php | 19 ++- .../Model/Interfaces/pdfdocuments_order.php | 6 + .../Interfaces/pdfdocuments_orderinvoice.php | 4 +- .../Model/d3_Order_PdfDocuments.php | 49 ++++---- composer.json | 1 + metadata.php | 2 +- 10 files changed, 209 insertions(+), 88 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfDocuments_generic.php b/Application/Model/AbstractClasses/pdfDocuments_generic.php index 3b09a93..fb1ab7e 100644 --- a/Application/Model/AbstractClasses/pdfDocuments_generic.php +++ b/Application/Model/AbstractClasses/pdfDocuments_generic.php @@ -18,57 +18,89 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic as genericInterface; -use \OxidEsales\Eshop\Application\Model\Order; -use OxidEsales\Eshop\Application\Model\Payment; -use OxidEsales\Eshop\Application\Model\User; -use OxidEsales\Eshop\Core\Base; use OxidEsales\Eshop\Core\Registry; +use Smarty; use Spipu\Html2Pdf\Html2Pdf; abstract class pdfDocuments_generic implements genericInterface { - public function genPdf($sFilename, $iSelLang = 0, $target = 'I') - { - $oSmarty = Registry::getUtilsView()->getSmarty(); + /** + * @param $sFilename + * @param int $iSelLang + * @param string $target + */ + public function genPdf($sFilename, $iSelLang = 0, $target = 'I') + { + $sFilename = $this->getFilename( $sFilename); - $oSmarty = $this->setSmartyVars($oSmarty); + $oPdf = call_user_func_array('oxNew', array_merge([Html2Pdf::class], $this->getPdfProperties())); + //$oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); + $oPdf->writeHTML($this->getHTMLContent($iSelLang)); + $oPdf->output($sFilename, $target); + } - $this->setInvoiceNumber(); - $this->setInvoiceDate(); - $this->saveOrderOnChanges(); + /** + * @param Smarty $smarty + * + * @return Smarty + */ + public function setSmartyVars($smarty) + { + $smarty->assign('oConfig', Registry::getSession()->getConfig()); + $smarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $smarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); + $smarty->assign('lang', Registry::getLang()); - $sContent = $oSmarty->fetch($this->getTemplate()); - $this->setFilename($sContent, $target, $sFilename); - } + return $smarty; + } - public function setSmartyVars($smarty) - { - $smarty->assign('oConfig', Registry::getSession()->getConfig()); - $smarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); - $smarty->assign('order', $this->getOrder()); - $smarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); - $smarty->assign('lang', Registry::getLang()); + /** + * @param string $sFilename + * + * @return string + */ + public function getFilename($sFilename) + { + return $sFilename; + } - $oUser = oxNew(User::Class); - $oUser->load($this->getOrder()->getFieldData('oxuserid')); - $smarty->assign('user', $oUser); + /** + * @param int $iSelLang + * + * @return mixed + */ + public function getHTMLContent($iSelLang = 0) + { + $lang = Registry::getLang(); - $oPayment = oxNew(Payment::class); - $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); - $smarty->assign('payment', $oPayment); + /** @var Smarty $oSmarty */ + $oSmarty = Registry::getUtilsView()->getSmarty(); - return $smarty; - } + $currTplLang = $lang->getTplLanguage(); + $lang->setTplLanguage($iSelLang); - public function setFilename($sContent, $target, $sFilename) - { - $ordernr = $this->getOrder()->getFieldData('oxordernr'); - $billnr = $this->getOrder()->getFieldData('oxbillnr');; + $oSmarty = $this->setSmartyVars($oSmarty); - $sFilename = str_replace($ordernr, $billnr, $sFilename); + $content = $oSmarty->fetch($this->getTemplate()); - $oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); - $oPdf->writeHTML($sContent); - $oPdf->output($sFilename, $target); - } + $lang->setTplLanguage($currTplLang); + + return $content; + } + + /** + * arguments for Html2Pdf class constructor + * - $orientation = 'P', + * - $format = 'A4', + * - $lang = 'fr', + * - $unicode = true, + * - $encoding = 'UTF-8', + * - $margins = array(5, 5, 5, 8), + * - $pdfa = false + * @return string[] + */ + public function getPdfProperties() + { + return ['P', 'A4', 'de']; + } } \ No newline at end of file diff --git a/Application/Model/AbstractClasses/pdfDocuments_order.php b/Application/Model/AbstractClasses/pdfDocuments_order.php index 17cf9ab..7e4f89e 100644 --- a/Application/Model/AbstractClasses/pdfDocuments_order.php +++ b/Application/Model/AbstractClasses/pdfDocuments_order.php @@ -19,24 +19,65 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order as orderInterface; use \OxidEsales\Eshop\Application\Model\Order; +use OxidEsales\Eshop\Application\Model\Payment; +use OxidEsales\Eshop\Application\Model\User; +use Smarty; abstract class pdfDocuments_order extends pdfDocuments_generic implements orderInterface { - public $oOrder; + /** @var Order */ + public $oOrder; - /** - * @param Order $order - */ - public function setOrder(Order $order) - { - $this->oOrder = $order; - } + /** + * @param Order $order + */ + public function setOrder(Order $order) + { + $this->oOrder = $order; + } - /** - * @return Order - */ - public function getOrder() - { - return $this->oOrder; - } + /** + * @return Order + */ + public function getOrder() + { + return $this->oOrder; + } + + /** + * @param Smarty $smarty + * + * @return Smarty + */ + public function setSmartyVars($smarty) + { + $smarty = parent::setSmartyVars($smarty); + + $smarty->assign('order', $this->getOrder()); + + $oUser = oxNew(User::Class); + $oUser->load($this->getOrder()->getFieldData('oxuserid')); + $smarty->assign('user', $oUser); + + $oPayment = oxNew(Payment::class); + $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); + $smarty->assign('payment', $oPayment); + + return $smarty; + } + + /** + * @param string $sFilename + * + * @return string + */ + public function getFilename($sFilename) + { + $sFilename = parent::getFilename( $sFilename); + + $ordernr = $this->getOrder()->getFieldData('oxordernr'); + $billnr = $this->getOrder()->getFieldData('oxbillnr');; + + return str_replace($ordernr, $billnr, $sFilename); + } } \ No newline at end of file diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index bbe15f4..08b2e29 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -1,9 +1,27 @@ + * @link http://www.oxidmodule.com + */ -class deliverynotePdf extends pdfDocuments{ - public function getTemplate(){ - return 'deliverynote.tpl'; - } +namespace D3\PdfDocuments\Modules\Application\Model\Documents; + +use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; + +class deliverynotePdf extends pdfDocuments_order +{ + public function getTemplate(){ + return 'deliverynote.tpl'; + } } \ No newline at end of file diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 72ba075..d7e019b 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -24,6 +24,15 @@ class invoicePdf extends pdfDocuments_order implements pdfdocuments_orderinvoice { protected $blIsNewOrder = false; + public function genPdf( $sFilename, $iSelLang = 0, $target = 'I' ) + { + $this->setInvoiceNumber(); + $this->setInvoiceDate(); + $this->saveOrderOnChanges(); + + parent::genPdf( $sFilename, $iSelLang, $target ); + } + public function setInvoiceNumber() { $this->blIsNewOrder = false; diff --git a/Application/Model/Interfaces/pdfdocuments_generic.php b/Application/Model/Interfaces/pdfdocuments_generic.php index d636533..607aa77 100644 --- a/Application/Model/Interfaces/pdfdocuments_generic.php +++ b/Application/Model/Interfaces/pdfdocuments_generic.php @@ -19,11 +19,22 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; interface pdfdocuments_generic { - public function setFilename($sContent, $target, $sFilename); - - public function saveOrderOnChanges(); - + /** + * @return string + */ public function getTemplate(); + /** + * @return mixed + */ + public function getHTMLContent(); + + /** + * @param $sFilename + * @param int $iSelLang + * @param string $target + * + * @return mixed + */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I'); } \ No newline at end of file diff --git a/Application/Model/Interfaces/pdfdocuments_order.php b/Application/Model/Interfaces/pdfdocuments_order.php index 690061d..4a562a2 100644 --- a/Application/Model/Interfaces/pdfdocuments_order.php +++ b/Application/Model/Interfaces/pdfdocuments_order.php @@ -21,7 +21,13 @@ use OxidEsales\Eshop\Application\Model\Order; interface pdfdocuments_order extends pdfdocuments_generic { + /** + * @param Order $order + */ public function setOrder(Order $order); + /** + * @return Order + */ public function getOrder(); } \ No newline at end of file diff --git a/Application/Model/Interfaces/pdfdocuments_orderinvoice.php b/Application/Model/Interfaces/pdfdocuments_orderinvoice.php index 11564d4..9dcc216 100644 --- a/Application/Model/Interfaces/pdfdocuments_orderinvoice.php +++ b/Application/Model/Interfaces/pdfdocuments_orderinvoice.php @@ -19,7 +19,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; interface pdfdocuments_orderinvoice extends pdfdocuments_order { - public function setInvoiceNumber(); + public function setInvoiceNumber(); - public function setInvoiceDate(); + public function setInvoiceDate(); } \ No newline at end of file diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index bc8dfa9..9a8de66 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,8 +17,9 @@ namespace D3\PdfDocuments\Modules\Application\Model; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order as OrderPdfInterface; use D3\PdfDocuments\Modules\Application\Model\Documents\invoicePdf; +use D3\PdfDocuments\Modules\Application\Model\Documents\deliverynotePdf; use OxidEsales\Eshop\Core\Registry; use Spipu\Html2Pdf\Exception\Html2PdfException; @@ -32,38 +33,40 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') { - $Pdf= $this->getPdfClass(); + $Pdf= $this->getPdfClass(); - $Pdf->setOrder($this); - $Pdf->genPdf($sFilename, $iSelLang = 0, $target = 'I'); + $Pdf->setOrder($this); + $Pdf->genPdf($sFilename, $iSelLang = 0, $target = 'I'); } - public function getPdfClass(){ - switch (Registry::getRequest()->getRequestParameter('pdftype')) { - case ('dnote'): - case ('dnote_without_logo'): - $pdfInstance= oxNew(deliverynotePdf::class); - $pdfInstance->setOrder($this); - return $pdfInstance; - case ('standart'): - case('standart_without_logo'): - $pdfInvoice= oxNew(invoicePdf::class); - $pdfInvoice->setOrder($this); - return $pdfInvoice; - default: - return $this->getCustomPdfClass(); - } + + public function getPdfClass() + { + switch (Registry::getRequest()->getRequestParameter('pdftype')) { + case ('dnote'): + case ('dnote_without_logo'): + $pdfInstance= oxNew(deliverynotePdf::class); + $pdfInstance->setOrder($this); + return $pdfInstance; + case ('standart'): + case('standart_without_logo'): + $pdfInvoice= oxNew(invoicePdf::class); + $pdfInvoice->setOrder($this); + return $pdfInvoice; + default: + return $this->getCustomPdfClass(); + } } /** - * @return pdfdocuments_generic + * @return OrderPdfInterface * @throws \OxidEsales\Eshop\Core\Exception\SystemComponentException * @throws \oxSystemComponentException */ public function getCustomPdfClass() { - $pdfInvoice= oxNew(invoicePdf::class); - $pdfInvoice->setOrder($this); + $pdfInvoice= oxNew(invoicePdf::class); + $pdfInvoice->setOrder($this); - return $pdfInvoice; + return $pdfInvoice; } } diff --git a/composer.json b/composer.json index 337a22c..9923320 100644 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ } }, "require": { + "oxid-esales/oxideshop-ce": "6.0 - 6.3" }, "autoload": { "psr-4": { diff --git a/metadata.php b/metadata.php index 37f2674..176e4d8 100644 --- a/metadata.php +++ b/metadata.php @@ -49,7 +49,7 @@ $aModule = [ ], 'controllers' => [], 'templates' => [ - 'd3deliverynote.tpl' => 'd3/pdfdocuments/Application/views/tpl/deliverynote.tpl', + 'd3deliverynote.tpl' => 'd3/pdfdocuments/Application/views/tpl/deliverynote/deliverynote.tpl', 'invoice.tpl' => 'd3/pdfdocuments/Application/views/tpl/invoice/invoice.tpl', 'd3tplheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/header.tpl' ], From 18a15906e2a6bfcfed5ccd9bb37643623abb164c Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 28 May 2020 12:21:11 +0200 Subject: [PATCH 028/134] set missing requirements, refactor class structure --- .../AbstractClasses/pdfDocuments_generic.php | 41 ++++++++++--------- .../AbstractClasses/pdfDocuments_order.php | 20 +++------ Application/Model/Documents/invoicePdf.php | 4 +- ...php => pdfdocuments_generic_interface.php} | 2 +- ...r.php => pdfdocuments_order_interface.php} | 2 +- ...> pdfdocuments_orderinvoice_interface.php} | 2 +- .../Model/d3_Order_PdfDocuments.php | 2 +- composer.json | 4 +- 8 files changed, 36 insertions(+), 41 deletions(-) rename Application/Model/Interfaces/{pdfdocuments_generic.php => pdfdocuments_generic_interface.php} (95%) rename Application/Model/Interfaces/{pdfdocuments_order.php => pdfdocuments_order_interface.php} (90%) rename Application/Model/Interfaces/{pdfdocuments_orderinvoice.php => pdfdocuments_orderinvoice_interface.php} (88%) diff --git a/Application/Model/AbstractClasses/pdfDocuments_generic.php b/Application/Model/AbstractClasses/pdfDocuments_generic.php index fb1ab7e..4d7645e 100644 --- a/Application/Model/AbstractClasses/pdfDocuments_generic.php +++ b/Application/Model/AbstractClasses/pdfDocuments_generic.php @@ -17,13 +17,25 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic as genericInterface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic_interface as genericInterface; use OxidEsales\Eshop\Core\Registry; use Smarty; use Spipu\Html2Pdf\Html2Pdf; abstract class pdfDocuments_generic implements genericInterface { + /** @var Smarty */ + public $oSmarty; + + /** + * pdfDocuments_generic constructor. + */ + public function __construct() + { + /** @var Smarty $oSmarty */ + $this->oSmarty = Registry::getUtilsView()->getSmarty(); + } + /** * @param $sFilename * @param int $iSelLang @@ -33,25 +45,17 @@ abstract class pdfDocuments_generic implements genericInterface { $sFilename = $this->getFilename( $sFilename); - $oPdf = call_user_func_array('oxNew', array_merge([Html2Pdf::class], $this->getPdfProperties())); - //$oPdf = oxNew(Html2Pdf::class, 'P', 'A4', 'de'); + $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); $oPdf->writeHTML($this->getHTMLContent($iSelLang)); $oPdf->output($sFilename, $target); } - /** - * @param Smarty $smarty - * - * @return Smarty - */ - public function setSmartyVars($smarty) + public function setSmartyVars() { - $smarty->assign('oConfig', Registry::getSession()->getConfig()); - $smarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); - $smarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); - $smarty->assign('lang', Registry::getLang()); - - return $smarty; + $this->oSmarty->assign('oConfig', Registry::getSession()->getConfig()); + $this->oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $this->oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); + $this->oSmarty->assign('lang', Registry::getLang()); } /** @@ -73,15 +77,12 @@ abstract class pdfDocuments_generic implements genericInterface { $lang = Registry::getLang(); - /** @var Smarty $oSmarty */ - $oSmarty = Registry::getUtilsView()->getSmarty(); - $currTplLang = $lang->getTplLanguage(); $lang->setTplLanguage($iSelLang); - $oSmarty = $this->setSmartyVars($oSmarty); + $this->setSmartyVars(); - $content = $oSmarty->fetch($this->getTemplate()); + $content = $this->oSmarty->fetch($this->getTemplate()); $lang->setTplLanguage($currTplLang); diff --git a/Application/Model/AbstractClasses/pdfDocuments_order.php b/Application/Model/AbstractClasses/pdfDocuments_order.php index 7e4f89e..f28f5be 100644 --- a/Application/Model/AbstractClasses/pdfDocuments_order.php +++ b/Application/Model/AbstractClasses/pdfDocuments_order.php @@ -17,11 +17,10 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order as orderInterface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface as orderInterface; use \OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Application\Model\Payment; use OxidEsales\Eshop\Application\Model\User; -use Smarty; abstract class pdfDocuments_order extends pdfDocuments_generic implements orderInterface { @@ -44,26 +43,19 @@ abstract class pdfDocuments_order extends pdfDocuments_generic implements orderI return $this->oOrder; } - /** - * @param Smarty $smarty - * - * @return Smarty - */ - public function setSmartyVars($smarty) + public function setSmartyVars() { - $smarty = parent::setSmartyVars($smarty); + parent::setSmartyVars(); - $smarty->assign('order', $this->getOrder()); + $this->oSmarty->assign('order', $this->getOrder()); $oUser = oxNew(User::Class); $oUser->load($this->getOrder()->getFieldData('oxuserid')); - $smarty->assign('user', $oUser); + $this->oSmarty->assign('user', $oUser); $oPayment = oxNew(Payment::class); $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); - $smarty->assign('payment', $oPayment); - - return $smarty; + $this->oSmarty->assign('payment', $oPayment); } /** diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index d7e019b..1c9e397 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -18,9 +18,9 @@ namespace D3\PdfDocuments\Modules\Application\Model\Documents; use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice_interface; -class invoicePdf extends pdfDocuments_order implements pdfdocuments_orderinvoice +class invoicePdf extends pdfDocuments_order implements pdfdocuments_orderinvoice_interface { protected $blIsNewOrder = false; diff --git a/Application/Model/Interfaces/pdfdocuments_generic.php b/Application/Model/Interfaces/pdfdocuments_generic_interface.php similarity index 95% rename from Application/Model/Interfaces/pdfdocuments_generic.php rename to Application/Model/Interfaces/pdfdocuments_generic_interface.php index 607aa77..924dd6b 100644 --- a/Application/Model/Interfaces/pdfdocuments_generic.php +++ b/Application/Model/Interfaces/pdfdocuments_generic_interface.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; -interface pdfdocuments_generic +interface pdfdocuments_generic_interface { /** * @return string diff --git a/Application/Model/Interfaces/pdfdocuments_order.php b/Application/Model/Interfaces/pdfdocuments_order_interface.php similarity index 90% rename from Application/Model/Interfaces/pdfdocuments_order.php rename to Application/Model/Interfaces/pdfdocuments_order_interface.php index 4a562a2..1a28938 100644 --- a/Application/Model/Interfaces/pdfdocuments_order.php +++ b/Application/Model/Interfaces/pdfdocuments_order_interface.php @@ -19,7 +19,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; use OxidEsales\Eshop\Application\Model\Order; -interface pdfdocuments_order extends pdfdocuments_generic +interface pdfdocuments_order_interface extends pdfdocuments_generic_interface { /** * @param Order $order diff --git a/Application/Model/Interfaces/pdfdocuments_orderinvoice.php b/Application/Model/Interfaces/pdfdocuments_orderinvoice_interface.php similarity index 88% rename from Application/Model/Interfaces/pdfdocuments_orderinvoice.php rename to Application/Model/Interfaces/pdfdocuments_orderinvoice_interface.php index 9dcc216..91f7ece 100644 --- a/Application/Model/Interfaces/pdfdocuments_orderinvoice.php +++ b/Application/Model/Interfaces/pdfdocuments_orderinvoice_interface.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; -interface pdfdocuments_orderinvoice extends pdfdocuments_order +interface pdfdocuments_orderinvoice_interface extends pdfdocuments_order_interface { public function setInvoiceNumber(); diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index 9a8de66..53deaae 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Modules\Application\Model; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order as OrderPdfInterface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderInterface as OrderPdfInterface; use D3\PdfDocuments\Modules\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Modules\Application\Model\Documents\deliverynotePdf; use OxidEsales\Eshop\Core\Registry; diff --git a/composer.json b/composer.json index 9923320..3888376 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,9 @@ } }, "require": { - "oxid-esales/oxideshop-ce": "6.0 - 6.3" + "php": ">=5.6", + "oxid-esales/oxideshop-ce": "6.0 - 6.3", + "spipu/html2pdf": "^5.2" }, "autoload": { "psr-4": { From 25bf6c0eb4dd9de06a4d6a4382469fbd99f64fa5 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 28 May 2020 13:32:34 +0200 Subject: [PATCH 029/134] fix namespaces --- Application/Model/Documents/deliverynotePdf.php | 2 +- Application/Model/Documents/invoicePdf.php | 2 +- Modules/Application/Model/d3_Order_PdfDocuments.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index 08b2e29..09b3088 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -15,7 +15,7 @@ * @link http://www.oxidmodule.com */ -namespace D3\PdfDocuments\Modules\Application\Model\Documents; +namespace D3\PdfDocuments\Application\Model\Documents; use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 1c9e397..77c0b58 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -15,7 +15,7 @@ * @link http://www.oxidmodule.com */ -namespace D3\PdfDocuments\Modules\Application\Model\Documents; +namespace D3\PdfDocuments\Application\Model\Documents; use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice_interface; diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index 53deaae..06c1064 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,9 +17,9 @@ namespace D3\PdfDocuments\Modules\Application\Model; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderInterface as OrderPdfInterface; -use D3\PdfDocuments\Modules\Application\Model\Documents\invoicePdf; -use D3\PdfDocuments\Modules\Application\Model\Documents\deliverynotePdf; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface as OrderPdfInterface; +use D3\PdfDocuments\Application\Model\Documents\invoicePdf; +use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf; use OxidEsales\Eshop\Core\Registry; use Spipu\Html2Pdf\Exception\Html2PdfException; From 887ed583a1a614f80b3b8001950bd8ea7ce15d19 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 28 May 2020 14:31:35 +0200 Subject: [PATCH 030/134] add missing css files, change template aliases --- .../Model/Documents/deliverynotePdf.php | 2 +- Application/Model/Documents/invoicePdf.php | 2 +- .../views/tpl/deliverynote/deliverynote.tpl | 7 +- Application/views/tpl/invoice/invoice.tpl | 2 +- composer.json | 4 +- metadata.php | 4 +- out/src/css/deliverynote.css | 18 ++ out/src/css/deliverynote_.css | 173 ++++++++++++++++++ out/src/css/offers.css | 24 +++ out/src/css/pdfInvoiceCorrection.css | 32 ++++ out/src/css/pdfStyling.css | 173 ++++++++++++++++++ 11 files changed, 430 insertions(+), 11 deletions(-) create mode 100644 out/src/css/deliverynote.css create mode 100644 out/src/css/deliverynote_.css create mode 100644 out/src/css/offers.css create mode 100644 out/src/css/pdfInvoiceCorrection.css create mode 100644 out/src/css/pdfStyling.css diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index 09b3088..ccb64a2 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -22,6 +22,6 @@ use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; class deliverynotePdf extends pdfDocuments_order { public function getTemplate(){ - return 'deliverynote.tpl'; + return 'd3deliverynote_pdf.tpl'; } } \ No newline at end of file diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 77c0b58..581dcde 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -61,6 +61,6 @@ class invoicePdf extends pdfDocuments_order implements pdfdocuments_orderinvoice } public function getTemplate(){ - return 'invoice.tpl'; + return 'd3invoice_pdf.tpl'; } } \ No newline at end of file diff --git a/Application/views/tpl/deliverynote/deliverynote.tpl b/Application/views/tpl/deliverynote/deliverynote.tpl index 00c4b3c..db4cc9c 100644 --- a/Application/views/tpl/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/deliverynote/deliverynote.tpl @@ -5,22 +5,23 @@ [{include file=$oViewConf->getModulePath('pdfDocuments', 'out/src/css/deliverynote.css')}], [{include file=$oViewConf->getModulePath('pdfDocuments', 'out/src/css/pdfStyling.css')}] + [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfToping.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl')}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl')}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfHeader.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliverynote/includingFiles/pdfHeader.tpl')}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] diff --git a/Application/views/tpl/invoice/invoice.tpl b/Application/views/tpl/invoice/invoice.tpl index 3fc4b99..bc51aa4 100644 --- a/Application/views/tpl/invoice/invoice.tpl +++ b/Application/views/tpl/invoice/invoice.tpl @@ -14,7 +14,7 @@ [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/includingFiles/pdfFooter.tpl')}] + [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoice/includingFiles/pdfFooter.tpl')}] [{/block}] diff --git a/composer.json b/composer.json index 3888376..9923320 100644 --- a/composer.json +++ b/composer.json @@ -30,9 +30,7 @@ } }, "require": { - "php": ">=5.6", - "oxid-esales/oxideshop-ce": "6.0 - 6.3", - "spipu/html2pdf": "^5.2" + "oxid-esales/oxideshop-ce": "6.0 - 6.3" }, "autoload": { "psr-4": { diff --git a/metadata.php b/metadata.php index 176e4d8..6842c9f 100644 --- a/metadata.php +++ b/metadata.php @@ -49,8 +49,8 @@ $aModule = [ ], 'controllers' => [], 'templates' => [ - 'd3deliverynote.tpl' => 'd3/pdfdocuments/Application/views/tpl/deliverynote/deliverynote.tpl', - 'invoice.tpl' => 'd3/pdfdocuments/Application/views/tpl/invoice/invoice.tpl', + 'd3deliverynote_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/deliverynote/deliverynote.tpl', + 'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/invoice/invoice.tpl', 'd3tplheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/header.tpl' ], 'events' => [], diff --git a/out/src/css/deliverynote.css b/out/src/css/deliverynote.css new file mode 100644 index 0000000..900f0ea --- /dev/null +++ b/out/src/css/deliverynote.css @@ -0,0 +1,18 @@ +.deliverynote_width_amount{ + width: 20px; +} +.deliverynote_width_artnum{ + width: 80px; +} +.deliverynote_width_desc{ + width: 469.5px; +} +.textAlignLeft{ + text-align: left; +} +.paddingLeft{ + padding-left: 2.4px; +} +.deliveryNote_paddingTop20{ + padding-top: 20px; +} \ No newline at end of file diff --git a/out/src/css/deliverynote_.css b/out/src/css/deliverynote_.css new file mode 100644 index 0000000..8b9c9a1 --- /dev/null +++ b/out/src/css/deliverynote_.css @@ -0,0 +1,173 @@ +/*debug hilfe*/ +.eraseBug{ + border: dashed blueviolet 1px; +} + +table{ + font-family: "helvetica"; +} +.aligning{ + text-align: right; +} +.vertical-a{ + vertical-align: top; +} +.fontSize12{ + font-size: 12px; +} +.order_sum{ + margin-left: 181px; +} +.order_sumNum{ + margin-right: -2.2px; +} +.border-bottom{ + border-bottom: solid 0.15mm #000; +} +.hermes{ + padding-top: 5px; +} +.mercurius{ + padding-bottom: 5px; +} +.spacing_order_info{ + padding-bottom: 5px; + padding-top: 5px; +} + +/*pdf_header*/ +.pdf_header_positioning{ + position: absolute; + top: 30px; + right: 44px; +} + +/*pdf_footer*/ +.pdf_footer_table{ + width: 688px; + font-size: 9px; + margin: 0 30px 0 30px; + border-top: solid 1px #000; +} + +/*pdf_heading*/ +.pdf_heading_table{ + width: 100%; + margin-top: 8mm; +} +.pdf_heading_width35{ + width: 35%; +} +.pdf_heading_fontSize8{ + font-size: 8px; +} +.pdf_heading_width65{ + width: 65%; +} +.pdf_heading_fontSize12{ + font-size: 12px; +} + +/*heading_order_information*/ +.heading_order_paddingTop10{ + padding-top: 10px; +} +.heading_order_width35{ + width: 35%; +} +.heading_order_paddingTopSub5{ + padding-top: -5px; +} +.heading_order_paddingTop1{ + padding-top: 1mm; +} +.heading_order_fontSize15{ + font-size: 15px; +} +.heading_order_paddingTop22{ + padding-top: 22px; +} +.heading_order_paddingBottom8{ + padding-bottom: 8px; +} +.heading_order_paddingBottom15{ + padding-bottom: 15px; +} +.heading_order_fontSize10{ + font-size: 10px; +} +.heading_order_paddingTopSub5{ + padding-top: -5px; +} +.heading_order_width65{ + width: 65%; +} + +/*order_article_listing*/ +.order_article_listing_width_amount{ + width: 20px; +} +.order_article_listing_width_desc{ + width: 398px; +} +.order_article_listing_width_ust{ + width: 10px; +} +.order_article_listing_width_unitPrice{ + width: 90px; +} +.order_article_listing_width_total_Price{ + width: 100px; +} +.order_article_listing_paddingRight52{ + padding-right: 52.1px; +} +.order_article_listing_fontSize{ + font-size: 11px; +} +.order_article_PaddingBottom5{ + padding-bottom: 5px; +} +.order_article_PaddingTop5{ + padding-top: 5px; +} +.order_article_marginTop10{ + margin-top: 10px; +} +.order_article_costs_marginLeftSub3{ + margin-left: -3px; +} +.order_article_costs_paddingRight66{ + padding-right: 65.9px; +} +.order_article_listing_fontSize9{ + font-size: 9px; +} +.order_article_listing_fontSize12{ + font-size: 12px; +} + +/* order_article_costs */ +.article_costs_table{ + width: 100%; + border-top: solid 0.15mm #000; +} +.article_costs_table_td_width50{ + width: 50%; +} +.article_costs_table_paddingRight{ + padding-right: -3px; +} +.order_article_costs_fontSize12{ + font-size: 12px; +} + +/*order_shop_past_thank*/ +.past_thank_width100{ + width: 100%; +} + +/* footer styling */ +.footer_parts{ + width: 33.33%; +} diff --git a/out/src/css/offers.css b/out/src/css/offers.css new file mode 100644 index 0000000..b5c01c2 --- /dev/null +++ b/out/src/css/offers.css @@ -0,0 +1,24 @@ +.offers_subTitle_font14{ + font-size: 14px; +} +.helvetica{ + font-family: helvetica; +} +.offers_width50{ + width: 50%; +} +.offers_width100{ + width: 100%; +} +.offers_margin_top20{ + margin-top: 20px; +} +.offers_margin_bottom20{ + margin-bottom: 20px; +} +.offers_pstThank_margin_top20{ + margin-top: 20px; +} +.offers_pstThank_font20{ + font-size: 20px; +} diff --git a/out/src/css/pdfInvoiceCorrection.css b/out/src/css/pdfInvoiceCorrection.css new file mode 100644 index 0000000..2c2ec33 --- /dev/null +++ b/out/src/css/pdfInvoiceCorrection.css @@ -0,0 +1,32 @@ +.invoiceCorrection_width_40{ + width: 40%; +} +.invoiceCorrection_width_60{ + width: 60%; +} +.invoiceCorrection_font8{ + font-size: 8px; +} +.invoiceCorrection_font9{ + font-size: 9px; +} +.invoiceCorrection_tableMarginTop15{ + margin-top: 15px; +} +.invoiceCorrection_spacingLeft20{ + margin-left: 73.6px; +} + +.invoiceCorrectionPaddingTop4{ + padding-top: 4px; +} +.invoiceCorrectionPaddingTop5{ + padding-top: 5px; +} + +.invoiceCorrectionPaddingBottom20{ + padding-bottom: 20px; +} +.invoiceCorrectionPaddingBottom16{ + padding-bottom: 16px; +} diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css new file mode 100644 index 0000000..8b9c9a1 --- /dev/null +++ b/out/src/css/pdfStyling.css @@ -0,0 +1,173 @@ +/*debug hilfe*/ +.eraseBug{ + border: dashed blueviolet 1px; +} + +table{ + font-family: "helvetica"; +} +.aligning{ + text-align: right; +} +.vertical-a{ + vertical-align: top; +} +.fontSize12{ + font-size: 12px; +} +.order_sum{ + margin-left: 181px; +} +.order_sumNum{ + margin-right: -2.2px; +} +.border-bottom{ + border-bottom: solid 0.15mm #000; +} +.hermes{ + padding-top: 5px; +} +.mercurius{ + padding-bottom: 5px; +} +.spacing_order_info{ + padding-bottom: 5px; + padding-top: 5px; +} + +/*pdf_header*/ +.pdf_header_positioning{ + position: absolute; + top: 30px; + right: 44px; +} + +/*pdf_footer*/ +.pdf_footer_table{ + width: 688px; + font-size: 9px; + margin: 0 30px 0 30px; + border-top: solid 1px #000; +} + +/*pdf_heading*/ +.pdf_heading_table{ + width: 100%; + margin-top: 8mm; +} +.pdf_heading_width35{ + width: 35%; +} +.pdf_heading_fontSize8{ + font-size: 8px; +} +.pdf_heading_width65{ + width: 65%; +} +.pdf_heading_fontSize12{ + font-size: 12px; +} + +/*heading_order_information*/ +.heading_order_paddingTop10{ + padding-top: 10px; +} +.heading_order_width35{ + width: 35%; +} +.heading_order_paddingTopSub5{ + padding-top: -5px; +} +.heading_order_paddingTop1{ + padding-top: 1mm; +} +.heading_order_fontSize15{ + font-size: 15px; +} +.heading_order_paddingTop22{ + padding-top: 22px; +} +.heading_order_paddingBottom8{ + padding-bottom: 8px; +} +.heading_order_paddingBottom15{ + padding-bottom: 15px; +} +.heading_order_fontSize10{ + font-size: 10px; +} +.heading_order_paddingTopSub5{ + padding-top: -5px; +} +.heading_order_width65{ + width: 65%; +} + +/*order_article_listing*/ +.order_article_listing_width_amount{ + width: 20px; +} +.order_article_listing_width_desc{ + width: 398px; +} +.order_article_listing_width_ust{ + width: 10px; +} +.order_article_listing_width_unitPrice{ + width: 90px; +} +.order_article_listing_width_total_Price{ + width: 100px; +} +.order_article_listing_paddingRight52{ + padding-right: 52.1px; +} +.order_article_listing_fontSize{ + font-size: 11px; +} +.order_article_PaddingBottom5{ + padding-bottom: 5px; +} +.order_article_PaddingTop5{ + padding-top: 5px; +} +.order_article_marginTop10{ + margin-top: 10px; +} +.order_article_costs_marginLeftSub3{ + margin-left: -3px; +} +.order_article_costs_paddingRight66{ + padding-right: 65.9px; +} +.order_article_listing_fontSize9{ + font-size: 9px; +} +.order_article_listing_fontSize12{ + font-size: 12px; +} + +/* order_article_costs */ +.article_costs_table{ + width: 100%; + border-top: solid 0.15mm #000; +} +.article_costs_table_td_width50{ + width: 50%; +} +.article_costs_table_paddingRight{ + padding-right: -3px; +} +.order_article_costs_fontSize12{ + font-size: 12px; +} + +/*order_shop_past_thank*/ +.past_thank_width100{ + width: 100%; +} + +/* footer styling */ +.footer_parts{ + width: 33.33%; +} From f768e8f3ed0c7c9f376addbf98e308d5b70e29f3 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 28 May 2020 14:58:42 +0200 Subject: [PATCH 031/134] use shared templates and template alias names --- .../views/tpl/deliverynote/deliverynote.tpl | 14 ++++---- .../deliverynote/includingFiles/pdfToping.tpl | 5 --- .../pdfFooter.tpl => inc/footer.tpl} | 2 +- Application/views/tpl/inc/header.tpl | 5 +++ .../tpl/invoice/includingFiles/pdfFooter.tpl | 32 ------------------- .../tpl/invoice/includingFiles/pdfTopping.tpl | 5 --- Application/views/tpl/invoice/invoice.tpl | 14 ++++---- metadata.php | 15 +++++++-- 8 files changed, 32 insertions(+), 60 deletions(-) delete mode 100644 Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl rename Application/views/tpl/{deliverynote/includingFiles/pdfFooter.tpl => inc/footer.tpl} (96%) create mode 100644 Application/views/tpl/inc/header.tpl delete mode 100644 Application/views/tpl/invoice/includingFiles/pdfFooter.tpl delete mode 100644 Application/views/tpl/invoice/includingFiles/pdfTopping.tpl diff --git a/Application/views/tpl/deliverynote/deliverynote.tpl b/Application/views/tpl/deliverynote/deliverynote.tpl index db4cc9c..b243720 100644 --- a/Application/views/tpl/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/deliverynote/deliverynote.tpl @@ -2,31 +2,31 @@ [{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl')}] + [{include file="d3pdfheader.tpl"}] [{/block}] [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl')}] + [{include file="d3pdffooter.tpl"}] [{/block}] [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliverynote/includingFiles/pdfHeader.tpl')}] + [{include file="d3delnote_pdf_addressarea.tpl"}] [{/block}] [{/block}] [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] - +
@@ -86,7 +86,7 @@
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}]
*}] [{/block}] [{block name="pdfPastThankFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/deliveryNote/includingFiles/pdfPastThank.tpl')}] + [{include file="d3delnote_pdf_conclusion.tpl"}] [{/block}]
\ No newline at end of file diff --git a/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl b/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl deleted file mode 100644 index 77a8ed7..0000000 --- a/Application/views/tpl/deliverynote/includingFiles/pdfToping.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{block name="pdfToping"}] -
- -
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl b/Application/views/tpl/inc/footer.tpl similarity index 96% rename from Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl rename to Application/views/tpl/inc/footer.tpl index d625e44..0e58a9c 100644 --- a/Application/views/tpl/deliverynote/includingFiles/pdfFooter.tpl +++ b/Application/views/tpl/inc/footer.tpl @@ -1,5 +1,5 @@ [{block name="pdfFooter"}] - + [{block name="shop_basic_information"}] diff --git a/IntelliSenseHelper.php b/IntelliSenseHelper.php index ea4c112..53b1730 100644 --- a/IntelliSenseHelper.php +++ b/IntelliSenseHelper.php @@ -18,4 +18,11 @@ namespace D3\PdfDocuments\Modules\Application\controllers { use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; class d3_overview_controller_pdfdocuments_parent extends OrderOverview {} +} + +namespace D3\PdfDocuments\Modules\Application\Model +{ + use OxidEsales\Eshop\Application\Model\Order; + + class d3_Order_PdfDocuments_parent extends Order {} } \ No newline at end of file diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index f31b34b..bbb2ee2 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -17,7 +17,10 @@ namespace D3\PdfDocuments\Modules\Application\Model; -use D3\PdfDocuments\Application\Controller\orderPdfGenerator; +use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator; +use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; +use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; +use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent { @@ -25,10 +28,13 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent * @param string $sFilename * @param int $iSelLang * @param string $target + * @throws noBaseObjectSetException + * @throws noPdfHandlerFoundException + * @throws pdfGeneratorExceptionAbstract */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') { - $generator = oxNew( orderPdfGenerator::class ); + $generator = oxNew( orderOverviewPdfGenerator::class ); $generator->generatePdf($this, $sFilename, $iSelLang, $target); } } diff --git a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php b/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php index f54a45e..2daf4e2 100644 --- a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php @@ -1,10 +1,31 @@ + * @link http://www.oxidmodule.com + */ + namespace D3\PdfDocuments\Modules\Application\controllers; +use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; +use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; +use D3\PdfDocuments\Application\Model\Registries\registry_orderoverview; +use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments; use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\DatabaseProvider; use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\TableViewNameGenerator; +use OxidEsales\Eshop\Core\UtilsView; class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocuments_parent { @@ -27,25 +48,38 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu { $soxId = $this->getEditObjectId(); if ($soxId != "-1" && isset($soxId)) { - // load object + /** @var d3_Order_PdfDocuments $oOrder */ $oOrder = oxNew(Order::class); if ($oOrder->load($soxId)) { - self::$_blIsAdmin = 0; - $oUtils = Registry::getUtils(); - $sTrimmedBillName = trim($oOrder->oxorder__oxbilllname->getRawValue()); - $sFilename = $oOrder->oxorder__oxordernr->value . "_" . $sTrimmedBillName . ".pdf"; - $sFilename = $this->makeValidFileName($sFilename); - ob_start(); - $oOrder->genPDF($sFilename, Registry::getConfig()->getRequestParameter("pdflanguage")); - $sPDF = ob_get_contents(); - ob_end_clean(); - $oUtils->setHeader("Pragma: public"); - $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - $oUtils->setHeader("Expires: 0"); - $oUtils->setHeader("Content-type: application/pdf"); - $oUtils->setHeader("Content-Disposition: attachment; filename=" . $sFilename); - Registry::getUtils()->showMessageAndExit($sPDF); + try { + self::$_blIsAdmin = 0; + $oUtils = Registry::getUtils(); + $sTrimmedBillName = trim($oOrder->oxorder__oxbilllname->getRawValue()); + $sFilename = $oOrder->oxorder__oxordernr->value . "_" . $sTrimmedBillName . ".pdf"; + $sFilename = $this->makeValidFileName($sFilename); + ob_start(); + $oOrder->genPdf($sFilename, Registry::getConfig()->getRequestParameter("pdflanguage")); + $sPDF = ob_get_contents(); + ob_end_clean(); + $oUtils->setHeader("Pragma: public"); + $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + $oUtils->setHeader("Expires: 0"); + $oUtils->setHeader("Content-type: application/pdf"); + $oUtils->setHeader("Content-Disposition: attachment; filename=" . $sFilename); + Registry::getUtils()->showMessageAndExit($sPDF); + } catch (pdfGeneratorExceptionAbstract $e) { + Registry::get(UtilsView::class)->addErrorToDisplay($e); + Registry::getLogger()->error($e); + } } } } + + /** + * @return registry_orderoverview + */ + public function d3getGeneratorList() + { + return oxNew(registry_orderoverview::class); + } } \ No newline at end of file From 63be8d9d69b7bf2602aad7a2ca923bab5f58151e Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 30 May 2020 01:02:50 +0200 Subject: [PATCH 044/134] rename registry classes --- Application/Controller/orderOverviewPdfGenerator.php | 4 ++-- .../{registry_abstract.php => registryAbstract.php} | 2 +- ..._generic_interface.php => registryGenericInterface.php} | 2 +- ...egistry_orderoverview.php => registryOrderoverview.php} | 2 +- ...ew_interface.php => registryOrderoverviewInterface.php} | 2 +- .../controllers/d3_overview_controller_pdfdocuments.php | 7 +++---- 6 files changed, 9 insertions(+), 10 deletions(-) rename Application/Model/Registries/{registry_abstract.php => registryAbstract.php} (95%) rename Application/Model/Registries/{registry_generic_interface.php => registryGenericInterface.php} (96%) rename Application/Model/Registries/{registry_orderoverview.php => registryOrderoverview.php} (94%) rename Application/Model/Registries/{registry_orderoverview_interface.php => registryOrderoverviewInterface.php} (91%) diff --git a/Application/Controller/orderOverviewPdfGenerator.php b/Application/Controller/orderOverviewPdfGenerator.php index df0e1a2..0d58e5a 100644 --- a/Application/Controller/orderOverviewPdfGenerator.php +++ b/Application/Controller/orderOverviewPdfGenerator.php @@ -22,7 +22,7 @@ use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface as OrderPdfInterface; -use D3\PdfDocuments\Application\Model\Registries\registry_orderoverview; +use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\Registry; @@ -55,7 +55,7 @@ class orderOverviewPdfGenerator { $requestedType = Registry::getRequest()->getRequestParameter('pdftype'); - $generatorList = oxNew(registry_orderoverview::class); + $generatorList = oxNew(registryOrderoverview::class); /** @var pdfdocuments_order_interface $generator */ foreach ($generatorList->getList() as $generator) { if ($generator->getRequestId() == $requestedType) { diff --git a/Application/Model/Registries/registry_abstract.php b/Application/Model/Registries/registryAbstract.php similarity index 95% rename from Application/Model/Registries/registry_abstract.php rename to Application/Model/Registries/registryAbstract.php index b8f8e6c..66cd6c4 100644 --- a/Application/Model/Registries/registry_abstract.php +++ b/Application/Model/Registries/registryAbstract.php @@ -19,7 +19,7 @@ namespace D3\PdfDocuments\Application\Model\Registries; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic_interface; -abstract class registry_abstract implements registry_generic_interface +abstract class registryAbstract implements registryGenericInterface { protected $_aRegistry = array(); diff --git a/Application/Model/Registries/registry_generic_interface.php b/Application/Model/Registries/registryGenericInterface.php similarity index 96% rename from Application/Model/Registries/registry_generic_interface.php rename to Application/Model/Registries/registryGenericInterface.php index f009e68..37d752c 100644 --- a/Application/Model/Registries/registry_generic_interface.php +++ b/Application/Model/Registries/registryGenericInterface.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Application\Model\Registries; -interface registry_generic_interface +interface registryGenericInterface { /** * @param $className * generator fully qualified class name diff --git a/Application/Model/Registries/registry_orderoverview.php b/Application/Model/Registries/registryOrderoverview.php similarity index 94% rename from Application/Model/Registries/registry_orderoverview.php rename to Application/Model/Registries/registryOrderoverview.php index a1065a2..c5234fc 100644 --- a/Application/Model/Registries/registry_orderoverview.php +++ b/Application/Model/Registries/registryOrderoverview.php @@ -23,7 +23,7 @@ use D3\PdfDocuments\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface; -class registry_orderoverview extends registry_abstract implements registry_orderoverview_interface +class registryOrderoverview extends registryAbstract implements registryOrderoverviewInterface { public function __construct() { diff --git a/Application/Model/Registries/registry_orderoverview_interface.php b/Application/Model/Registries/registryOrderoverviewInterface.php similarity index 91% rename from Application/Model/Registries/registry_orderoverview_interface.php rename to Application/Model/Registries/registryOrderoverviewInterface.php index 4c8ea01..fd8e501 100644 --- a/Application/Model/Registries/registry_orderoverview_interface.php +++ b/Application/Model/Registries/registryOrderoverviewInterface.php @@ -19,7 +19,7 @@ namespace D3\PdfDocuments\Application\Model\Registries; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface; -interface registry_orderoverview_interface extends registry_generic_interface +interface registryOrderoverviewInterface extends registryGenericInterface { /** * @param $className * generator fully qualified class name diff --git a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php b/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php index 2daf4e2..26abfd8 100644 --- a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php @@ -17,9 +17,8 @@ namespace D3\PdfDocuments\Modules\Application\controllers; -use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; -use D3\PdfDocuments\Application\Model\Registries\registry_orderoverview; +use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments; use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\DatabaseProvider; @@ -76,10 +75,10 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu } /** - * @return registry_orderoverview + * @return registryOrderoverview */ public function d3getGeneratorList() { - return oxNew(registry_orderoverview::class); + return oxNew(registryOrderoverview::class); } } \ No newline at end of file From 6620543de19b979412922c47d541b53c0fa1e106 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 30 May 2020 01:17:27 +0200 Subject: [PATCH 045/134] rename classses --- Application/Controller/orderOverviewPdfGenerator.php | 9 +++------ ...{pdfDocuments_generic.php => pdfdocumentsGeneric.php} | 6 +++--- .../{pdfDocuments_order.php => pdfdocumentsOrder.php} | 4 ++-- Application/Model/Documents/deliverynotePdf.php | 4 ++-- Application/Model/Documents/invoicePdf.php | 6 +++--- ...ic_interface.php => pdfdocumentsGenericInterface.php} | 2 +- ...rder_interface.php => pdfdocumentsOrderInterface.php} | 2 +- ...terface.php => pdfdocumentsOrderinvoiceInterface.php} | 2 +- Application/Model/Registries/registryAbstract.php | 6 +++--- Application/Model/Registries/registryOrderoverview.php | 8 ++++---- .../Model/Registries/registryOrderoverviewInterface.php | 6 +++--- 11 files changed, 26 insertions(+), 29 deletions(-) rename Application/Model/AbstractClasses/{pdfDocuments_generic.php => pdfdocumentsGeneric.php} (92%) rename Application/Model/AbstractClasses/{pdfDocuments_order.php => pdfdocumentsOrder.php} (92%) rename Application/Model/Interfaces/{pdfdocuments_generic_interface.php => pdfdocumentsGenericInterface.php} (96%) rename Application/Model/Interfaces/{pdfdocuments_order_interface.php => pdfdocumentsOrderInterface.php} (90%) rename Application/Model/Interfaces/{pdfdocuments_orderinvoice_interface.php => pdfdocumentsOrderinvoiceInterface.php} (88%) diff --git a/Application/Controller/orderOverviewPdfGenerator.php b/Application/Controller/orderOverviewPdfGenerator.php index 0d58e5a..61ead4a 100644 --- a/Application/Controller/orderOverviewPdfGenerator.php +++ b/Application/Controller/orderOverviewPdfGenerator.php @@ -15,13 +15,10 @@ namespace D3\PdfDocuments\Application\Controller; -use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf; -use D3\PdfDocuments\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface as OrderPdfInterface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\Registry; @@ -48,7 +45,7 @@ class orderOverviewPdfGenerator /** * @param Order $order * - * @return OrderPdfInterface + * @return pdfdocumentsOrderInterface * @throws noPdfHandlerFoundException */ public function getPdfClass(Order $order) @@ -56,7 +53,7 @@ class orderOverviewPdfGenerator $requestedType = Registry::getRequest()->getRequestParameter('pdftype'); $generatorList = oxNew(registryOrderoverview::class); - /** @var pdfdocuments_order_interface $generator */ + /** @var pdfdocumentsOrderInterface $generator */ foreach ($generatorList->getList() as $generator) { if ($generator->getRequestId() == $requestedType) { return $generator; diff --git a/Application/Model/AbstractClasses/pdfDocuments_generic.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php similarity index 92% rename from Application/Model/AbstractClasses/pdfDocuments_generic.php rename to Application/Model/AbstractClasses/pdfdocumentsGeneric.php index b96e725..c091b69 100644 --- a/Application/Model/AbstractClasses/pdfDocuments_generic.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -18,18 +18,18 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic_interface as genericInterface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface; use OxidEsales\Eshop\Core\Registry; use Smarty; use Spipu\Html2Pdf\Html2Pdf; -abstract class pdfDocuments_generic implements genericInterface +abstract class pdfdocumentsGeneric implements genericInterface { /** @var Smarty */ public $oSmarty; /** - * pdfDocuments_generic constructor. + * pdfDocumentsGeneric constructor. */ public function __construct() { diff --git a/Application/Model/AbstractClasses/pdfDocuments_order.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php similarity index 92% rename from Application/Model/AbstractClasses/pdfDocuments_order.php rename to Application/Model/AbstractClasses/pdfdocumentsOrder.php index d76ac3d..1e0125f 100644 --- a/Application/Model/AbstractClasses/pdfDocuments_order.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -18,12 +18,12 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface as orderInterface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface as orderInterface; use \OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Application\Model\Payment; use OxidEsales\Eshop\Application\Model\User; -abstract class pdfDocuments_order extends pdfDocuments_generic implements orderInterface +abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInterface { /** @var Order */ public $oOrder; diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index 557027f..63b832f 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -17,9 +17,9 @@ namespace D3\PdfDocuments\Application\Model\Documents; -use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; +use D3\PdfDocuments\Application\Model\AbstractClasses\pdfdocumentsOrder; -class deliverynotePdf extends pdfDocuments_order +class deliverynotePdf extends pdfdocumentsOrder { /** * @return string diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 4b3c936..a78c059 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -17,11 +17,11 @@ namespace D3\PdfDocuments\Application\Model\Documents; -use D3\PdfDocuments\Application\Model\AbstractClasses\pdfDocuments_order; +use D3\PdfDocuments\Application\Model\AbstractClasses\pdfdocumentsOrder; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice_interface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderinvoiceInterface; -class invoicePdf extends pdfDocuments_order implements pdfdocuments_orderinvoice_interface +class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceInterface { protected $blIsNewOrder = false; diff --git a/Application/Model/Interfaces/pdfdocuments_generic_interface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php similarity index 96% rename from Application/Model/Interfaces/pdfdocuments_generic_interface.php rename to Application/Model/Interfaces/pdfdocumentsGenericInterface.php index b99c9d2..1009d0d 100644 --- a/Application/Model/Interfaces/pdfdocuments_generic_interface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -19,7 +19,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; -interface pdfdocuments_generic_interface +interface pdfdocumentsGenericInterface { /** * @return string diff --git a/Application/Model/Interfaces/pdfdocuments_order_interface.php b/Application/Model/Interfaces/pdfdocumentsOrderInterface.php similarity index 90% rename from Application/Model/Interfaces/pdfdocuments_order_interface.php rename to Application/Model/Interfaces/pdfdocumentsOrderInterface.php index 1a28938..dfa2fdd 100644 --- a/Application/Model/Interfaces/pdfdocuments_order_interface.php +++ b/Application/Model/Interfaces/pdfdocumentsOrderInterface.php @@ -19,7 +19,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; use OxidEsales\Eshop\Application\Model\Order; -interface pdfdocuments_order_interface extends pdfdocuments_generic_interface +interface pdfdocumentsOrderInterface extends pdfdocumentsGenericInterface { /** * @param Order $order diff --git a/Application/Model/Interfaces/pdfdocuments_orderinvoice_interface.php b/Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php similarity index 88% rename from Application/Model/Interfaces/pdfdocuments_orderinvoice_interface.php rename to Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php index 91f7ece..bcdcf8d 100644 --- a/Application/Model/Interfaces/pdfdocuments_orderinvoice_interface.php +++ b/Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Application\Model\Interfaces; -interface pdfdocuments_orderinvoice_interface extends pdfdocuments_order_interface +interface pdfdocumentsOrderinvoiceInterface extends pdfdocumentsOrderInterface { public function setInvoiceNumber(); diff --git a/Application/Model/Registries/registryAbstract.php b/Application/Model/Registries/registryAbstract.php index 66cd6c4..433c642 100644 --- a/Application/Model/Registries/registryAbstract.php +++ b/Application/Model/Registries/registryAbstract.php @@ -17,7 +17,7 @@ namespace D3\PdfDocuments\Application\Model\Registries; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic_interface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface; abstract class registryAbstract implements registryGenericInterface { @@ -25,9 +25,9 @@ abstract class registryAbstract implements registryGenericInterface /** * @param $className * generator fully qualified class name - * @param pdfdocuments_generic_interface $item + * @param pdfdocumentsGenericInterface $item */ - protected function addItem($className, pdfdocuments_generic_interface $item) + protected function addItem($className, pdfdocumentsGenericInterface $item) { $this->_aRegistry[$className] = $item; } diff --git a/Application/Model/Registries/registryOrderoverview.php b/Application/Model/Registries/registryOrderoverview.php index c5234fc..625a17e 100644 --- a/Application/Model/Registries/registryOrderoverview.php +++ b/Application/Model/Registries/registryOrderoverview.php @@ -21,7 +21,7 @@ use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf; use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf; use D3\PdfDocuments\Application\Model\Documents\invoicePdf; use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; class registryOrderoverview extends registryAbstract implements registryOrderoverviewInterface { @@ -35,16 +35,16 @@ class registryOrderoverview extends registryAbstract implements registryOrderove /** * @param $className - * @param pdfdocuments_order_interface $pdfGenerator + * @param pdfdocumentsOrderInterface $pdfGenerator */ - public function addGenerator($className, pdfdocuments_order_interface $pdfGenerator) + public function addGenerator($className, pdfdocumentsOrderInterface $pdfGenerator) { $this->addItem($className, $pdfGenerator); } /** * @param $className * generator fully qualified class name - * @return pdfdocuments_order_interface + * @return pdfdocumentsOrderInterface */ public function getGenerator($className) { diff --git a/Application/Model/Registries/registryOrderoverviewInterface.php b/Application/Model/Registries/registryOrderoverviewInterface.php index fd8e501..0b7db65 100644 --- a/Application/Model/Registries/registryOrderoverviewInterface.php +++ b/Application/Model/Registries/registryOrderoverviewInterface.php @@ -17,13 +17,13 @@ namespace D3\PdfDocuments\Application\Model\Registries; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_order_interface; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; interface registryOrderoverviewInterface extends registryGenericInterface { /** * @param $className * generator fully qualified class name - * @param pdfdocuments_order_interface $pdfGenerator + * @param pdfdocumentsOrderInterface $pdfGenerator */ - public function addGenerator($className, pdfdocuments_order_interface $pdfGenerator); + public function addGenerator($className, pdfdocumentsOrderInterface $pdfGenerator); } \ No newline at end of file From ba3e35f4ceb386fb2af3ffd04342bdb8360f7628 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 2 Jun 2020 10:03:00 +0200 Subject: [PATCH 046/134] add documents without logo --- .../Documents/deliverynotewithoutlogoPdf.php | 2 +- .../Model/Documents/invoicewithoutlogoPdf.php | 2 +- .../documents/deliverynote/deliverynote.tpl | 2 +- .../deliverynote/deliverynoteNoLogo.tpl | 92 +++++++++++++++++++ .../views/tpl/documents/inc/header.tpl | 6 +- .../views/tpl/documents/invoice/invoice.tpl | 8 +- .../tpl/documents/invoice/invoiceNoLogo.tpl | 89 ++++++++++++++++++ metadata.php | 2 + 8 files changed, 195 insertions(+), 8 deletions(-) create mode 100644 Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl create mode 100644 Application/views/tpl/documents/invoice/invoiceNoLogo.tpl diff --git a/Application/Model/Documents/deliverynotewithoutlogoPdf.php b/Application/Model/Documents/deliverynotewithoutlogoPdf.php index 3291940..da32ac7 100644 --- a/Application/Model/Documents/deliverynotewithoutlogoPdf.php +++ b/Application/Model/Documents/deliverynotewithoutlogoPdf.php @@ -40,6 +40,6 @@ class deliverynotewithoutlogoPdf extends deliverynotePdf */ public function getTemplate() { - return 'd3deliverynote_pdf.tpl'; + return 'd3deliverynoteNoLogo_pdf.tpl'; } } \ No newline at end of file diff --git a/Application/Model/Documents/invoicewithoutlogoPdf.php b/Application/Model/Documents/invoicewithoutlogoPdf.php index c15a049..3d905e0 100644 --- a/Application/Model/Documents/invoicewithoutlogoPdf.php +++ b/Application/Model/Documents/invoicewithoutlogoPdf.php @@ -40,6 +40,6 @@ class invoicewithoutlogoPdf extends invoicePdf * @return string */ public function getTemplate(){ - return 'd3invoice_pdf.tpl'; + return 'd3invoiceNoLogo_pdf.tpl'; } } \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/deliverynote.tpl b/Application/views/tpl/documents/deliverynote/deliverynote.tpl index b243720..ba569c0 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynote.tpl @@ -9,7 +9,7 @@ [{block name="pdfTopingFile"}] - [{include file="d3pdfheader.tpl"}] + [{include file="d3pdfheader.tpl" showLogo=true}] [{/block}] diff --git a/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl b/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl new file mode 100644 index 0000000..66e8e60 --- /dev/null +++ b/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl @@ -0,0 +1,92 @@ +[{assign var= currency value= $order->getOrderCurrency()}] +[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] + + + + + + [{block name="pdfTopingFile"}] + [{include file="d3pdfheader.tpl" showLogo=false}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file="d3pdffooter.tpl"}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file="d3delnote_pdf_addressarea.tpl"}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + [{* + + + + + + *}] + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{$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__oxartnum->value }]
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{$oOrderArticle->oxorderarticles__oxselvariant->getRawValue()}]
+ [{/block}] + + [{block name="articleCosts"}] + [{* + + [{ ++++++Artikelzusammenfassung++++++ }] + + [{ ++++++Kosten der Bestellung++++++ }] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$order->getVats() key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
*}] + [{/block}] + [{block name="pdfPastThankFile"}] + [{include file="d3delnote_pdf_conclusion.tpl"}] + [{/block}] +
+
\ 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 d5a29f2..9d20cc2 100644 --- a/Application/views/tpl/documents/inc/header.tpl +++ b/Application/views/tpl/documents/inc/header.tpl @@ -1,5 +1,9 @@ +[{assign var="showLogo" value=$showLogo|default:true}] + [{block name="pdfToping"}]
- + [{if $showLogo}] + + [{/if}]
[{/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 a22be15..d10352f 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -1,6 +1,6 @@ -[{assign var= currency value= $order->getOrderCurrency()}] -[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] -[{assign var= productVats value= $order->getProductVats(false)}] +[{assign var="currency" value=$order->getOrderCurrency()}] +[{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}] +[{assign var="productVats" value= $order->getProductVats(false)}] + + + + [{block name="pdfTopingFile"}] + [{include file="d3pdfheader.tpl" showLogo=false}] + [{/block}] + + + [{block name="pdfFooterFile"}] + [{include file="d3pdffooter.tpl"}] + [{/block}] + + + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file="d3invoice_pdf_addressarea.tpl"}] + [{/block}] + [{/block}] + [{* +++++Artikeltabelle+++++*}] + [{block name="articleListing"}] + + + + + + + + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + + + + + [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
+ [{/block}] + + [{block name="articleCosts"}] + + + [{* ++++++Artikelzusammenfassung++++++ *}] + + [{* ++++++Kosten der Bestellung++++++ *}] + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$productVats key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
+ [{/block}] + [{block name="pdfPastThankFile"}] + [{include file="d3invoice_pdf_conclusion.tpl"}] + [{/block}] +
+
\ No newline at end of file diff --git a/metadata.php b/metadata.php index b445bfd..3e60cac 100644 --- a/metadata.php +++ b/metadata.php @@ -52,11 +52,13 @@ $aModule = [ 'd3orderoverview_pdfform.tpl' => 'd3/pdfdocuments/Application/views/tpl/admin/orderoverview_pdfform.tpl', 'd3deliverynote_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynote.tpl', + 'd3deliverynoteNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl', 'd3delnote_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl', 'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/pdfPastThank.tpl', 'd3delnote_pdf_style.css' => 'd3/pdfdocuments/out/src/css/deliverynote.css', 'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoice.tpl', + 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', 'd3invoice_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl', 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl', From 88ff329bb47a195f911bea386b0d93cf4b856427 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 2 Jun 2020 10:04:19 +0200 Subject: [PATCH 047/134] simplify registry configuration --- .../Exceptions/wrongPdfGeneratorInterface.php | 26 +++++++++++++ .../Model/Registries/registryAbstract.php | 39 +++++++++++++++++-- .../Registries/registryGenericInterface.php | 2 + .../Registries/registryOrderoverview.php | 15 ++++--- .../registryOrderoverviewInterface.php | 5 +-- 5 files changed, 72 insertions(+), 15 deletions(-) create mode 100644 Application/Model/Exceptions/wrongPdfGeneratorInterface.php diff --git a/Application/Model/Exceptions/wrongPdfGeneratorInterface.php b/Application/Model/Exceptions/wrongPdfGeneratorInterface.php new file mode 100644 index 0000000..8b2572e --- /dev/null +++ b/Application/Model/Exceptions/wrongPdfGeneratorInterface.php @@ -0,0 +1,26 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Exceptions; + +class wrongPdfGeneratorInterface extends pdfGeneratorExceptionAbstract +{ + public function __construct( $requiredInterface, $sMessage = "generator class doesn't fulfilled the interface", $iCode = 0, \Exception $previous = null ) { + + $sMessage .= $requiredInterface; + + parent::__construct( $sMessage, $iCode, $previous ); + } +} \ No newline at end of file diff --git a/Application/Model/Registries/registryAbstract.php b/Application/Model/Registries/registryAbstract.php index 433c642..1742afd 100644 --- a/Application/Model/Registries/registryAbstract.php +++ b/Application/Model/Registries/registryAbstract.php @@ -17,18 +17,49 @@ namespace D3\PdfDocuments\Application\Model\Registries; +use D3\PdfDocuments\Application\Model\Exceptions\wrongPdfGeneratorInterface; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface; +use OxidEsales\Eshop\Core\Exception\StandardException; abstract class registryAbstract implements registryGenericInterface { protected $_aRegistry = array(); + /** + * @return string + */ + public function getRequiredGeneratorInterfaceClassName() + { + return pdfdocumentsGenericInterface::class; + } + + /** + * @param $className + */ + public function addGenerator($className) + { + if (false == $this->hasGenerator($className)) { + /** @var pdfdocumentsGenericInterface $generator */ + $generator = oxNew( $className ); + + $this->addItem( $className, $generator ); + } else { + throw oxNew(StandardException::class, 'generator still exists in registry'); + } + } + /** * @param $className * generator fully qualified class name * @param pdfdocumentsGenericInterface $item */ protected function addItem($className, pdfdocumentsGenericInterface $item) { + $requiredInterface = $this->getRequiredGeneratorInterfaceClassName(); + + if (false == $item instanceof $requiredInterface) { + throw oxNew(wrongPdfGeneratorInterface::class, $requiredInterface); + } + $this->_aRegistry[$className] = $item; } @@ -37,7 +68,9 @@ abstract class registryAbstract implements registryGenericInterface */ public function removeGenerator($className) { - // TODO: Implement removeGenerator() method. + if ($this->hasGenerator($className)) { + unset( $this->_aRegistry[ $className ] ); + } } /** @@ -45,7 +78,7 @@ abstract class registryAbstract implements registryGenericInterface */ public function hasGenerator($className) { - // TODO: Implement hasGenerator() method. + return array_key_exists($className, $this->_aRegistry); } /** @@ -58,6 +91,6 @@ abstract class registryAbstract implements registryGenericInterface public function clearList() { - // TODO: Implement clearList() method. + $this->_aRegistry = []; } } \ No newline at end of file diff --git a/Application/Model/Registries/registryGenericInterface.php b/Application/Model/Registries/registryGenericInterface.php index 37d752c..2d775ea 100644 --- a/Application/Model/Registries/registryGenericInterface.php +++ b/Application/Model/Registries/registryGenericInterface.php @@ -19,6 +19,8 @@ namespace D3\PdfDocuments\Application\Model\Registries; interface registryGenericInterface { + public function getRequiredGeneratorInterfaceClassName(); + /** * @param $className * generator fully qualified class name */ diff --git a/Application/Model/Registries/registryOrderoverview.php b/Application/Model/Registries/registryOrderoverview.php index 625a17e..4349665 100644 --- a/Application/Model/Registries/registryOrderoverview.php +++ b/Application/Model/Registries/registryOrderoverview.php @@ -27,19 +27,18 @@ class registryOrderoverview extends registryAbstract implements registryOrderove { public function __construct() { - $this->addGenerator(invoicePdf::class, oxNew(invoicePdf::class)); - $this->addGenerator(deliverynotePdf::class, oxNew(deliverynotePdf::class)); - $this->addGenerator(invoicewithoutlogoPdf::class, oxNew(invoicewithoutlogoPdf::class)); - $this->addGenerator(deliverynotewithoutlogoPdf::class, oxNew(deliverynotewithoutlogoPdf::class)); + $this->addGenerator(invoicePdf::class); + $this->addGenerator(deliverynotePdf::class); + $this->addGenerator(invoicewithoutlogoPdf::class); + $this->addGenerator(deliverynotewithoutlogoPdf::class); } /** - * @param $className - * @param pdfdocumentsOrderInterface $pdfGenerator + * @return string */ - public function addGenerator($className, pdfdocumentsOrderInterface $pdfGenerator) + public function getRequiredGeneratorInterfaceClassName() { - $this->addItem($className, $pdfGenerator); + return pdfdocumentsOrderInterface::class; } /** diff --git a/Application/Model/Registries/registryOrderoverviewInterface.php b/Application/Model/Registries/registryOrderoverviewInterface.php index 0b7db65..dc142a1 100644 --- a/Application/Model/Registries/registryOrderoverviewInterface.php +++ b/Application/Model/Registries/registryOrderoverviewInterface.php @@ -17,13 +17,10 @@ namespace D3\PdfDocuments\Application\Model\Registries; -use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; - interface registryOrderoverviewInterface extends registryGenericInterface { /** * @param $className * generator fully qualified class name - * @param pdfdocumentsOrderInterface $pdfGenerator */ - public function addGenerator($className, pdfdocumentsOrderInterface $pdfGenerator); + public function addGenerator($className); } \ No newline at end of file From e295398a83e573d27e5683fd945fed2b3c4a42aa Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 2 Jun 2020 10:12:35 +0200 Subject: [PATCH 048/134] improve code --- Application/Controller/orderOverviewPdfGenerator.php | 6 ++---- Application/Model/Exceptions/noBaseObjectSetException.php | 4 +++- Application/Model/Exceptions/noPdfHandlerFoundException.php | 6 ++++-- Application/Model/Exceptions/wrongPdfGeneratorInterface.php | 4 +++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Application/Controller/orderOverviewPdfGenerator.php b/Application/Controller/orderOverviewPdfGenerator.php index 61ead4a..9749cd8 100644 --- a/Application/Controller/orderOverviewPdfGenerator.php +++ b/Application/Controller/orderOverviewPdfGenerator.php @@ -36,19 +36,17 @@ class orderOverviewPdfGenerator */ public function generatePdf(Order $order, $sFilename, $iSelLang = 0, $target = 'I') { - $Pdf= $this->getPdfClass($order); + $Pdf= $this->getPdfClass(); $Pdf->setOrder($order); $Pdf->genPdf($sFilename, $iSelLang, $target); } /** - * @param Order $order - * * @return pdfdocumentsOrderInterface * @throws noPdfHandlerFoundException */ - public function getPdfClass(Order $order) + public function getPdfClass() { $requestedType = Registry::getRequest()->getRequestParameter('pdftype'); diff --git a/Application/Model/Exceptions/noBaseObjectSetException.php b/Application/Model/Exceptions/noBaseObjectSetException.php index 3abc4db..590dd6d 100644 --- a/Application/Model/Exceptions/noBaseObjectSetException.php +++ b/Application/Model/Exceptions/noBaseObjectSetException.php @@ -15,9 +15,11 @@ namespace D3\PdfDocuments\Application\Model\Exceptions; +use Exception; + class noBaseObjectSetException extends pdfGeneratorExceptionAbstract { - public function __construct( $sMessage = "no base object (e.g. order) for pdf generator set", $iCode = 0, \Exception $previous = null ) + public function __construct( $sMessage = "no base object (e.g. order) for pdf generator set", $iCode = 0, Exception $previous = null ) { parent::__construct( $sMessage, $iCode, $previous ); } diff --git a/Application/Model/Exceptions/noPdfHandlerFoundException.php b/Application/Model/Exceptions/noPdfHandlerFoundException.php index 8adc14c..d3eed51 100644 --- a/Application/Model/Exceptions/noPdfHandlerFoundException.php +++ b/Application/Model/Exceptions/noPdfHandlerFoundException.php @@ -15,6 +15,8 @@ namespace D3\PdfDocuments\Application\Model\Exceptions; +use Exception; + class noPdfHandlerFoundException extends pdfGeneratorExceptionAbstract { /** @@ -23,9 +25,9 @@ class noPdfHandlerFoundException extends pdfGeneratorExceptionAbstract * @param $requestId * @param string $sMessage * @param int $iCode - * @param \Exception|null $previous + * @param Exception|null $previous */ - public function __construct( $requestId, $sMessage = "no pdf handler defined for given request id", $iCode = 0, \Exception $previous = null ) + public function __construct( $requestId, $sMessage = "no pdf handler defined for given request id", $iCode = 0, Exception $previous = null ) { $sMessage .= ' "'.$requestId.'"'; parent::__construct( $sMessage, $iCode, $previous ); diff --git a/Application/Model/Exceptions/wrongPdfGeneratorInterface.php b/Application/Model/Exceptions/wrongPdfGeneratorInterface.php index 8b2572e..2d05ae5 100644 --- a/Application/Model/Exceptions/wrongPdfGeneratorInterface.php +++ b/Application/Model/Exceptions/wrongPdfGeneratorInterface.php @@ -15,9 +15,11 @@ namespace D3\PdfDocuments\Application\Model\Exceptions; +use Exception; + class wrongPdfGeneratorInterface extends pdfGeneratorExceptionAbstract { - public function __construct( $requiredInterface, $sMessage = "generator class doesn't fulfilled the interface", $iCode = 0, \Exception $previous = null ) { + public function __construct( $requiredInterface, $sMessage = "generator class doesn't fulfilled the interface", $iCode = 0, Exception $previous = null ) { $sMessage .= $requiredInterface; From 2b33cfa997eeb36ebd8cd3cd6251992b1a9828a3 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 2 Jun 2020 11:25:00 +0200 Subject: [PATCH 049/134] move offer templates to offer module --- out/src/css/offers.css | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 out/src/css/offers.css diff --git a/out/src/css/offers.css b/out/src/css/offers.css deleted file mode 100644 index b5c01c2..0000000 --- a/out/src/css/offers.css +++ /dev/null @@ -1,24 +0,0 @@ -.offers_subTitle_font14{ - font-size: 14px; -} -.helvetica{ - font-family: helvetica; -} -.offers_width50{ - width: 50%; -} -.offers_width100{ - width: 100%; -} -.offers_margin_top20{ - margin-top: 20px; -} -.offers_margin_bottom20{ - margin-bottom: 20px; -} -.offers_pstThank_margin_top20{ - margin-top: 20px; -} -.offers_pstThank_font20{ - font-size: 20px; -} From dd6b2aaddec22f7bc48c722c7b2a7e15d38cada0 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Tue, 2 Jun 2020 14:32:22 +0200 Subject: [PATCH 050/134] add cellspacing --- Application/views/tpl/documents/deliverynote/deliverynote.tpl | 2 +- Application/views/tpl/documents/invoice/invoice.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/views/tpl/documents/deliverynote/deliverynote.tpl b/Application/views/tpl/documents/deliverynote/deliverynote.tpl index ba569c0..6c84a03 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynote.tpl @@ -26,7 +26,7 @@ [{/block}] [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] - +
diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index d10352f..71075d8 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -26,7 +26,7 @@ [{/block}] [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}]
+
From d584862ef15fd357377c342fbe3303d32f05b4e6 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 3 Jun 2020 13:55:00 +0200 Subject: [PATCH 051/134] rm unnecessary folder --- .../tpl/invoiceCorrection/deliverynote.tpl | 101 ------------------ 1 file changed, 101 deletions(-) delete mode 100644 Application/views/tpl/invoiceCorrection/deliverynote.tpl diff --git a/Application/views/tpl/invoiceCorrection/deliverynote.tpl b/Application/views/tpl/invoiceCorrection/deliverynote.tpl deleted file mode 100644 index b587430..0000000 --- a/Application/views/tpl/invoiceCorrection/deliverynote.tpl +++ /dev/null @@ -1,101 +0,0 @@ -[{assign var= currency value= $order->getOrderCurrency()}] -[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] - - - - - [{block name="pdfTopingFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfToping.tpl')}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfFooter.tpl')}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file=$oViewConf->getModulePath('pdfDocuments', 'Application/views/tpl/invoiceCorrection/includingFiles/pdfHeader.tpl')}] - [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
- - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
- [{/block}] - - [{block name="articleCosts"}] - - - [{* ++++++Artikelzusammenfassung++++++ *}] - - [{* ++++++Kosten der Bestellung++++++ *}] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
- [{*if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
*}] -
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
- [{*if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
*}] -
- - - - - -
-
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_SUM_EXCL_TAX"}]
-
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_CONTAININGTAX"}]
-
-
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
- [{/block}] - [{block name="pdfPastThankFile"}] -
-
hier müssen auch noch die Werte von 'te' ausgegriffen werden [Gesamtsumme; Gesamtsumme (excl. MwSt); enthaltene Mehrwertsteuer]
-
oben die Rechnungskorrekturnummer muss ausgegriffen werden
-
- [{/block}] -
-
\ No newline at end of file From 0f03cdfe848eee9162bd6f5be9149b4e33938889 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 3 Jun 2020 15:37:47 +0200 Subject: [PATCH 052/134] changed filename for exported pdfDocs --- .../controllers/d3_overview_controller_pdfdocuments.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php b/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php index 26abfd8..80662f2 100644 --- a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php @@ -54,7 +54,8 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu self::$_blIsAdmin = 0; $oUtils = Registry::getUtils(); $sTrimmedBillName = trim($oOrder->oxorder__oxbilllname->getRawValue()); - $sFilename = $oOrder->oxorder__oxordernr->value . "_" . $sTrimmedBillName . ".pdf"; + //oxbillr nicht so eingeschrieben lassen + $sFilename = $oOrder->oxorder__oxbillnr->value . "_" . $sTrimmedBillName . ".pdf"; $sFilename = $this->makeValidFileName($sFilename); ob_start(); $oOrder->genPdf($sFilename, Registry::getConfig()->getRequestParameter("pdflanguage")); From 68171b86de4750cb8a0fdced18a71010a13639c3 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 4 Jun 2020 10:31:38 +0200 Subject: [PATCH 053/134] move pdf download to pdf models, use different (changeable) filenames for every document --- .../Controller/orderOverviewPdfGenerator.php | 4 +- .../AbstractClasses/pdfdocumentsGeneric.php | 67 +++++++++++++++---- .../AbstractClasses/pdfdocumentsOrder.php | 16 +++-- .../Model/Documents/deliverynotePdf.php | 8 +++ Application/Model/Documents/invoicePdf.php | 24 +++++++ .../pdfdocumentsGenericInterface.php | 10 +++ .../Interfaces/pdfdocumentsOrderInterface.php | 5 ++ IntelliSenseHelper.php | 2 +- .../d3_overview_controller_pdfdocuments.php | 27 ++------ .../Model/d3_Order_PdfDocuments.php | 1 + metadata.php | 2 +- 11 files changed, 122 insertions(+), 44 deletions(-) rename Modules/Application/{controllers => Controller}/d3_overview_controller_pdfdocuments.php (61%) diff --git a/Application/Controller/orderOverviewPdfGenerator.php b/Application/Controller/orderOverviewPdfGenerator.php index 9749cd8..a529b3b 100644 --- a/Application/Controller/orderOverviewPdfGenerator.php +++ b/Application/Controller/orderOverviewPdfGenerator.php @@ -34,12 +34,12 @@ class orderOverviewPdfGenerator * @throws noBaseObjectSetException * @throws pdfGeneratorExceptionAbstract */ - public function generatePdf(Order $order, $sFilename, $iSelLang = 0, $target = 'I') + public function generatePdf(Order $order, $iSelLang = 0) { $Pdf= $this->getPdfClass(); $Pdf->setOrder($order); - $Pdf->genPdf($sFilename, $iSelLang, $target); + $Pdf->downloadPdf($iSelLang); } /** diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index c091b69..bcf5527 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -18,13 +18,18 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; +use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface; +use OxidEsales\Eshop\Core\Base; use OxidEsales\Eshop\Core\Registry; +use OxidEsales\Eshop\Core\UtilsView; use Smarty; use Spipu\Html2Pdf\Html2Pdf; -abstract class pdfdocumentsGeneric implements genericInterface +abstract class pdfdocumentsGeneric extends Base implements genericInterface { + const PDF_DOWNLOAD = 'I'; + /** @var Smarty */ public $oSmarty; @@ -33,6 +38,8 @@ abstract class pdfdocumentsGeneric implements genericInterface */ public function __construct() { + parent::__construct(); + /** @var Smarty $oSmarty */ $this->oSmarty = Registry::getUtilsView()->getSmarty(); } @@ -45,12 +52,33 @@ abstract class pdfdocumentsGeneric implements genericInterface */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') { - $sFilename = $this->getFilename( $sFilename); + $sFilename = $this->getFilename(); $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); $oPdf->writeHTML($this->getHTMLContent($iSelLang)); $oPdf->output($sFilename, $target); } + public function downloadPdf($iLanguage = 0) + { + try { + $oUtils = Registry::getUtils(); + $sFilename = $this->makeValidFileName($this->getFilename()); + ob_start(); + $this->genPdf($sFilename, $iLanguage, self::PDF_DOWNLOAD); + $sPDF = ob_get_contents(); + ob_end_clean(); + $oUtils->setHeader("Pragma: public"); + $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + $oUtils->setHeader("Expires: 0"); + $oUtils->setHeader("Content-type: application/pdf"); + $oUtils->setHeader("Content-Disposition: attachment; filename=" . $sFilename); + Registry::getUtils()->showMessageAndExit($sPDF); + } catch (pdfGeneratorExceptionAbstract $e) { + Registry::get(UtilsView::class)->addErrorToDisplay($e); + Registry::getLogger()->error($e); + } + } + public function setSmartyVars() { $this->oSmarty->assign('oConfig', Registry::getSession()->getConfig()); @@ -59,16 +87,6 @@ abstract class pdfdocumentsGeneric implements genericInterface $this->oSmarty->assign('lang', Registry::getLang()); } - /** - * @param string $sFilename - * - * @return string - */ - public function getFilename($sFilename) - { - return $sFilename; - } - /** * @param int $iSelLang * @@ -76,6 +94,8 @@ abstract class pdfdocumentsGeneric implements genericInterface */ public function getHTMLContent($iSelLang = 0) { + self::$_blIsAdmin = $this->renderTemplateFromAdmin(); + $lang = Registry::getLang(); $currTplLang = $lang->getTplLanguage(); @@ -105,4 +125,27 @@ abstract class pdfdocumentsGeneric implements genericInterface { return ['P', 'A4', 'de']; } + + /** + * Gets proper file name + * + * @param string $sFilename file name + * + * @return string + */ + public function makeValidFileName($sFilename) + { + $sFilename = preg_replace('/[\s]+/', '_', $sFilename); + $sFilename = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $sFilename); + + return str_replace(' ', '_', $sFilename); + } + + /** + * @return bool + */ + public function renderTemplateFromAdmin() + { + return false; + } } \ No newline at end of file diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index 1e0125f..b719dd8 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -64,14 +64,18 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt * * @return string */ - public function getFilename($sFilename) + public function getFilename() { - $sFilename = parent::getFilename( $sFilename); + $sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname')); - $ordernr = $this->getOrder()->getFieldData('oxordernr'); - $billnr = $this->getOrder()->getFieldData('oxbillnr');; - - return str_replace($ordernr, $billnr, $sFilename); + return implode( + '_', + [ + $this->getTypeForFilename(), + $this->getOrder()->getFieldData('oxordernr'), + $sTrimmedBillName . ".pdf" + ] + ); } /** diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index 63b832f..5af3b11 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -37,6 +37,14 @@ class deliverynotePdf extends pdfdocumentsOrder return "ORDER_OVERVIEW_PDF_DNOTE"; } + /** + * @return string + */ + public function getTypeForFilename() + { + return 'delnote'; + } + /** * @return string */ diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index a78c059..7d48e6a 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -42,6 +42,14 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn return "ORDER_OVERVIEW_PDF_STANDART"; } + /** + * @return string + */ + public function getTypeForFilename() + { + return 'invoice'; + } + /** * @param $sFilename * @param int $iSelLang @@ -88,4 +96,20 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn public function getTemplate(){ return 'd3invoice_pdf.tpl'; } + + /** + * @param string $sFilename + * + * @return string + */ + public function getFilename() + { + $filename = parent::getFilename(); + + return str_replace( + $this->getOrder()->getFieldData('oxordernr'), + $this->getOrder()->getFieldData('oxbillnr'), + $filename + ); + } } \ No newline at end of file diff --git a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php index 1009d0d..acc0751 100644 --- a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -41,6 +41,11 @@ interface pdfdocumentsGenericInterface */ public function getHTMLContent(); + /** + * @param int $iLanguage + */ + public function downloadPdf($iLanguage = 0); + /** * @param $sFilename * @param int $iSelLang @@ -50,4 +55,9 @@ interface pdfdocumentsGenericInterface * @throws noBaseObjectSetException */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I'); + + /** + * @return string + */ + public function getFilename(); } \ No newline at end of file diff --git a/Application/Model/Interfaces/pdfdocumentsOrderInterface.php b/Application/Model/Interfaces/pdfdocumentsOrderInterface.php index dfa2fdd..d02fbcf 100644 --- a/Application/Model/Interfaces/pdfdocumentsOrderInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsOrderInterface.php @@ -30,4 +30,9 @@ interface pdfdocumentsOrderInterface extends pdfdocumentsGenericInterface * @return Order */ public function getOrder(); + + /** + * @return string + */ + public function getTypeForFilename(); } \ No newline at end of file diff --git a/IntelliSenseHelper.php b/IntelliSenseHelper.php index 53b1730..0c5fc51 100644 --- a/IntelliSenseHelper.php +++ b/IntelliSenseHelper.php @@ -13,7 +13,7 @@ * @link http://www.oxidmodule.com */ -namespace D3\PdfDocuments\Modules\Application\controllers { +namespace D3\PdfDocuments\Modules\Application\Controller { use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; diff --git a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php similarity index 61% rename from Modules/Application/controllers/d3_overview_controller_pdfdocuments.php rename to Modules/Application/Controller/d3_overview_controller_pdfdocuments.php index 80662f2..dbdcd29 100644 --- a/Modules/Application/controllers/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php @@ -15,8 +15,9 @@ * @link http://www.oxidmodule.com */ -namespace D3\PdfDocuments\Modules\Application\controllers; +namespace D3\PdfDocuments\Modules\Application\Controller; +use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments; @@ -50,27 +51,9 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu /** @var d3_Order_PdfDocuments $oOrder */ $oOrder = oxNew(Order::class); if ($oOrder->load($soxId)) { - try { - self::$_blIsAdmin = 0; - $oUtils = Registry::getUtils(); - $sTrimmedBillName = trim($oOrder->oxorder__oxbilllname->getRawValue()); - //oxbillr nicht so eingeschrieben lassen - $sFilename = $oOrder->oxorder__oxbillnr->value . "_" . $sTrimmedBillName . ".pdf"; - $sFilename = $this->makeValidFileName($sFilename); - ob_start(); - $oOrder->genPdf($sFilename, Registry::getConfig()->getRequestParameter("pdflanguage")); - $sPDF = ob_get_contents(); - ob_end_clean(); - $oUtils->setHeader("Pragma: public"); - $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - $oUtils->setHeader("Expires: 0"); - $oUtils->setHeader("Content-type: application/pdf"); - $oUtils->setHeader("Content-Disposition: attachment; filename=" . $sFilename); - Registry::getUtils()->showMessageAndExit($sPDF); - } catch (pdfGeneratorExceptionAbstract $e) { - Registry::get(UtilsView::class)->addErrorToDisplay($e); - Registry::getLogger()->error($e); - } + self::$_blIsAdmin = 0; + $generator = oxNew( orderOverviewPdfGenerator::class ); + $generator->generatePdf($oOrder, Registry::getRequest()->getRequestEscapedParameter("pdflanguage")); } } } diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index bbb2ee2..2df74d0 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -25,6 +25,7 @@ use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent { /** + * compatibility to OXID Invoice PDF module * @param string $sFilename * @param int $iSelLang * @param string $target diff --git a/metadata.php b/metadata.php index 3e60cac..1465531 100644 --- a/metadata.php +++ b/metadata.php @@ -16,7 +16,7 @@ */ use D3\ModCfg\Application\Model\d3utils; -use D3\PdfDocuments\Modules\Application\controllers\d3_overview_controller_pdfdocuments; +use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments; use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments as d3_pdfdocs_OrderModel; use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; use OxidEsales\Eshop\Application\Model as OxidModel; From 33a5dc990a17f0e0e33c89fca3a2a9740da7f202 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 4 Jun 2020 10:39:21 +0200 Subject: [PATCH 054/134] prevent convert exception, if image couldn't loaded --- Application/views/tpl/documents/inc/header.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/views/tpl/documents/inc/header.tpl b/Application/views/tpl/documents/inc/header.tpl index 9d20cc2..cb26520 100644 --- a/Application/views/tpl/documents/inc/header.tpl +++ b/Application/views/tpl/documents/inc/header.tpl @@ -3,7 +3,10 @@ [{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 From 3011e61b850bf0a1bc9b2c9a1d04604e7e149b19 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 4 Jun 2020 11:04:17 +0200 Subject: [PATCH 055/134] fix set billdate --- Application/Model/Documents/invoicePdf.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 7d48e6a..c4899fc 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -80,7 +80,9 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn public function setInvoiceDate() { if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') { - $this->getOrder()->assign([date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y')))]); + $this->getOrder()->assign([ + "oxbilldate" => date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y'))) + ]); $this->blIsNewOrder = true; } From 4223f5128c927720ab8f629c3f7e64fdef337753 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 4 Jun 2020 11:11:40 +0200 Subject: [PATCH 056/134] remove isAdmin definition from orderOverview extension for generating pdf documents --- .../Controller/d3_overview_controller_pdfdocuments.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php index dbdcd29..874154f 100644 --- a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php @@ -51,7 +51,6 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu /** @var d3_Order_PdfDocuments $oOrder */ $oOrder = oxNew(Order::class); if ($oOrder->load($soxId)) { - self::$_blIsAdmin = 0; $generator = oxNew( orderOverviewPdfGenerator::class ); $generator->generatePdf($oOrder, Registry::getRequest()->getRequestEscapedParameter("pdflanguage")); } From b5096421ab9d7cbc328e8cf3003d5980eda4dacb Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 4 Jun 2020 15:18:51 +0200 Subject: [PATCH 057/134] use TCPDF functions instead of own implementations, use constants for configuration --- .../AbstractClasses/pdfdocumentsGeneric.php | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index bcf5527..b2b9292 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -17,18 +17,24 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; -use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface; use OxidEsales\Eshop\Core\Base; use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\UtilsView; use Smarty; +use Spipu\Html2Pdf\Exception\Html2PdfException; use Spipu\Html2Pdf\Html2Pdf; abstract class pdfdocumentsGeneric extends Base implements genericInterface { - const PDF_DOWNLOAD = 'I'; + const PDF_DESTINATION_DOWNLOAD = 'D'; // force download in browser + const PDF_DESTINATION_STDOUT = 'I'; // show in browser plugin if available, otherwise download + const PDF_DESTINATION_FILE = 'F'; // save as local file + const PDF_DESTINATION_STRING = 'S'; // output as string + + const PDF_ORIENTATION_PORTRAIT = 'P'; + const PDF_ORIENTATION_LANDSCAPE = 'L'; /** @var Smarty */ public $oSmarty; @@ -48,9 +54,9 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface * @param $sFilename * @param int $iSelLang * @param string $target - * @throws noBaseObjectSetException + * @throws Html2PdfException */ - public function genPdf($sFilename, $iSelLang = 0, $target = 'I') + public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT) { $sFilename = $this->getFilename(); $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); @@ -58,21 +64,15 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $oPdf->output($sFilename, $target); } + /** + * @param int $iLanguage + */ public function downloadPdf($iLanguage = 0) { try { - $oUtils = Registry::getUtils(); - $sFilename = $this->makeValidFileName($this->getFilename()); - ob_start(); - $this->genPdf($sFilename, $iLanguage, self::PDF_DOWNLOAD); - $sPDF = ob_get_contents(); - ob_end_clean(); - $oUtils->setHeader("Pragma: public"); - $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - $oUtils->setHeader("Expires: 0"); - $oUtils->setHeader("Content-type: application/pdf"); - $oUtils->setHeader("Content-Disposition: attachment; filename=" . $sFilename); - Registry::getUtils()->showMessageAndExit($sPDF); + $sFilename = $this->getFilename(); + $this->genPdf($sFilename, $iLanguage, self::PDF_DESTINATION_DOWNLOAD); + Registry::getUtils()->showMessageAndExit(''); } catch (pdfGeneratorExceptionAbstract $e) { Registry::get(UtilsView::class)->addErrorToDisplay($e); Registry::getLogger()->error($e); @@ -123,7 +123,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function getPdfProperties() { - return ['P', 'A4', 'de']; + return [self::PDF_ORIENTATION_PORTRAIT, 'A4', 'de']; } /** From 4949ef834e062fc1eecbbb1bada37cdbec4a4473 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 5 Jun 2020 09:37:11 +0200 Subject: [PATCH 058/134] allow forced filename --- .../Model/AbstractClasses/pdfdocumentsGeneric.php | 11 +++++++++++ .../Model/AbstractClasses/pdfdocumentsOrder.php | 5 +++++ .../Model/Interfaces/pdfdocumentsGenericInterface.php | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index b2b9292..eb70aa5 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -39,6 +39,9 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface /** @var Smarty */ public $oSmarty; + /** @var string */ + public $filename; + /** * pdfDocumentsGeneric constructor. */ @@ -126,6 +129,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface return [self::PDF_ORIENTATION_PORTRAIT, 'A4', 'de']; } + /** + * @param $filename + */ + public function setFilename($filename) + { + $this->filename = $filename; + } + /** * Gets proper file name * diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index b719dd8..14f7b1c 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -66,6 +66,11 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt */ public function getFilename() { + // forced filename from setFilename() + if ($this->filename) { + return $this->filename; + } + $sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname')); return implode( diff --git a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php index acc0751..b8b1a97 100644 --- a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -56,6 +56,11 @@ interface pdfdocumentsGenericInterface */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I'); + /** + * @param string $filename + */ + public function setFilename($filename); + /** * @return string */ From 3a3e22ac3b6bf5614d26779b0d4687f941bb7c1a Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 5 Jun 2020 10:06:58 +0200 Subject: [PATCH 059/134] add filename extension if it's missing --- .../AbstractClasses/pdfdocumentsGeneric.php | 33 +++++++++++++++++++ .../AbstractClasses/pdfdocumentsOrder.php | 18 +++++----- .../pdfdocumentsGenericInterface.php | 7 ++++ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index eb70aa5..9009880 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -36,6 +36,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface const PDF_ORIENTATION_PORTRAIT = 'P'; const PDF_ORIENTATION_LANDSCAPE = 'L'; + public $filenameExtension = 'pdf'; + /** @var Smarty */ public $oSmarty; @@ -137,6 +139,37 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $this->filename = $filename; } + /** + * @param string $sFilename + * + * @return string + */ + public function getFilename() + { + // forced filename from setFilename() + if ($this->filename) { + return $this->addFilenameExtension($this->filename); + } + + return $this->addFilenameExtension($this->getTypeForFilename()); + } + + /** + * @param string $filename + * + * @return string + */ + public function addFilenameExtension($filename) + { + $extension = $this->filenameExtension; + $extensionLength = (strlen($extension) + 1) * -1; + if ((bool) strlen($extension) && substr($filename, $extensionLength) != '.'.$extension) { + $filename .= '.'.$extension; + } + + return $filename; + } + /** * Gets proper file name * diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index 14f7b1c..78b3b62 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -68,18 +68,20 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt { // forced filename from setFilename() if ($this->filename) { - return $this->filename; + return $this->addFilenameExtension($this->filename); } $sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname')); - return implode( - '_', - [ - $this->getTypeForFilename(), - $this->getOrder()->getFieldData('oxordernr'), - $sTrimmedBillName . ".pdf" - ] + return $this->addFilenameExtension( + implode( + '_', + [ + $this->getTypeForFilename(), + $this->getOrder()->getFieldData('oxordernr'), + $sTrimmedBillName + ] + ) ); } diff --git a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php index b8b1a97..a57fa81 100644 --- a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -65,4 +65,11 @@ interface pdfdocumentsGenericInterface * @return string */ public function getFilename(); + + /** + * @param string $filename + * + * @return string + */ + public function addFilenameExtension($filename); } \ No newline at end of file From 2624bb32ec3b2981cbd9c465da2c6d8f8d54245f Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 5 Jun 2020 14:33:43 +0200 Subject: [PATCH 060/134] adding new css classes and config spaces --- .../invoice/includingFiles/pdfPastThank.tpl | 10 ++++------ out/src/css/deliverynote_.css | 4 ++-- out/src/css/pdfStyling.css | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index 907388c..9f3f61a 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -1,16 +1,14 @@ [{block name="pdfPastThankFile"}] - - - +
 
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}][{$payment->oxpayments__oxdesc->value}]
+ [{* +++++++Individueller Zahlungstext+++++++ *}] [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] [{else}] [{/if}] - [{*+++++++++++*}] - - + [{**Schlusstext/ Abschied***}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}] [{$payment->getFieldData('oxdesc')}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
 
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
[{/block}] \ No newline at end of file diff --git a/out/src/css/deliverynote_.css b/out/src/css/deliverynote_.css index 8b9c9a1..fd30784 100644 --- a/out/src/css/deliverynote_.css +++ b/out/src/css/deliverynote_.css @@ -24,10 +24,10 @@ table{ .border-bottom{ border-bottom: solid 0.15mm #000; } -.hermes{ +.paddingTop{ padding-top: 5px; } -.mercurius{ +.paddingBottom{ padding-bottom: 5px; } .spacing_order_info{ diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 8b9c9a1..aa36b1b 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -24,12 +24,20 @@ table{ .border-bottom{ border-bottom: solid 0.15mm #000; } -.hermes{ +.paddingTop{ padding-top: 5px; } -.mercurius{ +.paddingBottom{ padding-bottom: 5px; } + +.paddingTop15{ + padding-top: 10px; +} +.marginTop5{ + padding-top: 5px; +} + .spacing_order_info{ padding-bottom: 5px; padding-top: 5px; @@ -50,6 +58,10 @@ table{ border-top: solid 1px #000; } +.borderSpacingUnset{ + border-spacing: 0; +} + /*pdf_heading*/ .pdf_heading_table{ width: 100%; From c6511b02714af507e5ec26ec1e651a98b8ddb572 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 5 Jun 2020 15:54:16 +0200 Subject: [PATCH 061/134] added getFieldData() and spacing --- .../invoice/includingFiles/pdfHeader.tpl | 54 +++++++++---------- Modules/out/src/pdfStyling.css | 4 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl index a4aaa3c..88de701 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl @@ -3,52 +3,52 @@ [{block name="heading_owner_information"}] -
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
+
[{$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->oxshops__oxtelefon->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->getFieldData('oxtelefon')}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->getFieldData('oxtelefax')}]
+
[{$shop->getFieldData('oxinfoemail')}]
[{/block}] [{block name="heading_order_information"}] - [{if $order->oxorder__oxbillcompany->value}] -
[{$order->oxorder__oxbillcompany->value}]
+ [{if $order->getFieldData('oxbillcompany')}] +
[{$order->getFieldData('oxbillcompany')}]
[{/if}] -
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
-
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
-
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
+
[{$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->oxorder__oxdelstreet->value}] + [{if $order->getFieldData('oxdelstreet')}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] -
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
-
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
-
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
-
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{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->oxorder__oxordernr->value}]
-
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
[{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->oxshops__oxbankname->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->oxshops__oxbiccode->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
+
[{$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}] diff --git a/Modules/out/src/pdfStyling.css b/Modules/out/src/pdfStyling.css index 8b9c9a1..fd30784 100644 --- a/Modules/out/src/pdfStyling.css +++ b/Modules/out/src/pdfStyling.css @@ -24,10 +24,10 @@ table{ .border-bottom{ border-bottom: solid 0.15mm #000; } -.hermes{ +.paddingTop{ padding-top: 5px; } -.mercurius{ +.paddingBottom{ padding-bottom: 5px; } .spacing_order_info{ From 1b35798d9fd42dab7460df87153aa4d010752046 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 5 Jun 2020 16:06:35 +0200 Subject: [PATCH 062/134] implementation of smarty.now --- .../tpl/documents/deliverynote/includingFiles/pdfHeader.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl index 93f2d94..8344fb7 100644 --- a/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl @@ -42,7 +42,7 @@
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_QUOTECUSTMNR"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
-
[{$shop->oxshops__oxcity->value}], [{$order->oxorder__oxbilldate->value|date_format:"%d.%m.%Y"}]
+
[{$shop->oxshops__oxcity->value}], [{$smarty.now|date_format:"%d.%m.%G"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
From c9457f14079b1bad380903e7497eb538922aec3d Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 8 Jun 2020 08:45:47 +0200 Subject: [PATCH 063/134] added margin-bottom class --- .../views/tpl/documents/invoice/includingFiles/pdfHeader.tpl | 2 +- out/src/css/pdfStyling.css | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl index 88de701..0b34150 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl @@ -1,5 +1,5 @@ [{block name="pdfHeading"}] - +
[{block name="heading_owner_information"}] - [{/block}]
diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index aa36b1b..334554e 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -67,6 +67,9 @@ table{ width: 100%; margin-top: 8mm; } +.marginBottom15{ + margin-bottom: 15px; +} .pdf_heading_width35{ width: 35%; } From b200c54339d5c7a95540b2d0e34923e2957b58d0 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 8 Jun 2020 10:30:35 +0200 Subject: [PATCH 064/134] reordering header --- .../deliverynote/includingFiles/pdfHeader.tpl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl index 8344fb7..86b0c87 100644 --- a/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl @@ -34,12 +34,9 @@
[{$shop->oxshops__oxcountry->value}]
[{$shop->oxshops__oxdeladdinfo->value}]
[{/if}] - [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYNOTE"}][{$order->oxorder__oxordernr->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_QUOTECUSTMNR"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
[{$shop->oxshops__oxcity->value}], [{$smarty.now|date_format:"%d.%m.%G"}]
@@ -49,4 +46,16 @@
+ + + + + + + +
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYNOTE"}][{$order->oxorder__oxordernr->value}]
+
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
[{/block}] \ No newline at end of file From c1ce7ac95c0f2dc7f40dee08d9538e5e05f6fa9b Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 8 Jun 2020 16:39:33 +0200 Subject: [PATCH 065/134] add ordermanager combination --- .../AbstractClasses/pdfdocumentsGeneric.php | 26 +++++++++- .../pdfdocumentsGenericInterface.php | 7 +++ .../registryOrdermanagerActions.php | 50 +++++++++++++++++++ .../registryOrdermanagerActionsInterface.php | 26 ++++++++++ metadata.php | 3 +- 5 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 Application/Model/Registries/registryOrdermanagerActions.php create mode 100644 Application/Model/Registries/registryOrdermanagerActionsInterface.php diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 9009880..f589128 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -66,7 +66,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $sFilename = $this->getFilename(); $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); $oPdf->writeHTML($this->getHTMLContent($iSelLang)); - $oPdf->output($sFilename, $target); + return $oPdf->output($sFilename, $target); } /** @@ -84,6 +84,30 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface } } + /** + * @param int $iLanguage + * + * @return null|string + * @throws Html2PdfException + */ + public function getPdfContent($iLanguage = 0) + { + try { + $sFilename = $this->getFilename(); + ob_start(); + //$this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STDOUT ); + $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING ); + return ob_get_contents(); + } catch (pdfGeneratorExceptionAbstract $e) { + Registry::get(UtilsView::class)->addErrorToDisplay($e); + Registry::getLogger()->error($e); + } catch (\Exception $e) { + dumpvar($e->getMessage()); + } + + return null; + } + public function setSmartyVars() { $this->oSmarty->assign('oConfig', Registry::getSession()->getConfig()); diff --git a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php index a57fa81..e2a14ed 100644 --- a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -46,6 +46,13 @@ interface pdfdocumentsGenericInterface */ public function downloadPdf($iLanguage = 0); + /** + * @param int $iLanguage + * + * @return string|null + */ + public function getPdfContent($iLanguage = 0); + /** * @param $sFilename * @param int $iSelLang diff --git a/Application/Model/Registries/registryOrdermanagerActions.php b/Application/Model/Registries/registryOrdermanagerActions.php new file mode 100644 index 0000000..5f634f2 --- /dev/null +++ b/Application/Model/Registries/registryOrdermanagerActions.php @@ -0,0 +1,50 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Registries; + +use D3\PdfDocuments\Application\Model\Documents\deliverynotePdf; +use D3\PdfDocuments\Application\Model\Documents\deliverynotewithoutlogoPdf; +use D3\PdfDocuments\Application\Model\Documents\invoicePdf; +use D3\PdfDocuments\Application\Model\Documents\invoicewithoutlogoPdf; +use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; + +class registryOrdermanagerActions extends registryAbstract implements registryOrdermanagerActionsInterface +{ + public function __construct() + { + $this->addGenerator(invoicePdf::class); + $this->addGenerator(deliverynotePdf::class); + $this->addGenerator(invoicewithoutlogoPdf::class); + $this->addGenerator(deliverynotewithoutlogoPdf::class); + } + + /** + * @return string + */ + public function getRequiredGeneratorInterfaceClassName() + { + return pdfdocumentsOrderInterface::class; + } + + /** + * @param $className * generator fully qualified class name + * @return pdfdocumentsOrderInterface + */ + public function getGenerator($className) + { + return $this->_aRegistry[$className]; + } +} \ No newline at end of file diff --git a/Application/Model/Registries/registryOrdermanagerActionsInterface.php b/Application/Model/Registries/registryOrdermanagerActionsInterface.php new file mode 100644 index 0000000..9bee64c --- /dev/null +++ b/Application/Model/Registries/registryOrdermanagerActionsInterface.php @@ -0,0 +1,26 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Registries; + +interface registryOrdermanagerActionsInterface extends registryGenericInterface +{ + /** + * @param $className * generator fully qualified class name + */ + public function addGenerator($className); +} \ No newline at end of file diff --git a/metadata.php b/metadata.php index 1465531..5c0684c 100644 --- a/metadata.php +++ b/metadata.php @@ -28,7 +28,7 @@ $sMetadataVersion = '2.0'; $logo = (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D³'); -$sModuleId = 'pdfDocuments'; +$sModuleId = 'd3PdfDocuments'; /** * Module information */ @@ -38,7 +38,6 @@ $aModule = [ 'de' => $logo.' PDF-Dokumente aus HTML-Templates', 'en' => $logo.' PDF documents from HTML templates', ], - 'thumbnail' => 'picture.png', 'version' => '1.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', From d194491675138f3de8bd12bc37a7c33738558488 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 9 Jun 2020 14:56:14 +0200 Subject: [PATCH 066/134] document can save to disc --- .../AbstractClasses/pdfdocumentsGeneric.php | 41 ++++++++++++++----- .../AbstractClasses/pdfdocumentsOrder.php | 10 +++-- .../Documents/deliverynotewithoutlogoPdf.php | 8 ++++ Application/Model/Documents/invoicePdf.php | 11 +++-- .../Model/Documents/invoicewithoutlogoPdf.php | 8 ++++ .../pdfdocumentsGenericInterface.php | 6 +++ 6 files changed, 66 insertions(+), 18 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index f589128..bdda72c 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -28,10 +28,12 @@ use Spipu\Html2Pdf\Html2Pdf; abstract class pdfdocumentsGeneric extends Base implements genericInterface { - const PDF_DESTINATION_DOWNLOAD = 'D'; // force download in browser - const PDF_DESTINATION_STDOUT = 'I'; // show in browser plugin if available, otherwise download - const PDF_DESTINATION_FILE = 'F'; // save as local file - const PDF_DESTINATION_STRING = 'S'; // output as string + const PDF_DESTINATION_DOWNLOAD = 'D'; // force download in browser + const PDF_DESTINATION_STDOUT = 'I'; // show in browser plugin if available, otherwise download + const PDF_DESTINATION_FILE = 'F'; // save as local file + const PDF_DESTINATION_FILEANDSTDOUT = 'FI'; // output as local file and show in browser plugin + const PDF_DESTINATION_FILEANDDOWNLOAD = 'FD'; // output as local file and force download in browser + const PDF_DESTINATION_STRING = 'S'; // output as string const PDF_ORIENTATION_PORTRAIT = 'P'; const PDF_ORIENTATION_LANDSCAPE = 'L'; @@ -59,11 +61,12 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface * @param $sFilename * @param int $iSelLang * @param string $target + * + * @return mixed|string * @throws Html2PdfException */ public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT) { - $sFilename = $this->getFilename(); $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); $oPdf->writeHTML($this->getHTMLContent($iSelLang)); return $oPdf->output($sFilename, $target); @@ -84,6 +87,27 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface } } + /** + * @param string $path + * @param int $iLanguage + * + * @throws Html2PdfException + */ + public function savePdfFile($path, $iLanguage = 0) + { + try { + $sFilename = $this->getFilename(); + $this->genPdf( + rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$sFilename, + $iLanguage, + self::PDF_DESTINATION_FILE + ); + } catch (pdfGeneratorExceptionAbstract $e) { + Registry::get(UtilsView::class)->addErrorToDisplay($e); + Registry::getLogger()->error($e); + } + } + /** * @param int $iLanguage * @@ -94,15 +118,10 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface { try { $sFilename = $this->getFilename(); - ob_start(); - //$this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STDOUT ); - $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING ); - return ob_get_contents(); + return $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING ); } catch (pdfGeneratorExceptionAbstract $e) { Registry::get(UtilsView::class)->addErrorToDisplay($e); Registry::getLogger()->error($e); - } catch (\Exception $e) { - dumpvar($e->getMessage()); } return null; diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index 78b3b62..cefd14d 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -22,6 +22,7 @@ use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface as o use \OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Application\Model\Payment; use OxidEsales\Eshop\Application\Model\User; +use Spipu\Html2Pdf\Exception\Html2PdfException; abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInterface { @@ -86,9 +87,12 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt } /** - * @param $sFilename - * @param int $iSelLang + * @param $sFilename + * @param int $iSelLang * @param string $target + * + * @return mixed|string|void + * @throws Html2PdfException * @throws noBaseObjectSetException */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') @@ -98,6 +102,6 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt throw $e; } - parent::genPdf($sFilename, $iSelLang, $target); + return parent::genPdf($sFilename, $iSelLang, $target); } } \ No newline at end of file diff --git a/Application/Model/Documents/deliverynotewithoutlogoPdf.php b/Application/Model/Documents/deliverynotewithoutlogoPdf.php index da32ac7..d348b2e 100644 --- a/Application/Model/Documents/deliverynotewithoutlogoPdf.php +++ b/Application/Model/Documents/deliverynotewithoutlogoPdf.php @@ -35,6 +35,14 @@ class deliverynotewithoutlogoPdf extends deliverynotePdf return "ORDER_OVERVIEW_PDF_DNOTE_WITHOUT_LOGO"; } + /** + * @return string + */ + public function getTypeForFilename() + { + return 'delnote-nl'; + } + /** * @return string */ diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index c4899fc..4a7edaf 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -20,6 +20,7 @@ namespace D3\PdfDocuments\Application\Model\Documents; use D3\PdfDocuments\Application\Model\AbstractClasses\pdfdocumentsOrder; use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderinvoiceInterface; +use Spipu\Html2Pdf\Exception\Html2PdfException; class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceInterface { @@ -51,10 +52,12 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn } /** - * @param $sFilename - * @param int $iSelLang + * @param $sFilename + * @param int $iSelLang * @param string $target - * @return void + * + * @return mixed|string|void + * @throws Html2PdfException * @throws noBaseObjectSetException */ public function genPdf( $sFilename, $iSelLang = 0, $target = 'I' ) @@ -63,7 +66,7 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn $this->setInvoiceDate(); $this->saveOrderOnChanges(); - parent::genPdf( $sFilename, $iSelLang, $target ); + return parent::genPdf( $sFilename, $iSelLang, $target ); } public function setInvoiceNumber() diff --git a/Application/Model/Documents/invoicewithoutlogoPdf.php b/Application/Model/Documents/invoicewithoutlogoPdf.php index 3d905e0..9a09606 100644 --- a/Application/Model/Documents/invoicewithoutlogoPdf.php +++ b/Application/Model/Documents/invoicewithoutlogoPdf.php @@ -36,6 +36,14 @@ class invoicewithoutlogoPdf extends invoicePdf return "ORDER_OVERVIEW_PDF_STANDART_WITHOUT_LOGO"; } + /** + * @return string + */ + public function getTypeForFilename() + { + return 'invoice-nl'; + } + /** * @return string */ diff --git a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php index e2a14ed..95180b6 100644 --- a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -53,6 +53,12 @@ interface pdfdocumentsGenericInterface */ public function getPdfContent($iLanguage = 0); + /** + * @param string $path + * @param int $iLanguage + */ + public function savePdfFile($path, $iLanguage = 0); + /** * @param $sFilename * @param int $iSelLang From c931ac19f309b5def3a13781ade6c834ffdf4535 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 9 Jun 2020 22:49:47 +0200 Subject: [PATCH 067/134] set PDF metadata --- Application/Model/AbstractClasses/pdfdocumentsGeneric.php | 8 ++++++++ Application/views/tpl/documents/invoice/invoice.tpl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index bdda72c..dbb7a54 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -68,7 +68,12 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT) { $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); + $oPdf->setTestIsImage(false); $oPdf->writeHTML($this->getHTMLContent($iSelLang)); + $oPdf->pdf->SetAuthor(Registry::getConfig()->getActiveShop()->getFieldData('oxname')); + $oPdf->pdf->SetTitle(Registry::getLang()->translateString($this->getTitleIdent())); + $oPdf->pdf->SetCreator('D³ PDF Documents for OXID eShop'); + $oPdf->pdf->SetSubject(NULL); return $oPdf->output($sFilename, $target); } @@ -142,6 +147,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function getHTMLContent($iSelLang = 0) { + $blCurrentRenderFromAdmin = self::$_blIsAdmin; self::$_blIsAdmin = $this->renderTemplateFromAdmin(); $lang = Registry::getLang(); @@ -155,6 +161,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $lang->setTplLanguage($currTplLang); + self::$_blIsAdmin = $blCurrentRenderFromAdmin; + return $content; } diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 71075d8..f1ddb8c 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -6,7 +6,7 @@ [{include file="d3pdfstyle.css"}] - + [{block name="pdfTopingFile"}] [{include file="d3pdfheader.tpl" showLogo=true}] From 514c860de9a58318094e89e6a9ee2b8d97597284 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 9 Jun 2020 23:44:33 +0200 Subject: [PATCH 068/134] add simple fold and punch marks --- Application/views/tpl/documents/inc/din5008.tpl | 6 ++++++ Application/views/tpl/documents/invoice/invoice.tpl | 5 +++++ metadata.php | 1 + 3 files changed, 12 insertions(+) create mode 100644 Application/views/tpl/documents/inc/din5008.tpl diff --git a/Application/views/tpl/documents/inc/din5008.tpl b/Application/views/tpl/documents/inc/din5008.tpl new file mode 100644 index 0000000..9319a57 --- /dev/null +++ b/Application/views/tpl/documents/inc/din5008.tpl @@ -0,0 +1,6 @@ +[{* fold marks *}] +
+
+ +[{* punch mark *}] +
\ 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 f1ddb8c..ceb1246 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -18,6 +18,11 @@ [{/block}] + [{* +++++ fold and punch marks +++++ *}] + [{block name="pdfDIN5008Markings"}] + [{include file="d3din5008.tpl"}] + [{/block}] + [{* +++++ main page part +++++ *}] [{block name="pdfHeadingFile"}] [{block name="pdfHeaderFile"}] diff --git a/metadata.php b/metadata.php index 5c0684c..9328a04 100644 --- a/metadata.php +++ b/metadata.php @@ -63,6 +63,7 @@ $aModule = [ 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl', 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl', + 'd3din5008.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/din5008.tpl', 'd3pdfstyle.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css' ], 'events' => [], From 57194fc76110a7c98341468ef3bc6990c9da3325 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 10 Jun 2020 11:42:47 +0200 Subject: [PATCH 069/134] adding new classes, changed classes --- .../views/tpl/documents/invoice/invoice.tpl | 12 ++++---- out/src/css/pdfStyling.css | 29 ++++++------------- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 71075d8..4d44aba 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -53,8 +53,9 @@ [{block name="articleCosts"}] - [{* ++++++Artikelzusammenfassung++++++ *}] - - [{* ++++++Kosten der Bestellung++++++ *}] - + {/block}
+ [{block name="d3_article_costs_summary"}] + [{* ++++++Beschreibung der Kostensummierung++++++ *}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
[{if $order->getFormattedDiscount() != 0}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
@@ -64,11 +65,11 @@
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+ [{* ++++++Kostensummierung++++++ *}] +
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
[{if $order->getFormattedDiscount() != 0}]
-[{$order->getFormattedDiscount()}] [{$currency->name}]
@@ -79,6 +80,7 @@
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
[{/block}] diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 334554e..11cf028 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -16,7 +16,7 @@ table{ font-size: 12px; } .order_sum{ - margin-left: 181px; + margin-left: 300px; } .order_sumNum{ margin-right: -2.2px; @@ -24,20 +24,12 @@ table{ .border-bottom{ border-bottom: solid 0.15mm #000; } -.paddingTop{ +.hermes{ padding-top: 5px; } -.paddingBottom{ +.mercurius{ padding-bottom: 5px; } - -.paddingTop15{ - padding-top: 10px; -} -.marginTop5{ - padding-top: 5px; -} - .spacing_order_info{ padding-bottom: 5px; padding-top: 5px; @@ -58,18 +50,11 @@ table{ border-top: solid 1px #000; } -.borderSpacingUnset{ - border-spacing: 0; -} - /*pdf_heading*/ .pdf_heading_table{ width: 100%; margin-top: 8mm; } -.marginBottom15{ - margin-bottom: 15px; -} .pdf_heading_width35{ width: 35%; } @@ -167,9 +152,13 @@ table{ width: 100%; border-top: solid 0.15mm #000; } -.article_costs_table_td_width50{ - width: 50%; +.article_costs_table_desc_width70{ + width: 70%; } +.article_costs_table_sum_width30{ + width: 30%; +} + .article_costs_table_paddingRight{ padding-right: -3px; } From 30f8cebe11762333d0f25d631c30c40a3f00f496 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Wed, 10 Jun 2020 14:21:17 +0200 Subject: [PATCH 070/134] fix syntax error in invoice tpl template --- Application/views/tpl/documents/invoice/invoice.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 89ce016..e959f98 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -85,7 +85,7 @@
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
- {/block} + [{/block}] [{/block}] From f566ed025a71beb4e4b908a95af7228358ae697d Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 10 Jun 2020 15:36:22 +0200 Subject: [PATCH 071/134] outsource article_cost_summary and included it + metadata entry --- .../d3_article_costs_summary.tpl | 26 +++++++++++ .../views/tpl/documents/invoice/invoice.tpl | 46 ++++--------------- metadata.php | 1 + 3 files changed, 35 insertions(+), 38 deletions(-) create mode 100644 Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl diff --git a/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl b/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl new file mode 100644 index 0000000..a25ad8d --- /dev/null +++ b/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl @@ -0,0 +1,26 @@ +[{* ++++++Beschreibung der Kostensummierung++++++ *}] + +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$productVats key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+ +[{* ++++++Kostensummierung++++++ *}] + +
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+ \ 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 e959f98..21d62bf 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -18,18 +18,13 @@ [{/block}] - [{* +++++ fold and punch marks +++++ *}] - [{block name="pdfDIN5008Markings"}] - [{include file="d3din5008.tpl"}] - [{/block}] - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="d3invoice_pdf_addressarea.tpl"}] + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file="d3invoice_pdf_addressarea.tpl"}] + [{/block}] [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] + [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] @@ -59,32 +54,7 @@
[{block name="d3_article_costs_summary"}] - [{* ++++++Beschreibung der Kostensummierung++++++ *}] - - [{* ++++++Kostensummierung++++++ *}] - + [{include file="d3_article_costs_summary.tpl"}] [{/block}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$productVats key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
@@ -93,4 +63,4 @@ [{include file="d3invoice_pdf_conclusion.tpl"}] [{/block}] -
\ No newline at end of file +
diff --git a/metadata.php b/metadata.php index 9328a04..a3bad85 100644 --- a/metadata.php +++ b/metadata.php @@ -60,6 +60,7 @@ $aModule = [ 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', 'd3invoice_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.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', 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl', 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl', From 3fdc01a68bc3783d6416bddaef5d9b176c5510bd Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 11 Jun 2020 01:26:16 +0200 Subject: [PATCH 072/134] add dev mode --- .../AbstractClasses/pdfdocumentsGeneric.php | 101 +++++++++- .../views}/admin/blocks/order_overview.tpl | 0 .../views/admin/de/pdfdocuments_lang.php | 4 + Modules/out/src/deliverynote.css | 18 -- Modules/out/src/offers.css | 24 --- Modules/out/src/pdfInvoiceCorrection.css | 32 ---- Modules/out/src/pdfStyling.css | 173 ------------------ metadata.php | 5 +- 8 files changed, 106 insertions(+), 251 deletions(-) rename {views => Application/views}/admin/blocks/order_overview.tpl (100%) rename views/admin/de/auftragsbestaetigung_lang.php => Application/views/admin/de/pdfdocuments_lang.php (96%) delete mode 100644 Modules/out/src/deliverynote.css delete mode 100644 Modules/out/src/offers.css delete mode 100644 Modules/out/src/pdfInvoiceCorrection.css delete mode 100644 Modules/out/src/pdfStyling.css diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index dbb7a54..a628ba9 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -69,12 +69,13 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface { $oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties()); $oPdf->setTestIsImage(false); - $oPdf->writeHTML($this->getHTMLContent($iSelLang)); + $htmlContent = $this->getHTMLContent($iSelLang); + $oPdf->writeHTML($htmlContent); $oPdf->pdf->SetAuthor(Registry::getConfig()->getActiveShop()->getFieldData('oxname')); $oPdf->pdf->SetTitle(Registry::getLang()->translateString($this->getTitleIdent())); $oPdf->pdf->SetCreator('D³ PDF Documents for OXID eShop'); $oPdf->pdf->SetSubject(NULL); - return $oPdf->output($sFilename, $target); + return $this->output($oPdf, $sFilename, $target, $htmlContent); } /** @@ -179,7 +180,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function getPdfProperties() { - return [self::PDF_ORIENTATION_PORTRAIT, 'A4', 'de']; + $orientation = self::PDF_ORIENTATION_PORTRAIT; + $format = 'A4'; + $lang = 'de'; + $unicode = true; + $encoding = 'UTF-8'; + $margins = [0, 0, 0, 0]; + $pdfa = true; + return [$orientation, $format, $lang, $unicode, $encoding, $margins, $pdfa]; } /** @@ -243,4 +251,91 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface { return false; } + + public function output(Html2Pdf $oPdf, $sFilename, $target, $html) + { + if ((bool) Registry::getConfig()->getConfigParam('d3PdfDocumentsbDev') === true) { + return $this->outputDev($oPdf, $sFilename, $target, $html); + } else { + return $oPdf->output($sFilename, $target); + } + } + + /** + * @param Html2Pdf $oPdf + * @param $sFilename + * @param $target + * @param $html + * @return mixed + */ + public function outputDev(Html2Pdf $oPdf, $sFilename, $target, $html) + { + $sFilename = str_replace('.pdf', '.html', $sFilename); + + switch($target) { + case 'I': { + // Send PDF to the standard output + if (ob_get_contents()) { + $oPdf->pdf->Error('Some data has already been output, can\'t send PDF file'); + } + if (php_sapi_name() != 'cli') { + //We send to a browser + header('Content-Type: text/html'); + if (headers_sent()) { + $oPdf->pdf->Error('Some data has already been output to browser, can\'t send PDF file'); + } + header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 + header('Pragma: public'); + header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + header('Content-Length: '.strlen($html)); + header('Content-Disposition: inline; filename="'.basename($sFilename).'";'); + } + echo $html; + break; + } + case 'D': { + // Download PDF as file + if (ob_get_contents()) { + $oPdf->pdf->Error('Some data has already been output, can\'t send PDF file'); + } + header('Content-Description: File Transfer'); + if (headers_sent()) { + $oPdf->pdf->Error('Some data has already been output to browser, can\'t send PDF file'); + } + header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 + header('Pragma: public'); + header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + // force download dialog + header('Content-Type: application/force-download'); + header('Content-Type: application/octet-stream', false); + header('Content-Type: application/download', false); + header('Content-Type: text/html', false); + // use the Content-Disposition header to supply a recommended filename + header('Content-Disposition: attachment; filename="'.basename($sFilename).'";'); + header('Content-Transfer-Encoding: binary'); + header('Content-Length: '.strlen($html)); + echo $html; + break; + } + case 'F': { + // Save PDF to a local file + $f = fopen($sFilename, 'wb'); + if (!$f) { + $oPdf->pdf->Error('Unable to create output file: '.$sFilename); + } + fwrite($f, $html, strlen($html)); + fclose($f); + break; + } + case 'S': { + // Returns PDF as a string + return $html; + } + default: { + $oPdf->pdf->Error('Incorrect output destination: '.$target); + } + } + } } \ No newline at end of file diff --git a/views/admin/blocks/order_overview.tpl b/Application/views/admin/blocks/order_overview.tpl similarity index 100% rename from views/admin/blocks/order_overview.tpl rename to Application/views/admin/blocks/order_overview.tpl diff --git a/views/admin/de/auftragsbestaetigung_lang.php b/Application/views/admin/de/pdfdocuments_lang.php similarity index 96% rename from views/admin/de/auftragsbestaetigung_lang.php rename to Application/views/admin/de/pdfdocuments_lang.php index ef5505d..bf3d76d 100644 --- a/views/admin/de/auftragsbestaetigung_lang.php +++ b/Application/views/admin/de/pdfdocuments_lang.php @@ -15,6 +15,10 @@ $sLangName = "Deutsch"; $aLang = array( 'charset' => 'utf-8', + + 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen', + 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus', + 'ORDER_OVERVIEW_PDF_auftragsbestaetigung' => 'Auftragsbestätigung', 'ORDER_OVERVIEW_PDF_auftragsbestaetigung_TEXTAREA' => 'Text für Auftragsbestätigung', 'ORDER_OVERVIEW_PDF_AUFTRAGSNUMMER' => 'Auftragsbestätigung:', diff --git a/Modules/out/src/deliverynote.css b/Modules/out/src/deliverynote.css deleted file mode 100644 index 900f0ea..0000000 --- a/Modules/out/src/deliverynote.css +++ /dev/null @@ -1,18 +0,0 @@ -.deliverynote_width_amount{ - width: 20px; -} -.deliverynote_width_artnum{ - width: 80px; -} -.deliverynote_width_desc{ - width: 469.5px; -} -.textAlignLeft{ - text-align: left; -} -.paddingLeft{ - padding-left: 2.4px; -} -.deliveryNote_paddingTop20{ - padding-top: 20px; -} \ No newline at end of file diff --git a/Modules/out/src/offers.css b/Modules/out/src/offers.css deleted file mode 100644 index b5c01c2..0000000 --- a/Modules/out/src/offers.css +++ /dev/null @@ -1,24 +0,0 @@ -.offers_subTitle_font14{ - font-size: 14px; -} -.helvetica{ - font-family: helvetica; -} -.offers_width50{ - width: 50%; -} -.offers_width100{ - width: 100%; -} -.offers_margin_top20{ - margin-top: 20px; -} -.offers_margin_bottom20{ - margin-bottom: 20px; -} -.offers_pstThank_margin_top20{ - margin-top: 20px; -} -.offers_pstThank_font20{ - font-size: 20px; -} diff --git a/Modules/out/src/pdfInvoiceCorrection.css b/Modules/out/src/pdfInvoiceCorrection.css deleted file mode 100644 index 2c2ec33..0000000 --- a/Modules/out/src/pdfInvoiceCorrection.css +++ /dev/null @@ -1,32 +0,0 @@ -.invoiceCorrection_width_40{ - width: 40%; -} -.invoiceCorrection_width_60{ - width: 60%; -} -.invoiceCorrection_font8{ - font-size: 8px; -} -.invoiceCorrection_font9{ - font-size: 9px; -} -.invoiceCorrection_tableMarginTop15{ - margin-top: 15px; -} -.invoiceCorrection_spacingLeft20{ - margin-left: 73.6px; -} - -.invoiceCorrectionPaddingTop4{ - padding-top: 4px; -} -.invoiceCorrectionPaddingTop5{ - padding-top: 5px; -} - -.invoiceCorrectionPaddingBottom20{ - padding-bottom: 20px; -} -.invoiceCorrectionPaddingBottom16{ - padding-bottom: 16px; -} diff --git a/Modules/out/src/pdfStyling.css b/Modules/out/src/pdfStyling.css deleted file mode 100644 index fd30784..0000000 --- a/Modules/out/src/pdfStyling.css +++ /dev/null @@ -1,173 +0,0 @@ -/*debug hilfe*/ -.eraseBug{ - border: dashed blueviolet 1px; -} - -table{ - font-family: "helvetica"; -} -.aligning{ - text-align: right; -} -.vertical-a{ - vertical-align: top; -} -.fontSize12{ - font-size: 12px; -} -.order_sum{ - margin-left: 181px; -} -.order_sumNum{ - margin-right: -2.2px; -} -.border-bottom{ - border-bottom: solid 0.15mm #000; -} -.paddingTop{ - padding-top: 5px; -} -.paddingBottom{ - padding-bottom: 5px; -} -.spacing_order_info{ - padding-bottom: 5px; - padding-top: 5px; -} - -/*pdf_header*/ -.pdf_header_positioning{ - position: absolute; - top: 30px; - right: 44px; -} - -/*pdf_footer*/ -.pdf_footer_table{ - width: 688px; - font-size: 9px; - margin: 0 30px 0 30px; - border-top: solid 1px #000; -} - -/*pdf_heading*/ -.pdf_heading_table{ - width: 100%; - margin-top: 8mm; -} -.pdf_heading_width35{ - width: 35%; -} -.pdf_heading_fontSize8{ - font-size: 8px; -} -.pdf_heading_width65{ - width: 65%; -} -.pdf_heading_fontSize12{ - font-size: 12px; -} - -/*heading_order_information*/ -.heading_order_paddingTop10{ - padding-top: 10px; -} -.heading_order_width35{ - width: 35%; -} -.heading_order_paddingTopSub5{ - padding-top: -5px; -} -.heading_order_paddingTop1{ - padding-top: 1mm; -} -.heading_order_fontSize15{ - font-size: 15px; -} -.heading_order_paddingTop22{ - padding-top: 22px; -} -.heading_order_paddingBottom8{ - padding-bottom: 8px; -} -.heading_order_paddingBottom15{ - padding-bottom: 15px; -} -.heading_order_fontSize10{ - font-size: 10px; -} -.heading_order_paddingTopSub5{ - padding-top: -5px; -} -.heading_order_width65{ - width: 65%; -} - -/*order_article_listing*/ -.order_article_listing_width_amount{ - width: 20px; -} -.order_article_listing_width_desc{ - width: 398px; -} -.order_article_listing_width_ust{ - width: 10px; -} -.order_article_listing_width_unitPrice{ - width: 90px; -} -.order_article_listing_width_total_Price{ - width: 100px; -} -.order_article_listing_paddingRight52{ - padding-right: 52.1px; -} -.order_article_listing_fontSize{ - font-size: 11px; -} -.order_article_PaddingBottom5{ - padding-bottom: 5px; -} -.order_article_PaddingTop5{ - padding-top: 5px; -} -.order_article_marginTop10{ - margin-top: 10px; -} -.order_article_costs_marginLeftSub3{ - margin-left: -3px; -} -.order_article_costs_paddingRight66{ - padding-right: 65.9px; -} -.order_article_listing_fontSize9{ - font-size: 9px; -} -.order_article_listing_fontSize12{ - font-size: 12px; -} - -/* order_article_costs */ -.article_costs_table{ - width: 100%; - border-top: solid 0.15mm #000; -} -.article_costs_table_td_width50{ - width: 50%; -} -.article_costs_table_paddingRight{ - padding-right: -3px; -} -.order_article_costs_fontSize12{ - font-size: 12px; -} - -/*order_shop_past_thank*/ -.past_thank_width100{ - width: 100%; -} - -/* footer styling */ -.footer_parts{ - width: 33.33%; -} diff --git a/metadata.php b/metadata.php index a3bad85..44baee0 100644 --- a/metadata.php +++ b/metadata.php @@ -72,7 +72,10 @@ $aModule = [ [ 'template' => 'order_overview.tpl', 'block' => 'admin_order_overview_export', - 'file' => 'views/admin/blocks/order_overview.tpl' + 'file' => 'Application/views/admin/blocks/order_overview.tpl' ], + ], + 'settings' => [ + ['group' => $sModuleId.'main', 'name' => $sModuleId.'bDev', 'type' => 'bool', 'value' => false], ] ]; From eeb6283a9696e61f9c7ac9217021e21cee498239 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 11 Jun 2020 01:29:04 +0200 Subject: [PATCH 073/134] change invoice pdf templates --- .../views/tpl/documents/inc/addressarea.tpl | 12 ++ .../views/tpl/documents/inc/backaddress.tpl | 1 + Application/views/tpl/documents/inc/base.tpl | 27 +++ .../views/tpl/documents/inc/din5008.tpl | 17 +- .../views/tpl/documents/inc/header.tpl | 5 +- .../views/tpl/documents/inc/rulers.tpl | 33 ++++ .../invoice/includingFiles/pdfHeader.tpl | 63 +------ .../views/tpl/documents/invoice/invoice.tpl | 154 ++++++++++++------ metadata.php | 4 + out/src/css/pdfStyling.css | 42 ++++- 10 files changed, 245 insertions(+), 113 deletions(-) create mode 100644 Application/views/tpl/documents/inc/addressarea.tpl create mode 100644 Application/views/tpl/documents/inc/backaddress.tpl create mode 100644 Application/views/tpl/documents/inc/base.tpl create mode 100644 Application/views/tpl/documents/inc/rulers.tpl 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*/ From eb88aaf32741f9eb0f6f7ba1fe29a199d24f30a0 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 11 Jun 2020 10:04:48 +0200 Subject: [PATCH 074/134] add: smarty date generation, css-classes; rm unneseccary css-classes, metadata include; --- .../d3_article_costs_summary.tpl | 28 ++++++------- .../invoice/includingFiles/pdfHeader.tpl | 2 +- .../invoice/includingFiles/pdfPastThank.tpl | 2 +- .../views/tpl/documents/invoice/invoice.tpl | 41 +++++++++++++++---- .../tpl/documents/invoice/invoiceNoLogo.tpl | 10 ++--- metadata.php | 1 - 6 files changed, 54 insertions(+), 30 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl b/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl index a25ad8d..a440358 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl @@ -1,26 +1,26 @@ [{* ++++++Beschreibung der Kostensummierung++++++ *}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
[{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
[{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
[{foreach from=$productVats key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
[{* ++++++Kostensummierung++++++ *}] -
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
[{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+
-[{$order->getFormattedDiscount()}] [{$currency->name}]
[{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
\ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl index 0b34150..2a6ceba 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl @@ -47,7 +47,7 @@
[{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_DATE"}][{$smarty.now|date_format:"%d.%m.%G"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]
diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index 9f3f61a..476d247 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -1,5 +1,5 @@ [{block name="pdfPastThankFile"}] - +
[{* +++++++Individueller Zahlungstext+++++++ *}] [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 21d62bf..fc9b870 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -36,15 +36,15 @@ [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - + - - - + + + [{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}] [{$payment->getFieldData('oxdesc')}]
[{$oOrderArticle->oxorderarticles__oxamount->value }]
- [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }] +
[{$oOrderArticle->oxorderarticles__oxamount->value }]
+ [{$oOrderArticle->getFieldData('oxtitle')}] [{$oOrderArticle->getFieldData('oxselvariant')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->getFieldData('oxartnum')}]
[{$oOrderArticle->oxorderarticles__oxvat->value }]
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->getFieldData('oxvat')}]
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
@@ -54,7 +54,32 @@ [{block name="d3_article_costs_summary"}] - [{include file="d3_article_costs_summary.tpl"}] + [{* ++++++Beschreibung der Kostensummierung++++++ *}] + + [{* ++++++Kostensummierung++++++ *}] + [{/block}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$productVats key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
diff --git a/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl b/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl index ec23f7f..5ff8b3a 100644 --- a/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl +++ b/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl @@ -57,24 +57,24 @@
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
[{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
[{/if}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
[{foreach from=$productVats key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
[{* ++++++Kosten der Bestellung++++++ *}]
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
[{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+
-[{$order->getFormattedDiscount()}] [{$currency->name}]
[{/if}]
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
diff --git a/metadata.php b/metadata.php index a3bad85..9328a04 100644 --- a/metadata.php +++ b/metadata.php @@ -60,7 +60,6 @@ $aModule = [ 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', 'd3invoice_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.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', 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl', 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl', From 49b128c42969897e253e867c0f3b2e9e2d0e3fc5 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 11 Jun 2020 10:07:21 +0200 Subject: [PATCH 075/134] change PDF logo resolution --- Application/views/tpl/documents/inc/header.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/views/tpl/documents/inc/header.tpl b/Application/views/tpl/documents/inc/header.tpl index cb26520..7a46a03 100644 --- a/Application/views/tpl/documents/inc/header.tpl +++ b/Application/views/tpl/documents/inc/header.tpl @@ -3,9 +3,9 @@ [{block name="pdfToping"}]
[{if $showLogo}] - [{assign var="logoUrl" value=$oViewConf->getImageUrl('Elektroversand-Schmidt_Logo_180.jpg')}] + [{assign var="logoUrl" value=$oViewConf->getImageUrl('Elektroversand-Schmidt_Logo_360.jpg')}] [{if $logoUrl}] - + [{/if}] [{/if}]
From 86521638b9e3613c401450989323360552e3c247 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 11 Jun 2020 10:19:31 +0200 Subject: [PATCH 076/134] add: database require, nl2br --- .../documents/invoice/includingFiles/pdfPastThank.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index 476d247..e020a45 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -1,14 +1,14 @@ [{block name="pdfPastThankFile"}] + [{* +++++++Individueller Zahlungstext+++++++ *}] - [{if $order->oxorder__d3pdftextbestellbestaetigung->value}] - - [{else}] - + [{if $order->getFieldData('d3pdftextbestellbestaetigung')}] + [{/if}] + [{**Schlusstext/ Abschied***}] - +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}] [{$payment->getFieldData('oxdesc')}]
[{$order->oxorder__d3pdftextbestellbestaetigung->value}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER"}]
[{$order->getFieldData('d3pdftextbestellbestaetigung')|nl2br}]
[{$payment->getFieldData('d3shortdescpdf')|nl2br}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
[{/block}] \ No newline at end of file From c91fecbca8f5e06d862d81128d180cf859f89cf3 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 11 Jun 2020 10:20:39 +0200 Subject: [PATCH 077/134] add: css-classes; rm: unneseccary css-classes --- .../tpl/documents/deliverynote/deliverynote.tpl | 10 +++++----- .../documents/deliverynote/deliverynoteNoLogo.tpl | 10 +++++----- Modules/out/src/pdfStyling.css | 4 ++-- out/src/css/pdfStyling.css | 15 ++++++++++++--- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Application/views/tpl/documents/deliverynote/deliverynote.tpl b/Application/views/tpl/documents/deliverynote/deliverynote.tpl index 6c84a03..beea02d 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynote.tpl @@ -60,24 +60,24 @@
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
[{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
[{/if}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
[{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
[{ ++++++Kosten der Bestellung++++++ }]
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
[{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+
-[{$order->getFormattedDiscount()}] [{$currency->name}]
[{/if}]
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
diff --git a/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl b/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl index 66e8e60..1af284c 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl @@ -60,24 +60,24 @@
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
[{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
[{/if}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
[{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
[{ ++++++Kosten der Bestellung++++++ }]
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
[{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+
-[{$order->getFormattedDiscount()}] [{$currency->name}]
[{/if}]
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
diff --git a/Modules/out/src/pdfStyling.css b/Modules/out/src/pdfStyling.css index fd30784..c44fd41 100644 --- a/Modules/out/src/pdfStyling.css +++ b/Modules/out/src/pdfStyling.css @@ -16,7 +16,7 @@ table{ font-size: 12px; } .order_sum{ - margin-left: 181px; + margin-left: 300px; } .order_sumNum{ margin-right: -2.2px; @@ -30,7 +30,7 @@ table{ .paddingBottom{ padding-bottom: 5px; } -.spacing_order_info{ +.paddingTopBottom5{ padding-bottom: 5px; padding-top: 5px; } diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 11cf028..6a7e287 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -24,13 +24,18 @@ table{ .border-bottom{ border-bottom: solid 0.15mm #000; } -.hermes{ +.paddingTop10{ + padding-top: 10px +} + +.paddingTop{ padding-top: 5px; } -.mercurius{ +.paddingBottom{ padding-bottom: 5px; } -.spacing_order_info{ + +.paddingTopBottom5{ padding-bottom: 5px; padding-top: 5px; } @@ -55,6 +60,10 @@ table{ width: 100%; margin-top: 8mm; } +.paddingTop10{ + padding-top: 10px; +} + .pdf_heading_width35{ width: 35%; } From 5c0601ebaa1269bca97ab93c2775e11d57b42665 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Thu, 11 Jun 2020 11:50:34 +0200 Subject: [PATCH 078/134] add: css-classes --- out/src/css/pdfInvoiceCorrection.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/out/src/css/pdfInvoiceCorrection.css b/out/src/css/pdfInvoiceCorrection.css index 2c2ec33..a2a6cfb 100644 --- a/out/src/css/pdfInvoiceCorrection.css +++ b/out/src/css/pdfInvoiceCorrection.css @@ -1,9 +1,17 @@ -.invoiceCorrection_width_40{ - width: 40%; +.invoiceCorrection_pdf_heading_table{ + width: 678px; + margin-top: 8mm; } -.invoiceCorrection_width_60{ - width: 60%; +.invoiceCorrection_width_20{ + width: 20%; } +.invoiceCorrection_width_80{ + width: 80% +} +.iC_paddingBottom10{ + padding-bottom: 10px; +} + .invoiceCorrection_font8{ font-size: 8px; } From b6eeff3119e46dee7f1bdc16f00922f937481c65 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 09:45:42 +0200 Subject: [PATCH 079/134] add: include, Line breaks --- .../includingFiles/heidelpay_bank_data.tpl | 23 ++++++++++ .../invoice/includingFiles/pdfPastThank.tpl | 43 ++++++++++++++++--- metadata.php | 4 +- 3 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl diff --git a/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl b/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl new file mode 100644 index 0000000..a9a11f3 --- /dev/null +++ b/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl @@ -0,0 +1,23 @@ +[{block name="heidelpay_bank_data"}] + [{d3modcfgcheck modid="d3heidelpay"}][{/d3modcfgcheck}] + + [{if $mod_d3heidelpay}] + [{assign var="oPrePaymentData" value=$order->getHeidelpayBankTransferData()}] + [{if $oPrePaymentData}] +
+

[{oxmultilang ident="BANK_DETAILS"}]

+

+ [{oxmultilang ident="D3_HEIDELPAY_BANK_INFO"}]
+ [{oxmultilang ident="D3_HEIDELPAY_PURPOSE_OF_USE"}]

+ [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_ACCOUNTHOLDER"}] [{$oPrePaymentData->Holder}]
+ [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_IBAN"}] [{$oPrePaymentData->Iban}]
+ [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_BIC"}] [{$oPrePaymentData->Bic}]
+ hier shortID: [{$oPrePaymentData->getShortId()}] + [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_AMOUNT"}] [{$order->getFormattedTotalOrderSum()}] [{$oPrePaymentData->Currency}]
+ [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_REASON"}] [{$oPrePaymentData->Reference}] +

+
+

+ [{/if}] + [{/if}] +[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index e020a45..2ffdea5 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -1,14 +1,43 @@ [{block name="pdfPastThankFile"}] - - + + + [{* +++++++Individueller Zahlungstext+++++++ *}] [{if $order->getFieldData('d3pdftextbestellbestaetigung')}] - + + + [{/if}] - + [{d3modcfgcheck modid="d3heidelpay"}][{/d3modcfgcheck}] + [{if $mod_d3heidelpay}] + + + + [{else}] + + + + [{/if}] [{**Schlusstext/ Abschied***}] - - + + + + + +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}] [{$payment->getFieldData('oxdesc')}]
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}] + [{$payment->getFieldData('oxdesc')}] +
[{$order->getFieldData('d3pdftextbestellbestaetigung')|nl2br}]
+ [{$order->getFieldData('d3pdftextbestellbestaetigung')|nl2br}] +
[{$payment->getFieldData('d3shortdescpdf')|nl2br}]
+ [{include file="d3Heidelpay_bank_data.tpl"}] +
+ [{$payment->getFieldData('d3shortdescpdf')|nl2br}] +
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}]
+ [{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}] +
+ [{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}] +
-[{/block}] \ No newline at end of file +[{/block}] diff --git a/metadata.php b/metadata.php index 9328a04..dc7a729 100644 --- a/metadata.php +++ b/metadata.php @@ -64,7 +64,9 @@ $aModule = [ 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl', 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl', 'd3din5008.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/din5008.tpl', - 'd3pdfstyle.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css' + 'd3pdfstyle.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css', + + 'd3Heidelpay_bank_data.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl' ], 'events' => [], 'blocks' => [ From a2129673076897d6a6d002877084d4a57619137b Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 10:27:21 +0200 Subject: [PATCH 080/134] add: code - line breaks; rm unnecessary method --- .../invoice/includingFiles/heidelpay_bank_data.tpl | 1 - Application/views/tpl/documents/invoice/invoice.tpl | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl b/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl index a9a11f3..3beb2f2 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl @@ -12,7 +12,6 @@ [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_ACCOUNTHOLDER"}] [{$oPrePaymentData->Holder}]
[{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_IBAN"}] [{$oPrePaymentData->Iban}]
[{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_BIC"}] [{$oPrePaymentData->Bic}]
- hier shortID: [{$oPrePaymentData->getShortId()}] [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_AMOUNT"}] [{$order->getFormattedTotalOrderSum()}] [{$oPrePaymentData->Currency}]
[{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_REASON"}] [{$oPrePaymentData->Reference}]

diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index fc9b870..6c1b6d2 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -37,11 +37,15 @@ [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}]
[{$oOrderArticle->oxorderarticles__oxamount->value }]
-
+ +
[{$oOrderArticle->getFieldData('oxtitle')}] [{$oOrderArticle->getFieldData('oxselvariant')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->getFieldData('oxartnum')}] -
+ + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->getFieldData('oxartnum')}] + +
+
[{$oOrderArticle->getFieldData('oxvat')}]
[{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}]
[{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
From feca5990d2ee6e9afe777ba2d60c658a774b8270 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 11:11:56 +0200 Subject: [PATCH 081/134] add: css-classes, reordering article listing --- .../documents/deliverynote/deliverynote.tpl | 75 +++++++------------ out/src/css/deliverynote.css | 30 +++++++- 2 files changed, 51 insertions(+), 54 deletions(-) diff --git a/Application/views/tpl/documents/deliverynote/deliverynote.tpl b/Application/views/tpl/documents/deliverynote/deliverynote.tpl index beea02d..5503fab 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynote.tpl @@ -26,65 +26,40 @@ [{/block}] [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] - +
- - - + + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - [{* - - - - - - *}] - - - + + [{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}] +
+
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}] +
+
[{$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__oxartnum->value }]
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{$oOrderArticle->oxorderarticles__oxselvariant->getRawValue()}]
+
+ [{$oOrderArticle->getFieldData('oxamount')}] +
+
+
+ [{$oOrderArticle->getFieldData('oxtitle')}] [{$oOrderArticle->getFieldData('oxselvariant')}]
+ + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->getFieldData('oxartnum')}] + +
+
[{/block}] - [{block name="articleCosts"}] - [{* - - [{ ++++++Artikelzusammenfassung++++++ }] - - [{ ++++++Kosten der Bestellung++++++ }] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
*}] - [{/block}] + [{block name="articleCosts"}][{/block}] [{block name="pdfPastThankFile"}] [{include file="d3delnote_pdf_conclusion.tpl"}] [{/block}] diff --git a/out/src/css/deliverynote.css b/out/src/css/deliverynote.css index 900f0ea..380994a 100644 --- a/out/src/css/deliverynote.css +++ b/out/src/css/deliverynote.css @@ -1,11 +1,33 @@ -.deliverynote_width_amount{ - width: 20px; +.deliveryNote_table{ + width: 678px; +} +.dN_width20{ + width: 20%; +} +.dN_width80{ + width: 80%; +} +.dN_paddingTopBottom5{ + padding-top: 5px; + padding-bottom: 5px; +} +.dN_fontSize12{ + font-size: 12px; +} +.dN_fontSize8{ + font-size: 8px; +} +.dN_paddingRight52{ + padding-right: 52.1px; +} +.dN_paddingLeft12{ + padding-left: 12.5px } .deliverynote_width_artnum{ width: 80px; } -.deliverynote_width_desc{ - width: 469.5px; +.dN_width_658{ + width: 658px; } .textAlignLeft{ text-align: left; From 5edf1d02dbc69c32be315f90fa8a48f42cf65846 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 13:38:07 +0200 Subject: [PATCH 082/134] changed {if} --- .../views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index 2ffdea5..59af8bf 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -15,7 +15,7 @@ [{/if}] [{d3modcfgcheck modid="d3heidelpay"}][{/d3modcfgcheck}] - [{if $mod_d3heidelpay}] + [{if $order->getHeidelpayBankTransferData()}] [{include file="d3Heidelpay_bank_data.tpl"}] From e60f5fd82febbb6423b286319c9d6fb225d3f113 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 13:38:31 +0200 Subject: [PATCH 083/134] add: css-classes --- out/src/css/pdfStyling.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 6a7e287..eaedeb1 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -179,6 +179,15 @@ table{ .past_thank_width100{ width: 100%; } +.marginTop0{ + margin-top: 0; +} +.marginLeftSub3{ + padding-left: -3.5px; +} +.marginLeft3{ + margin-left: 3px; +} /* footer styling */ .footer_parts{ From 0b901295c9420dd0255935dd1d11854c348e8600 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 14:51:19 +0200 Subject: [PATCH 084/134] add: css-classes --- out/src/css/pdfInvoiceCorrection.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/out/src/css/pdfInvoiceCorrection.css b/out/src/css/pdfInvoiceCorrection.css index a2a6cfb..18e4cbd 100644 --- a/out/src/css/pdfInvoiceCorrection.css +++ b/out/src/css/pdfInvoiceCorrection.css @@ -8,6 +8,16 @@ .invoiceCorrection_width_80{ width: 80% } +.iC_width11{ + width: 11%; +} +.iC_width29{ + width: 29%; +} +.iC_width60{ + width: 60%; +} + .iC_paddingBottom10{ padding-bottom: 10px; } @@ -24,6 +34,9 @@ .invoiceCorrection_spacingLeft20{ margin-left: 73.6px; } +.margin-top7{ + margin-top: 7px; +} .invoiceCorrectionPaddingTop4{ padding-top: 4px; @@ -31,6 +44,9 @@ .invoiceCorrectionPaddingTop5{ padding-top: 5px; } +.paddingTop20{ + padding-top: 20px; +} .invoiceCorrectionPaddingBottom20{ padding-bottom: 20px; From 458cb5bd5b0d588cfe043011a6386adb2aeecc79 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 16:22:17 +0200 Subject: [PATCH 085/134] add: css-classes --- .../deliverynote/includingFiles/pdfHeader.tpl | 52 +++++++++---------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl index 86b0c87..91a16ce 100644 --- a/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl +++ b/Application/views/tpl/documents/deliverynote/includingFiles/pdfHeader.tpl @@ -5,43 +5,39 @@
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
- [{* -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->oxshops__oxtelefon->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
- *}] [{/block}] [{block name="heading_order_information"}] - [{if $order->oxorder__oxbillcompany->value}] -
[{$order->oxorder__oxbillcompany->value}]
- [{/if}] -
[{$order->oxorder__oxbillfname->value}] [{$order->oxorder__oxbilllname->value}]
-
[{$order->oxorder__oxbillstreet->value}] [{$order->oxorder__oxbillstreetnr->value}]
-
[{$order->oxorder__oxbillzip->value}] [{$order->oxorder__oxbillcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
- [{* +++++++Lieferadressen dynamisch+++++++ *}] - [{if $order->oxorder__oxdelstreet->value}] + [{if $order->getFieldData('oxdellname')}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->oxorder__oxdelcompany->value}]
[{$order->oxorder__oxdelcompany->value}]
[{/if}] -
[{$order->oxorder__oxdelfname->value}] [{$order->oxorder__oxdellname->value}]
-
[{$order->oxorder__oxdelstreet->value}] [{$order->oxorder__oxdelstreetnr->value}]
-
[{$order->oxorder__oxdelzip->value}] [{$order->oxorder__oxdelcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
-
[{$shop->oxshops__oxdeladdinfo->value}]
+ [{if $order->oxorder__oxdelcompany->value}] +
[{$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')}]
+ [{else}] + [{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')}]
+ [{/if}] [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] - +
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_QUOTECUSTMNR"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->oxuser__oxcustnr->value}]
-
[{$shop->oxshops__oxcity->value}], [{$smarty.now|date_format:"%d.%m.%G"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->oxshops__oxvatnumber->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->oxorder__oxbillnr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]
+
[{$shop->getFieldData('oxcity')}], [{$smarty.now|date_format:"%d.%m.%G"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}]
[{/block}] @@ -49,12 +45,12 @@
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYNOTE"}][{$order->oxorder__oxordernr->value}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYNOTE"}][{$order->oxorder__oxordernr->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
From abee0865633ce484da8c474cdca94b22dbd770ae Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 16:51:25 +0200 Subject: [PATCH 086/134] rm: space --- .../documents/invoice/includingFiles/heidelpay_bank_data.tpl | 4 ++-- .../tpl/documents/invoice/includingFiles/pdfPastThank.tpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl b/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl index 3beb2f2..2d538eb 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/heidelpay_bank_data.tpl @@ -5,7 +5,7 @@ [{assign var="oPrePaymentData" value=$order->getHeidelpayBankTransferData()}] [{if $oPrePaymentData}]
-

[{oxmultilang ident="BANK_DETAILS"}]

+

[{oxmultilang ident="BANK_DETAILS"}]

[{oxmultilang ident="D3_HEIDELPAY_BANK_INFO"}]
[{oxmultilang ident="D3_HEIDELPAY_PURPOSE_OF_USE"}]

@@ -16,7 +16,7 @@ [{oxmultilang ident="D3HEIDELPAY_EMAIL_PREPAYMENT_REASON"}] [{$oPrePaymentData->Reference}]

-

+
[{/if}] [{/if}] [{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index 59af8bf..a43651c 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -17,7 +17,7 @@ [{d3modcfgcheck modid="d3heidelpay"}][{/d3modcfgcheck}] [{if $order->getHeidelpayBankTransferData()}] - + [{include file="d3Heidelpay_bank_data.tpl"}] @@ -30,7 +30,7 @@ [{/if}] [{**Schlusstext/ Abschied***}] - + [{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}] From a3ee335358bebee857e5e0384518d2399bd2afd4 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 17:01:27 +0200 Subject: [PATCH 087/134] #9764 rm: bug finding support --- .../tpl/documents/invoice/includingFiles/pdfPastThank.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl index a43651c..3d18639 100644 --- a/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl +++ b/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl @@ -17,7 +17,7 @@ [{d3modcfgcheck modid="d3heidelpay"}][{/d3modcfgcheck}] [{if $order->getHeidelpayBankTransferData()}] - + [{include file="d3Heidelpay_bank_data.tpl"}] @@ -30,7 +30,7 @@ [{/if}] [{**Schlusstext/ Abschied***}] - + [{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}] From 42810b892af5423fff4fe05c1cdc0617a549ecec Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Fri, 12 Jun 2020 17:09:31 +0200 Subject: [PATCH 088/134] #9776 rm: spacing --- out/src/css/pdfStyling.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index eaedeb1..247b774 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -179,6 +179,9 @@ table{ .past_thank_width100{ width: 100%; } +.paddingBottomSub10{ + padding-bottom: -10px; +} .marginTop0{ margin-top: 0; } From be187280240f582a3d97f8249a4ed3435eef24e3 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 13 Jun 2020 22:43:57 +0200 Subject: [PATCH 089/134] change invoice templates --- .../AbstractClasses/pdfdocumentsGeneric.php | 2 +- .../views/tpl/documents/inc/din5008.tpl | 17 ---- .../inc/{ => elements}/addressarea.tpl | 6 +- .../tpl/documents/inc/elements/foldmarks.tpl | 32 +++++++ .../views/tpl/documents/inc/header.tpl | 9 -- .../views/tpl/documents/inc/helper/rulers.tpl | 39 +++++++++ .../tpl/documents/inc/{ => page}/base.tpl | 4 +- .../tpl/documents/inc/{ => page}/footer.tpl | 0 .../views/tpl/documents/inc/page/header.tpl | 9 ++ .../returnaddress.tpl} | 0 .../views/tpl/documents/inc/rulers.tpl | 33 -------- .../views/tpl/documents/invoice/invoice.tpl | 28 +++---- metadata.php | 23 ++--- out/src/css/pdfStyling.css | 83 +++++++++---------- 14 files changed, 154 insertions(+), 131 deletions(-) delete mode 100644 Application/views/tpl/documents/inc/din5008.tpl rename Application/views/tpl/documents/inc/{ => elements}/addressarea.tpl (69%) create mode 100644 Application/views/tpl/documents/inc/elements/foldmarks.tpl delete mode 100644 Application/views/tpl/documents/inc/header.tpl create mode 100644 Application/views/tpl/documents/inc/helper/rulers.tpl rename Application/views/tpl/documents/inc/{ => page}/base.tpl (64%) rename Application/views/tpl/documents/inc/{ => page}/footer.tpl (100%) create mode 100644 Application/views/tpl/documents/inc/page/header.tpl rename Application/views/tpl/documents/inc/{backaddress.tpl => page/returnaddress.tpl} (100%) delete mode 100644 Application/views/tpl/documents/inc/rulers.tpl diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index a628ba9..090a547 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -249,7 +249,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function renderTemplateFromAdmin() { - return false; + return true; } public function output(Html2Pdf $oPdf, $sFilename, $target, $html) diff --git a/Application/views/tpl/documents/inc/din5008.tpl b/Application/views/tpl/documents/inc/din5008.tpl deleted file mode 100644 index 97c2aab..0000000 --- a/Application/views/tpl/documents/inc/din5008.tpl +++ /dev/null @@ -1,17 +0,0 @@ -[{* fold marks *}] -
-
- -[{* punch mark *}] -
- - \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/addressarea.tpl b/Application/views/tpl/documents/inc/elements/addressarea.tpl similarity index 69% rename from Application/views/tpl/documents/inc/addressarea.tpl rename to Application/views/tpl/documents/inc/elements/addressarea.tpl index 8228061..93338a2 100644 --- a/Application/views/tpl/documents/inc/addressarea.tpl +++ b/Application/views/tpl/documents/inc/elements/addressarea.tpl @@ -1,12 +1,12 @@ -[{assign var="backaddressfile" value=$backaddressfile|default:"d3pdfbackaddress.tpl"}] +[{assign var="backaddressfile" value=$backaddressfile|default:"d3pdfreturnaddress.tpl"}]
-
+
[{include file=$backaddressfile}]
-
+
[{include file=$addressfile}]
\ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/foldmarks.tpl b/Application/views/tpl/documents/inc/elements/foldmarks.tpl new file mode 100644 index 0000000..4b6ea3c --- /dev/null +++ b/Application/views/tpl/documents/inc/elements/foldmarks.tpl @@ -0,0 +1,32 @@ +[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}] +[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}] + +[{* fold marks *}] +
a
+
b
+ +[{* punch mark *}] +
c
+ + \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/header.tpl b/Application/views/tpl/documents/inc/header.tpl deleted file mode 100644 index 8886cc3..0000000 --- a/Application/views/tpl/documents/inc/header.tpl +++ /dev/null @@ -1,9 +0,0 @@ -[{assign var="showLogo" value=$showLogo|default:true}] - -[{block name="pdfToping"}] -
- [{if $showLogo}] - - [{/if}] -
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/helper/rulers.tpl b/Application/views/tpl/documents/inc/helper/rulers.tpl new file mode 100644 index 0000000..b855f46 --- /dev/null +++ b/Application/views/tpl/documents/inc/helper/rulers.tpl @@ -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 *}] + + + +[{* horizontal *}] +[{section name=rulerItemsHorizontal start=10 step=10 loop=600}] +
+ [{$smarty.section.rulerItemsHorizontal.index}] +
+[{/section}] + +[{* vertical *}] +[{section name=rulerItemsVertical start=0 step=10 loop=600}] +
[{$smarty.section.rulerItemsVertical.index}]
+[{/section}] + + diff --git a/Application/views/tpl/documents/inc/base.tpl b/Application/views/tpl/documents/inc/page/base.tpl similarity index 64% rename from Application/views/tpl/documents/inc/base.tpl rename to Application/views/tpl/documents/inc/page/base.tpl index cd71271..6c2013a 100644 --- a/Application/views/tpl/documents/inc/base.tpl +++ b/Application/views/tpl/documents/inc/page/base.tpl @@ -1,6 +1,8 @@ [{assign var="pageset" value=$pageset|default:"new"}] [{assign var="orientation" value=$orientation|default:"P"}] [{assign var="format" value=$format|default:"A4"}] +[{assign var="defaultPagePadding" value=","|explode:"45,20,20,25"}] +[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}] - + [{foreach from=$pdfBlock_header item="_block"}] [{$_block}] diff --git a/Application/views/tpl/documents/inc/footer.tpl b/Application/views/tpl/documents/inc/page/footer.tpl similarity index 100% rename from Application/views/tpl/documents/inc/footer.tpl rename to Application/views/tpl/documents/inc/page/footer.tpl diff --git a/Application/views/tpl/documents/inc/page/header.tpl b/Application/views/tpl/documents/inc/page/header.tpl new file mode 100644 index 0000000..6c8a11e --- /dev/null +++ b/Application/views/tpl/documents/inc/page/header.tpl @@ -0,0 +1,9 @@ +[{assign var="showLogo" value=$showLogo|default:true}] + +[{block name="pdfHeader"}] +
+ [{if $showLogo}] + + [{/if}] +
+[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/backaddress.tpl b/Application/views/tpl/documents/inc/page/returnaddress.tpl similarity index 100% rename from Application/views/tpl/documents/inc/backaddress.tpl rename to Application/views/tpl/documents/inc/page/returnaddress.tpl diff --git a/Application/views/tpl/documents/inc/rulers.tpl b/Application/views/tpl/documents/inc/rulers.tpl deleted file mode 100644 index 6eb998d..0000000 --- a/Application/views/tpl/documents/inc/rulers.tpl +++ /dev/null @@ -1,33 +0,0 @@ -[{* 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/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 0a28a23..b673ee9 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -1,33 +1,31 @@ [{assign var="currency" value=$order->getOrderCurrency()}] [{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}] [{assign var="productVats" value= $order->getProductVats(false)}] +[{assign var="pagePadding" value=","|explode:"45,20,20,25"}] [{capture append="pdfBlock_style"}] - [{include file="d3pdfstyle.css"}] + [{block name="pdfStyles"}] + [{include file="d3pdfstyles.css"}] + [{/block}] [{/capture}] [{capture append="pdfBlock_header"}] - [{block name="pdfTopingFile"}] + [{block name="pdfHeader"}] [{include file="d3pdfheader.tpl" showLogo=true}] [{/block}] [{/capture}] [{capture append="pdfBlock_content"}] - [{include file="d3pdfrulers.tpl"}] - [{include file="d3din5008.tpl"}] + [{*include file="d3pdfrulers.tpl" pagePadding=$pagePadding*}] + [{include file="d3foldmarks.tpl" pagePadding=$pagePadding}] - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}] - [{/block}] + [{block name="pdfAddressArea"}] + [{include file="d3pdfaddressarea.tpl" addressfile="d3invoice_pdf_addressarea.tpl"}] [{/block}] - - - [{block name="pdfHeading"}] + [{block name="pdfInformations"}] - [{block name="heading_owner_information"}] + [{block name="pdfContactInformations"}] + + +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}]
@@ -116,9 +114,9 @@ [{/capture}] [{capture append="pdfBlock_footer"}] - [{block name="pdfFooterFile"}] + [{block name="pdfFooter"}] [{include file="d3pdffooter.tpl"}] [{/block}] [{/capture}] -[{include file="d3pdfbase.tpl"}] +[{include file="d3pdfbase.tpl" pagePadding=$pagePadding}] diff --git a/metadata.php b/metadata.php index 5a61d66..e844446 100644 --- a/metadata.php +++ b/metadata.php @@ -35,8 +35,8 @@ $sModuleId = 'd3PdfDocuments'; $aModule = [ 'id' => $sModuleId, 'title' => [ - 'de' => $logo.' PDF-Dokumente aus HTML-Templates', - 'en' => $logo.' PDF documents from HTML templates', + 'de' => $logo.' PDF-Dokumente', + 'en' => $logo.' PDF documents', ], 'version' => '1.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', @@ -62,14 +62,17 @@ $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' + 'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl', + 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl', + 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/footer.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', + 'd3foldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl', + + 'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css', + + 'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/helper/rulers.tpl', ], 'events' => [], 'blocks' => [ diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index da6d6ad..6f48574 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -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*/ .eraseBug{ border: dashed blueviolet 1px; @@ -35,48 +76,6 @@ table{ 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_table{ From b8ab0dd104c3a29a79754ce2757bf2c8fa5a4dd9 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sun, 14 Jun 2020 00:46:17 +0200 Subject: [PATCH 090/134] change invoice templates --- .../tpl/documents/inc/elements/foldmarks.tpl | 24 +++---- .../documents/inc/elements/informations.tpl | 27 +++++++ .../views/tpl/documents/inc/helper/rulers.tpl | 2 +- .../views/tpl/documents/inc/page/base.tpl | 2 +- .../views/tpl/documents/inc/page/footer.tpl | 66 +++++++++-------- .../views/tpl/documents/inc/page/header.tpl | 4 ++ .../views/tpl/documents/invoice/invoice.tpl | 71 ++++++------------- metadata.php | 3 +- out/src/css/pdfStyling.css | 34 +++++++-- 9 files changed, 134 insertions(+), 99 deletions(-) create mode 100644 Application/views/tpl/documents/inc/elements/informations.tpl diff --git a/Application/views/tpl/documents/inc/elements/foldmarks.tpl b/Application/views/tpl/documents/inc/elements/foldmarks.tpl index 4b6ea3c..07f3668 100644 --- a/Application/views/tpl/documents/inc/elements/foldmarks.tpl +++ b/Application/views/tpl/documents/inc/elements/foldmarks.tpl @@ -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}] -[{* fold marks *}] -
a
-
b
- -[{* punch mark *}] -
c
- \ No newline at end of file + + +[{* fold marks *}] +
+
+ +[{* punch mark *}] +
\ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/informations.tpl b/Application/views/tpl/documents/inc/elements/informations.tpl new file mode 100644 index 0000000..91c80a2 --- /dev/null +++ b/Application/views/tpl/documents/inc/elements/informations.tpl @@ -0,0 +1,27 @@ +
+
+ [{block name="pdfContactInformations"}] +
[{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')}]
+ [{/block}] +
+ +
+ [{block name="pdfBankaccountInformations"}] +
[{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')}]
+ [{/block}] +
+
+ [{block name="pdfDocumentInformations"}] +
[{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}] +
+
\ No newline at end of file diff --git a/Application/views/tpl/documents/inc/helper/rulers.tpl b/Application/views/tpl/documents/inc/helper/rulers.tpl index b855f46..d8b2824 100644 --- a/Application/views/tpl/documents/inc/helper/rulers.tpl +++ b/Application/views/tpl/documents/inc/helper/rulers.tpl @@ -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}] [{* rulers *}] diff --git a/Application/views/tpl/documents/inc/page/base.tpl b/Application/views/tpl/documents/inc/page/base.tpl index 6c2013a..351bee6 100644 --- a/Application/views/tpl/documents/inc/page/base.tpl +++ b/Application/views/tpl/documents/inc/page/base.tpl @@ -1,7 +1,7 @@ [{assign var="pageset" value=$pageset|default:"new"}] [{assign var="orientation" value=$orientation|default:"P"}] [{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}] - - - - [{block name="pdfTopingFile"}] - [{include file="d3pdfheader.tpl" showLogo=true}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file="d3pdffooter.tpl"}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="d3delnote_pdf_addressarea.tpl"}] - [{/block}] +[{capture append="pdfBlock_style"}] + [{block name="pdfStyles"}] + [{include file="d3pdfstyles.css"}] [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - [{/foreach}] -
-
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}] -
-
-
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}] -
-
-
- [{$oOrderArticle->getFieldData('oxamount')}] -
-
-
- [{$oOrderArticle->getFieldData('oxtitle')}] [{$oOrderArticle->getFieldData('oxselvariant')}]
- - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->getFieldData('oxartnum')}] - -
-
+[{/capture}] + +[{capture append="pdfBlock_header"}] + [{block name="pdfHeader"}] + [{include file="d3pdfheader.tpl" showLogo=$showLogo}] [{/block}] - - [{block name="articleCosts"}][{/block}] - [{block name="pdfPastThankFile"}] +[{/capture}] + +[{capture append="pdfBlock_content"}] + [{* include file="d3pdfrulers.tpl" pagePadding=$pagePadding *}] + [{include file="d3pdffoldmarks.tpl" pagePadding=$pagePadding}] + + [{block name="pdfAddressArea"}] + [{include file="d3pdfaddressarea.tpl" addressfile="d3delnote_pdf_recipient.tpl"}] + [{/block}] + + [{block name="pdfInformations"}] + [{include file="d3pdfinformations.tpl" documentinformationfile="d3delnote_pdf_informations.tpl"}] + [{/block}] + + [{block name="pdfSalutation"}] + [{include file="d3delnote_pdf_salutation.tpl"}] + [{/block}] + + [{block name="pdfArticleList"}] + [{include file="d3pdfarticlelist.tpl" showPrices=false}] + [{/block}] + + [{block name="pdfConclusion"}] [{include file="d3delnote_pdf_conclusion.tpl"}] - [{/block}] - -
\ No newline at end of file + [{/block}] +[{/capture}] + +[{capture append="pdfBlock_footer"}] + [{block name="pdfFooter"}] + [{include file="d3pdffooter.tpl" pagePadding=$pagePadding}] + [{/block}] +[{/capture}] + +[{include file="d3pdfbase.tpl" pagePadding=$pagePadding}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl b/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl index cb28af1..f40d245 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl @@ -1,92 +1 @@ -[{assign var= currency value= $order->getOrderCurrency()}] -[{assign var= deliveryPrice value= $order->getOrderDeliveryPrice()}] - - - - - - [{block name="pdfTopingFile"}] - [{include file="d3pdfheader.tpl" showLogo=false}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file="d3pdffooter.tpl"}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="d3delnote_pdf_addressarea.tpl"}] - [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - [{* - - - - - - *}] - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{$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__oxartnum->value }]
[{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{$oOrderArticle->oxorderarticles__oxselvariant->getRawValue()}]
- [{/block}] - - [{block name="articleCosts"}] - [{* - - [{ ++++++Artikelzusammenfassung++++++ }] - - [{ ++++++Kosten der Bestellung++++++ }] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$order->getVats() key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
*}] - [{/block}] - [{block name="pdfPastThankFile"}] - [{include file="d3delnote_pdf_conclusion.tpl"}] - [{/block}] -
-
\ No newline at end of file +[{include file="d3deliverynote_pdf.tpl" showLogo=false}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl new file mode 100644 index 0000000..f2429dd --- /dev/null +++ b/Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl @@ -0,0 +1,9 @@ +[{block name="informations"}] +
+ [{block name="pdfDocumentInformations"}] +
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$smarty.now|date_format:"%d.%m.%Y"}] +
+ [{/block}] +
+[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl index 662a120..bb4e8c3 100644 --- a/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl +++ b/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl @@ -1,57 +1,25 @@ -[{block name="pdfHeading"}] - - [{block name="heading_owner_information"}] - - - - [{/block}] - [{block name="heading_order_information"}] - - - - - [{/block}] -
-
[{$shop->oxshops__oxname->value}] - [{$shop->oxshops__oxstreet->value}] - [{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
-
- [{* +++++++Lieferadressen dynamisch+++++++ *}] - [{if $order->getFieldData('oxdellname')}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
- [{if $order->oxorder__oxdelcompany->value}] -
[{$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')}]
- [{else}] - [{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')}]
- [{/if}] - [{*Bestellnummer,Rechnungsvermerk, 'Ihre bestellung vom...'*}] -
-
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_QUOTECUSTMNR"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]
-
[{$shop->getFieldData('oxcity')}], [{$smarty.now|date_format:"%d.%m.%G"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}]
-
- - - - - - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYNOTE"}][{$order->oxorder__oxordernr->value}]
-
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->oxorder__oxorderdate->value|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}]
-
+[{block name="recipientaddress"}] + [{if $order->getFieldData('oxdellname')}] + [{if $order->getFieldData('oxdelcompany')}] +
[{$order->getFieldData('oxdelcompany')}]
+ [{/if}] +
[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]
+ [{if $order->getFieldData('oxdeladdinfo')}] +
[{$order->getFieldData('oxdeladdinfo')}]
+ [{/if}] +
[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]
+
[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]
+
[{$order->getFieldData('oxdelcountry')}]
+ [{else}] + [{if $order->getFieldData('oxbillcompany')}] +
[{$order->getFieldData('oxbillcompany')}]
+ [{/if}] +
[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]
+ [{if $order->getFieldData('oxbilladdinfo')}] +
[{$order->getFieldData('oxbilladdinfo')}]
+ [{/if}] +
[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]
+
[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]
+
[{$order->getFieldData('oxbillcountry')}]
+ [{/if}] [{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl new file mode 100644 index 0000000..58390f8 --- /dev/null +++ b/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl @@ -0,0 +1,7 @@ +[{block name="salutation"}] +
+
Rechnung
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]
+
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}] [{$shop->oxshops__oxname->value}]
+
+[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/addressarea.tpl b/Application/views/tpl/documents/inc/elements/addressarea.tpl index 93338a2..72c3fd3 100644 --- a/Application/views/tpl/documents/inc/elements/addressarea.tpl +++ b/Application/views/tpl/documents/inc/elements/addressarea.tpl @@ -1,4 +1,5 @@ [{assign var="backaddressfile" value=$backaddressfile|default:"d3pdfreturnaddress.tpl"}] +[{assign var="addressfile" value=$addressfile|default:"d3pdfrecipientaddress.tpl"}]
diff --git a/Application/views/tpl/documents/inc/elements/articlelist.tpl b/Application/views/tpl/documents/inc/elements/articlelist.tpl index 7f407f5..52c6519 100644 --- a/Application/views/tpl/documents/inc/elements/articlelist.tpl +++ b/Application/views/tpl/documents/inc/elements/articlelist.tpl @@ -1,5 +1,7 @@ +[{assign var="showPrices" value=$showPrices|default:true}] + [{block name="articlelist"}] - +
- - - + [{if $showPrices}] + + + + [{/if}] [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] @@ -29,25 +33,104 @@ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] - + + + [{/if}] + + [{/foreach}] + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + - - + + + [{/if}] + + [{/foreach}] + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + [{if $showPrices}] + + + + [{/if}] + + [{/foreach}] + [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + + + + [{if $showPrices}] + + + + [{/if}] [{/foreach}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}] @@ -7,15 +9,17 @@ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}] - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}] - - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_UNITPRICE"}] - - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TOTALPRICE"}] - + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}] + + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_UNITPRICE"}] + + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TOTALPRICE"}] +
- [{$oOrderArticle->oxorderarticles__oxvat->value }] + [{if $showPrices}] + + [{$oOrderArticle->oxorderarticles__oxvat->value }] + + [{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}] + + [{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}] +
+ [{$oOrderArticle->oxorderarticles__oxamount->value }] - [{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}] + + [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }] +
+ + [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] +
- [{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}] + [{if $showPrices}] + + [{$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}] +
+ [{$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="d3pdfarticlecostsummary.tpl"}] - [{/block}] - -
-[{/block}] \ No newline at end of file +[{if $showPrices}] + [{block name="articleCosts"}] + + + [{block name="d3_article_costs_summary"}] + [{include file="d3pdfarticlecostsummary.tpl"}] + [{/block}] + +
+ [{/block}] +[{/if}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl b/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl index a9ad966..cacea05 100644 --- a/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl +++ b/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl @@ -1,17 +1,19 @@ [{block name="deliveryaddress"}] [{if $order->getFieldData('oxdelstreet')}]
-
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
[{if $order->getFieldData('oxdelcompany')}] -
[{$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')}]
+
[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]
+ [{if $order->getFieldData('oxdeladdinfo')}] +
[{$order->getFieldData('oxdeladdinfo')}]
+ [{/if}] +
[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]
+
[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]
+
[{$order->getFieldData('oxdelcountry')}]
[{/if}] [{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/foldmarks.tpl b/Application/views/tpl/documents/inc/elements/foldmarks.tpl index 34a9218..9b99fff 100644 --- a/Application/views/tpl/documents/inc/elements/foldmarks.tpl +++ b/Application/views/tpl/documents/inc/elements/foldmarks.tpl @@ -1,4 +1,4 @@ -[{assign var="defaultPagePadding" value=","|explode:"45,20,10,25"}] [{* top, right, bottom, left *}] +[{assign var="defaultPagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}] [{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}] - - - - [{block name="pdfTopingFile"}] - [{include file="d3pdfheader.tpl" showLogo=false}] - [{/block}] - - - [{block name="pdfFooterFile"}] - [{include file="d3pdffooter.tpl"}] - [{/block}] - - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="d3invoice_pdf_addressarea.tpl"}] - [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] - [{block name="articleListing"}] - - - - - - - - - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - - - - - [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}]
[{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}]
- [{/block}] - - [{block name="articleCosts"}] - - - [{* ++++++Artikelzusammenfassung++++++ *}] - - [{* ++++++Kosten der Bestellung++++++ *}] - - -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$productVats key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
- [{/block}] - [{block name="pdfPastThankFile"}] - [{include file="d3invoice_pdf_conclusion.tpl"}] - [{/block}] -
-
\ No newline at end of file +[{include file="d3invoice_pdf.tpl" showLogo=false}] \ No newline at end of file diff --git a/metadata.php b/metadata.php index 4ca27c6..777179e 100644 --- a/metadata.php +++ b/metadata.php @@ -51,13 +51,15 @@ $aModule = [ 'd3deliverynote_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynote.tpl', 'd3deliverynoteNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl', - 'd3delnote_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl', + 'd3delnote_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl', + 'd3delnote_pdf_recipient.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl', + 'd3delnote_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl', 'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/conclusion.tpl', 'd3delnote_pdf_style.css' => 'd3/pdfdocuments/out/src/css/deliverynote.css', 'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoice.tpl', 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', - 'd3invoice_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/recipientAddress.tpl', + 'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/informations.tpl', 'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/salutation.tpl', 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/conclusion.tpl', @@ -67,6 +69,7 @@ $aModule = [ 'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl', 'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl', + 'd3pdfrecipientaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/recipientAddress.tpl', 'd3pdfinformations.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/informations.tpl', 'd3pdfdeladdress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl', 'd3pdfarticlelist.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlelist.tpl', diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index e5044c5..366f541 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -36,6 +36,17 @@ .addressarea .recipientAddress { height: 27.3mm; } +.addressarea .recipientAddress .location, +.deliveryaddress .location { + font-weight: bold; +} +.addressarea .recipientAddress .country { + padding-top: 5mm; +} +.deliveryaddress .headline { + font-size: 10px; + padding-bottom: 2mm; +} .informations { width: 75mm; @@ -78,6 +89,23 @@ padding: 0 2mm; } +.contactinformations, +.bankaccountinformations, +.documentinformations { + margin-bottom: 5mm; +} +.contactinformations div, +.bankaccountinformations div, +.documentinformations div { + text-align: right; + font-size: 11px; +} +.contactinformations div.headline, +.bankaccountinformations div.headline, +.documentinformations div.headline { + font-weight: bold; +} + /*debug hilfe*/ .eraseBug{ border: dashed blueviolet 1px; @@ -178,61 +206,85 @@ table{ } /*order_article_listing*/ -.article_table { +.article_table, +.article_table_prices { width: 100%; margin-top: 5mm; border-spacing: 0; border-collapse: collapse; } .article_table th, -.article_table td { +.article_table td, +.article_table_prices th, +.article_table_prices td { padding-bottom: 2mm; vertical-align: top; } -.article_table th { +.article_table th, +.article_table_prices th { border-bottom: solid 0.15mm #000; font-weight: normal; font-size: 11px; } -.article_table td { +.article_table td, +.article_table_prices td { padding-top: 2mm; font-size: 12px; } .article_table th.amount, -.article_table td.amount, -.article_table th.tax, -.article_table td.tax { +.article_table td.amount { width: 10%; } -.article_table th.tax, -.article_table td.tax { +.article_table_prices th.amount, +.article_table_prices td.amount, +.article_table_prices th.tax, +.article_table_prices td.tax { + width: 10%; +} +.article_table_prices th.tax, +.article_table_prices td.tax { text-align: right; padding-right: 0; } .article_table th.description, .article_table td.description { + width: 90%; +} +.article_table_prices th.description, +.article_table_prices td.description { width: 50%; } -.article_table td.description .artnr { +.article_table td.description .artnr, +.article_table_prices td.description .artnr { font-size: 9px; } -.article_table th.unitPrice, -.article_table td.unitPrice, -.article_table th.totalPrice, -.article_table td.totalPrice { +.article_table_prices th.unitPrice, +.article_table_prices td.unitPrice, +.article_table_prices th.totalPrice, +.article_table_prices td.totalPrice { width: 15%; text-align: right; } -.article_table td.amount { +.article_table td.amount, +.article_table_prices td.amount { text-align: right; padding-right: 10mm; } -.article_table td.unitPrice, -.article_table td.totalPrice { +.article_table_prices td.unitPrice, +.article_table_prices td.totalPrice { text-align: right; padding-right: 0; } +.conclusion_table { + width: 100%; + border-spacing: 0; + border-collapse: collapse; + padding-top: 10mm +} +.conclusion_table td { + font-size: 12px; +} .order_article_listing_width_amount{ width: 20px; } @@ -280,6 +332,7 @@ table{ .article_costs_table{ width: 100%; border-top: solid 0.15mm #000; + border-bottom: solid 0.15mm #000; } .article_costs_table_desc_width70{ width: 70%; From 8a696541198a4effa27abc2ed4a3b6252b6ed186 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 29 Jun 2020 10:52:29 +0200 Subject: [PATCH 098/134] cleanup --- .../views/tpl/admin/orderoverview_pdfform.tpl | 3 +- .../documents/deliverynote/inc/conclusion.tpl | 9 + .../{includingFiles => inc}/informations.tpl | 0 .../deliverynote/inc/recipientAddress.tpl | 25 ++ .../{includingFiles => inc}/salutation.tpl | 2 +- .../includingFiles/conclusion.tpl | 5 - .../includingFiles/recipientAddress.tpl | 25 -- .../inc/elements/articlecostssummary.tpl | 64 ++-- .../{includingFiles => inc}/conclusion.tpl | 0 .../{includingFiles => inc}/informations.tpl | 0 .../{includingFiles => inc}/salutation.tpl | 0 .../includingFiles/recipientAddress.tpl | 12 - metadata.php | 15 +- out/src/css/deliverynote.css | 40 --- out/src/css/pdfStyling.css | 280 ++++-------------- 15 files changed, 151 insertions(+), 329 deletions(-) create mode 100644 Application/views/tpl/documents/deliverynote/inc/conclusion.tpl rename Application/views/tpl/documents/deliverynote/{includingFiles => inc}/informations.tpl (100%) create mode 100644 Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl rename Application/views/tpl/documents/deliverynote/{includingFiles => inc}/salutation.tpl (83%) delete mode 100644 Application/views/tpl/documents/deliverynote/includingFiles/conclusion.tpl delete mode 100644 Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl rename Application/views/tpl/documents/invoice/{includingFiles => inc}/conclusion.tpl (100%) rename Application/views/tpl/documents/invoice/{includingFiles => inc}/informations.tpl (100%) rename Application/views/tpl/documents/invoice/{includingFiles => inc}/salutation.tpl (100%) delete mode 100644 Application/views/tpl/documents/invoice/includingFiles/recipientAddress.tpl delete mode 100644 out/src/css/deliverynote.css diff --git a/Application/views/tpl/admin/orderoverview_pdfform.tpl b/Application/views/tpl/admin/orderoverview_pdfform.tpl index 93a2d5b..27e8ff0 100644 --- a/Application/views/tpl/admin/orderoverview_pdfform.tpl +++ b/Application/views/tpl/admin/orderoverview_pdfform.tpl @@ -5,8 +5,7 @@ - - +
-[{* ++++++Kostensummierung++++++ *}] - \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/includingFiles/conclusion.tpl b/Application/views/tpl/documents/invoice/inc/conclusion.tpl similarity index 100% rename from Application/views/tpl/documents/invoice/includingFiles/conclusion.tpl rename to Application/views/tpl/documents/invoice/inc/conclusion.tpl diff --git a/Application/views/tpl/documents/invoice/includingFiles/informations.tpl b/Application/views/tpl/documents/invoice/inc/informations.tpl similarity index 100% rename from Application/views/tpl/documents/invoice/includingFiles/informations.tpl rename to Application/views/tpl/documents/invoice/inc/informations.tpl diff --git a/Application/views/tpl/documents/invoice/includingFiles/salutation.tpl b/Application/views/tpl/documents/invoice/inc/salutation.tpl similarity index 100% rename from Application/views/tpl/documents/invoice/includingFiles/salutation.tpl rename to Application/views/tpl/documents/invoice/inc/salutation.tpl diff --git a/Application/views/tpl/documents/invoice/includingFiles/recipientAddress.tpl b/Application/views/tpl/documents/invoice/includingFiles/recipientAddress.tpl deleted file mode 100644 index 7a02ef5..0000000 --- a/Application/views/tpl/documents/invoice/includingFiles/recipientAddress.tpl +++ /dev/null @@ -1,12 +0,0 @@ -[{block name="recipientaddress"}] - [{if $order->getFieldData('oxbillcompany')}] -
[{$order->getFieldData('oxbillcompany')}]
- [{/if}] -
[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]
- [{if $order->getFieldData('oxbilladdinfo')}] -
[{$order->getFieldData('oxbilladdinfo')}]
- [{/if}] -
[{$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/metadata.php b/metadata.php index 777179e..022bc2d 100644 --- a/metadata.php +++ b/metadata.php @@ -51,17 +51,16 @@ $aModule = [ 'd3deliverynote_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynote.tpl', 'd3deliverynoteNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl', - 'd3delnote_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl', - 'd3delnote_pdf_recipient.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl', - 'd3delnote_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl', - 'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/includingFiles/conclusion.tpl', - 'd3delnote_pdf_style.css' => 'd3/pdfdocuments/out/src/css/deliverynote.css', + 'd3delnote_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/informations.tpl', + 'd3delnote_pdf_recipient.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl', + 'd3delnote_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/salutation.tpl', + 'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl', 'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoice.tpl', 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', - 'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/informations.tpl', - 'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/salutation.tpl', - 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/conclusion.tpl', + 'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/informations.tpl', + 'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/salutation.tpl', + 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/conclusion.tpl', 'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl', 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl', diff --git a/out/src/css/deliverynote.css b/out/src/css/deliverynote.css deleted file mode 100644 index 380994a..0000000 --- a/out/src/css/deliverynote.css +++ /dev/null @@ -1,40 +0,0 @@ -.deliveryNote_table{ - width: 678px; -} -.dN_width20{ - width: 20%; -} -.dN_width80{ - width: 80%; -} -.dN_paddingTopBottom5{ - padding-top: 5px; - padding-bottom: 5px; -} -.dN_fontSize12{ - font-size: 12px; -} -.dN_fontSize8{ - font-size: 8px; -} -.dN_paddingRight52{ - padding-right: 52.1px; -} -.dN_paddingLeft12{ - padding-left: 12.5px -} -.deliverynote_width_artnum{ - width: 80px; -} -.dN_width_658{ - width: 658px; -} -.textAlignLeft{ - text-align: left; -} -.paddingLeft{ - padding-left: 2.4px; -} -.deliveryNote_paddingTop20{ - padding-top: 20px; -} \ No newline at end of file diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 366f541..c019ec4 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -1,10 +1,13 @@ +table{ + font-family: "helvetica"; +} + .header { padding: 5mm; height: 35mm; width: 100%; position: relative; } - .header img.logo { float: right; margin: 10mm; @@ -18,21 +21,21 @@ height: 45mm; position: relative; } - +.deliveryaddress { + margin-top: 10mm; + height: 27.3mm; +} .addressarea .returnAddress, .addressarea .recipientAddress { position: relative; } - .addressarea .returnAddress { height: 17.7mm; font-size: 8px; } - .addressarea .returnAddress div { padding-top: 3mm; } - .addressarea .recipientAddress { height: 27.3mm; } @@ -54,41 +57,6 @@ top: 5mm; position: absolute; } - -.deliveryaddress { - margin-top: 10mm; - height: 27.3mm; -} - -.salutation { - margin-top: 5mm; -} - -.salutation .documentnumber { - font-weight: bold; -} - -.footer{ - width: 173mm; - font-size: 9px; - position: relative; - margin: 0; - padding: 0; -} - -.footer table { - border-top: solid 1px #000; - width: 100%; - position: relative; -} - -.footerLeft, -.footerCenter, -.footerRight { - width: 33%; - padding: 0 2mm; -} - .contactinformations, .bankaccountinformations, .documentinformations { @@ -106,106 +74,13 @@ font-weight: bold; } -/*debug hilfe*/ -.eraseBug{ - border: dashed blueviolet 1px; +.salutation { + margin-top: 5mm; +} +.salutation .documentnumber { + font-weight: bold; } -table{ - font-family: "helvetica"; -} -.aligning{ - text-align: right; -} -.vertical-a{ - vertical-align: top; -} -.fontSize12{ - font-size: 12px; -} -.order_sum{ - margin-left: 300px; -} -.order_sumNum{ - margin-right: -2.2px; -} -.border-bottom{ - border-bottom: solid 0.15mm #000; -} -.paddingTop10{ - padding-top: 10px -} - -.paddingTop{ - padding-top: 5px; -} -.paddingBottom{ - padding-bottom: 5px; -} - -.paddingTopBottom5{ - padding-bottom: 5px; - padding-top: 5px; -} - - -/*pdf_footer*/ - -/*pdf_heading*/ -.pdf_heading_table{ - width: 100%; - margin-top: 8mm; -} -.paddingTop10{ - padding-top: 10px; -} - -.pdf_heading_width35{ - width: 35%; -} -.pdf_heading_fontSize8{ - font-size: 8px; -} -.pdf_heading_width65{ - width: 65%; -} -.pdf_heading_fontSize12{ - font-size: 12px; -} - -/*heading_order_information*/ -.heading_order_paddingTop10{ - padding-top: 10px; -} -.heading_order_width35{ - width: 35%; -} -.heading_order_paddingTopSub5{ - padding-top: -5px; -} -.heading_order_fontSize15{ - font-size: 15px; -} -.heading_order_paddingTop22{ - padding-top: 22px; -} -.heading_order_paddingBottom8{ - padding-bottom: 8px; -} -.heading_order_paddingBottom15{ - padding-bottom: 15px; -} -.heading_order_fontSize10{ - font-size: 10px; -} -.heading_order_paddingTopSub5{ - padding-top: -5px; -} -.heading_order_width65{ - width: 65%; -} - -/*order_article_listing*/ .article_table, .article_table_prices { width: 100%; @@ -276,6 +151,40 @@ table{ padding-right: 0; } +.article_costs_table{ + width: 100%; + border-top: solid 0.15mm #000; + border-bottom: solid 0.15mm #000; +} +.article_costs_table .description { + padding-right: -3px; + width: 70%; +} +.article_costs_table div { + padding-bottom: 5px; + padding-top: 5px; + font-size: 12px; +} +.article_costs_table .description div { + margin-left: 300px; +} +.article_costs_table .values { + width: 30%; +} +.article_costs_table .values div { + margin-right: -2.2px; + text-align: right; +} +.article_costs_table .sumbrutto, +.article_costs_table .discount, +.article_costs_table .producttax, +.article_costs_table .deliverytax { + border-bottom: solid 0.15mm #000; +} +.article_costs_table .totalsum { + font-weight: bold; +} + .conclusion_table { width: 100%; border-spacing: 0; @@ -285,87 +194,22 @@ table{ .conclusion_table td { font-size: 12px; } -.order_article_listing_width_amount{ - width: 20px; -} -.order_article_listing_width_desc{ - width: 398px; -} -.order_article_listing_width_ust{ - width: 10px; -} -.order_article_listing_width_unitPrice{ - width: 90px; -} -.order_article_listing_width_total_Price{ - width: 100px; -} -.order_article_listing_paddingRight52{ - padding-right: 52.1px; -} -.order_article_listing_fontSize{ - font-size: 11px; -} -.order_article_PaddingBottom5{ - padding-bottom: 5px; -} -.order_article_PaddingTop5{ - padding-top: 5px; -} -.order_article_marginTop10{ - margin-top: 10px; -} -.order_article_costs_marginLeftSub3{ - margin-left: -3px; -} -.order_article_costs_paddingRight66{ - padding-right: 65.9px; -} -.order_article_listing_fontSize9{ + +.footer{ + width: 173mm; font-size: 9px; + position: relative; + margin: 0; + padding: 0; } -.order_article_listing_fontSize12{ - font-size: 12px; -} - -/* order_article_costs */ -.article_costs_table{ +.footer table { + border-top: solid 1px #000; width: 100%; - border-top: solid 0.15mm #000; - border-bottom: solid 0.15mm #000; -} -.article_costs_table_desc_width70{ - width: 70%; -} -.article_costs_table_sum_width30{ - width: 30%; -} - -.article_costs_table_paddingRight{ - padding-right: -3px; -} -.order_article_costs_fontSize12{ - font-size: 12px; -} - -/*order_shop_past_thank*/ -.past_thank_width100{ - width: 100%; -} -.paddingBottomSub10{ - padding-bottom: -10px; -} -.marginTop0{ - margin-top: 0; -} -.marginLeftSub3{ - padding-left: -3.5px; -} -.marginLeft3{ - margin-left: 3px; -} - -/* footer styling */ -.footer_parts{ - width: 33.33%; + position: relative; } +.footerLeft, +.footerCenter, +.footerRight { + width: 33%; + padding: 0 2mm; +} \ No newline at end of file From 38ad7ad33325b46b17cc45cec70e97a5763ec599 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 30 Jun 2020 00:44:07 +0200 Subject: [PATCH 099/134] adjust translations --- .../AbstractClasses/pdfdocumentsGeneric.php | 2 +- .../translations/de/pdfdocuments_lang.php | 66 +++++++++++++++++++ .../translations/en/pdfdocuments_lang.php | 66 +++++++++++++++++++ .../views/admin/de/pdfdocuments_lang.php | 53 --------------- .../views/admin/en/pdfdocuments_lang.php | 21 ++++++ .../deliverynote/inc/informations.tpl | 3 +- .../documents/deliverynote/inc/salutation.tpl | 11 +++- .../inc/elements/articlecostssummary.tpl | 14 ++-- .../documents/inc/elements/articlelist.tpl | 18 ++--- .../documents/inc/elements/informations.tpl | 14 ++-- .../views/tpl/documents/inc/page/footer.tpl | 16 ++--- .../tpl/documents/invoice/inc/conclusion.tpl | 6 +- .../documents/invoice/inc/informations.tpl | 9 +-- .../tpl/documents/invoice/inc/salutation.tpl | 11 +++- out/src/css/pdfStyling.css | 2 +- 15 files changed, 212 insertions(+), 100 deletions(-) create mode 100644 Application/translations/de/pdfdocuments_lang.php create mode 100644 Application/translations/en/pdfdocuments_lang.php create mode 100644 Application/views/admin/en/pdfdocuments_lang.php diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 5a87aa7..4989655 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -257,7 +257,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function renderTemplateFromAdmin() { - return true; + return false; } public function output(Html2Pdf $oPdf, $sFilename, $target, $html) diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php new file mode 100644 index 0000000..ff99efe --- /dev/null +++ b/Application/translations/de/pdfdocuments_lang.php @@ -0,0 +1,66 @@ + + * @link http://www.oxidmodule.com + */ +$sLangName = "Deutsch"; +$aLang = array( + 'charset' => 'utf-8', + + 'D3_PDFDOCUMENTS_THANKYOU_1' => 'Vielen Dank für Ihren Einkauf!', + 'D3_PDFDOCUMENTS_THANKYOU_2' => 'Ihr Team von %1$s', + + 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'So erreichen Sie uns:', + 'D3_PDFDOCUMENTS_TELEFON' => 'Telefon: ', + 'D3_PDFDOCUMENTS_FAX' => 'Fax: ', + 'D3_PDFDOCUMENTS_EMAIL' => 'e-Mail: ', + + 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bankverbindung:', + 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN: ', + 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC: ', + + 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Rechnungs-Nr.: ', + 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Kundennummer: ', + 'D3_PDFDOCUMENTS_DATE' => 'Datum: ', + 'D3_PDFDOCUMENTS_DATE_FORMAT' => '%d.%m.%Y', + 'D3_PDFDOCUMENTS_USTIDNR' => 'Ust.-ID-Nr: ', + + 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', + 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', + 'D3_PDFDOCUMENTS_ORDERNR' => 'Bestellnr.: ', + 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Ihre Bestellung vom %1$s bei "%2$s"', + + 'D3_PDFDOCUMENTS_AMOUNT' => 'Menge', + 'D3_PDFDOCUMENTS_DESCRIPTION' => 'Beschreibung', + 'D3_PDFDOCUMENTS_USTPERCENTAGE' => 'Ust. %: ', + 'D3_PDFDOCUMENTS_UNITPRICE' => 'Einzelpreis', + 'D3_PDFDOCUMENTS_TOTALPRICE' => 'Gesamtpreis', + + 'D3_PDFDOCUMENTS_ARTNR' => 'Art.-Nr.', + + 'D3_PDFDOCUMENTS_SUMBRUTTO' => 'Summe Artikel (brutto)', + 'D3_PDFDOCUMENTS_DISCOUNT' => 'Rabatt', + 'D3_PDFDOCUMENTS_SUMNETTO' => 'Summe Artikel (netto)', + 'D3_PDFDOCUMENTS_TAX' => 'zzgl. MwSt. %1$s %% Betrag', + 'D3_PDFDOCUMENTS_DELIVERY' => 'Versandkosten (netto)', + 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', + + 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise: ', + 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'Den Rechnungsbetrag haben wir dankend erhalten.', + + 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer:', + 'D3_PDFDOCUMENTS_COURT' => 'Amtsgericht ', + 'D3_PDFDOCUMENTS_HRBNR' => 'HRB ', + 'D3_PDFDOCUMENTS_USTID' => 'Ust.-ID: ', + + 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC-/SWIFT-Code: ', +); diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php new file mode 100644 index 0000000..29a6886 --- /dev/null +++ b/Application/translations/en/pdfdocuments_lang.php @@ -0,0 +1,66 @@ + + * @link http://www.oxidmodule.com + */ +$sLangName = "English"; +$aLang = array( + 'charset' => 'utf-8', + + 'D3_PDFDOCUMENTS_THANKYOU_1' => 'Many thanks for your purchase!', + 'D3_PDFDOCUMENTS_THANKYOU_2' => 'Your team from %1$s', + + 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'You can contact us as follows:', + 'D3_PDFDOCUMENTS_TELEFON' => 'Telephone: ', + 'D3_PDFDOCUMENTS_FAX' => 'Fax: ', + 'D3_PDFDOCUMENTS_EMAIL' => 'e-Mail: ', + + 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bank account:', + 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN: ', + 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC: ', + + 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Invoice no.: ', + 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Customer no.: ', + 'D3_PDFDOCUMENTS_DATE' => 'Date: ', + 'D3_PDFDOCUMENTS_DATE_FORMAT' => '%Y-%m-%d', + 'D3_PDFDOCUMENTS_USTIDNR' => 'VAT ID no.: ', + + 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', + 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', + 'D3_PDFDOCUMENTS_ORDERNR' => 'Order no.: ', + 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Your order from %1$s at "%2$s"', + + 'D3_PDFDOCUMENTS_AMOUNT' => 'Amount', + 'D3_PDFDOCUMENTS_DESCRIPTION' => 'Description', + 'D3_PDFDOCUMENTS_USTPERCENTAGE' => 'VAT %: ', + 'D3_PDFDOCUMENTS_UNITPRICE' => 'Unit Price', + 'D3_PDFDOCUMENTS_TOTALPRICE' => 'Total', + + 'D3_PDFDOCUMENTS_ARTNR' => 'Item no.', + + 'D3_PDFDOCUMENTS_SUMBRUTTO' => 'Total products (incl. tax)', + 'D3_PDFDOCUMENTS_DISCOUNT' => 'Discount', + 'D3_PDFDOCUMENTS_SUMNETTO' => 'Total products (excl. tax)', + 'D3_PDFDOCUMENTS_TAX' => 'plus VAT %1$s %% amount', + 'D3_PDFDOCUMENTS_DELIVERY' => 'Shipping costs (net)', + 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Total sum (gross)', + + 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method: ', + 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'We have received the invoice amount with thanks.', + + 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'managing director:', + 'D3_PDFDOCUMENTS_COURT' => 'local court ', + 'D3_PDFDOCUMENTS_HRBNR' => 'HRB ', + 'D3_PDFDOCUMENTS_USTID' => 'VAT ID: ', + + 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC-/SWIFT-Code: ', +); diff --git a/Application/views/admin/de/pdfdocuments_lang.php b/Application/views/admin/de/pdfdocuments_lang.php index ee794c4..2109978 100644 --- a/Application/views/admin/de/pdfdocuments_lang.php +++ b/Application/views/admin/de/pdfdocuments_lang.php @@ -18,57 +18,4 @@ $aLang = array( 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus', - - 'ORDER_OVERVIEW_PDF_auftragsbestaetigung' => 'Auftragsbestätigung', - 'ORDER_OVERVIEW_PDF_auftragsbestaetigung_TEXTAREA' => 'Text für Auftragsbestätigung', - 'ORDER_OVERVIEW_PDF_AUFTRAGSNUMMER' => 'Auftragsbestätigung:', - 'ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1' => 'Vielen Dank für Ihren Einkauf!', - 'ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2' => 'Ihr Team von ', - 'ORDER_OVERVIEW_PDF_auftragsbestaetigung_Alternativtext' => 'Alle Artikel sind ab Lager lieferbar und gehen schnellstmöglich in den Versand.', - 'ORDER_OVERVIEW_PDF_bestellbestaetitung_TEXTAREA' => 'Individueller Zahlungstext', - 'PAYMENT_MAIN_D3SHORTDESCPDF' => 'Rechnungstext', - 'D3_OFFERPDF_FINAL_1' => 'Die hier angegebene Materialzusammenstellung dient lediglich der Unterstützung Ihrer Planung. Sie wurde nach bestem Wissen erstellt, erhebt jedoch keinen Anspruch auf Richtigkeit und Vollständigkeit und ersetzt auch nicht Ihre individuelle Planung. Eine Haftung unsererseits für Richtigkeit und Vollständigkeit wird nicht übernommen.', - 'D3_OFFERPDF_FINAL_2' => 'Alle Preisangaben sind inkl. Kupfer- und Metallzuschlägen.', - 'D3_OFFERPDF_FINAL_3' => 'Dieses Angebot ist 14 Tage gültig.', - 'D3_OFFERPDF_FINAL_4' => 'Wir hoffen, dass Ihnen unser Angebot zusagt und würden uns über Ihren Auftrag freuen.', - - 'ORDER_OVERVIEW_PDF_d3pdftextkostenstelle_kunden' => 'kundenspezifischer Kostenstellen', - 'ORDER_OVERVIEW_PDF_d3pdftextkostenstelle_kunden_PDF' => 'Rechnungsvermerk:', - 'D3_ORDERCONFIRMATION_ACTION_ORDERGENERATEPDFORDERCONFIRMATION' => 'Auftragsbestätigung', - //pdf - 'ORDER_OVERVIEW_PDF_ORDERSAT' => ' beim Elektroversand Schmidt', - 'ORDER_OVERVIEW_PDF_ORDERSINCERELY' => 'Ihre Bestellung vom ', - 'D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG' => 'Bankverbindung:', - 'ORDER_OVERVIEW_PDF_ACCOUNTNR' => 'IBAN: ', - 'ORDER_OVERVIEW_PDF_BANKCODE' => 'BIC-/SWIFT-Code: ', - 'ORDER_OVERVIEW_PDF_BANKCODE_HEADER' => 'BIC: ', - 'D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT' => 'So erreichen Sie uns:', - 'D3_ORDER_OVERVIEW_PDF_GESCHAEFTSFUEHRER' => 'Geschäftsführer: Denis Schmidt', - 'D3_ORDER_OVERVIEW_PDF_COURT' => 'Amtsgericht ', - 'D3_ORDER_OVERVIEW_PDF_HRBNR' => 'HRB ', - 'D3_AUFTRAGSBESTAETIGUNG_PDF_PRETEXT' => 'Auf Grundlage unserer allgemeinen Liefer- und Geschäftsbedingungen bestätigen wir Ihnen folgenden Auftrag:', - 'D3_ORDER_OVERVIEW_PDF_USTID' => 'Ust.-ID: ', - 'D3_ORDER_OVERVIEW_PDF_USTIDNR' => 'Ust.-ID-Nr: ', - 'D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE' => 'Ust. %: ', - 'D3_ORDER_OVERVIEW_PDF_TELEFON' => 'Telefon: ', - 'D3_ORDER_OVERVIEW_PDF_FAX' => 'Fax: ', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILLNR' => 'Rechnungs-Nr.: ', - 'D3_ORDER_OVERVIEW_PDF_ORDERNR' => 'Bestellnr.: ', - 'D3_ORDER_OVERVIEW_PDF_DATE' => 'Datum: ', - 'D3_ORDER_OVERVIEW_PDF_AMOUNT' => 'Menge', - 'D3_ORDER_OVERVIEW_PDF_ARTNR' => 'Art.-Nr.', - 'D3_ORDER_OVERVIEW_PDF_DESCRIPTION' => 'Beschreibung', - 'D3_ORDER_OVERVIEW_PDF_UNITPRICE' => 'Einzelpreise', - 'D3_ORDER_OVERVIEW_PDF_TOTALPRICE' => 'Gesamtpreis', - 'D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise: ', - 'D3_ORDER_OVERVIEW_PDF_USED_GREETINGSORDER'=> 'Den Rechnungsbetrag haben wir dankend erhalten.', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO'=> 'Summe Artikel (brutto)', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT' => 'Rabatt', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO' => 'Summe Artikel (netto)', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX' => 'zzgl. MwSt. ', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE' => '%', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE' => ' Betrag', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY' => 'Versandkosten (netto)', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', - 'D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR' => 'Kundennummer: ', ); diff --git a/Application/views/admin/en/pdfdocuments_lang.php b/Application/views/admin/en/pdfdocuments_lang.php new file mode 100644 index 0000000..98d7682 --- /dev/null +++ b/Application/views/admin/en/pdfdocuments_lang.php @@ -0,0 +1,21 @@ + + * @link http://www.oxidmodule.com + */ +$sLangName = "English"; +$aLang = array( + 'charset' => 'utf-8', + + 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings', + 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode', +); diff --git a/Application/views/tpl/documents/deliverynote/inc/informations.tpl b/Application/views/tpl/documents/deliverynote/inc/informations.tpl index f2429dd..b27d738 100644 --- a/Application/views/tpl/documents/deliverynote/inc/informations.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/informations.tpl @@ -2,7 +2,8 @@
[{block name="pdfDocumentInformations"}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$smarty.now|date_format:"%d.%m.%Y"}] + [{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DATE"}] [{$smarty.now|date_format:$dateFormat}]
[{/block}]
diff --git a/Application/views/tpl/documents/deliverynote/inc/salutation.tpl b/Application/views/tpl/documents/deliverynote/inc/salutation.tpl index 32e8c5a..e9692d9 100644 --- a/Application/views/tpl/documents/deliverynote/inc/salutation.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/salutation.tpl @@ -1,7 +1,12 @@ [{block name="salutation"}]
-
noch übersetzen: Lieferschein
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}] [{$shop->oxshops__oxname->value}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERYNOTE"}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR"}] [{$order->getFieldData('oxordernr')}]
+ + [{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}] + +
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDER_FROM_AT" args=$aArgs}]
[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl index 68c1aab..74c1b65 100644 --- a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl +++ b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl @@ -1,28 +1,28 @@
[{/block}] [{block name="pdfFooterRight"}] [{/block}] diff --git a/Application/views/tpl/documents/invoice/inc/conclusion.tpl b/Application/views/tpl/documents/invoice/inc/conclusion.tpl index e950980..f12fb4d 100644 --- a/Application/views/tpl/documents/invoice/inc/conclusion.tpl +++ b/Application/views/tpl/documents/invoice/inc/conclusion.tpl @@ -3,7 +3,7 @@ [{block name="conclusion_paymethod"}] diff --git a/Application/views/tpl/documents/invoice/inc/informations.tpl b/Application/views/tpl/documents/invoice/inc/informations.tpl index fcd9f43..7d89865 100644 --- a/Application/views/tpl/documents/invoice/inc/informations.tpl +++ b/Application/views/tpl/documents/invoice/inc/informations.tpl @@ -2,17 +2,17 @@
[{block name="pdfDocumentInformations"}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_ORDERBILLNR"}] [{$order->getFieldData('oxbillnr')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_ORDERBILLNR" suffix="COLON"}] [{$order->getFieldData('oxbillnr')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_CUSTOMERNR" suffix="COLON"}] [{$user->getFieldData('oxcustnr')}]
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] - [{oxmultilang ident="D3_PDFDOCUMENTS_DATE"}] [{$order->getFieldData('oxbilldate')|date_format:$dateFormat}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DATE" suffix="COLON"}] [{$order->getFieldData('oxbilldate')|date_format:$dateFormat}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_USTIDNR"}] [{$shop->getFieldData('oxvatnumber')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_USTIDNR" suffix="COLON"}] [{$shop->getFieldData('oxvatnumber')}]
[{/block}]
diff --git a/Application/views/tpl/documents/invoice/inc/salutation.tpl b/Application/views/tpl/documents/invoice/inc/salutation.tpl index 58e53e8..1bf0ce2 100644 --- a/Application/views/tpl/documents/invoice/inc/salutation.tpl +++ b/Application/views/tpl/documents/invoice/inc/salutation.tpl @@ -1,7 +1,7 @@ [{block name="salutation"}]
[{oxmultilang ident="D3_PDFDOCUMENTS_INVOICE"}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR"}] [{$order->getFieldData('oxordernr')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR" suffix="COLON"}] [{$order->getFieldData('oxordernr')}]
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] [{assign var="sArgs" value=$order->getFieldData('oxorderdate')|date_format:$dateFormat|cat:"//"|cat:$shop->getFieldData('oxname')}] From ea807097d6144a95b49860ac2762e538666f955b Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 30 Jun 2020 23:14:26 +0200 Subject: [PATCH 102/134] change HTML structure for article costs area --- .../inc/elements/articlecostssummary.tpl | 117 ++++++++++-------- .../documents/inc/elements/articlelist.tpl | 8 +- out/src/css/pdfStyling.css | 26 ++-- 3 files changed, 84 insertions(+), 67 deletions(-) diff --git a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl index 09eaf89..e79926e 100644 --- a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl +++ b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl @@ -1,54 +1,73 @@ -
+ + + +[{/block}] +[{block name="discount"}] [{if $order->getFormattedDiscount() != 0}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT" suffix="COLON"}] -
+ + + + [{/if}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}] -
+[{/block}] +[{block name="sumnetto"}] + + + + +[{/block}] +[{block name="producttax"}] [{foreach from=$productVats key=VatKey item=oVat}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] -
+ + + + [{/foreach}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}] -
-
- [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] -
-
- [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT" suffix="COLON"}] -
- - + + + + + + + +[{/block}] [{* ToDo: keine payment costs ??? *}] -
- [{$order->getFormattedTotalOrderSum()}] [{$currency->name}] -
- \ No newline at end of file +[{block name="totalsum"}] + + + + +[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/articlelist.tpl b/Application/views/tpl/documents/inc/elements/articlelist.tpl index 21a8592..ecde677 100644 --- a/Application/views/tpl/documents/inc/elements/articlelist.tpl +++ b/Application/views/tpl/documents/inc/elements/articlelist.tpl @@ -126,11 +126,9 @@ [{if $showPrices}] [{block name="articleCosts"}]
diff --git a/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl b/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl new file mode 100644 index 0000000..bbfde06 --- /dev/null +++ b/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl @@ -0,0 +1,9 @@ +[{block name="conclusion"}] + + + + +
+ [{oxmultilang ident="D3_DELIVERYNOTE_PDF_PAYABLEUNTIL"}] 20.05.2020 +
+[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl b/Application/views/tpl/documents/deliverynote/inc/informations.tpl similarity index 100% rename from Application/views/tpl/documents/deliverynote/includingFiles/informations.tpl rename to Application/views/tpl/documents/deliverynote/inc/informations.tpl diff --git a/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl b/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl new file mode 100644 index 0000000..e872462 --- /dev/null +++ b/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl @@ -0,0 +1,25 @@ +[{block name="recipientaddress"}] + [{if $order->getFieldData('oxdellname')}] + [{if $order->getFieldData('oxdelcompany')}] +
[{$order->getFieldData('oxdelcompany')}]
+ [{/if}] +
[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]
+ [{if $order->getFieldData('oxdeladdinfo')}] +
[{$order->getFieldData('oxdeladdinfo')}]
+ [{/if}] +
[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]
+
[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]
+
[{$order->getFieldData('oxdelcountry')}]
+ [{else}] + [{if $order->getFieldData('oxbillcompany')}] +
[{$order->getFieldData('oxbillcompany')}]
+ [{/if}] +
[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]
+ [{if $order->getFieldData('oxbilladdinfo')}] +
[{$order->getFieldData('oxbilladdinfo')}]
+ [{/if}] +
[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]
+
[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]
+
[{$order->getFieldData('oxbillcountry')}]
+ [{/if}] +[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl b/Application/views/tpl/documents/deliverynote/inc/salutation.tpl similarity index 83% rename from Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl rename to Application/views/tpl/documents/deliverynote/inc/salutation.tpl index 58390f8..32e8c5a 100644 --- a/Application/views/tpl/documents/deliverynote/includingFiles/salutation.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/salutation.tpl @@ -1,6 +1,6 @@ [{block name="salutation"}]
-
Rechnung
+
noch übersetzen: Lieferschein
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}] [{$shop->oxshops__oxname->value}]
diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/conclusion.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/conclusion.tpl deleted file mode 100644 index ff3ee3e..0000000 --- a/Application/views/tpl/documents/deliverynote/includingFiles/conclusion.tpl +++ /dev/null @@ -1,5 +0,0 @@ -[{block name="pdfPastThankFile"}] - - -
[{oxmultilang ident="D3_DELIVERYNOTE_PDF_PAYABLEUNTIL"}] 20.05.2020
-[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl b/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl deleted file mode 100644 index bb4e8c3..0000000 --- a/Application/views/tpl/documents/deliverynote/includingFiles/recipientAddress.tpl +++ /dev/null @@ -1,25 +0,0 @@ -[{block name="recipientaddress"}] - [{if $order->getFieldData('oxdellname')}] - [{if $order->getFieldData('oxdelcompany')}] -
[{$order->getFieldData('oxdelcompany')}]
- [{/if}] -
[{$order->getFieldData('oxdelfname')}] [{$order->getFieldData('oxdellname')}]
- [{if $order->getFieldData('oxdeladdinfo')}] -
[{$order->getFieldData('oxdeladdinfo')}]
- [{/if}] -
[{$order->getFieldData('oxdelstreet')}] [{$order->getFieldData('oxdelstreetnr')}]
-
[{$order->getFieldData('oxdelzip')}] [{$order->getFieldData('oxdelcity')}]
-
[{$order->getFieldData('oxdelcountry')}]
- [{else}] - [{if $order->getFieldData('oxbillcompany')}] -
[{$order->getFieldData('oxbillcompany')}]
- [{/if}] -
[{$order->getFieldData('oxbillfname')}] [{$order->getFieldData('oxbilllname')}]
- [{if $order->getFieldData('oxbilladdinfo')}] -
[{$order->getFieldData('oxbilladdinfo')}]
- [{/if}] -
[{$order->getFieldData('oxbillstreet')}] [{$order->getFieldData('oxbillstreetnr')}]
-
[{$order->getFieldData('oxbillzip')}] [{$order->getFieldData('oxbillcity')}]
-
[{$order->getFieldData('oxbillcountry')}]
- [{/if}] -[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl index a440358..68c1aab 100644 --- a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl +++ b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl @@ -1,26 +1,54 @@ -[{* ++++++Beschreibung der Kostensummierung++++++ *}] -
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}] +
[{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}] +
[{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}] +
[{foreach from=$productVats key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}] +
[{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}] +
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}] +
+
+ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}] +
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+
+
+ [{$order->getFormattedTotalBrutSum()}] [{$currency->name}] +
[{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+
+ -[{$order->getFormattedDiscount()}] [{$currency->name}] +
[{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+
+ [{$order->getFormattedTotalNetSum()}] [{$currency->name}] +
+[{* ToDo: kein foreach wie oben ??? *}] +
+ [{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}] +
+
+ [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}] +
+
+ [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}] +
+[{* ToDo: keine payment costs ??? *}] +
+ [{$order->getFormattedTotalOrderSum()}] [{$currency->name}] +
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO"}]
[{if $order->getFormattedDiscount() != 0}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT"}]
[{/if}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO"}]
[{foreach from=$productVats key=VatKey item=oVat}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey}]
[{/foreach}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY"}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT"}]
diff --git a/Application/views/tpl/documents/inc/elements/articlelist.tpl b/Application/views/tpl/documents/inc/elements/articlelist.tpl index 52c6519..21a8592 100644 --- a/Application/views/tpl/documents/inc/elements/articlelist.tpl +++ b/Application/views/tpl/documents/inc/elements/articlelist.tpl @@ -4,20 +4,20 @@ [{if $showPrices}] [{/if}] @@ -30,7 +30,7 @@ [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] + [{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] [{if $showPrices}] @@ -55,7 +55,7 @@ [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] + [{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] [{if $showPrices}] @@ -80,7 +80,7 @@ [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] + [{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] [{if $showPrices}] @@ -105,7 +105,7 @@ [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] + [{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] [{if $showPrices}] diff --git a/Application/views/tpl/documents/inc/elements/informations.tpl b/Application/views/tpl/documents/inc/elements/informations.tpl index c18a3b5..c873a9d 100644 --- a/Application/views/tpl/documents/inc/elements/informations.tpl +++ b/Application/views/tpl/documents/inc/elements/informations.tpl @@ -2,16 +2,16 @@
[{block name="pdfContactInformations"}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_GET_IN_CONTACT"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_GET_IN_CONTACT"}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TELEFON"}][{$shop->getFieldData('oxtelefon')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TELEFON"}] [{$shop->getFieldData('oxtelefon')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->getFieldData('oxtelefax')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_FAX"}] [{$shop->getFieldData('oxtelefax')}]
- [{$shop->getFieldData('oxinfoemail')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_EMAIL"}] [{$shop->getFieldData('oxinfoemail')}]
[{/block}]
@@ -19,16 +19,16 @@
[{block name="pdfBankaccountInformations"}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNT"}]
[{$shop->getFieldData('oxbankname')}]
- [{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->getFieldData('oxibannumber')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNTNR"}] [{$shop->getFieldData('oxibannumber')}]
- [{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE_HEADER"}][{$shop->getFieldData('oxbiccode')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER"}] [{$shop->getFieldData('oxbiccode')}]
[{/block}]
diff --git a/Application/views/tpl/documents/inc/page/footer.tpl b/Application/views/tpl/documents/inc/page/footer.tpl index 3b1ac42..8c4b88f 100644 --- a/Application/views/tpl/documents/inc/page/footer.tpl +++ b/Application/views/tpl/documents/inc/page/footer.tpl @@ -17,18 +17,18 @@ [{/block}] [{block name="pdfFooterCenter"}] [{/block}] [{block name="pdfFooterRight"}] [{/block}] diff --git a/Application/views/tpl/documents/invoice/inc/conclusion.tpl b/Application/views/tpl/documents/invoice/inc/conclusion.tpl index 84680eb..e950980 100644 --- a/Application/views/tpl/documents/invoice/inc/conclusion.tpl +++ b/Application/views/tpl/documents/invoice/inc/conclusion.tpl @@ -3,19 +3,19 @@ [{block name="conclusion_paymethod"}] [{/block}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_AMOUNT"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_AMOUNT"}] - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DESCRIPTION"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DESCRIPTION"}] - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTPERCENTAGE"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_USTPERCENTAGE"}] - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_UNITPRICE"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_UNITPRICE"}] - [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_TOTALPRICE"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALPRICE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_MANAGINGDIRECTOR"}][{$shop->oxshops__oxfname->value}] [{$shop->oxshops__oxlname->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_COURT"}] [{$shop->oxshops__oxcourt->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_HRBNR"}][{$shop->oxshops__oxhrbnr->value}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTID"}][{$shop->oxshops__oxvatnumber->value}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_MANAGINGDIRECTOR"}] [{$shop->getFieldData('oxfname')}] [{$shop->getFieldData('oxlname')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_COURT"}] [{$shop->getFieldData('oxcourt')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_HRBNR"}] [{$shop->getFieldData('oxhrbnr')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_USTID"}] [{$shop->getFieldData('oxvatnumber')}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_BANKVERBINDUNG"}]
-
[{$shop->oxshops__oxbankname->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE"}][{$shop->oxshops__oxbiccode->value}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNT"}]
+
[{$shop->getFieldData('oxbankname')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNTNR"}] [{$shop->getFieldData('oxibannumber')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_BANKCODE"}] [{$shop->getFieldData('oxbiccode')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USED_PAYMENTMETHOD"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD"}] [{$payment->getFieldData('oxdesc')}]
- [{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_1"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_1"}]
- [{oxmultilang ident="ORDER_OVERVIEW_PDF_GREETINGS_AUFTRAG_2"}] [{$shop->oxshops__oxname->value}] + [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_2" args=$shop->getFieldData('oxname')}]
diff --git a/Application/views/tpl/documents/invoice/inc/informations.tpl b/Application/views/tpl/documents/invoice/inc/informations.tpl index 8bf7a10..fcd9f43 100644 --- a/Application/views/tpl/documents/invoice/inc/informations.tpl +++ b/Application/views/tpl/documents/invoice/inc/informations.tpl @@ -2,16 +2,17 @@
[{block name="pdfDocumentInformations"}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILLNR"}][{$order->getFieldData('oxbillnr')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_ORDERBILLNR"}] [{$order->getFieldData('oxbillnr')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_CUSTOMERNR"}] [{$user->getFieldData('oxcustnr')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DATE"}][{$order->getFieldData('oxbilldate')|date_format:"%d.%m.%Y"}] + [{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DATE"}] [{$order->getFieldData('oxbilldate')|date_format:$dateFormat}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTIDNR"}][{$shop->getFieldData('oxvatnumber')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_USTIDNR"}] [{$shop->getFieldData('oxvatnumber')}]
[{/block}]
diff --git a/Application/views/tpl/documents/invoice/inc/salutation.tpl b/Application/views/tpl/documents/invoice/inc/salutation.tpl index 674eda9..58e53e8 100644 --- a/Application/views/tpl/documents/invoice/inc/salutation.tpl +++ b/Application/views/tpl/documents/invoice/inc/salutation.tpl @@ -1,7 +1,12 @@ [{block name="salutation"}]
-
zu übersetzen: Rechnung
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERNR"}][{$order->getFieldData('oxordernr')}]
-
[{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSINCERELY"}][{$order->getFieldData('oxorderdate')|date_format:"%d.%m.%Y"}][{oxmultilang ident="ORDER_OVERVIEW_PDF_ORDERSAT"}] [{$shop->oxshops__oxname->value}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_INVOICE"}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR"}] [{$order->getFieldData('oxordernr')}]
+ + [{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}] + +
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDER_FROM_AT" args=$aArgs}]
[{/block}] \ No newline at end of file diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index c019ec4..e86320f 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -77,7 +77,7 @@ table{ .salutation { margin-top: 5mm; } -.salutation .documentnumber { +.salutation .documenttype { font-weight: bold; } From 9c12c8688b4373b54dc58eabfb22414a406b0bc5 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 30 Jun 2020 10:33:23 +0200 Subject: [PATCH 100/134] adjust multilang items --- .../translations/de/pdfdocuments_lang.php | 35 ++++++++-------- .../translations/en/pdfdocuments_lang.php | 40 +++++++++---------- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index ff99efe..9f74463 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -12,6 +12,7 @@ * @author D3 Data Development * @link http://www.oxidmodule.com */ + $sLangName = "Deutsch"; $aLang = array( 'charset' => 'utf-8', @@ -20,28 +21,28 @@ $aLang = array( 'D3_PDFDOCUMENTS_THANKYOU_2' => 'Ihr Team von %1$s', 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'So erreichen Sie uns:', - 'D3_PDFDOCUMENTS_TELEFON' => 'Telefon: ', - 'D3_PDFDOCUMENTS_FAX' => 'Fax: ', - 'D3_PDFDOCUMENTS_EMAIL' => 'e-Mail: ', + 'D3_PDFDOCUMENTS_TELEFON' => 'Telefon', + 'D3_PDFDOCUMENTS_FAX' => 'Fax', + 'D3_PDFDOCUMENTS_EMAIL' => 'e-Mail', - 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bankverbindung:', - 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN: ', - 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC: ', + 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bankverbindung', + 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN', + 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC', - 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Rechnungs-Nr.: ', - 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Kundennummer: ', - 'D3_PDFDOCUMENTS_DATE' => 'Datum: ', + 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Rechnungs-Nr.', + 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Kundennummer', + 'D3_PDFDOCUMENTS_DATE' => 'Datum', 'D3_PDFDOCUMENTS_DATE_FORMAT' => '%d.%m.%Y', - 'D3_PDFDOCUMENTS_USTIDNR' => 'Ust.-ID-Nr: ', + 'D3_PDFDOCUMENTS_USTIDNR' => 'Ust.-ID-Nr.', 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', - 'D3_PDFDOCUMENTS_ORDERNR' => 'Bestellnr.: ', + 'D3_PDFDOCUMENTS_ORDERNR' => 'Bestellnr.', 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Ihre Bestellung vom %1$s bei "%2$s"', 'D3_PDFDOCUMENTS_AMOUNT' => 'Menge', 'D3_PDFDOCUMENTS_DESCRIPTION' => 'Beschreibung', - 'D3_PDFDOCUMENTS_USTPERCENTAGE' => 'Ust. %: ', + 'D3_PDFDOCUMENTS_USTPERCENTAGE' => 'Ust. %', 'D3_PDFDOCUMENTS_UNITPRICE' => 'Einzelpreis', 'D3_PDFDOCUMENTS_TOTALPRICE' => 'Gesamtpreis', @@ -50,17 +51,17 @@ $aLang = array( 'D3_PDFDOCUMENTS_SUMBRUTTO' => 'Summe Artikel (brutto)', 'D3_PDFDOCUMENTS_DISCOUNT' => 'Rabatt', 'D3_PDFDOCUMENTS_SUMNETTO' => 'Summe Artikel (netto)', - 'D3_PDFDOCUMENTS_TAX' => 'zzgl. MwSt. %1$s %% Betrag', + 'D3_PDFDOCUMENTS_TAX' => 'zzgl. MwSt. %1$s %%', 'D3_PDFDOCUMENTS_DELIVERY' => 'Versandkosten (netto)', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', - 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise: ', + 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'Den Rechnungsbetrag haben wir dankend erhalten.', - 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer:', + 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer', 'D3_PDFDOCUMENTS_COURT' => 'Amtsgericht ', 'D3_PDFDOCUMENTS_HRBNR' => 'HRB ', - 'D3_PDFDOCUMENTS_USTID' => 'Ust.-ID: ', + 'D3_PDFDOCUMENTS_USTID' => 'Ust.-ID', - 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC-/SWIFT-Code: ', + 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC/SWIFT-Code', ); diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php index 29a6886..46ca118 100644 --- a/Application/translations/en/pdfdocuments_lang.php +++ b/Application/translations/en/pdfdocuments_lang.php @@ -19,29 +19,29 @@ $aLang = array( 'D3_PDFDOCUMENTS_THANKYOU_1' => 'Many thanks for your purchase!', 'D3_PDFDOCUMENTS_THANKYOU_2' => 'Your team from %1$s', - 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'You can contact us as follows:', - 'D3_PDFDOCUMENTS_TELEFON' => 'Telephone: ', - 'D3_PDFDOCUMENTS_FAX' => 'Fax: ', - 'D3_PDFDOCUMENTS_EMAIL' => 'e-Mail: ', + 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'You can contact us as follows', + 'D3_PDFDOCUMENTS_TELEFON' => 'Telephone', + 'D3_PDFDOCUMENTS_FAX' => 'Fax', + 'D3_PDFDOCUMENTS_EMAIL' => 'email', - 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bank account:', - 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN: ', - 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC: ', + 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bank account', + 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN', + 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC', - 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Invoice no.: ', - 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Customer no.: ', - 'D3_PDFDOCUMENTS_DATE' => 'Date: ', + 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Invoice no.', + 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Customer no.', + 'D3_PDFDOCUMENTS_DATE' => 'Date', 'D3_PDFDOCUMENTS_DATE_FORMAT' => '%Y-%m-%d', - 'D3_PDFDOCUMENTS_USTIDNR' => 'VAT ID no.: ', + 'D3_PDFDOCUMENTS_USTIDNR' => 'VAT ID no.', 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', - 'D3_PDFDOCUMENTS_ORDERNR' => 'Order no.: ', + 'D3_PDFDOCUMENTS_ORDERNR' => 'Order no.', 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Your order from %1$s at "%2$s"', 'D3_PDFDOCUMENTS_AMOUNT' => 'Amount', 'D3_PDFDOCUMENTS_DESCRIPTION' => 'Description', - 'D3_PDFDOCUMENTS_USTPERCENTAGE' => 'VAT %: ', + 'D3_PDFDOCUMENTS_USTPERCENTAGE' => 'VAT %', 'D3_PDFDOCUMENTS_UNITPRICE' => 'Unit Price', 'D3_PDFDOCUMENTS_TOTALPRICE' => 'Total', @@ -50,17 +50,17 @@ $aLang = array( 'D3_PDFDOCUMENTS_SUMBRUTTO' => 'Total products (incl. tax)', 'D3_PDFDOCUMENTS_DISCOUNT' => 'Discount', 'D3_PDFDOCUMENTS_SUMNETTO' => 'Total products (excl. tax)', - 'D3_PDFDOCUMENTS_TAX' => 'plus VAT %1$s %% amount', + 'D3_PDFDOCUMENTS_TAX' => 'plus VAT %1$s %%', 'D3_PDFDOCUMENTS_DELIVERY' => 'Shipping costs (net)', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Total sum (gross)', - 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method: ', + 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'We have received the invoice amount with thanks.', - 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'managing director:', - 'D3_PDFDOCUMENTS_COURT' => 'local court ', - 'D3_PDFDOCUMENTS_HRBNR' => 'HRB ', - 'D3_PDFDOCUMENTS_USTID' => 'VAT ID: ', + 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'managing director', + 'D3_PDFDOCUMENTS_COURT' => 'local court', + 'D3_PDFDOCUMENTS_HRBNR' => 'HRB', + 'D3_PDFDOCUMENTS_USTID' => 'VAT ID', - 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC-/SWIFT-Code: ', + 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC/SWIFT-Code', ); From b4b9a5275725137e1df89cb2058cd39e0da6b142 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 30 Jun 2020 22:21:27 +0200 Subject: [PATCH 101/134] add auto colon suffix --- .../translations/de/pdfdocuments_lang.php | 2 ++ .../translations/en/pdfdocuments_lang.php | 22 ++++++++++--------- .../deliverynote/inc/informations.tpl | 2 +- .../documents/deliverynote/inc/salutation.tpl | 2 +- .../inc/elements/articlecostssummary.tpl | 14 ++++++------ .../inc/elements/deliveryaddress.tpl | 2 +- .../documents/inc/elements/informations.tpl | 10 ++++----- .../views/tpl/documents/inc/page/footer.tpl | 12 +++++----- .../tpl/documents/invoice/inc/conclusion.tpl | 2 +- .../documents/invoice/inc/informations.tpl | 8 +++---- .../tpl/documents/invoice/inc/salutation.tpl | 2 +- 11 files changed, 41 insertions(+), 37 deletions(-) diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index 9f74463..b12c04e 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -35,6 +35,8 @@ $aLang = array( 'D3_PDFDOCUMENTS_DATE_FORMAT' => '%d.%m.%Y', 'D3_PDFDOCUMENTS_USTIDNR' => 'Ust.-ID-Nr.', + 'D3_PDFDOCUMENTS_DELIVERYADDRESS' => 'Lieferadresse', + 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', 'D3_PDFDOCUMENTS_ORDERNR' => 'Bestellnr.', diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php index 46ca118..c686251 100644 --- a/Application/translations/en/pdfdocuments_lang.php +++ b/Application/translations/en/pdfdocuments_lang.php @@ -22,21 +22,23 @@ $aLang = array( 'D3_PDFDOCUMENTS_GET_IN_CONTACT' => 'You can contact us as follows', 'D3_PDFDOCUMENTS_TELEFON' => 'Telephone', 'D3_PDFDOCUMENTS_FAX' => 'Fax', - 'D3_PDFDOCUMENTS_EMAIL' => 'email', + 'D3_PDFDOCUMENTS_EMAIL' => 'Email', - 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bank account', + 'D3_PDFDOCUMENTS_BANK_ACCOUNT' => 'Bank Account', 'D3_PDFDOCUMENTS_BANK_ACCOUNTNR' => 'IBAN', 'D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER' => 'BIC', - 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Invoice no.', - 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Customer no.', + 'D3_PDFDOCUMENTS_ORDERBILLNR' => 'Invoice No.', + 'D3_PDFDOCUMENTS_CUSTOMERNR' => 'Customer No.', 'D3_PDFDOCUMENTS_DATE' => 'Date', 'D3_PDFDOCUMENTS_DATE_FORMAT' => '%Y-%m-%d', - 'D3_PDFDOCUMENTS_USTIDNR' => 'VAT ID no.', + 'D3_PDFDOCUMENTS_USTIDNR' => 'VAT ID No.', + + 'D3_PDFDOCUMENTS_DELIVERYADDRESS' => 'Shipping Address', 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', - 'D3_PDFDOCUMENTS_ORDERNR' => 'Order no.', + 'D3_PDFDOCUMENTS_ORDERNR' => 'Order No.', 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Your order from %1$s at "%2$s"', 'D3_PDFDOCUMENTS_AMOUNT' => 'Amount', @@ -45,7 +47,7 @@ $aLang = array( 'D3_PDFDOCUMENTS_UNITPRICE' => 'Unit Price', 'D3_PDFDOCUMENTS_TOTALPRICE' => 'Total', - 'D3_PDFDOCUMENTS_ARTNR' => 'Item no.', + 'D3_PDFDOCUMENTS_ARTNR' => 'Item No.', 'D3_PDFDOCUMENTS_SUMBRUTTO' => 'Total products (incl. tax)', 'D3_PDFDOCUMENTS_DISCOUNT' => 'Discount', @@ -57,10 +59,10 @@ $aLang = array( 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'We have received the invoice amount with thanks.', - 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'managing director', - 'D3_PDFDOCUMENTS_COURT' => 'local court', + 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Managing director', + 'D3_PDFDOCUMENTS_COURT' => 'Local court', 'D3_PDFDOCUMENTS_HRBNR' => 'HRB', 'D3_PDFDOCUMENTS_USTID' => 'VAT ID', - 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC/SWIFT-Code', + 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC/SWIFT Code', ); diff --git a/Application/views/tpl/documents/deliverynote/inc/informations.tpl b/Application/views/tpl/documents/deliverynote/inc/informations.tpl index b27d738..2ce19fb 100644 --- a/Application/views/tpl/documents/deliverynote/inc/informations.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/informations.tpl @@ -3,7 +3,7 @@ [{block name="pdfDocumentInformations"}]
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] - [{oxmultilang ident="D3_PDFDOCUMENTS_DATE"}] [{$smarty.now|date_format:$dateFormat}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DATE" suffix="COLON"}] [{$smarty.now|date_format:$dateFormat}]
[{/block}] diff --git a/Application/views/tpl/documents/deliverynote/inc/salutation.tpl b/Application/views/tpl/documents/deliverynote/inc/salutation.tpl index e9692d9..3a81ac1 100644 --- a/Application/views/tpl/documents/deliverynote/inc/salutation.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/salutation.tpl @@ -1,7 +1,7 @@ [{block name="salutation"}]
[{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERYNOTE"}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR"}] [{$order->getFieldData('oxordernr')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_ORDERNR" suffix="COLON"}] [{$order->getFieldData('oxordernr')}]
[{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] [{assign var="sArgs" value=$order->getFieldData('oxorderdate')|date_format:$dateFormat|cat:"//"|cat:$shop->getFieldData('oxname')}] diff --git a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl index 74c1b65..09eaf89 100644 --- a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl +++ b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl @@ -1,28 +1,28 @@
- [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}]
[{if $order->getFormattedDiscount() != 0}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT" suffix="COLON"}]
[{/if}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}]
[{foreach from=$productVats key=VatKey item=oVat}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}]
[{/foreach}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT" suffix="COLON"}]
diff --git a/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl b/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl index cacea05..0677c89 100644 --- a/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl +++ b/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl @@ -2,7 +2,7 @@ [{if $order->getFieldData('oxdelstreet')}]
- [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERYADDRESS" suffix="COLON"}]
[{if $order->getFieldData('oxdelcompany')}]
[{$order->getFieldData('oxdelcompany')}]
diff --git a/Application/views/tpl/documents/inc/elements/informations.tpl b/Application/views/tpl/documents/inc/elements/informations.tpl index c873a9d..761ae50 100644 --- a/Application/views/tpl/documents/inc/elements/informations.tpl +++ b/Application/views/tpl/documents/inc/elements/informations.tpl @@ -5,13 +5,13 @@ [{oxmultilang ident="D3_PDFDOCUMENTS_GET_IN_CONTACT"}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_TELEFON"}] [{$shop->getFieldData('oxtelefon')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TELEFON" suffix="COLON"}] [{$shop->getFieldData('oxtelefon')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_FAX"}] [{$shop->getFieldData('oxtelefax')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_FAX" suffix="COLON"}] [{$shop->getFieldData('oxtelefax')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_EMAIL"}] [{$shop->getFieldData('oxinfoemail')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_EMAIL" suffix="COLON"}] [{$shop->getFieldData('oxinfoemail')}]
[{/block}] @@ -25,10 +25,10 @@ [{$shop->getFieldData('oxbankname')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNTNR"}] [{$shop->getFieldData('oxibannumber')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNTNR" suffix="COLON"}] [{$shop->getFieldData('oxibannumber')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER"}] [{$shop->getFieldData('oxbiccode')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER" suffix="COLON"}] [{$shop->getFieldData('oxbiccode')}]
[{/block}] diff --git a/Application/views/tpl/documents/inc/page/footer.tpl b/Application/views/tpl/documents/inc/page/footer.tpl index 8c4b88f..c4f12b5 100644 --- a/Application/views/tpl/documents/inc/page/footer.tpl +++ b/Application/views/tpl/documents/inc/page/footer.tpl @@ -17,18 +17,18 @@ [{/block}] [{block name="pdfFooterCenter"}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_MANAGINGDIRECTOR"}] [{$shop->getFieldData('oxfname')}] [{$shop->getFieldData('oxlname')}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_COURT"}] [{$shop->getFieldData('oxcourt')}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_HRBNR"}] [{$shop->getFieldData('oxhrbnr')}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_USTID"}] [{$shop->getFieldData('oxvatnumber')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_MANAGINGDIRECTOR" suffix="COLON"}] [{$shop->getFieldData('oxfname')}] [{$shop->getFieldData('oxlname')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_COURT" suffix="COLON"}] [{$shop->getFieldData('oxcourt')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_HRBNR" suffix="COLON"}] [{$shop->getFieldData('oxhrbnr')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_USTID" suffix="COLON"}] [{$shop->getFieldData('oxvatnumber')}]
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNT"}]
[{$shop->getFieldData('oxbankname')}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNTNR"}] [{$shop->getFieldData('oxibannumber')}]
-
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_BANKCODE"}] [{$shop->getFieldData('oxbiccode')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_ACCOUNTNR" suffix="COLON"}] [{$shop->getFieldData('oxibannumber')}]
+
[{oxmultilang ident="D3_PDFDOCUMENTS_BANK_BANKCODE" suffix="COLON"}] [{$shop->getFieldData('oxbiccode')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}] [{$payment->getFieldData('oxdesc')}]
-
- [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}] -
+[{block name="sumbrutto"}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}] + + [{$order->getFormattedTotalBrutSum()}] [{$currency->name}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT" suffix="COLON"}] + + -[{$order->getFormattedDiscount()}] [{$currency->name}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}] + + [{$order->getFormattedTotalNetSum()}] [{$currency->name}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] + + [{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}] +
-
- [{$order->getFormattedTotalBrutSum()}] [{$currency->name}] -
- [{if $order->getFormattedDiscount() != 0}] -
- -[{$order->getFormattedDiscount()}] [{$currency->name}] -
- [{/if}] -
- [{$order->getFormattedTotalNetSum()}] [{$currency->name}] -
-[{* ToDo: kein foreach wie oben ??? *}] -
- [{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}] -
-
- [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}] -
-
- [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}] -
+[{/block}] +[{block name="delivery"}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}] + + [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] + + [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT" suffix="COLON"}] + + [{$order->getFormattedTotalOrderSum()}] [{$currency->name}] +
- - [{block name="d3_article_costs_summary"}] - [{include file="d3pdfarticlecostsummary.tpl"}] - [{/block}] - + [{block name="d3_article_costs_summary"}] + [{include file="d3pdfarticlecostsummary.tpl"}] + [{/block}]
[{/block}] [{/if}] \ No newline at end of file diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index e86320f..1f87933 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -153,35 +153,35 @@ table{ .article_costs_table{ width: 100%; - border-top: solid 0.15mm #000; - border-bottom: solid 0.15mm #000; + padding-left: 300px; + border-spacing: 0; + border-collapse: collapse; } .article_costs_table .description { padding-right: -3px; width: 70%; } -.article_costs_table div { +.article_costs_table td { padding-bottom: 5px; padding-top: 5px; font-size: 12px; } -.article_costs_table .description div { - margin-left: 300px; -} .article_costs_table .values { width: 30%; -} -.article_costs_table .values div { margin-right: -2.2px; text-align: right; } -.article_costs_table .sumbrutto, -.article_costs_table .discount, -.article_costs_table .producttax, -.article_costs_table .deliverytax { +.article_costs_table .sumbrutto td { + border-top: solid 0.15mm #000; +} +.article_costs_table .sumbrutto td, +.article_costs_table .discount td, +.article_costs_table .producttax td, +.article_costs_table .deliverytax td, +.article_costs_table .totalsum td { border-bottom: solid 0.15mm #000; } -.article_costs_table .totalsum { +.article_costs_table .totalsum td { font-weight: bold; } From 5235ffbd81058b2651105629c55620b1e8008f10 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 30 Jun 2020 23:37:08 +0200 Subject: [PATCH 103/134] prevent page break in important chapters --- .../documents/deliverynote/inc/conclusion.tpl | 16 +++++---- .../documents/inc/elements/articlelist.tpl | 12 ++++--- .../tpl/documents/invoice/inc/conclusion.tpl | 34 ++++++++++--------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl b/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl index bbfde06..c79a7a7 100644 --- a/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl @@ -1,9 +1,11 @@ [{block name="conclusion"}] - - - - -
- [{oxmultilang ident="D3_DELIVERYNOTE_PDF_PAYABLEUNTIL"}] 20.05.2020 -
+ + + + + +
+ [{oxmultilang ident="D3_DELIVERYNOTE_PDF_PAYABLEUNTIL"}] 20.05.2020 +
+
[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/inc/elements/articlelist.tpl b/Application/views/tpl/documents/inc/elements/articlelist.tpl index ecde677..f260038 100644 --- a/Application/views/tpl/documents/inc/elements/articlelist.tpl +++ b/Application/views/tpl/documents/inc/elements/articlelist.tpl @@ -125,10 +125,12 @@ [{/block}] [{if $showPrices}] [{block name="articleCosts"}] - - [{block name="d3_article_costs_summary"}] - [{include file="d3pdfarticlecostsummary.tpl"}] - [{/block}] -
+ + + [{block name="d3_article_costs_summary"}] + [{include file="d3pdfarticlecostsummary.tpl"}] + [{/block}] +
+
[{/block}] [{/if}] \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/inc/conclusion.tpl b/Application/views/tpl/documents/invoice/inc/conclusion.tpl index f12fb4d..e7541c3 100644 --- a/Application/views/tpl/documents/invoice/inc/conclusion.tpl +++ b/Application/views/tpl/documents/invoice/inc/conclusion.tpl @@ -1,22 +1,24 @@ [{block name="conclusion"}] - - [{block name="conclusion_paymethod"}] + +
+ [{block name="conclusion_paymethod"}] + + + + [{/block}] - [{/block}] - - - - - - -
+ [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}] + [{$payment->getFieldData('oxdesc')}] +
- [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}] - [{$payment->getFieldData('oxdesc')}] + [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_1"}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_1"}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_2" args=$shop->getFieldData('oxname')}] -
+
+ [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_2" args=$shop->getFieldData('oxname')}] +
+ [{/block}] From 35a2128c155642d45acb54c5a156fc6e024192bd Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 2 Jul 2020 00:16:45 +0200 Subject: [PATCH 104/134] set article summmary --- .../translations/de/pdfdocuments_lang.php | 12 +- .../translations/en/pdfdocuments_lang.php | 12 +- .../documents/deliverynote/deliverynote.tpl | 3 - .../inc/elements/articlecostssummary.tpl | 275 +++++++++++++++--- .../documents/inc/elements/articlelist.tpl | 1 + .../views/tpl/documents/invoice/invoice.tpl | 3 - out/src/css/pdfStyling.css | 24 +- 7 files changed, 265 insertions(+), 65 deletions(-) diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index b12c04e..65c2781 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -54,7 +54,17 @@ $aLang = array( 'D3_PDFDOCUMENTS_DISCOUNT' => 'Rabatt', 'D3_PDFDOCUMENTS_SUMNETTO' => 'Summe Artikel (netto)', 'D3_PDFDOCUMENTS_TAX' => 'zzgl. MwSt. %1$s %%', - 'D3_PDFDOCUMENTS_DELIVERY' => 'Versandkosten (netto)', + 'D3_PDFDOCUMENTS_UNDEFINED_TAX' => 'zzgl. MwSt.', + 'D3_PDFDOCUMENTS_PROPORTIONAL_TAX' => 'zzgl. MwSt. (anteilig berechnet)', + 'D3_PDFDOCUMENTS_VOUCHERDISCOUNT' => 'Gutschein', + 'D3_PDFDOCUMENTS_DELIVERY_NET' => 'Versandkosten (netto)', + 'D3_PDFDOCUMENTS_DELIVERY' => 'Versandkosten', + 'D3_PDFDOCUMENTS_PAYMENT_NET' => 'Aufschlag Zahlungsart (netto)', + 'D3_PDFDOCUMENTS_PAYMENT' => 'Aufschlag Zahlungsart', + 'D3_PDFDOCUMENTS_WRAPPING_NET' => 'Geschenkverpackung (netto)', + 'D3_PDFDOCUMENTS_WRAPPING' => 'Geschenkverpackung', + 'D3_PDFDOCUMENTS_GIFTCARD_NET' => 'Grußkarte (netto)', + 'D3_PDFDOCUMENTS_GIFTCARD' => 'Grußkarte', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise', diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php index c686251..dd76647 100644 --- a/Application/translations/en/pdfdocuments_lang.php +++ b/Application/translations/en/pdfdocuments_lang.php @@ -53,7 +53,17 @@ $aLang = array( 'D3_PDFDOCUMENTS_DISCOUNT' => 'Discount', 'D3_PDFDOCUMENTS_SUMNETTO' => 'Total products (excl. tax)', 'D3_PDFDOCUMENTS_TAX' => 'plus VAT %1$s %%', - 'D3_PDFDOCUMENTS_DELIVERY' => 'Shipping costs (net)', + 'D3_PDFDOCUMENTS_UNDEFINED_TAX' => 'plus VAT', + 'D3_PDFDOCUMENTS_PROPORTIONAL_TAX' => 'plus VAT (proportionally calculated)', + 'D3_PDFDOCUMENTS_VOUCHERDISCOUNT' => 'Coupon', + 'D3_PDFDOCUMENTS_DELIVERY_NET' => 'Shipping costs (net)', + 'D3_PDFDOCUMENTS_DELIVERY' => 'Shipping costs', + 'D3_PDFDOCUMENTS_PAYMENT_NET' => 'Additional Charge Payment Method (net)', + 'D3_PDFDOCUMENTS_PAYMENT' => 'Additional Charge Payment Method', + 'D3_PDFDOCUMENTS_WRAPPING_NET' => 'Gift Wrapping (net)', + 'D3_PDFDOCUMENTS_WRAPPING' => 'Gift Wrapping', + 'D3_PDFDOCUMENTS_GIFTCARD_NET' => 'Greeting Card (net)', + 'D3_PDFDOCUMENTS_GIFTCARD' => 'Greeting Card', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Total sum (gross)', 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method', diff --git a/Application/views/tpl/documents/deliverynote/deliverynote.tpl b/Application/views/tpl/documents/deliverynote/deliverynote.tpl index fa53be1..f0820fa 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynote.tpl @@ -1,6 +1,3 @@ -[{assign var="currency" value=$order->getOrderCurrency()}] -[{assign var="deliveryPrice" value= $order->getOrderDeliveryPrice()}] -[{assign var="productVats" value= $order->getProductVats(false)}] [{assign var="pagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}] [{assign var="showLogo" value=$showLogo|default:true}] diff --git a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl index e79926e..320842f 100644 --- a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl +++ b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl @@ -1,68 +1,249 @@ -[{block name="sumbrutto"}] - - - [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}] - - - [{$order->getFormattedTotalBrutSum()}] [{$currency->name}] - - -[{/block}] -[{block name="discount"}] - [{if $order->getFormattedDiscount() != 0}] +[{capture name="sumnetto"}] + [{block name="sumnetto"}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}] + + + [{$order->getFormattedTotalNetSum()}] [{$currency->name}] + + + [{/block}] +[{/capture}] + +[{capture name="discount"}] + [{block name="discount"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT" suffix="COLON"}] - -[{$order->getFormattedDiscount()}] [{$currency->name}] + [{$order->getFormattedDiscount()}] [{$currency->name}] + + + [{/block}] +[{/capture}] + +[{capture name="producttax"}] + [{block name="producttax"}] + [{foreach from=$order->getProductVats(false) key=VatKey item=oVat}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] + + + [{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}] + + + [{/foreach}] + [{/block}] +[{/capture}] + +[{capture name="sumbrutto"}] + [{block name="sumbrutto"}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}] + + + [{$order->getFormattedTotalBrutSum()}] [{$currency->name}] + + + [{/block}] +[{/capture}] + +[{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}] + [{/if}] +[{else}] + [{$smarty.capture.sumnetto}] + [{$smarty.capture.producttax}] + [{$smarty.capture.sumbrutto}] +[{/if}] + +[{if $order->getFieldData('oxvoucherdiscount')}] + [{block name="voucherdiscount"}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_VOUCHERDISCOUNT" suffix="COLON"}] + + + -[{$order->getFormattedTotalVouchers()}] [{$currency->name}] + + + [{/block}] +[{/if}] + +[{block name="delivery"}] + [{if $oConfig->getConfigParam('blShowVATForDelivery')}] + [{assign var="deliveryPrice" value=$order->getOrderDeliveryPrice()}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY_NET" suffix="COLON"}] + + + [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}] + + + + + + [{if $oConfig->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$order->getFieldData('oxdelvat') suffix="COLON"}] + [{else}] + [{oxmultilang ident="D3_PDFDOCUMENTS_PROPORTIONAL_TAX" suffix="COLON"}] + [{/if}] + + + [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}] + + + [{else}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}] + + + [{$lang->formatCurrency($order->getFieldData('oxdelcost'), $currency)}] [{$currency->name}] [{/if}] [{/block}] -[{block name="sumnetto"}] - - - [{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}] - - - [{$order->getFormattedTotalNetSum()}] [{$currency->name}] - - -[{/block}] -[{block name="producttax"}] - [{foreach from=$productVats key=VatKey item=oVat}] - + +[{block name="payment"}] + [{if $oConfig->getConfigParam('blShowVATForPayCharge')}] + [{assign var="paymentPrice" value=$order->getOrderPaymentPrice()}] + + - [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_PAYMENT_NET" suffix="COLON"}] - [{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}] + [{$lang->formatCurrency($paymentPrice->getNettoPrice(), $currency)}] [{$currency->name}] - [{/foreach}] + + + + [{if $oConfig->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}] + [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$order->getFieldData('oxpayvat') suffix="COLON"}] + [{else}] + [{oxmultilang ident="D3_PDFDOCUMENTS_PROPORTIONAL_TAX" suffix="COLON"}] + [{/if}] + + + [{$lang->formatCurrency($paymentPrice->getVATValue(), $currency)}] [{$currency->name}] + + + [{else}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_PAYMENT" suffix="COLON"}] + + + [{$lang->formatCurrency($order->getFieldData('oxpaycost'), $currency)}] [{$currency->name}] + + + [{/if}] [{/block}] -[{block name="delivery"}] - - - [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}] - - - [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}] - - - - - [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] - - - [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}] - - + +[{block name="wrapping"}] + [{if $order->getFieldData('oxwrapcost')}] + [{if $oConfig->getConfigParam('blShowVATForWrapping')}] + [{assign var="wrappingPrice" value=$order->getOrderWrappingPrice()}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_WRAPPING_NET" suffix="COLON"}] + + + [{$lang->formatCurrency($wrappingPrice->getNettoPrice(), $currency)}] [{$currency->name}] + + + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_UNDEFINED_TAX" suffix="COLON"}] + + + [{$lang->formatCurrency($wrappingPrice->getVATValue(), $currency)}] [{$currency->name}] + + + [{else}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_WRAPPING" suffix="COLON"}] + + + [{$lang->formatCurrency($order->getFieldData('oxwrapcost'), $currency)}] [{$currency->name}] + + + [{/if}] + [{/if}] [{/block}] -[{* ToDo: keine payment costs ??? *}] + +[{block name="giftcard"}] + [{if $order->getFieldData('oxgiftcardcost')}] + [{if $oConfig->getConfigParam('blShowVATForWrapping')}] + [{assign var="giftCardPrice" value=$order->getOrderGiftCardPrice()}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_GIFTCARD_NET" suffix="COLON"}] + + + [{$lang->formatCurrency($giftCardPrice->getNettoPrice(), $currency)}] [{$currency->name}] + + + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_UNDEFINED_TAX" suffix="COLON"}] + + + [{$lang->formatCurrency($giftCardPrice->getVATValue(), $currency)}] [{$currency->name}] + + + [{else}] + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_GIFTCARD" suffix="COLON"}] + + + [{$lang->formatCurrency($order->getFieldData('oxgiftcardcost'), $currency)}] [{$currency->name}] + + + [{/if}] + [{/if}] +[{/block}] + [{block name="totalsum"}] + + + + + + [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT" suffix="COLON"}] diff --git a/Application/views/tpl/documents/inc/elements/articlelist.tpl b/Application/views/tpl/documents/inc/elements/articlelist.tpl index f260038..7deead4 100644 --- a/Application/views/tpl/documents/inc/elements/articlelist.tpl +++ b/Application/views/tpl/documents/inc/elements/articlelist.tpl @@ -1,3 +1,4 @@ +[{assign var="currency" value=$order->getOrderCurrency()}] [{assign var="showPrices" value=$showPrices|default:true}] [{block name="articlelist"}] diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 05a0189..748ffa8 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -1,6 +1,3 @@ -[{assign var="currency" value=$order->getOrderCurrency()}] -[{assign var="deliveryPrice" value=$order->getOrderDeliveryPrice()}] -[{assign var="productVats" value=$order->getProductVats(false)}] [{assign var="pagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}] [{assign var="showLogo" value=$showLogo|default:true}] diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 1f87933..a841539 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -153,13 +153,14 @@ table{ .article_costs_table{ width: 100%; - padding-left: 300px; border-spacing: 0; border-collapse: collapse; } +.article_costs_table .indent { + width: 10%; +} .article_costs_table .description { - padding-right: -3px; - width: 70%; + width: 75%; } .article_costs_table td { padding-bottom: 5px; @@ -167,21 +168,24 @@ table{ font-size: 12px; } .article_costs_table .values { - width: 30%; + width: 15%; margin-right: -2.2px; text-align: right; } -.article_costs_table .sumbrutto td { +.article_costs_table .sumnetto td { border-top: solid 0.15mm #000; } -.article_costs_table .sumbrutto td, -.article_costs_table .discount td, -.article_costs_table .producttax td, -.article_costs_table .deliverytax td, -.article_costs_table .totalsum td { +.article_costs_table .voucherdiscount td, +.article_costs_table .sumbrutto td { border-bottom: solid 0.15mm #000; } +.article_costs_table .totalseparator td { + height: 0; + line-height: 0; +} +.article_costs_table .totalseparator td, .article_costs_table .totalsum td { + border-bottom: solid 0.3mm #000; font-weight: bold; } From c28e7c3f4566293e1fc87a7801430166ea5bd3d1 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 2 Jul 2020 01:21:14 +0200 Subject: [PATCH 105/134] add payment informations --- .../AbstractClasses/pdfdocumentsGeneric.php | 9 +++-- .../AbstractClasses/pdfdocumentsOrder.php | 35 +++++++++++++++++-- .../translations/de/pdfdocuments_lang.php | 1 + .../translations/en/pdfdocuments_lang.php | 9 ++--- .../documents/deliverynote/deliverynote.tpl | 2 +- .../documents/deliverynote/inc/conclusion.tpl | 9 ++--- .../tpl/documents/invoice/inc/conclusion.tpl | 35 ++++++++----------- .../tpl/documents/invoice/inc/payinfo.tpl | 16 +++++++++ .../views/tpl/documents/invoice/invoice.tpl | 2 +- metadata.php | 1 + out/src/css/pdfStyling.css | 10 ++---- 11 files changed, 84 insertions(+), 45 deletions(-) create mode 100644 Application/views/tpl/documents/invoice/inc/payinfo.tpl diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 4989655..3e66377 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -133,12 +133,17 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface return null; } - public function setSmartyVars() + /** + * @param int $iSelLang + */ + public function setSmartyVars($iSelLang) { + unset($iSelLang); $this->oSmarty->assign('oConfig', Registry::getSession()->getConfig()); $this->oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); $this->oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); $this->oSmarty->assign('lang', Registry::getLang()); + $this->oSmarty->assign('document', $this); } /** @@ -156,7 +161,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $currTplLang = $lang->getTplLanguage(); $lang->setTplLanguage($iSelLang); - $this->setSmartyVars(); + $this->setSmartyVars($iSelLang); $content = $this->oSmarty->fetch($this->getTemplate()); diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index 3029148..d920c9b 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -22,6 +22,7 @@ use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface as o use \OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Application\Model\Payment; use OxidEsales\Eshop\Application\Model\User; +use OxidEsales\Eshop\Core\Registry; use Spipu\Html2Pdf\Exception\Html2PdfException; abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInterface @@ -45,9 +46,12 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt return $this->oOrder; } - public function setSmartyVars() + /** + * @param int $iSelLang + */ + public function setSmartyVars($iSelLang) { - parent::setSmartyVars(); + parent::setSmartyVars($iSelLang); $this->oSmarty->assign('order', $this->getOrder()); @@ -56,7 +60,7 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt $this->oSmarty->assign('user', $oUser); $oPayment = oxNew(Payment::class); - $oPayment->load($this->getOrder()->getFieldData('oxpaymenttype')); + $oPayment->loadInLang($iSelLang, $this->getOrder()->getFieldData('oxpaymenttype')); $this->oSmarty->assign('payment', $oPayment); } @@ -110,4 +114,29 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt return parent::genPdf($sFilename, $iSelLang, $target); } + + /** + * @return int + */ + public function getPaymentTerm() + { + if (null === $iPaymentTerm = Registry::getConfig()->getConfigParam('iPaymentTerm')) { + $iPaymentTerm = 7; + } + + return $iPaymentTerm; + } + + /** + * @return false|string + */ + public function getPayableUntilDate() + { + return strtotime( + '+' . $this->getPaymentTerm() . ' day', + strtotime( + $this->getOrder()->getFieldData('oxbilldate') + ) + ); + } } \ No newline at end of file diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index 65c2781..ee1ac5a 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -68,6 +68,7 @@ $aLang = array( 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Gesamtsumme (brutto)', 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Ihre gewählte Zahlungsweise', + 'D3_PDFDOCUMENTS_PAYABLEUNTIL' => 'Zahlbar bis zum', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'Den Rechnungsbetrag haben wir dankend erhalten.', 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer', diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php index dd76647..3d2f93c 100644 --- a/Application/translations/en/pdfdocuments_lang.php +++ b/Application/translations/en/pdfdocuments_lang.php @@ -56,17 +56,18 @@ $aLang = array( 'D3_PDFDOCUMENTS_UNDEFINED_TAX' => 'plus VAT', 'D3_PDFDOCUMENTS_PROPORTIONAL_TAX' => 'plus VAT (proportionally calculated)', 'D3_PDFDOCUMENTS_VOUCHERDISCOUNT' => 'Coupon', - 'D3_PDFDOCUMENTS_DELIVERY_NET' => 'Shipping costs (net)', + 'D3_PDFDOCUMENTS_DELIVERY_NET' => 'Shipping costs (excl. tax)', 'D3_PDFDOCUMENTS_DELIVERY' => 'Shipping costs', - 'D3_PDFDOCUMENTS_PAYMENT_NET' => 'Additional Charge Payment Method (net)', + 'D3_PDFDOCUMENTS_PAYMENT_NET' => 'Additional Charge Payment Method (excl. tax)', 'D3_PDFDOCUMENTS_PAYMENT' => 'Additional Charge Payment Method', - 'D3_PDFDOCUMENTS_WRAPPING_NET' => 'Gift Wrapping (net)', + 'D3_PDFDOCUMENTS_WRAPPING_NET' => 'Gift Wrapping (excl. tax)', 'D3_PDFDOCUMENTS_WRAPPING' => 'Gift Wrapping', - 'D3_PDFDOCUMENTS_GIFTCARD_NET' => 'Greeting Card (net)', + 'D3_PDFDOCUMENTS_GIFTCARD_NET' => 'Greeting Card (excl. tax)', 'D3_PDFDOCUMENTS_GIFTCARD' => 'Greeting Card', 'D3_PDFDOCUMENTS_TOTALSUMBRUT' => 'Total sum (gross)', 'D3_PDFDOCUMENTS_USED_PAYMENTMETHOD' => 'Your chosen payment method', + 'D3_PDFDOCUMENTS_PAYABLEUNTIL' => 'Billing till', 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'We have received the invoice amount with thanks.', 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Managing director', diff --git a/Application/views/tpl/documents/deliverynote/deliverynote.tpl b/Application/views/tpl/documents/deliverynote/deliverynote.tpl index f0820fa..215e32f 100644 --- a/Application/views/tpl/documents/deliverynote/deliverynote.tpl +++ b/Application/views/tpl/documents/deliverynote/deliverynote.tpl @@ -1,4 +1,4 @@ -[{assign var="pagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}] +[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}] [{assign var="showLogo" value=$showLogo|default:true}] [{capture append="pdfBlock_style"}] diff --git a/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl b/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl index c79a7a7..45544e6 100644 --- a/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl +++ b/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl @@ -1,11 +1,6 @@ [{block name="conclusion"}] - - - - -
- [{oxmultilang ident="D3_DELIVERYNOTE_PDF_PAYABLEUNTIL"}] 20.05.2020 -
+ [{block name="conclusion_thankyou"}] + [{/block}]
[{/block}] \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/inc/conclusion.tpl b/Application/views/tpl/documents/invoice/inc/conclusion.tpl index e7541c3..2d79b32 100644 --- a/Application/views/tpl/documents/invoice/inc/conclusion.tpl +++ b/Application/views/tpl/documents/invoice/inc/conclusion.tpl @@ -1,24 +1,19 @@ [{block name="conclusion"}] - - [{block name="conclusion_paymethod"}] - - - - [{/block}] - - - - - - -
- [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}] - [{$payment->getFieldData('oxdesc')}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_1"}] -
- [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_2" args=$shop->getFieldData('oxname')}] -
+ [{block name="conclusion_paymethod"}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}] + [{$payment->getFieldData('oxdesc')}]
+ + [{include file="d3invoice_pdf_payinfo.tpl"}] +
+ [{/block}] + + [{block name="conclusion_thankyou"}] +
+ [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_1"}]
+ [{oxmultilang ident="D3_PDFDOCUMENTS_THANKYOU_2" args=$shop->getFieldData('oxname')}] +
+ [{/block}]
[{/block}] diff --git a/Application/views/tpl/documents/invoice/inc/payinfo.tpl b/Application/views/tpl/documents/invoice/inc/payinfo.tpl new file mode 100644 index 0000000..01c6918 --- /dev/null +++ b/Application/views/tpl/documents/invoice/inc/payinfo.tpl @@ -0,0 +1,16 @@ +[{block name="payinfo"}] + [{if $payment->getId() == 'oxidinvoice'}] + [{block name="payinfo_billable_till"}] + [{assign var="dateFormat" value='D3_PDFDOCUMENTS_DATE_FORMAT'|oxmultilangassign}] + [{oxmultilang ident="D3_PDFDOCUMENTS_PAYABLEUNTIL"}] + [{$document->getPayableUntilDate()|date_format:$dateFormat}] + [{/block}] + [{elseif $payment->getId() == 'oxidpayadvance' || $payment->getId() == 'oxidcreditcard'}] + [{block name="payinfo_payed"}] + [{oxmultilang ident="D3_PDFDOCUMENTS_RECEIVED_PAYMENT"}] + [{/block}] + [{else}] + [{block name="payinfo_other"}] + [{/block}] + [{/if}] +[{/block}] diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index 748ffa8..999559a 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -1,4 +1,4 @@ -[{assign var="pagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}] +[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}] [{assign var="showLogo" value=$showLogo|default:true}] [{capture append="pdfBlock_style"}] diff --git a/metadata.php b/metadata.php index 022bc2d..5952b46 100644 --- a/metadata.php +++ b/metadata.php @@ -61,6 +61,7 @@ $aModule = [ 'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/informations.tpl', 'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/salutation.tpl', 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/conclusion.tpl', + 'd3invoice_pdf_payinfo.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/payinfo.tpl', 'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl', 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl', diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index a841539..97f079c 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -189,13 +189,9 @@ table{ font-weight: bold; } -.conclusion_table { - width: 100%; - border-spacing: 0; - border-collapse: collapse; - padding-top: 10mm -} -.conclusion_table td { +.conclusion_payment, +.conclusion_thankyou { + margin-top: 5mm; font-size: 12px; } From 5f9587413a279e5f24fef452e77aa2917be71328 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 2 Jul 2020 10:35:56 +0200 Subject: [PATCH 106/134] change small syntax issues --- .../AbstractClasses/pdfdocumentsGeneric.php | 4 +- .../views/tpl/admin/orderoverview_pdfform.tpl | 6 +- .../inc/elements/articlecostssummary.tpl | 12 +-- .../documents/inc/elements/articlelist.tpl | 89 ++----------------- .../views/tpl/documents/inc/page/footer.tpl | 12 +-- .../views/tpl/documents/inc/page/header.tpl | 8 +- metadata.php | 4 +- 7 files changed, 30 insertions(+), 105 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 3e66377..23bb70b 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -139,8 +139,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface public function setSmartyVars($iSelLang) { unset($iSelLang); - $this->oSmarty->assign('oConfig', Registry::getSession()->getConfig()); - $this->oSmarty->assign('oViewConf', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); + $this->oSmarty->assign('config', Registry::getSession()->getConfig()); + $this->oSmarty->assign('viewConfig', Registry::getSession()->getConfig()->getActiveView()->getViewConfig()); $this->oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop()); $this->oSmarty->assign('lang', Registry::getLang()); $this->oSmarty->assign('document', $this); diff --git a/Application/views/tpl/admin/orderoverview_pdfform.tpl b/Application/views/tpl/admin/orderoverview_pdfform.tpl index 27e8ff0..0effc13 100644 --- a/Application/views/tpl/admin/orderoverview_pdfform.tpl +++ b/Application/views/tpl/admin/orderoverview_pdfform.tpl @@ -1,14 +1,14 @@ [{if $edit && $oView->canExport()}]
-
- [{$oViewConf->getHiddenSid()}] + + [{$viewConfig->getHiddenSid()}] @@ -103,7 +103,7 @@ @@ -141,7 +141,7 @@ @@ -202,7 +202,7 @@ [{block name="giftcard"}] [{if $order->getFieldData('oxgiftcardcost')}] - [{if $oConfig->getConfigParam('blShowVATForWrapping')}] + [{if $config->getConfigParam('blShowVATForWrapping')}] [{assign var="giftCardPrice" value=$order->getOrderGiftCardPrice()}] diff --git a/Application/views/tpl/documents/inc/elements/articlelist.tpl b/Application/views/tpl/documents/inc/elements/articlelist.tpl index 7deead4..dbb9161 100644 --- a/Application/views/tpl/documents/inc/elements/articlelist.tpl +++ b/Application/views/tpl/documents/inc/elements/articlelist.tpl @@ -22,102 +22,27 @@ [{/if}] - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] + [{foreach from=$order->getOrderArticles(true) item=orderArticle}] [{if $showPrices}] - [{/if}] - - [{/foreach}] - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - [{if $showPrices}] - - - - [{/if}] - - [{/foreach}] - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - [{if $showPrices}] - - - - [{/if}] - - [{/foreach}] - [{foreach from=$order->getOrderArticles(true) item=oOrderArticle}] - - - - [{if $showPrices}] - - - [{/if}] diff --git a/Application/views/tpl/documents/inc/page/footer.tpl b/Application/views/tpl/documents/inc/page/footer.tpl index c4f12b5..0e9a8a9 100644 --- a/Application/views/tpl/documents/inc/page/footer.tpl +++ b/Application/views/tpl/documents/inc/page/footer.tpl @@ -7,12 +7,12 @@ [{block name="pdfFooterLeft"}] [{/block}] [{block name="pdfFooterCenter"}] diff --git a/Application/views/tpl/documents/inc/page/header.tpl b/Application/views/tpl/documents/inc/page/header.tpl index e6f15b1..8e864ac 100644 --- a/Application/views/tpl/documents/inc/page/header.tpl +++ b/Application/views/tpl/documents/inc/page/header.tpl @@ -4,10 +4,10 @@
[{if $showLogo}] [{* pdf logo is available only in non admin theme *}] - [{assign var="isAdmin" value=$oViewConf->isAdmin()}] - [{$oViewConf->setAdminMode(false)}] - - [{$oViewConf->setAdminMode($isAdmin)}] + [{assign var="isAdmin" value=$viewConfig->isAdmin()}] + [{$viewConfig->setAdminMode(false)}] + + [{$viewConfig->setAdminMode($isAdmin)}] [{/if}]
[{/block}] \ No newline at end of file diff --git a/metadata.php b/metadata.php index 5952b46..cb49195 100644 --- a/metadata.php +++ b/metadata.php @@ -42,8 +42,8 @@ $aModule = [ 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', 'extend' => [ - OxidModel\Order::class => d3_pdfdocs_OrderModel::class, - OrderOverview::class => d3_overview_controller_pdfdocuments::class + OxidModel\Order::class => d3_pdfdocs_OrderModel::class, + OrderOverview::class => d3_overview_controller_pdfdocuments::class ], 'controllers' => [], 'templates' => [ From 76e8d3f1e6c6e6c052aeb638e6a4c16420133f5b Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 2 Jul 2020 16:02:15 +0200 Subject: [PATCH 107/134] prevent docs dir from exporting and installing --- .gitattributes | 3 +++ composer.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..358977c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +docs export-ignore +.gitattributes export-ignore +.gitignore export-ignore \ No newline at end of file diff --git a/composer.json b/composer.json index 94661d6..15d4f19 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,8 @@ "extra": { "oxideshop": { "blacklist-filter": [ - "composer.json" + "composer.json", + "docs/**/*.*" ], "target-directory": "d3/pdfdocuments" } From f439da3751a506cae53bce5ddaf8a456eff16443 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 2 Jul 2020 22:35:09 +0200 Subject: [PATCH 108/134] change small syntax issues --- .../Model/d3_Order_PdfDocuments.php | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 Modules/Application/Model/d3_Order_PdfDocuments.php diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php deleted file mode 100644 index 2df74d0..0000000 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @link http://www.oxidmodule.com - */ - -namespace D3\PdfDocuments\Modules\Application\Model; - -use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator; -use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; -use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; -use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; - -class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent -{ - /** - * compatibility to OXID Invoice PDF module - * @param string $sFilename - * @param int $iSelLang - * @param string $target - * @throws noBaseObjectSetException - * @throws noPdfHandlerFoundException - * @throws pdfGeneratorExceptionAbstract - */ - public function genPdf($sFilename, $iSelLang = 0, $target = 'I') - { - $generator = oxNew( orderOverviewPdfGenerator::class ); - $generator->generatePdf($this, $sFilename, $iSelLang, $target); - } -} From ac4f9313bda9b3ee701fb4296860991324ac2a53 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 3 Jul 2020 08:56:04 +0200 Subject: [PATCH 109/134] remove order class extension from metadata --- metadata.php | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.php b/metadata.php index cb49195..20454e4 100644 --- a/metadata.php +++ b/metadata.php @@ -42,7 +42,6 @@ $aModule = [ 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', 'extend' => [ - OxidModel\Order::class => d3_pdfdocs_OrderModel::class, OrderOverview::class => d3_overview_controller_pdfdocuments::class ], 'controllers' => [], From 30199b44ad3a6b3a714c0c027d181b6469ff7ad4 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 3 Jul 2020 10:01:50 +0200 Subject: [PATCH 110/134] change small syntax issues --- Application/translations/de/pdfdocuments_lang.php | 4 ++-- Application/views/tpl/admin/orderoverview_pdfform.tpl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index ee1ac5a..c36bbfb 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -72,8 +72,8 @@ $aLang = array( 'D3_PDFDOCUMENTS_RECEIVED_PAYMENT' => 'Den Rechnungsbetrag haben wir dankend erhalten.', 'D3_PDFDOCUMENTS_MANAGINGDIRECTOR' => 'Geschäftsführer', - 'D3_PDFDOCUMENTS_COURT' => 'Amtsgericht ', - 'D3_PDFDOCUMENTS_HRBNR' => 'HRB ', + 'D3_PDFDOCUMENTS_COURT' => 'Amtsgericht', + 'D3_PDFDOCUMENTS_HRBNR' => 'HRB', 'D3_PDFDOCUMENTS_USTID' => 'Ust.-ID', 'D3_PDFDOCUMENTS_BANK_BANKCODE' => 'BIC/SWIFT-Code', diff --git a/Application/views/tpl/admin/orderoverview_pdfform.tpl b/Application/views/tpl/admin/orderoverview_pdfform.tpl index 0effc13..27e8ff0 100644 --- a/Application/views/tpl/admin/orderoverview_pdfform.tpl +++ b/Application/views/tpl/admin/orderoverview_pdfform.tpl @@ -1,14 +1,14 @@ [{if $edit && $oView->canExport()}]
- - [{$viewConfig->getHiddenSid()}] + + [{$oViewConf->getHiddenSid()}]
- + [{oxmultilang ident="ORDER_OVERVIEW_PDF_TYPE"}]:  diff --git a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl index 320842f..62f384d 100644 --- a/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl +++ b/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl @@ -89,7 +89,7 @@ [{/if}] [{block name="delivery"}] - [{if $oConfig->getConfigParam('blShowVATForDelivery')}] + [{if $config->getConfigParam('blShowVATForDelivery')}] [{assign var="deliveryPrice" value=$order->getOrderDeliveryPrice()}]
- [{if $oConfig->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}] + [{if $config->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}] [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$order->getFieldData('oxdelvat') suffix="COLON"}] [{else}] [{oxmultilang ident="D3_PDFDOCUMENTS_PROPORTIONAL_TAX" suffix="COLON"}] @@ -127,7 +127,7 @@ [{/block}] [{block name="payment"}] - [{if $oConfig->getConfigParam('blShowVATForPayCharge')}] + [{if $config->getConfigParam('blShowVATForPayCharge')}] [{assign var="paymentPrice" value=$order->getOrderPaymentPrice()}]
- [{if $oConfig->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}] + [{if $config->getConfigParam('sAdditionalServVATCalcMethod') != 'proportional'}] [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$order->getFieldData('oxpayvat') suffix="COLON"}] [{else}] [{oxmultilang ident="D3_PDFDOCUMENTS_PROPORTIONAL_TAX" suffix="COLON"}] @@ -166,7 +166,7 @@ [{block name="wrapping"}] [{if $order->getFieldData('oxwrapcost')}] - [{if $oConfig->getConfigParam('blShowVATForWrapping')}] + [{if $config->getConfigParam('blShowVATForWrapping')}] [{assign var="wrappingPrice" value=$order->getOrderWrappingPrice()}]
- [{$oOrderArticle->oxorderarticles__oxamount->value }] + [{$orderArticle->getFieldData('oxamount')}] - [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }] + [{$orderArticle->getFieldData('oxtitle')}] [{ $orderArticle->getFieldData('oxselvariant')}]
- [{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] + [{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$orderArticle->getFieldData('oxartnum')}]
- [{$oOrderArticle->oxorderarticles__oxvat->value }] + [{$orderArticle->getFieldData('oxvat')}] - [{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}] + [{$orderArticle->getBrutPriceFormated()}] [{$currency->name}] - [{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}] -
- [{$oOrderArticle->oxorderarticles__oxamount->value }] - - [{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }] -
- - [{oxmultilang ident="D3_PDFDOCUMENTS_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_PDFDOCUMENTS_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_PDFDOCUMENTS_ARTNR"}] [{$oOrderArticle->oxorderarticles__oxartnum->value }] - -
- [{$oOrderArticle->oxorderarticles__oxvat->value }] - - [{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}] - - [{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}] + [{$orderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
-
[{$shop->oxshops__oxname->value}]
-
[{$shop->oxshops__oxstreet->value}]
-
[{$shop->oxshops__oxzip->value}] [{$shop->oxshops__oxcity->value}]
-
[{$shop->oxshops__oxcountry->value}]
-
[{$shop->oxshops__oxurl->value}]
-
[{$shop->oxshops__oxinfoemail->value}]
+
[{$shop->getFieldData('oxname')}]
+
[{$shop->getFieldData('oxstreet')}]
+
[{$shop->getFieldData('oxzip')}] [{$shop->getFieldData('oxcity')}]
+
[{$shop->getFieldData('oxcountry')}]
+
[{$shop->getFieldData('oxurl')}]
+
[{$shop->getFieldData('oxinfoemail')}]
- + [{oxmultilang ident="ORDER_OVERVIEW_PDF_TYPE"}]:  From 70605bdbd9b5ff0887a2b1ccd91d984ff497ae08 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 3 Jul 2020 20:04:21 +0200 Subject: [PATCH 111/134] change small syntax issues --- .../Controller/orderOverviewPdfGenerator.php | 6 -- .../AbstractClasses/pdfdocumentsGeneric.php | 22 ++++-- .../AbstractClasses/pdfdocumentsOrder.php | 15 ++-- .../Model/Documents/deliverynotePdf.php | 2 +- .../Documents/deliverynotewithoutlogoPdf.php | 2 +- Application/Model/Documents/invoicePdf.php | 4 +- .../Model/Documents/invoicewithoutlogoPdf.php | 2 +- .../Model/Registries/registryAbstract.php | 1 + .../translations/de/pdfdocuments_lang.php | 2 + .../translations/en/pdfdocuments_lang.php | 2 + .../views/admin/de/pdfdocuments_lang.php | 8 +++ .../views/admin/en/pdfdocuments_lang.php | 8 +++ .../views/tpl/admin/orderoverview_pdfform.tpl | 24 +++---- .../d3_overview_controller_pdfdocuments.php | 69 +++++++++++-------- metadata.php | 2 - out/src/css/pdfStyling.css | 1 + 16 files changed, 96 insertions(+), 74 deletions(-) diff --git a/Application/Controller/orderOverviewPdfGenerator.php b/Application/Controller/orderOverviewPdfGenerator.php index a529b3b..fe9b9bc 100644 --- a/Application/Controller/orderOverviewPdfGenerator.php +++ b/Application/Controller/orderOverviewPdfGenerator.php @@ -15,9 +15,7 @@ namespace D3\PdfDocuments\Application\Controller; -use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; -use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface; use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use OxidEsales\Eshop\Application\Model\Order; @@ -27,12 +25,8 @@ class orderOverviewPdfGenerator { /** * @param Order $order - * @param $sFilename * @param int $iSelLang - * @param string $target * @throws noPdfHandlerFoundException - * @throws noBaseObjectSetException - * @throws pdfGeneratorExceptionAbstract */ public function generatePdf(Order $order, $iSelLang = 0) { diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 23bb70b..c4ba93e 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -58,11 +58,10 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface } /** - * @param $sFilename - * @param int $iSelLang + * @param $sFilename + * @param int $iSelLang * @param string $target - * - * @return mixed|string + * @return mixed|string|null * @throws Html2PdfException */ public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT) @@ -80,6 +79,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface /** * @param int $iLanguage + * @throws Html2PdfException */ public function downloadPdf($iLanguage = 0) { @@ -204,8 +204,6 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface } /** - * @param string $sFilename - * * @return string */ public function getFilename() @@ -265,6 +263,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface return false; } + /** + * @param Html2Pdf $oPdf + * @param $sFilename + * @param $target + * @param $html + * @return string|null + * @throws Html2PdfException + */ public function output(Html2Pdf $oPdf, $sFilename, $target, $html) { if ((bool) Registry::getConfig()->getConfigParam('d3PdfDocumentsbDev') === true) { @@ -279,7 +285,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface * @param $sFilename * @param $target * @param $html - * @return mixed + * @return null */ public function outputDev(Html2Pdf $oPdf, $sFilename, $target, $html) { @@ -350,5 +356,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $oPdf->pdf->Error('Incorrect output destination: '.$target); } } + + return null; } } \ No newline at end of file diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index d920c9b..a17fc6d 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -23,7 +23,6 @@ use \OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Application\Model\Payment; use OxidEsales\Eshop\Application\Model\User; use OxidEsales\Eshop\Core\Registry; -use Spipu\Html2Pdf\Exception\Html2PdfException; abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInterface { @@ -65,8 +64,6 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt } /** - * @param string $sFilename - * * @return string */ public function getFilename() @@ -97,19 +94,15 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt } /** - * @param $sFilename - * @param int $iSelLang + * @param $sFilename + * @param int $iSelLang * @param string $target - * - * @return mixed|string|void - * @throws Html2PdfException - * @throws noBaseObjectSetException + * @return mixed|string|null */ public function genPdf($sFilename, $iSelLang = 0, $target = 'I') { if (false == $this->getOrder()) { - $e = oxNew(noBaseObjectSetException::class); - throw $e; + throw oxNew(noBaseObjectSetException::class); } return parent::genPdf($sFilename, $iSelLang, $target); diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index 5af3b11..e435628 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -34,7 +34,7 @@ class deliverynotePdf extends pdfdocumentsOrder */ public function getTitleIdent() { - return "ORDER_OVERVIEW_PDF_DNOTE"; + return "D3_PDFDOCUMENTS_DELIVERYNOTE"; } /** diff --git a/Application/Model/Documents/deliverynotewithoutlogoPdf.php b/Application/Model/Documents/deliverynotewithoutlogoPdf.php index d348b2e..deb81e8 100644 --- a/Application/Model/Documents/deliverynotewithoutlogoPdf.php +++ b/Application/Model/Documents/deliverynotewithoutlogoPdf.php @@ -32,7 +32,7 @@ class deliverynotewithoutlogoPdf extends deliverynotePdf */ public function getTitleIdent() { - return "ORDER_OVERVIEW_PDF_DNOTE_WITHOUT_LOGO"; + return "D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO"; } /** diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 1761067..4cc26ce 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -40,7 +40,7 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn */ public function getTitleIdent() { - return "ORDER_OVERVIEW_PDF_STANDART"; + return "D3_PDFDOCUMENTS_INVOICE"; } /** @@ -103,8 +103,6 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn } /** - * @param string $sFilename - * * @return string */ public function getFilename() diff --git a/Application/Model/Documents/invoicewithoutlogoPdf.php b/Application/Model/Documents/invoicewithoutlogoPdf.php index 9a09606..1f2e266 100644 --- a/Application/Model/Documents/invoicewithoutlogoPdf.php +++ b/Application/Model/Documents/invoicewithoutlogoPdf.php @@ -33,7 +33,7 @@ class invoicewithoutlogoPdf extends invoicePdf */ public function getTitleIdent() { - return "ORDER_OVERVIEW_PDF_STANDART_WITHOUT_LOGO"; + return "D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO"; } /** diff --git a/Application/Model/Registries/registryAbstract.php b/Application/Model/Registries/registryAbstract.php index 1742afd..5d2f924 100644 --- a/Application/Model/Registries/registryAbstract.php +++ b/Application/Model/Registries/registryAbstract.php @@ -75,6 +75,7 @@ abstract class registryAbstract implements registryGenericInterface /** * @param $className * generator fully qualified class name + * @return bool */ public function hasGenerator($className) { diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index c36bbfb..50e7cf6 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -38,7 +38,9 @@ $aLang = array( 'D3_PDFDOCUMENTS_DELIVERYADDRESS' => 'Lieferadresse', 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', + 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Rechnung ohne Logo', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', + 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Lieferschein ohne Logo', 'D3_PDFDOCUMENTS_ORDERNR' => 'Bestellnr.', 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Ihre Bestellung vom %1$s bei "%2$s"', diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php index 3d2f93c..f6e7ec5 100644 --- a/Application/translations/en/pdfdocuments_lang.php +++ b/Application/translations/en/pdfdocuments_lang.php @@ -37,7 +37,9 @@ $aLang = array( 'D3_PDFDOCUMENTS_DELIVERYADDRESS' => 'Shipping Address', 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', + 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', + 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Deliverynote without logo', 'D3_PDFDOCUMENTS_ORDERNR' => 'Order No.', 'D3_PDFDOCUMENTS_ORDER_FROM_AT' => 'Your order from %1$s at "%2$s"', diff --git a/Application/views/admin/de/pdfdocuments_lang.php b/Application/views/admin/de/pdfdocuments_lang.php index 2109978..5dfdecb 100644 --- a/Application/views/admin/de/pdfdocuments_lang.php +++ b/Application/views/admin/de/pdfdocuments_lang.php @@ -18,4 +18,12 @@ $aLang = array( 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus', + + 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', + 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Rechnung ohne Logo', + 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', + 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Lieferschein ohne Logo', + + 'D3_PDFDOCUMENTS_PDF_TYPE' => 'PDF Typ', + 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'PDF ausgeben', ); diff --git a/Application/views/admin/en/pdfdocuments_lang.php b/Application/views/admin/en/pdfdocuments_lang.php index 98d7682..fd47a0f 100644 --- a/Application/views/admin/en/pdfdocuments_lang.php +++ b/Application/views/admin/en/pdfdocuments_lang.php @@ -18,4 +18,12 @@ $aLang = array( 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode', + + 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', + 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo', + 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', + 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Deliverynote without logo', + + 'D3_PDFDOCUMENTS_PDF_TYPE' => 'PDF Type', + 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Create PDF', ); diff --git a/Application/views/tpl/admin/orderoverview_pdfform.tpl b/Application/views/tpl/admin/orderoverview_pdfform.tpl index 27e8ff0..7ab0cd7 100644 --- a/Application/views/tpl/admin/orderoverview_pdfform.tpl +++ b/Application/views/tpl/admin/orderoverview_pdfform.tpl @@ -1,18 +1,18 @@ -[{if $edit && $oView->canExport()}] +[{if $edit && $oView->d3CanExport()}]
[{$oViewConf->getHiddenSid()}] - + - - -
- + - [{oxmultilang ident="ORDER_OVERVIEW_PDF_TYPE"}]:  - + :  +
- [{oxmultilang ident="GENERAL_LANGUAGE"}] - + +

- - +

+ +
diff --git a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php index 874154f..34a7757 100644 --- a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php @@ -18,50 +18,59 @@ namespace D3\PdfDocuments\Modules\Application\Controller; use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator; +use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException; +use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments; use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\DatabaseProvider; +use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\TableViewNameGenerator; -use OxidEsales\Eshop\Core\UtilsView; class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocuments_parent { - public function canExport() - { - // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804). - $masterDb = DatabaseProvider::getMaster(); - $sOrderId = $this->getEditObjectId(); + /** + * @return bool + * @throws DatabaseConnectionException + */ + public function d3CanExport() + { + // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804). + $masterDb = DatabaseProvider::getMaster(); + $sOrderId = $this->getEditObjectId(); - $viewNameGenerator = Registry::get(TableViewNameGenerator::class); - $sTable = $viewNameGenerator->getViewName("oxorderarticles"); + $viewNameGenerator = Registry::get(TableViewNameGenerator::class); + $sTable = $viewNameGenerator->getViewName("oxorderarticles"); - $sQ = "select count(oxid) from {$sTable} where oxorderid = " . $masterDb->quote($sOrderId) . " and oxstorno = 0"; - $blCan = (bool) $masterDb->getOne($sQ); - - return $blCan; - } - - public function createPDF() - { - $soxId = $this->getEditObjectId(); - if ($soxId != "-1" && isset($soxId)) { - /** @var d3_Order_PdfDocuments $oOrder */ - $oOrder = oxNew(Order::class); - if ($oOrder->load($soxId)) { - $generator = oxNew( orderOverviewPdfGenerator::class ); - $generator->generatePdf($oOrder, Registry::getRequest()->getRequestEscapedParameter("pdflanguage")); - } + $sQ = "select count(oxid) from {$sTable} where oxorderid = " . $masterDb->quote($sOrderId) . " and oxstorno = 0"; + return (bool) $masterDb->getOne($sQ); } - } /** - * @return registryOrderoverview + * @throws noBaseObjectSetException + * @throws noPdfHandlerFoundException + * @throws pdfGeneratorExceptionAbstract */ - public function d3getGeneratorList() - { - return oxNew(registryOrderoverview::class); - } + public function d3CreatePDF() + { + $soxId = $this->getEditObjectId(); + if ($soxId != "-1" && isset($soxId)) { + /** @var d3_Order_PdfDocuments $oOrder */ + $oOrder = oxNew(Order::class); + if ($oOrder->load($soxId)) { + $generator = oxNew( orderOverviewPdfGenerator::class ); + $generator->generatePdf($oOrder, Registry::getRequest()->getRequestEscapedParameter("pdflanguage")); + } + } + } + + /** + * @return registryOrderoverview + */ + public function d3getGeneratorList() + { + return oxNew(registryOrderoverview::class); + } } \ No newline at end of file diff --git a/metadata.php b/metadata.php index 20454e4..0c91685 100644 --- a/metadata.php +++ b/metadata.php @@ -16,9 +16,7 @@ */ use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments; -use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments as d3_pdfdocs_OrderModel; use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; -use OxidEsales\Eshop\Application\Model as OxidModel; /** * Metadata version diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index 97f079c..cee2a78 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -79,6 +79,7 @@ table{ } .salutation .documenttype { font-weight: bold; + margin-bottom: 5mm; } .article_table, From a3ea238afb208c613326e3df0396e839cba90a6f Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 3 Jul 2020 21:59:18 +0200 Subject: [PATCH 112/134] add final changes --- Application/Model/Documents/invoicePdf.php | 3 +- .../views/admin/de/pdfdocuments_lang.php | 1 + .../views/admin/en/pdfdocuments_lang.php | 1 + .../views/tpl/admin/orderoverview_pdfform.tpl | 71 ++++++++++--------- out/src/css/pdfStyling.css | 13 ++-- 5 files changed, 48 insertions(+), 41 deletions(-) diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 4cc26ce..9eae5e3 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -31,8 +31,7 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn */ public function getRequestId() { - // same like in OXID PDF module - return 'standart'; + return 'invoice'; } /** diff --git a/Application/views/admin/de/pdfdocuments_lang.php b/Application/views/admin/de/pdfdocuments_lang.php index 5dfdecb..f619e26 100644 --- a/Application/views/admin/de/pdfdocuments_lang.php +++ b/Application/views/admin/de/pdfdocuments_lang.php @@ -19,6 +19,7 @@ $aLang = array( 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus', + 'D3_PDFDOCUMENTS' => 'PDF-Dokumente', 'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung', 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Rechnung ohne Logo', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', diff --git a/Application/views/admin/en/pdfdocuments_lang.php b/Application/views/admin/en/pdfdocuments_lang.php index fd47a0f..a582cbd 100644 --- a/Application/views/admin/en/pdfdocuments_lang.php +++ b/Application/views/admin/en/pdfdocuments_lang.php @@ -19,6 +19,7 @@ $aLang = array( 'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings', 'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode', + 'D3_PDFDOCUMENTS' => 'PDF Documents', 'D3_PDFDOCUMENTS_INVOICE' => 'Invoice', 'D3_PDFDOCUMENTS_INVOICE_WITHOUT_LOGO' => 'Invoice without logo', 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', diff --git a/Application/views/tpl/admin/orderoverview_pdfform.tpl b/Application/views/tpl/admin/orderoverview_pdfform.tpl index 7ab0cd7..c497d7a 100644 --- a/Application/views/tpl/admin/orderoverview_pdfform.tpl +++ b/Application/views/tpl/admin/orderoverview_pdfform.tpl @@ -1,43 +1,46 @@ [{if $edit && $oView->d3CanExport()}]
- + [{$oViewConf->getHiddenSid()}] - - - - + + + + +
- - - :  - + + + + + + - - - - - - - -
+ [{oxmultilang ident= + + :  + +
+ + -
- - -

- - -
+ +

+ + +
+ [{/if}] diff --git a/out/src/css/pdfStyling.css b/out/src/css/pdfStyling.css index cee2a78..315fa53 100644 --- a/out/src/css/pdfStyling.css +++ b/out/src/css/pdfStyling.css @@ -98,7 +98,7 @@ table{ } .article_table th, .article_table_prices th { - border-bottom: solid 0.15mm #000; + border-bottom: solid 0.75pt #000; font-weight: normal; font-size: 11px; } @@ -174,11 +174,11 @@ table{ text-align: right; } .article_costs_table .sumnetto td { - border-top: solid 0.15mm #000; + border-top: 0.75pt solid #000; } .article_costs_table .voucherdiscount td, .article_costs_table .sumbrutto td { - border-bottom: solid 0.15mm #000; + border-bottom: solid 0.75pt #000; } .article_costs_table .totalseparator td { height: 0; @@ -186,9 +186,12 @@ table{ } .article_costs_table .totalseparator td, .article_costs_table .totalsum td { - border-bottom: solid 0.3mm #000; + border-bottom: solid 0.75pt #000; font-weight: bold; } +.article_costs_table .totalsum td { + border-bottom: double 2pt #000; +} .conclusion_payment, .conclusion_thankyou { @@ -204,7 +207,7 @@ table{ padding: 0; } .footer table { - border-top: solid 1px #000; + border-top: solid 0.75pt #000; width: 100%; position: relative; } From 3c95b7b928c2a8631b6245e423e8d2bd8e4ed63e Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 3 Jul 2020 22:24:50 +0200 Subject: [PATCH 113/134] change installation documentation --- docs/daux/changelog/010_Changelog.md | 28 ++++------------- docs/daux/config.json | 19 ++++++------ docs/daux/editions/010_Editionen.md | 12 ------- docs/daux/installation/002_Installation.md | 2 +- .../010_Systemanforderungen.md | 15 +++------ ...030_Kompatibilitaet_mit_anderen_Modulen.md | 2 +- .../040_Beiliegende_Bibliotheken.md | 8 ----- .../010_Anforderungen/050_Vorbereitungen.md | 9 ------ .../020_Neuinstallation/005_Vorbereitung.md | 7 ----- .../030_Verwendung_eigener_Themes.md | 14 --------- .../060_Shopanpassungen_installieren.md | 11 ------- .../070_TMP-Ordner_leeren.md | 6 ++-- .../080_Lizenz_eintragen.md | 9 ------ .../090_Cronjob_einrichten.md | 13 -------- .../050_Shopanpassungen_installieren.md | 11 ------- .../030_Update/060_TMP-Ordner_leeren.md | 6 ++-- .../070_Lizenzschluessel_aktualisieren.md | 5 --- .../installation/040_Installationspruefung.md | 18 +---------- docs/daux/installation/050_Schnellstart.md | 7 ----- .../050_Datenbank_bereinigen.md | 31 ------------------- .../060_TMP-Ordner_leeren.md | 6 ++-- 21 files changed, 28 insertions(+), 211 deletions(-) delete mode 100644 docs/daux/editions/010_Editionen.md delete mode 100644 docs/daux/installation/010_Anforderungen/040_Beiliegende_Bibliotheken.md delete mode 100644 docs/daux/installation/010_Anforderungen/050_Vorbereitungen.md delete mode 100644 docs/daux/installation/020_Neuinstallation/005_Vorbereitung.md delete mode 100644 docs/daux/installation/020_Neuinstallation/030_Verwendung_eigener_Themes.md delete mode 100644 docs/daux/installation/020_Neuinstallation/060_Shopanpassungen_installieren.md delete mode 100644 docs/daux/installation/020_Neuinstallation/080_Lizenz_eintragen.md delete mode 100644 docs/daux/installation/020_Neuinstallation/090_Cronjob_einrichten.md delete mode 100644 docs/daux/installation/030_Update/050_Shopanpassungen_installieren.md delete mode 100644 docs/daux/installation/030_Update/070_Lizenzschluessel_aktualisieren.md delete mode 100644 docs/daux/installation/050_Schnellstart.md delete mode 100644 docs/daux/installation/060_Deinstallation/050_Datenbank_bereinigen.md diff --git a/docs/daux/changelog/010_Changelog.md b/docs/daux/changelog/010_Changelog.md index 303f4b6..5ec1125 100644 --- a/docs/daux/changelog/010_Changelog.md +++ b/docs/daux/changelog/010_Changelog.md @@ -6,27 +6,11 @@ title: Changelog --- -## 1.1.0.1 - (2019-02-20) - -### Fixed -- ... -- ... - ---- - -## 1.1.0.0 - (2018-05-29) - -**Minor version upgrade notice: there are some backward-incompatible changes to this release.** - -#### Fixed -- Einstellungs-Überladung korrigiert - verwendet Einstellungen der Hauptsprache, wenn in aktueller Sprache keine Einstellungen gespeichert wurden - -#### Changed -- kleine Textänderungen in der Installationsroutine - ---- - -## 1.0.0.0 - (2018-05-15) +## 1.0.0.0 - (2020-07-10) #### Added -- Angepasst für Shopversion 6.x, Installation via Composer +- Framework zur Erstellung unterschiedlichster PDF Dokumente +- ermöglicht Generierung von Rechnungen und Lieferscheinen für Bestellungen aus dem Adminbereich +- enthält Templates und Basislayouts für Rechnungen und Lieferscheine +- enthält Registries (Dokumentenlisten) für Bestellungen im Adminbereich sowie für Auftragsmanager-Aktionen +- kann als vollwertiger Ersatz für Invoice-PDF-Modul verwendet werden diff --git a/docs/daux/config.json b/docs/daux/config.json index 3dfe754..653337c 100644 --- a/docs/daux/config.json +++ b/docs/daux/config.json @@ -1,10 +1,10 @@ { - "title": " MODULNAME", - "moduleversion": "5.0.0.0", + "title": " PDF Dokumente", + "moduleversion": "1.0.0.0", "titledesc": "für den Oxid eShop", "author": "D³ Data Development", - "moduledate": "17.04.2018", - "editors": "XX/YY", + "moduledate": "10.07.2020", + "editors": "", "tagline": "", "image": "", "ignore": { @@ -32,7 +32,6 @@ "powered_by": "" }, "languages": { - "editions": "Editionen", "installation": "Installation", "manual": "Handbuch", "changelog": "Changelog", @@ -62,11 +61,11 @@ } }, "variables": { - "modulename" : " MODULNAME", - "menutitle" : " MODULNAME", - "modulefolder" : "module_folder", - "modcfgident" : "d3modident", - "composerident" : "d3/moduleident" + "modulename" : " PDF Dokumente", + "menutitle" : " PDF Dokumente", + "modulefolder" : "pdfdocuments", + "modcfgident" : "d3pdfdocuments", + "composerident" : "d3/pdfdocuments" }, "versionselector": false, "versiondirectoryindex": 2 diff --git a/docs/daux/editions/010_Editionen.md b/docs/daux/editions/010_Editionen.md deleted file mode 100644 index 3ce4acf..0000000 --- a/docs/daux/editions/010_Editionen.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Editionen ---- - -Das Modul **{$modulename}** erhalten Sie in verschiedenen Editionen mit unterschiedlichem Funktionsumfang. - -Definition der Unterschiede: - -| Free-Edition | Standard-Edition | Premium-Edition | -|:-------------:|:-----------------:|:-----------------:| -| 1 | 2 | 3 | - diff --git a/docs/daux/installation/002_Installation.md b/docs/daux/installation/002_Installation.md index ffa02e6..a20979a 100644 --- a/docs/daux/installation/002_Installation.md +++ b/docs/daux/installation/002_Installation.md @@ -3,7 +3,7 @@ title: Installation / Update / Deinstallation --- * [Anforderungen](installation/010_Anforderungen/010_Systemanforderungen.md) -* [Neuinstallation](installation/020_Neuinstallation/005_Vorbereitung.md) +* [Neuinstallation](installation/020_Neuinstallation/020_Modul_hinzufuegen.md) * [Update](installation/030_Update/005_Updatedefinition.md) * [Deinstallation](installation/060_Deinstallation/010_Modulerweiterungen_deaktivieren_und_entfernen.md) diff --git a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md index a225496..1c9b604 100644 --- a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md +++ b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md @@ -3,21 +3,14 @@ title: Systemanforderungen --- * PHP Version - * 5.6.x bis 7.3.x -* PHP Decoder - * installierter ionCube Loader + * 7.0.x bis 7.4.x * Shopversionen / -editionen * OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version * 6.0.x * 6.1.x * 6.2.x * Themes - * flow - * wave -* D3 Modul-Connector ([kostenfrei bei D3 erhältlich](https://www.oxidmodule.com/connector/)) ab Version 5.3.0.0 + * Diese Modul bindet sich nicht in Frontendthemes ein und ist daher davon unabhängig +* Template-Engine + * Smarty * Installation via [Composer](https://getcomposer.org) -* mindestens ein freier Cronjob zur automatischen Ausführung der angelegten Aufgaben - -Beachten Sie, dass die Ihnen vorliegende Modulversion entsprechend für **PHP 5.6**, **PHP 7.0**, **PHP 7.1**, **PHP 7.2** oder **PHP 7.3** sowie dem auf Ihrem Server vorhandenen Decoder (**ionCube Loader**) kompatibel ist. Im Zweifelsfall kontaktieren Sie uns und nennen den für Ihren Shop genutzten Decoder und die PHP-Version. - -Kontrollieren Sie bitte auch, ob diese Modulversion für die von Ihnen eingesetzte Shopedition (Professional Edition (PE) oder Enterprise Edition (EE)) ausgelegt ist. diff --git a/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md b/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md index 5f91b53..b8fc5bd 100644 --- a/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md +++ b/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md @@ -2,4 +2,4 @@ title: Kompatibilität mit anderen Modulen --- -Das „Modul“ integriert sich auch in die Erweiterung „Visual CMS“ von OXID eSales AG & digidesk - media solutions, sofern diese im Shop installiert wurde. Diese Integration wurde für die Version 3.0.0 des „Visual CMS“-Moduls entwickelt. \ No newline at end of file +Das „Modul“ integriert sich auch in die Erweiterung "Auftragsmanager" von (D3) Data Development, sofern dieses im Shop installiert wurde. Diese Integration wurde für die Version 4.0.0.0 des "Auftragsmanager"-Moduls entwickelt. diff --git a/docs/daux/installation/010_Anforderungen/040_Beiliegende_Bibliotheken.md b/docs/daux/installation/010_Anforderungen/040_Beiliegende_Bibliotheken.md deleted file mode 100644 index 29e9adc..0000000 --- a/docs/daux/installation/010_Anforderungen/040_Beiliegende_Bibliotheken.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: beiliegende Bibliotheken ---- - -Dem Modul liegt eine Kopie der **XYZ**-Bibliothek bei. Bitte beachten Sie auch deren folgende Lizenzhinweise: - -- Lizenzhinweis #1 -- Lizenzhinweis #2 \ No newline at end of file diff --git a/docs/daux/installation/010_Anforderungen/050_Vorbereitungen.md b/docs/daux/installation/010_Anforderungen/050_Vorbereitungen.md deleted file mode 100644 index c122b72..0000000 --- a/docs/daux/installation/010_Anforderungen/050_Vorbereitungen.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Vorbereitungen ---- - -Installieren Sie bitte zuerst unseren Modul-Connector in der erforderlichen Version. -Ob dies evtl. schon geschehen ist, können Sie im Adminbereich Ihres Shops prüfen. Existiert der Punkt [ (D3) Module ] -> [ Modul-Connector ], können Sie die installierte Version unter [ Bibliotheksverwaltung ] ablesen. Fehlt dieser Eintrag, installieren Sie den kostenfreien Connector. -Informationen zu dessen Installation finden Sie auf unserer [Homepage](https://www.oxidmodule.com/Connector/). - -Klicken Sie auf den Reiter [ Downloads ] und wählen dort das für Ihre Installation passende Paket. \ No newline at end of file diff --git a/docs/daux/installation/020_Neuinstallation/005_Vorbereitung.md b/docs/daux/installation/020_Neuinstallation/005_Vorbereitung.md deleted file mode 100644 index 36aac51..0000000 --- a/docs/daux/installation/020_Neuinstallation/005_Vorbereitung.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Vorbereitungen ---- - -Installieren Sie bitte zuerst unseren Modul-Connector in der erforderlichen Version. Ob dies evtl. schon geschehen ist, können Sie im Adminbereich Ihres Shops prüfen. -Existiert der Punkt [ (D3) Module ] -> [ Modul-Connector ], können Sie die installierte Version unter [ Bibliotheksverwaltung ] ablesen. -Fehlt dieser Eintrag, installieren Sie den Modul-Connector bitte vorab. Hinweise zu dessen Installation finden Sie in der [Modul-Connector Dokumentation](https://docs.oxidmodule.com/Modul_Connector/). \ No newline at end of file diff --git a/docs/daux/installation/020_Neuinstallation/030_Verwendung_eigener_Themes.md b/docs/daux/installation/020_Neuinstallation/030_Verwendung_eigener_Themes.md deleted file mode 100644 index 0123a15..0000000 --- a/docs/daux/installation/020_Neuinstallation/030_Verwendung_eigener_Themes.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Verwendung eigener Themes ---- - -Das Modul ist für die Verwendung mit den folgenden OXID-Themes vorbereitet: - -* Flow -* Azure - -Verwenden Sie in Ihrem Shop ein angepasstes Verzeichnis für Ihre Templates (neues Theme oder CustomTheme), kopieren Sie die Templates und / oder die CSS-Dateien in die neuen Ordner. - -Ähnelt Ihr neues Theme technisch einem der OXID-Originale, können Sie dieses darauf umleiten. Childs von originalen OXID- Themes benötigen keine Umleitung. - -Weitere Informationen zur Umleitung finden Sie in unserer [FAQ](https://faq.d3data.de/oxid-eshop/module-oxid-eshop/anpassungen/template-bloecke-dem-eigenen-theme-zuordnen/). \ No newline at end of file diff --git a/docs/daux/installation/020_Neuinstallation/060_Shopanpassungen_installieren.md b/docs/daux/installation/020_Neuinstallation/060_Shopanpassungen_installieren.md deleted file mode 100644 index 636441d..0000000 --- a/docs/daux/installation/020_Neuinstallation/060_Shopanpassungen_installieren.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Shopanpassungen installieren ---- - -Direkt nach der Modulaktivierung startet der Assistent, der Sie durch die Shopanpassung führt. Darin können Sie verschiedene Optionen der Installation wählen. - -Den Installationsassistenten finden Sie auch unter den Menüpunkten [ Admin ] -> [ (D3) Module ] -> [ Modul-Connector ] -> [ Modulverwaltung ] -> [ Modulinstallation ]. - -Bei tiefgreifenden Änderungen an Ihrem Shop (z.B. Hinzufügen weiterer Sprachen oder Mandanten) rufen Sie den Installationsassistenten bitte erneut auf, um dann eventuell notwendige Nacharbeiten für das Modul ausführen zu lassen. - -Möchten Sie die Änderungen manuell installieren, können Sie sich über diesen Assistenten ebenfalls eine Checkliste erstellen. \ No newline at end of file diff --git a/docs/daux/installation/020_Neuinstallation/070_TMP-Ordner_leeren.md b/docs/daux/installation/020_Neuinstallation/070_TMP-Ordner_leeren.md index fb6a3a2..02f06ec 100644 --- a/docs/daux/installation/020_Neuinstallation/070_TMP-Ordner_leeren.md +++ b/docs/daux/installation/020_Neuinstallation/070_TMP-Ordner_leeren.md @@ -2,8 +2,6 @@ title: TMP-Ordner leeren --- -Leeren Sie das Verzeichnis `tmp` über [ Admin ] -> [ (D3) Module ] -> [ Modul-Connector ] -> [ TMP leeren ]. Markieren Sie [ komplett leeren ] und klicken auf [ TMP leeren ]. +Leeren Sie das Verzeichnis `tmp` Ihres Shops. -Sofern die Views nicht automatisch aktualisiert werden, führen Sie dies noch durch. - -> [i] Erfordert Ihre Installation eine andere Vorgehensweise zum Leeren des Caches oder zum Aktualisieren der Datenbank-Viewtabellen, führen Sie diese bitte aus. \ No newline at end of file +> [i] Erfordert Ihre Installation eine andere Vorgehensweise zum Leeren des Caches oder zum Aktualisieren der Datenbank-Viewtabellen, führen Sie diese bitte aus. diff --git a/docs/daux/installation/020_Neuinstallation/080_Lizenz_eintragen.md b/docs/daux/installation/020_Neuinstallation/080_Lizenz_eintragen.md deleted file mode 100644 index 1e75d27..0000000 --- a/docs/daux/installation/020_Neuinstallation/080_Lizenz_eintragen.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Lizenzschlüssel eintragen ---- - -Das Modul verwendet Lizenzschlüssel, um die Lizenzverwaltung für Sie und auch für uns einfacher zu gestalten. Hierbei haben Sie je nach Modul die Wahl zwischen einer kostenfreien Testlizenz und einer Lizenz für den Einsatz im Livebetrieb. - -Speziell **{$modulename}** wird in unterschiedlichen (teilweise kostenfreien) Editionen für den Livebetrieb angeboten. Besuchen Sie unseren [Moduleshop](https://www.oxidmodule.com/), um mehr darüber zu erfahren. - -Rufen Sie zum Anfordern des Lizenzschlüssels die Modulverwaltung im Adminbereich unter [ (D3) Module ] -> [ Modul-Connector ] -> [ Modulverwaltung ] auf. Klappen Sie den Eintrag des jeweiligen Moduls aus. Sofern erforderlich, können Sie hier den Lizenzassistenten starten, der schnell und einfach ihr Modul aktiviert. \ No newline at end of file diff --git a/docs/daux/installation/020_Neuinstallation/090_Cronjob_einrichten.md b/docs/daux/installation/020_Neuinstallation/090_Cronjob_einrichten.md deleted file mode 100644 index ff7eb59..0000000 --- a/docs/daux/installation/020_Neuinstallation/090_Cronjob_einrichten.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Cronjob einrichten ---- - -Legen Sie den Cronjob für die automatische Bearbeitung der eingerichteten Aufträge an. Die für die Anlage benötigten Daten finden Sie im Adminbereich des Moduls unter [ (D3) Module ] -> [ {$menutitle} ] -> [ Einstellungen ] -> [ Grundeinstellungen ]. Weitere Informationen zum Anlegen von Cronjobs finden Sie in unserer [FAQ](https://faq.d3data.de/technik/wie-werden-cronjobs-angelegt/). - -> [!!] Sie sollten unbedingt den Aufruf von `.sh`-Dateien via Browser verhindern, so dass kein Unbefugter die Datei von außen aufrufen kann. Dazu können Sie z.B. die `.htaccess`-Datei des Shops um folgende Zeilen erweitern: - -```htaccess - - Require all denied - -``` \ No newline at end of file diff --git a/docs/daux/installation/030_Update/050_Shopanpassungen_installieren.md b/docs/daux/installation/030_Update/050_Shopanpassungen_installieren.md deleted file mode 100644 index 577efa4..0000000 --- a/docs/daux/installation/030_Update/050_Shopanpassungen_installieren.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Shopanpassungen installieren ---- - -Ob Shopanpassungen notwendig sind, ist von der Versionsänderung des Moduls abhängig. - -Möglicherweise sehen Sie nach dem Neuaktivieren des Moduls den Installationsassistent, der Sie durch die Änderungen führt. Folgen Sie dann den einzelnen Schritten. Möchten Sie die Änderungen manuell installieren, können Sie sich über diesen Assistenten ebenfalls eine Checkliste erstellen. - -Wird der Assistent nicht gezeigt (Sie sehen wieder die Modulübersicht), waren keine Anpassungen am Shop notwendig. - -Ob erforderliche Updates ausgeführt werden sollen, können Sie jederzeit im Adminbereich unter [ (D3) Module ] -> [ Modul-Connector ] -> [ Modulverwaltung ] -> [ Modulinstallation ] prüfen. \ No newline at end of file diff --git a/docs/daux/installation/030_Update/060_TMP-Ordner_leeren.md b/docs/daux/installation/030_Update/060_TMP-Ordner_leeren.md index fb6a3a2..a9dfa15 100644 --- a/docs/daux/installation/030_Update/060_TMP-Ordner_leeren.md +++ b/docs/daux/installation/030_Update/060_TMP-Ordner_leeren.md @@ -2,8 +2,6 @@ title: TMP-Ordner leeren --- -Leeren Sie das Verzeichnis `tmp` über [ Admin ] -> [ (D3) Module ] -> [ Modul-Connector ] -> [ TMP leeren ]. Markieren Sie [ komplett leeren ] und klicken auf [ TMP leeren ]. +Leeren Sie das Verzeichnis Ihres Shops. -Sofern die Views nicht automatisch aktualisiert werden, führen Sie dies noch durch. - -> [i] Erfordert Ihre Installation eine andere Vorgehensweise zum Leeren des Caches oder zum Aktualisieren der Datenbank-Viewtabellen, führen Sie diese bitte aus. \ No newline at end of file +> [i] Erfordert Ihre Installation eine andere Vorgehensweise zum Leeren des Caches oder zum Aktualisieren der Datenbank-Viewtabellen, führen Sie diese bitte aus. diff --git a/docs/daux/installation/030_Update/070_Lizenzschluessel_aktualisieren.md b/docs/daux/installation/030_Update/070_Lizenzschluessel_aktualisieren.md deleted file mode 100644 index 378a069..0000000 --- a/docs/daux/installation/030_Update/070_Lizenzschluessel_aktualisieren.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Lizenzschlüssel aktualisieren ---- - -Wird für die neue Modulversion ein aktualisierter Lizenzschlüssel benötigt, tragen Sie diesen im Adminbereich unter [ (D3) Module ] -> [ Modul-Connector ] -> [ Modulverwaltung ] ein. Klappen Sie dazu den Eintrag des jeweiligen Moduls aus und starten den Lizenzassistent. \ No newline at end of file diff --git a/docs/daux/installation/040_Installationspruefung.md b/docs/daux/installation/040_Installationspruefung.md index 4fcf66c..9a3340b 100644 --- a/docs/daux/installation/040_Installationspruefung.md +++ b/docs/daux/installation/040_Installationspruefung.md @@ -9,21 +9,5 @@ Um die erfolgreiche Installation zu prüfen, können Sie die folgende(n) Checkli ### Backend * Modul ist unter [ Erweiterungen ] -> [ Module ] aktiv geschaltet -* Modul ist unter [ (D3) Module ] -> [ Modul-Connector ] -> [ Modulverwaltung ] aktiv geschaltet -* Modul zeigt unter [ (D3) Module ] -> [ {$menutitle} ] einen eigenen Bereich für Einstellungen -* Modul zeigt unter [ Artikel verwalten ] -> [ Artikel ] -> [ Erweitert ] die Einstellung [ Wichtigkeit des Artikels im Sortiment ] -* ... um weitere Punkte ergänzen +* Modul zeigt unter [ Bestellungen verwalten ] -> [ Bestellungen ] -> [ Übersicht ] einen eigenen Bereich für PDF-Exporte -### Frontend - -* Punkte einfügen oder Absatz entfernen - -## Einstellungsabhängige Prüfungen - -### Backend - -* Punkte einfügen oder Absatz entfernen - -### Frontend - -* Punkte einfügen oder Absatz entfernen diff --git a/docs/daux/installation/050_Schnellstart.md b/docs/daux/installation/050_Schnellstart.md deleted file mode 100644 index 4e10ac7..0000000 --- a/docs/daux/installation/050_Schnellstart.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Schnellstart ---- - -Das Modul **{$modulename}** bringt einen umfangreichen Adminbereich mit, in dem Sie die Konfigurationseinstellungen des Moduls setzen können. Über das Menü [ (D3) Module ] -> [{$menutitle}] -> [Einstellungen] erreichen Sie die Einstellseiten. Arbeiten Sie idealerweise die Optionen einmal durch. Hinweise zu den einzelnen Einstellungen finden Sie in dem dahinter stehenden Fragezeichenfeld. Durch einen Klick darauf öffnet sich der Hinweistext. - -Die meisten Optionen sind zusätzlich im [Handbuch zum Modul](../manual/000_Handbuch.md) umfangreicher beschrieben. diff --git a/docs/daux/installation/060_Deinstallation/050_Datenbank_bereinigen.md b/docs/daux/installation/060_Deinstallation/050_Datenbank_bereinigen.md deleted file mode 100644 index ac816cc..0000000 --- a/docs/daux/installation/060_Deinstallation/050_Datenbank_bereinigen.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Datenbank bereinigen ---- - -Das Modul legt Informationen in der Datenbank ab. Sofern diese Daten nicht mehr benötigt werden, können diese gelöscht werden. - -> [!] Legen Sie sich vorab bitte unbedingt eine Sicherung an, um die Daten im Zweifelsfall wiederherstellen zu können. - -Für das Modul **{$modulename}** sind dies die folgende Tabellen und Felder: - -* die komplette Tabelle `tablename` -* sofern vorhanden: `tablename_setX` *) - -und diese Felder in bestehenden Tabellen: - -* in Tabelle `oxorder`: - * das Feld `fieldname1` - * das Feld `fieldname2` -* in Tabelle `oxuser`: - * das Feld `fieldname3` - * das Feld `fieldname4` - -sowie diese Einträge in bestehenden Tabellen: - -* in Tabelle `d3_cfg_mod`: - * den Eintrag `oxmodid = "{$modcfgident}"` **) - -*) `_setX` ist eine Tabellenliste, die mit `_set1` beginnen und shopabhängig auch Tabellen mit höheren Nummerierungen enthalten kann (z.B. `_set2`, `_set3`, …). -Zu einigen dieser Tabellen wurden die Config-Einträge `aMultiLangTables` (bei Enterprise Edition auch `aMultiShopTables`) um entsprechende Einträge ergänzt). Bereinigen Sie diese ebenfalls. - -**) Diesen Eintrag gibt es ggf. für jeden Subshop. Entfernen Sie diesen nur für die Mandanten, in denen das Modul **nicht** mehr installiert ist. \ No newline at end of file diff --git a/docs/daux/installation/060_Deinstallation/060_TMP-Ordner_leeren.md b/docs/daux/installation/060_Deinstallation/060_TMP-Ordner_leeren.md index fb6a3a2..a9dfa15 100644 --- a/docs/daux/installation/060_Deinstallation/060_TMP-Ordner_leeren.md +++ b/docs/daux/installation/060_Deinstallation/060_TMP-Ordner_leeren.md @@ -2,8 +2,6 @@ title: TMP-Ordner leeren --- -Leeren Sie das Verzeichnis `tmp` über [ Admin ] -> [ (D3) Module ] -> [ Modul-Connector ] -> [ TMP leeren ]. Markieren Sie [ komplett leeren ] und klicken auf [ TMP leeren ]. +Leeren Sie das Verzeichnis Ihres Shops. -Sofern die Views nicht automatisch aktualisiert werden, führen Sie dies noch durch. - -> [i] Erfordert Ihre Installation eine andere Vorgehensweise zum Leeren des Caches oder zum Aktualisieren der Datenbank-Viewtabellen, führen Sie diese bitte aus. \ No newline at end of file +> [i] Erfordert Ihre Installation eine andere Vorgehensweise zum Leeren des Caches oder zum Aktualisieren der Datenbank-Viewtabellen, führen Sie diese bitte aus. From d5b3b1a1a531dd7587f64be8775d6a1a2bf46a39 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 4 Jul 2020 23:25:24 +0200 Subject: [PATCH 114/134] apply GPL v3 license --- .../Controller/orderOverviewPdfGenerator.php | 7 +- .../AbstractClasses/pdfdocumentsGeneric.php | 13 +- .../AbstractClasses/pdfdocumentsOrder.php | 13 +- .../Model/Documents/deliverynotePdf.php | 13 +- .../Documents/deliverynotewithoutlogoPdf.php | 13 +- Application/Model/Documents/invoicePdf.php | 13 +- .../Model/Documents/invoicewithoutlogoPdf.php | 13 +- .../Exceptions/noBaseObjectSetException.php | 9 +- .../Exceptions/noPdfHandlerFoundException.php | 9 +- .../pdfGeneratorExceptionAbstract.php | 13 +- .../Exceptions/wrongPdfGeneratorInterface.php | 9 +- .../pdfdocumentsGenericInterface.php | 13 +- .../Interfaces/pdfdocumentsOrderInterface.php | 13 +- .../pdfdocumentsOrderinvoiceInterface.php | 13 +- .../Model/Registries/registryAbstract.php | 13 +- .../Registries/registryGenericInterface.php | 13 +- .../registryOrdermanagerActions.php | 9 +- .../registryOrdermanagerActionsInterface.php | 13 +- .../Registries/registryOrderoverview.php | 13 +- .../registryOrderoverviewInterface.php | 13 +- .../translations/de/pdfdocuments_lang.php | 11 +- .../translations/en/pdfdocuments_lang.php | 11 +- .../views/admin/de/pdfdocuments_lang.php | 12 +- .../views/admin/en/pdfdocuments_lang.php | 12 +- IntelliSenseHelper.php | 9 +- LICENSE | 675 ++++++++++++++++++ .../d3_overview_controller_pdfdocuments.php | 13 +- README | 27 + metadata.php | 13 +- 29 files changed, 778 insertions(+), 243 deletions(-) create mode 100644 LICENSE create mode 100644 README diff --git a/Application/Controller/orderOverviewPdfGenerator.php b/Application/Controller/orderOverviewPdfGenerator.php index fe9b9bc..2318d6f 100644 --- a/Application/Controller/orderOverviewPdfGenerator.php +++ b/Application/Controller/orderOverviewPdfGenerator.php @@ -1,12 +1,7 @@ diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index c4ba93e..636bd4f 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\AbstractClasses; diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index a17fc6d..aa38398 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\AbstractClasses; diff --git a/Application/Model/Documents/deliverynotePdf.php b/Application/Model/Documents/deliverynotePdf.php index e435628..f1e3392 100644 --- a/Application/Model/Documents/deliverynotePdf.php +++ b/Application/Model/Documents/deliverynotePdf.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Documents; diff --git a/Application/Model/Documents/deliverynotewithoutlogoPdf.php b/Application/Model/Documents/deliverynotewithoutlogoPdf.php index deb81e8..7e750d0 100644 --- a/Application/Model/Documents/deliverynotewithoutlogoPdf.php +++ b/Application/Model/Documents/deliverynotewithoutlogoPdf.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Documents; diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 9eae5e3..c1b2ade 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Documents; diff --git a/Application/Model/Documents/invoicewithoutlogoPdf.php b/Application/Model/Documents/invoicewithoutlogoPdf.php index 1f2e266..0b08b49 100644 --- a/Application/Model/Documents/invoicewithoutlogoPdf.php +++ b/Application/Model/Documents/invoicewithoutlogoPdf.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Documents; diff --git a/Application/Model/Exceptions/noBaseObjectSetException.php b/Application/Model/Exceptions/noBaseObjectSetException.php index 590dd6d..2ec97e7 100644 --- a/Application/Model/Exceptions/noBaseObjectSetException.php +++ b/Application/Model/Exceptions/noBaseObjectSetException.php @@ -1,13 +1,8 @@ * @link http://www.oxidmodule.com diff --git a/Application/Model/Exceptions/noPdfHandlerFoundException.php b/Application/Model/Exceptions/noPdfHandlerFoundException.php index d3eed51..40a29da 100644 --- a/Application/Model/Exceptions/noPdfHandlerFoundException.php +++ b/Application/Model/Exceptions/noPdfHandlerFoundException.php @@ -1,13 +1,8 @@ * @link http://www.oxidmodule.com diff --git a/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php b/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php index 4e8676d..0293eec 100644 --- a/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php +++ b/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Exceptions; diff --git a/Application/Model/Exceptions/wrongPdfGeneratorInterface.php b/Application/Model/Exceptions/wrongPdfGeneratorInterface.php index 2d05ae5..8ff4f96 100644 --- a/Application/Model/Exceptions/wrongPdfGeneratorInterface.php +++ b/Application/Model/Exceptions/wrongPdfGeneratorInterface.php @@ -1,13 +1,8 @@ * @link http://www.oxidmodule.com diff --git a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php index 95180b6..152d053 100644 --- a/Application/Model/Interfaces/pdfdocumentsGenericInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsGenericInterface.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Interfaces; diff --git a/Application/Model/Interfaces/pdfdocumentsOrderInterface.php b/Application/Model/Interfaces/pdfdocumentsOrderInterface.php index d02fbcf..2254beb 100644 --- a/Application/Model/Interfaces/pdfdocumentsOrderInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsOrderInterface.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Interfaces; diff --git a/Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php b/Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php index bcdcf8d..22d7e48 100644 --- a/Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php +++ b/Application/Model/Interfaces/pdfdocumentsOrderinvoiceInterface.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Interfaces; diff --git a/Application/Model/Registries/registryAbstract.php b/Application/Model/Registries/registryAbstract.php index 5d2f924..34c7111 100644 --- a/Application/Model/Registries/registryAbstract.php +++ b/Application/Model/Registries/registryAbstract.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Registries; diff --git a/Application/Model/Registries/registryGenericInterface.php b/Application/Model/Registries/registryGenericInterface.php index 2d775ea..4da4f45 100644 --- a/Application/Model/Registries/registryGenericInterface.php +++ b/Application/Model/Registries/registryGenericInterface.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Registries; diff --git a/Application/Model/Registries/registryOrdermanagerActions.php b/Application/Model/Registries/registryOrdermanagerActions.php index 5f634f2..6d49370 100644 --- a/Application/Model/Registries/registryOrdermanagerActions.php +++ b/Application/Model/Registries/registryOrdermanagerActions.php @@ -1,13 +1,8 @@ * @link http://www.oxidmodule.com diff --git a/Application/Model/Registries/registryOrdermanagerActionsInterface.php b/Application/Model/Registries/registryOrdermanagerActionsInterface.php index 9bee64c..d67c097 100644 --- a/Application/Model/Registries/registryOrdermanagerActionsInterface.php +++ b/Application/Model/Registries/registryOrdermanagerActionsInterface.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Registries; diff --git a/Application/Model/Registries/registryOrderoverview.php b/Application/Model/Registries/registryOrderoverview.php index 4349665..106fa79 100644 --- a/Application/Model/Registries/registryOrderoverview.php +++ b/Application/Model/Registries/registryOrderoverview.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Registries; diff --git a/Application/Model/Registries/registryOrderoverviewInterface.php b/Application/Model/Registries/registryOrderoverviewInterface.php index dc142a1..a8ed002 100644 --- a/Application/Model/Registries/registryOrderoverviewInterface.php +++ b/Application/Model/Registries/registryOrderoverviewInterface.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Application\Model\Registries; diff --git a/Application/translations/de/pdfdocuments_lang.php b/Application/translations/de/pdfdocuments_lang.php index 50e7cf6..6f1c30d 100644 --- a/Application/translations/de/pdfdocuments_lang.php +++ b/Application/translations/de/pdfdocuments_lang.php @@ -1,15 +1,10 @@ + * @author D3 Data Development - Daniel Seifert * @link http://www.oxidmodule.com */ diff --git a/Application/translations/en/pdfdocuments_lang.php b/Application/translations/en/pdfdocuments_lang.php index f6e7ec5..f77cf2e 100644 --- a/Application/translations/en/pdfdocuments_lang.php +++ b/Application/translations/en/pdfdocuments_lang.php @@ -1,15 +1,10 @@ + * @author D3 Data Development - Daniel Seifert * @link http://www.oxidmodule.com */ $sLangName = "English"; diff --git a/Application/views/admin/de/pdfdocuments_lang.php b/Application/views/admin/de/pdfdocuments_lang.php index f619e26..66b7e1e 100644 --- a/Application/views/admin/de/pdfdocuments_lang.php +++ b/Application/views/admin/de/pdfdocuments_lang.php @@ -1,17 +1,13 @@ + * @author D3 Data Development - Daniel Seifert * @link http://www.oxidmodule.com */ + $sLangName = "Deutsch"; $aLang = array( 'charset' => 'utf-8', diff --git a/Application/views/admin/en/pdfdocuments_lang.php b/Application/views/admin/en/pdfdocuments_lang.php index a582cbd..a4db1ab 100644 --- a/Application/views/admin/en/pdfdocuments_lang.php +++ b/Application/views/admin/en/pdfdocuments_lang.php @@ -1,17 +1,13 @@ + * @author D3 Data Development - Daniel Seifert * @link http://www.oxidmodule.com */ + $sLangName = "English"; $aLang = array( 'charset' => 'utf-8', diff --git a/IntelliSenseHelper.php b/IntelliSenseHelper.php index 0c5fc51..e1ecebb 100644 --- a/IntelliSenseHelper.php +++ b/IntelliSenseHelper.php @@ -1,13 +1,8 @@ * @link http://www.oxidmodule.com diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..53d1f3d --- /dev/null +++ b/LICENSE @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php index 34a7757..46b2435 100644 --- a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ namespace D3\PdfDocuments\Modules\Application\Controller; diff --git a/README b/README new file mode 100644 index 0000000..83f63ea --- /dev/null +++ b/README @@ -0,0 +1,27 @@ +# PDF-Dokumente + +PDF-Dokumentgenerator für OXID eShop + +Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird in Smartytemplates definiert. + +Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. + +## Systemanforderungen: + +- installierter OXID eShop +- PHP-Version, für die Installationspakete verfügbar sind +- Installation via Composer + +## Installation: + +```bash +composer require d3/pdfdocuments --update-no-dev +``` + +Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. + +## Support: + +- D3 Data Development (Inh. Thomas Dartsch) +- Home: [www.d3data.de](https://www.d3data.de) +- E-Mail: support@shopmodule.com diff --git a/metadata.php b/metadata.php index 0c91685..6b94503 100644 --- a/metadata.php +++ b/metadata.php @@ -1,18 +1,11 @@ - * @link http://www.oxidmodule.com + * @author D3 Data Development - Max Buhe + * @link http://www.oxidmodule.com */ use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments; From 70dfbf48b6eba6ba0c57cf4567f205bb0fdd9341 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 4 Jul 2020 23:34:18 +0200 Subject: [PATCH 115/134] remove README --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 7165ea8fe9cf446b1e83dcb9cb48b9330a333db2 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sun, 5 Jul 2020 14:08:51 +0200 Subject: [PATCH 116/134] change OXID contents to D3 contents --- .../views/admin/de/pdfdocuments_lang.php | 5 +- .../views/admin/en/pdfdocuments_lang.php | 5 +- .../views/tpl/admin/orderoverview_pdfform.tpl | 6 +-- .../documents/inc/elements/articlelist.tpl | 2 +- README.md | 4 ++ metadata.php | 2 +- out/img/pdf.svg | 51 +++++++++++++++++++ 7 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 out/img/pdf.svg diff --git a/Application/views/admin/de/pdfdocuments_lang.php b/Application/views/admin/de/pdfdocuments_lang.php index 66b7e1e..7348b26 100644 --- a/Application/views/admin/de/pdfdocuments_lang.php +++ b/Application/views/admin/de/pdfdocuments_lang.php @@ -21,6 +21,7 @@ $aLang = array( 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Lieferschein', 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Lieferschein ohne Logo', - 'D3_PDFDOCUMENTS_PDF_TYPE' => 'PDF Typ', - 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'PDF ausgeben', + 'D3_PDFDOCUMENTS_PDF_TYPE' => 'Dokument', + 'D3_PDFDOCUMENTS_LANGUAGE' => 'Sprache', + 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Dokument erstellen', ); diff --git a/Application/views/admin/en/pdfdocuments_lang.php b/Application/views/admin/en/pdfdocuments_lang.php index a4db1ab..52888d0 100644 --- a/Application/views/admin/en/pdfdocuments_lang.php +++ b/Application/views/admin/en/pdfdocuments_lang.php @@ -21,6 +21,7 @@ $aLang = array( 'D3_PDFDOCUMENTS_DELIVERYNOTE' => 'Deliverynote', 'D3_PDFDOCUMENTS_DELIVERYNOTE_WITHOUT_LOGO' => 'Deliverynote without logo', - 'D3_PDFDOCUMENTS_PDF_TYPE' => 'PDF Type', - 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Create PDF', + 'D3_PDFDOCUMENTS_PDF_TYPE' => 'Document', + 'D3_PDFDOCUMENTS_LANGUAGE' => 'Language', + 'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Create Document', ); diff --git a/Application/views/tpl/admin/orderoverview_pdfform.tpl b/Application/views/tpl/admin/orderoverview_pdfform.tpl index c497d7a..2ba4a0f 100644 --- a/Application/views/tpl/admin/orderoverview_pdfform.tpl +++ b/Application/views/tpl/admin/orderoverview_pdfform.tpl @@ -10,10 +10,10 @@
- [{oxmultilang ident= + [{oxmultilang ident= - :  +
- + - [{$orderArticle->getFieldData('oxtitle')}] [{ $orderArticle->getFieldData('oxselvariant')}] + [{$orderArticle->getFieldData('oxtitle')}] [{$orderArticle->getFieldData('oxselvariant')}]
[{oxmultilang ident="D3_PDFDOCUMENTS_ARTNR"}] [{$orderArticle->getFieldData('oxartnum')}] diff --git a/README.md b/README.md index 83f63ea..6600934 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,7 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo - D3 Data Development (Inh. Thomas Dartsch) - Home: [www.d3data.de](https://www.d3data.de) - E-Mail: support@shopmodule.com + +## Credits: + +- PDF logo made by Dimitriy Morilubov from www.flaticon.com \ No newline at end of file diff --git a/metadata.php b/metadata.php index 6b94503..b31c623 100644 --- a/metadata.php +++ b/metadata.php @@ -16,7 +16,7 @@ use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; */ $sMetadataVersion = '2.0'; -$logo = ''; +$logo = '(D3)'; $sModuleId = 'd3PdfDocuments'; /** diff --git a/out/img/pdf.svg b/out/img/pdf.svg new file mode 100644 index 0000000..8c9430a --- /dev/null +++ b/out/img/pdf.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f019ac5f722cc0fb7ee8db8d40776a9ddeb7cfb7 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sun, 5 Jul 2020 14:14:55 +0200 Subject: [PATCH 117/134] add basic manual structure --- .../010_Options.md => 010_Funktionen/010_Funktionen.md} | 0 docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md | 0 .../010_Anpassungen.md} | 0 docs/daux/manual/020_Programmierung/020_neueDokumente.md | 0 docs/daux/manual/020_Programmierung/030_Registries.md | 0 docs/daux/manual/{000_Handbuch.md => _index.md} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename docs/daux/manual/{010_Konfiguration/010_Options.md => 010_Funktionen/010_Funktionen.md} (100%) create mode 100644 docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md rename docs/daux/manual/{015_optischeAnpassungen.md => 020_Programmierung/010_Anpassungen.md} (100%) create mode 100644 docs/daux/manual/020_Programmierung/020_neueDokumente.md create mode 100644 docs/daux/manual/020_Programmierung/030_Registries.md rename docs/daux/manual/{000_Handbuch.md => _index.md} (100%) diff --git a/docs/daux/manual/010_Konfiguration/010_Options.md b/docs/daux/manual/010_Funktionen/010_Funktionen.md similarity index 100% rename from docs/daux/manual/010_Konfiguration/010_Options.md rename to docs/daux/manual/010_Funktionen/010_Funktionen.md diff --git a/docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md b/docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/daux/manual/015_optischeAnpassungen.md b/docs/daux/manual/020_Programmierung/010_Anpassungen.md similarity index 100% rename from docs/daux/manual/015_optischeAnpassungen.md rename to docs/daux/manual/020_Programmierung/010_Anpassungen.md diff --git a/docs/daux/manual/020_Programmierung/020_neueDokumente.md b/docs/daux/manual/020_Programmierung/020_neueDokumente.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/daux/manual/020_Programmierung/030_Registries.md b/docs/daux/manual/020_Programmierung/030_Registries.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/daux/manual/000_Handbuch.md b/docs/daux/manual/_index.md similarity index 100% rename from docs/daux/manual/000_Handbuch.md rename to docs/daux/manual/_index.md From 96e65b90fc86ef6f9a456994cadc09f745f419be Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sun, 5 Jul 2020 22:35:53 +0200 Subject: [PATCH 118/134] complete documentation and manual --- README.md | 18 ++++++++++---- ...030_Kompatibilitaet_mit_anderen_Modulen.md | 2 +- .../manual/010_Funktionen/010_Funktionen.md | 7 +++++- .../010_Funktionen/020_Kompatibilitaet.md | 7 ++++++ .../020_Programmierung/010_Anpassungen.md | 17 ++++--------- .../020_Programmierung/020_Templatedesign.md | 24 +++++++++++++++++++ .../020_Programmierung/020_neueDokumente.md | 0 .../020_Programmierung/030_Registries.md | 0 .../020_Programmierung/030_neueDokumente.md | 9 +++++++ .../020_Programmierung/040_Registries.md | 12 ++++++++++ docs/daux/manual/_index.md | 8 ++++++- 11 files changed, 84 insertions(+), 20 deletions(-) create mode 100644 docs/daux/manual/020_Programmierung/020_Templatedesign.md delete mode 100644 docs/daux/manual/020_Programmierung/020_neueDokumente.md delete mode 100644 docs/daux/manual/020_Programmierung/030_Registries.md create mode 100644 docs/daux/manual/020_Programmierung/030_neueDokumente.md create mode 100644 docs/daux/manual/020_Programmierung/040_Registries.md diff --git a/README.md b/README.md index 6600934..5620374 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,31 @@ PDF-Dokumentgenerator für OXID eShop -Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird in Smartytemplates definiert. +Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Smartytemplates erstellt. -Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. +An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung. + +Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. ## Systemanforderungen: -- installierter OXID eShop -- PHP-Version, für die Installationspakete verfügbar sind +- installierter OXID eShop in Version 6 +- PHP-Version, für die Installationspakete verfügbar sind (PHP 7) - Installation via Composer +## Kompatibilität: + +Das Modul enthält die selbe Funktionalität wie das `OXID Invoice-PDF`-Modul. Grundsätzlich können beide Module parallel im Shop installiert werden, wenn dies erforderlich ist. + +Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir in Kürze eine Anpassung dafür zur Verfügung. + ## Installation: ```bash composer require d3/pdfdocuments --update-no-dev ``` -Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. +Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. Dort ist ebenfalls das Modulhandbuch hinterlegt. ## Support: diff --git a/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md b/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md index b8fc5bd..ba64bf0 100644 --- a/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md +++ b/docs/daux/installation/010_Anforderungen/030_Kompatibilitaet_mit_anderen_Modulen.md @@ -2,4 +2,4 @@ title: Kompatibilität mit anderen Modulen --- -Das „Modul“ integriert sich auch in die Erweiterung "Auftragsmanager" von (D3) Data Development, sofern dieses im Shop installiert wurde. Diese Integration wurde für die Version 4.0.0.0 des "Auftragsmanager"-Moduls entwickelt. +Das PDF Dokumente-Modul integriert sich auch in die Erweiterung "Auftragsmanager" von (D3) Data Development, sofern dieses im Shop installiert wurde. Diese Integration wurde für die Version 4.0.0.0 des "Auftragsmanager"-Moduls entwickelt. diff --git a/docs/daux/manual/010_Funktionen/010_Funktionen.md b/docs/daux/manual/010_Funktionen/010_Funktionen.md index fa26afe..93a44b7 100644 --- a/docs/daux/manual/010_Funktionen/010_Funktionen.md +++ b/docs/daux/manual/010_Funktionen/010_Funktionen.md @@ -1,4 +1,9 @@ --- -title: Benutzerhandbuch +title: Funktionen --- +Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Smartytemplates erstellt. + +An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung. + +Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. diff --git a/docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md b/docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md index e69de29..3c2fdbc 100644 --- a/docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md +++ b/docs/daux/manual/010_Funktionen/020_Kompatibilitaet.md @@ -0,0 +1,7 @@ +--- +title: Kompatibilität +--- + +Das Modul enthält die selbe Funktionalität wie das `OXID Invoice-PDF`-Modul. Grundsätzlich können beide Module parallel im Shop installiert werden, wenn dies erforderlich ist. + +Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir in Kürze eine Anpassung dafür zur Verfügung. diff --git a/docs/daux/manual/020_Programmierung/010_Anpassungen.md b/docs/daux/manual/020_Programmierung/010_Anpassungen.md index f1c6c17..fb83104 100644 --- a/docs/daux/manual/020_Programmierung/010_Anpassungen.md +++ b/docs/daux/manual/020_Programmierung/010_Anpassungen.md @@ -1,18 +1,11 @@ --- -title: optische Anpassungen +title: Anpassungen an bestehenden Dokumenten --- -Die Modulausgaben können durch eigene CSS-Styles angepasst werden. Um die Updatefähigkeit des Moduls zu -erhalten, übernehmen Sie die neuen Stylesheets bitte in modulunabhängige Dateien. +Die Dokumente werden aus Smartytemplates erstellt, die Sie im `Application/views/tpl/documents` finden. -Die mitgelieferten Assets (CSS, JavaScripts) werden von uns über einen vorkonfigurierten Kompilierungstask -erstellt. Dieser kann via [Grunt](https://gruntjs.com/) ausgeführt werden. Möchten Sie eigene oder -angepasste Inhalte daraus kompilieren lassen, installieren Sie das Modul bitte mit Composer und der -`--prefer-source`-Option. Dann stehen Ihnen die Quelldateien im Ordner `src/build` zur Verfügung. +Für Änderungen einzelner Dokumentbereiche können Sie die darin notierten Templateblöcke in einem eigenen Modul überladen und deren Inhalt so verändern oder ergänzen. So müssen Sie das Originalmodul nicht verändern. -Diese können direkt aufgerufen werden, um eventuelle Anpassungen im zu Grunde liegenden Theme zu -integrieren. Alternativ können Sie die Sources auch in eigene Kompilierungsprozesse einbinden, -um projektspezifische Assets zu erstellen. +Beachten Sie, dass Templateblöcke in gemeinsam genutzen Templates auch in allen Dokumenten Änderungen hervorrufen. -Details zur Verwendung des Taskrunners und der Quelldateien entnehmen Sie bitte der `README.md` im -oben erwähnten Build-Ordner. \ No newline at end of file +Für umfangreichere Veränderungen können Sie dem jeweiligen Dokument auch auch anderes Template zuordnen. Überladen Sie dafür die entsprechende Dokumentenklasse und verändern Sie den Rückgabewert der Methode `getTemplate`. \ No newline at end of file diff --git a/docs/daux/manual/020_Programmierung/020_Templatedesign.md b/docs/daux/manual/020_Programmierung/020_Templatedesign.md new file mode 100644 index 0000000..40dfaf8 --- /dev/null +++ b/docs/daux/manual/020_Programmierung/020_Templatedesign.md @@ -0,0 +1,24 @@ +--- +title: Hinweise für Templatedesigner +--- + +## HTML + +Aus den Templates wird HTML-ähnlicher Quellcode mit CSS-Angaben erzeugt, der zur Erzeugung des PDF-Dokumentes dient. + +Der Quellcode beinhaltet jedoch einige wenige Besonderheiten (z.B. die `page`-, `page_head`- und `page_footer`-Tags), die im [HTML2PDF-Projekt](https://github.com/spipu/html2pdf) beschrieben sind. + +## CSS + +Layouts können mit inline CSS-Styles definiert werden. Die Einbindung externer Stylesheets wird zum Zeitpunkt der Dokumentationserstellung leider nicht unterstützt. + +Beachten Sie bitte, dass auch nur ein CSS-Subset unterstützt wird. Mit etwas CSS-Kreativität sollten sich die üblichen Formatierungen dennoch deutlich einfacher umsetzen lassen, als dies direkt in PHP-Programmierung möglich wäre. + +## Smarty + +Innerhalb der Templates steht Ihnen die komplette Smarty-Funktionalität zur Verfügung. + +## Debug + +Zur Erstellung der Dokumente kann es hilfreich sein, dass statt des fertigen PDFs eine besser prüfbare Zwischenversion exportiert wird. +Dies können Sie mit der Entwickleroption im Modul erreichen, die Sie im Adminbereich des Shops unter `Erweiterungen -> Module -> D3 PDF-Dokumente -> Einstell. -> Grundeinstellungen`. Sie erhalten dann beim Download ein HTML-Dokument, welches einfach im Browser analysiert werden kann. \ No newline at end of file diff --git a/docs/daux/manual/020_Programmierung/020_neueDokumente.md b/docs/daux/manual/020_Programmierung/020_neueDokumente.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/daux/manual/020_Programmierung/030_Registries.md b/docs/daux/manual/020_Programmierung/030_Registries.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/daux/manual/020_Programmierung/030_neueDokumente.md b/docs/daux/manual/020_Programmierung/030_neueDokumente.md new file mode 100644 index 0000000..4574e22 --- /dev/null +++ b/docs/daux/manual/020_Programmierung/030_neueDokumente.md @@ -0,0 +1,9 @@ +--- +title: neue Dokumente hinzufügen +--- + +Erstellen Sie eine neue PHP-Klasse, die mindestens das Interface `D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface` implementiert. Für Dokumente, die auf Bestellungen basieren (z.B. Rechnungen, Angebote, ...) können Sie statt dessen auch das optimierte Interface `D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentOrderInterface` verwenden. + +Wenn Sie Ihre Dokumentenklasse von `D3\PdfDocuments\Application\Model\AbstractClasses\pdfdocumentsGeneric` bzw. von `D3\PdfDocuments\Application\Model\AbstractClasses\pdfdocumentsOrder` ableiten, sind für jedes Dokument nur noch wenige Zeilen Quellcode nötig. Beide abstrakte Klassen implementieren die oben genannten Interfaces automatisch. + +Als Beispiele dienen Ihnen die im Modul enthaltenen Dokumentklassen `invoice` und `deliverynote`. \ No newline at end of file diff --git a/docs/daux/manual/020_Programmierung/040_Registries.md b/docs/daux/manual/020_Programmierung/040_Registries.md new file mode 100644 index 0000000..5d04b0a --- /dev/null +++ b/docs/daux/manual/020_Programmierung/040_Registries.md @@ -0,0 +1,12 @@ +--- +title: Registries +--- + +Sollen in einem bestimmten Bereich des Shops mehrere Dokumente zur Auswahl angeboten werden, verwenden wir so genannte Registries für diese Liste. +So gibt es zum Beispiel eine Registry für den Bereich der Bestellungsdokumente im Adminbereich des Shops unter `Bestellungen verwalten -> Bestellungen -> Übersicht`. + +Sollen in diesem Bereich neue Dokumente zusätzlich angeboten werden oder bestehende Dokumente entfernt werden, können Sie die jeweilige Registry im eigenen Modul überladen und mit deren Methoden die Dokumentliste manipulieren. + +Benötigen Sie eine eigene Regsitry, können Sie eine eigene Klasse erstellen, die `D3\PdfDocuments\Application\Model\Registries\registryAbstract` erweitert. + +Ein Beispiel zur Verwendung von Registries finden Sie in der Erweiterung des im 1. Abschnitt genannten Adminbereich. \ No newline at end of file diff --git a/docs/daux/manual/_index.md b/docs/daux/manual/_index.md index 834f612..ba85e07 100644 --- a/docs/daux/manual/_index.md +++ b/docs/daux/manual/_index.md @@ -1 +1,7 @@ -It starts here. +--- +title: Handbuch +--- + +Im Abschnitt [Funktionen](010_Funktionen/010_Funktionen.md) finden Sie Informationen zum Funktionsumfang des Moduls und dessen Zusammenspiel mit dem `InvoicePdf` Modul von OXID eSales. + +Unter [Programmierung](020_Programmierung/010_Anpassungen.md) sind Hinweise enthalten, die Templatedesignern und Programmierern als Hinweise zur Erweiterung der Dokumente behilflich sind. \ No newline at end of file From b057e0d5b6a5bf4f5600f923bc7dd1cbc9908079 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sun, 5 Jul 2020 22:41:26 +0200 Subject: [PATCH 119/134] add license note to README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5620374..2b41d1d 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,10 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo ## Credits: -- PDF logo made by Dimitriy Morilubov from www.flaticon.com \ No newline at end of file +- PDF logo made by Dimitriy Morilubov from www.flaticon.com + +## License + +This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. + +Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file From 1436ac6f9375e3c6041426857519294ea6bb2c9b Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 6 Jul 2020 11:10:26 +0200 Subject: [PATCH 120/134] change license note in composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 15d4f19..29e3340 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "homepage": "https://www.oxidmodule.com/", "license": [ - "proprietary" + "GPL-3.0-or-later" ], "extra": { "oxideshop": { @@ -31,7 +31,7 @@ } }, "require": { - "php": ">=5.6", + "php": "^7.0", "oxid-esales/oxideshop-ce": "6.3 - 6.5", "spipu/html2pdf": "^5.2" }, From f36a710e88560626d43b43a399e399f9c6eb9dd8 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 7 Jul 2020 23:03:07 +0200 Subject: [PATCH 121/134] adjust README --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2b41d1d..496b39c 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,14 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo - Home: [www.d3data.de](https://www.d3data.de) - E-Mail: support@shopmodule.com -## Credits: +## Danksagung: - PDF logo made by Dimitriy Morilubov from www.flaticon.com -## License +## Lizenz / License -This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. +**de:** Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. + +**en:** This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file From f4a2727a2fa18a734ad0926f84026fef0d2cb55b Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 08:42:51 +0200 Subject: [PATCH 122/134] extend README --- README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 496b39c..542bdc9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# PDF-Dokumente +[de](#de) | [en](#en) +[de](#pdf-dokumente) | [en](#pdf-documents) + +# PDF-Dokumente PDF-Dokumentgenerator für OXID eShop @@ -6,7 +9,7 @@ Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopf An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung. -Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. +Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. Auch komplett andere Dokumentarten (z.B. Artikeldatenblätter) sind einfach möglich. ## Systemanforderungen: @@ -18,7 +21,7 @@ Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Das Modul enthält die selbe Funktionalität wie das `OXID Invoice-PDF`-Modul. Grundsätzlich können beide Module parallel im Shop installiert werden, wenn dies erforderlich ist. -Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir in Kürze eine Anpassung dafür zur Verfügung. +Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir unter ... eine Anpassung zur Verfügung, die zusätzlich installiert wird. ## Installation: @@ -42,6 +45,14 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo **de:** Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. -**en:** This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. +Copyright by D3 Data Development (Inh. Thomas Dartsch) -Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file +--- + +# PDF Documents + +## License + +This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. + +Copyright by D3 Data Development (Inh. Thomas Dartsch) From 2ab787865921c022e57a35477be80d67d0fef2d0 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 08:48:21 +0200 Subject: [PATCH 123/134] divide multi language into different languages --- README.md => README.de.md | 0 README.en.md | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) rename README.md => README.de.md (100%) create mode 100644 README.en.md diff --git a/README.md b/README.de.md similarity index 100% rename from README.md rename to README.de.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..542bdc9 --- /dev/null +++ b/README.en.md @@ -0,0 +1,58 @@ +[de](#de) | [en](#en) +[de](#pdf-dokumente) | [en](#pdf-documents) + +# PDF-Dokumente + +PDF-Dokumentgenerator für OXID eShop + +Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Smartytemplates erstellt. + +An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung. + +Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. Auch komplett andere Dokumentarten (z.B. Artikeldatenblätter) sind einfach möglich. + +## Systemanforderungen: + +- installierter OXID eShop in Version 6 +- PHP-Version, für die Installationspakete verfügbar sind (PHP 7) +- Installation via Composer + +## Kompatibilität: + +Das Modul enthält die selbe Funktionalität wie das `OXID Invoice-PDF`-Modul. Grundsätzlich können beide Module parallel im Shop installiert werden, wenn dies erforderlich ist. + +Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir unter ... eine Anpassung zur Verfügung, die zusätzlich installiert wird. + +## Installation: + +```bash +composer require d3/pdfdocuments --update-no-dev +``` + +Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. Dort ist ebenfalls das Modulhandbuch hinterlegt. + +## Support: + +- D3 Data Development (Inh. Thomas Dartsch) +- Home: [www.d3data.de](https://www.d3data.de) +- E-Mail: support@shopmodule.com + +## Danksagung: + +- PDF logo made by Dimitriy Morilubov from www.flaticon.com + +## Lizenz / License + +**de:** Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. + +Copyright by D3 Data Development (Inh. Thomas Dartsch) + +--- + +# PDF Documents + +## License + +This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. + +Copyright by D3 Data Development (Inh. Thomas Dartsch) From 02a7f8f0435a68dc9840397fc6f527649dc61d03 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 08:57:49 +0200 Subject: [PATCH 124/134] change documentation content --- README.de.md | 23 ++++---------- README.en.md | 45 ++++++++++------------------ docs/daux/changelog/010_Changelog.md | 2 +- docs/daux/config.json | 2 +- 4 files changed, 23 insertions(+), 49 deletions(-) diff --git a/README.de.md b/README.de.md index 542bdc9..49edf70 100644 --- a/README.de.md +++ b/README.de.md @@ -1,7 +1,4 @@ -[de](#de) | [en](#en) -[de](#pdf-dokumente) | [en](#pdf-documents) - -# PDF-Dokumente +# PDF-Dokumente PDF-Dokumentgenerator für OXID eShop @@ -26,7 +23,7 @@ Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt wer ## Installation: ```bash -composer require d3/pdfdocuments --update-no-dev +composer require d3/pdfdocuments:^1.0 --update-no-dev ``` Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. Dort ist ebenfalls das Modulhandbuch hinterlegt. @@ -39,20 +36,10 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo ## Danksagung: -- PDF logo made by Dimitriy Morilubov from www.flaticon.com +- PDF-Logo erstellt von Dimitriy Morilubov von www.flaticon.com -## Lizenz / License +## Lizenz **de:** Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. -Copyright by D3 Data Development (Inh. Thomas Dartsch) - ---- - -# PDF Documents - -## License - -This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. - -Copyright by D3 Data Development (Inh. Thomas Dartsch) +Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file diff --git a/README.en.md b/README.en.md index 542bdc9..0dba9e2 100644 --- a/README.en.md +++ b/README.en.md @@ -1,35 +1,32 @@ -[de](#de) | [en](#en) -[de](#pdf-dokumente) | [en](#pdf-documents) +# PDF Documents -# PDF-Dokumente +PDF document generator for OXID eShop -PDF-Dokumentgenerator für OXID eShop +Create a wide variety of static or dynamic PDF documents at the touch of a button. The document content is created from Smarty templates. -Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Smartytemplates erstellt. +At the orders of your OXID shop you have the option of creating an invoice and delivery note. -An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur Verfügung. +The module can be easily extended to adapt existing documents or add new ones. Even completely different document types (e.g. article data sheets) are possible. -Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufügen. Auch komplett andere Dokumentarten (z.B. Artikeldatenblätter) sind einfach möglich. +## System requirements: -## Systemanforderungen: - -- installierter OXID eShop in Version 6 -- PHP-Version, für die Installationspakete verfügbar sind (PHP 7) +- installed OXID eShop version 6 +- PHP version for which installation packages are available (PHP 7) - Installation via Composer -## Kompatibilität: +## Compatibility: -Das Modul enthält die selbe Funktionalität wie das `OXID Invoice-PDF`-Modul. Grundsätzlich können beide Module parallel im Shop installiert werden, wenn dies erforderlich ist. +The module contains the same functionality as the 'OXID Invoice PDF' module. Basically, both modules can be installed in parallel in the shop, if required. -Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir unter ... eine Anpassung zur Verfügung, die zusätzlich installiert wird. +If the 'OXID Invoice PDF' module has to be completely replaced by the 'PDF Documents' module (e.g. because third modules also use its function), we set up a ... which will be installed additionally. ## Installation: ```bash -composer require d3/pdfdocuments --update-no-dev +composer require d3/pdfdocuments:^1.0 --update-no-dev ``` -Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. Dort ist ebenfalls das Modulhandbuch hinterlegt. +Detailed installation instructions can be found [online](https://docs.oxidmodule.com/PDF-Dokumente/) and in the docs directory of this package. The module manual is also available there. ## Support: @@ -37,22 +34,12 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo - Home: [www.d3data.de](https://www.d3data.de) - E-Mail: support@shopmodule.com -## Danksagung: +## Credits: - PDF logo made by Dimitriy Morilubov from www.flaticon.com -## Lizenz / License - -**de:** Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. - -Copyright by D3 Data Development (Inh. Thomas Dartsch) - ---- - -# PDF Documents - ## License This module is distributed under the GPL v3 License. For more information see the ./LICENSE file. - -Copyright by D3 Data Development (Inh. Thomas Dartsch) + +Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file diff --git a/docs/daux/changelog/010_Changelog.md b/docs/daux/changelog/010_Changelog.md index 5ec1125..bfc896a 100644 --- a/docs/daux/changelog/010_Changelog.md +++ b/docs/daux/changelog/010_Changelog.md @@ -6,7 +6,7 @@ title: Changelog --- -## 1.0.0.0 - (2020-07-10) +## 1.0.0.0 - (2020-08-13) #### Added - Framework zur Erstellung unterschiedlichster PDF Dokumente diff --git a/docs/daux/config.json b/docs/daux/config.json index 653337c..b42f147 100644 --- a/docs/daux/config.json +++ b/docs/daux/config.json @@ -3,7 +3,7 @@ "moduleversion": "1.0.0.0", "titledesc": "für den Oxid eShop", "author": "D³ Data Development", - "moduledate": "10.07.2020", + "moduledate": "13.08.2020", "editors": "", "tagline": "", "image": "", From fc516647009539952883a911bd2917d3410b7e69 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 09:39:19 +0200 Subject: [PATCH 125/134] update documentation, remove external IntelliSenseHelper --- IntelliSenseHelper.php | 23 ------------------- .../d3_overview_controller_pdfdocuments.php | 8 +++++++ README.en.md | 8 ++++--- README.de.md => README.md | 8 ++++--- .../010_Systemanforderungen.md | 1 - metadata.php | 4 ++-- 6 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 IntelliSenseHelper.php rename README.de.md => README.md (78%) diff --git a/IntelliSenseHelper.php b/IntelliSenseHelper.php deleted file mode 100644 index e1ecebb..0000000 --- a/IntelliSenseHelper.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @link http://www.oxidmodule.com - */ - -namespace D3\PdfDocuments\Modules\Application\Controller { - - use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; - - class d3_overview_controller_pdfdocuments_parent extends OrderOverview {} -} - -namespace D3\PdfDocuments\Modules\Application\Model -{ - use OxidEsales\Eshop\Application\Model\Order; - - class d3_Order_PdfDocuments_parent extends Order {} -} \ No newline at end of file diff --git a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php index 46b2435..fb1e836 100644 --- a/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php +++ b/Modules/Application/Controller/d3_overview_controller_pdfdocuments.php @@ -16,12 +16,20 @@ use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview; use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments; +use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; use OxidEsales\Eshop\Application\Model\Order; use OxidEsales\Eshop\Core\DatabaseProvider; use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\TableViewNameGenerator; +if (false) { + class_alias( + d3_overview_controller_pdfdocuments_parent::class, + OrderOverview::class + ); +} + class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocuments_parent { /** diff --git a/README.en.md b/README.en.md index 0dba9e2..46c36de 100644 --- a/README.en.md +++ b/README.en.md @@ -1,4 +1,6 @@ -# PDF Documents +> [german version](README.md) + +# PDF Documents PDF document generator for OXID eShop @@ -10,7 +12,7 @@ The module can be easily extended to adapt existing documents or add new ones. E ## System requirements: -- installed OXID eShop version 6 +- installed OXID eShop version from 6.1 - PHP version for which installation packages are available (PHP 7) - Installation via Composer @@ -18,7 +20,7 @@ The module can be easily extended to adapt existing documents or add new ones. E The module contains the same functionality as the 'OXID Invoice PDF' module. Basically, both modules can be installed in parallel in the shop, if required. -If the 'OXID Invoice PDF' module has to be completely replaced by the 'PDF Documents' module (e.g. because third modules also use its function), we set up a ... which will be installed additionally. +If the `OXID Invoice PDF` module is to be completely replaced by the `D3 PDF Documents` module (e.g. because third modules also use its function), we provide [a customization](https://packagist.org/packages/d3/pdfdocuments_compat) which is installed additionally. ## Installation: diff --git a/README.de.md b/README.md similarity index 78% rename from README.de.md rename to README.md index 49edf70..80a6ce0 100644 --- a/README.de.md +++ b/README.md @@ -1,3 +1,5 @@ +> [english version](README.en.md) + # PDF-Dokumente PDF-Dokumentgenerator für OXID eShop @@ -10,7 +12,7 @@ Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder ## Systemanforderungen: -- installierter OXID eShop in Version 6 +- installierter OXID eShop in Version ab 6.1 - PHP-Version, für die Installationspakete verfügbar sind (PHP 7) - Installation via Composer @@ -18,7 +20,7 @@ Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Das Modul enthält die selbe Funktionalität wie das `OXID Invoice-PDF`-Modul. Grundsätzlich können beide Module parallel im Shop installiert werden, wenn dies erforderlich ist. -Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir unter ... eine Anpassung zur Verfügung, die zusätzlich installiert wird. +Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt werden (weil z.B. dritte Module ebenfalls dessen Funktion verwenden), stellen wir [eine Anpassung](https://packagist.org/packages/d3/pdfdocuments_compat) zur Verfügung, die zusätzlich installiert wird. ## Installation: @@ -40,6 +42,6 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo ## Lizenz -**de:** Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. +Dieses Modul wird unter der GPL v3 Lizenz vertrieben. Für weitere Informationen siehe die ./LICENSE Datei. Copyright by D3 Data Development (Inh. Thomas Dartsch) \ No newline at end of file diff --git a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md index 1c9b604..c95646c 100644 --- a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md +++ b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md @@ -6,7 +6,6 @@ title: Systemanforderungen * 7.0.x bis 7.4.x * Shopversionen / -editionen * OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version - * 6.0.x * 6.1.x * 6.2.x * Themes diff --git a/metadata.php b/metadata.php index b31c623..783898f 100644 --- a/metadata.php +++ b/metadata.php @@ -14,7 +14,7 @@ use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview; /** * Metadata version */ -$sMetadataVersion = '2.0'; +$sMetadataVersion = '2.1'; $logo = '(D3)'; @@ -28,7 +28,7 @@ $aModule = [ 'de' => $logo.' PDF-Dokumente', 'en' => $logo.' PDF documents', ], - 'version' => '0.1', + 'version' => '1.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', From de22f5dd7198d2a32a0cd76fb0d803d60bd2dbdb Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 14:50:48 +0200 Subject: [PATCH 126/134] add preAction and postAction calls to prevent wrong filenames because unset values --- .../AbstractClasses/pdfdocumentsGeneric.php | 17 ++++++++++++++++- Application/Model/Documents/invoicePdf.php | 15 +++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 636bd4f..0551997 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -50,6 +50,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface $this->oSmarty = Registry::getUtilsView()->getSmarty(); } + public function runPreAction() + { + } + + public function runPostAction() + { + } + /** * @param $sFilename * @param int $iSelLang @@ -77,8 +85,10 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface public function downloadPdf($iLanguage = 0) { try { + $this->runPreAction(); $sFilename = $this->getFilename(); $this->genPdf($sFilename, $iLanguage, self::PDF_DESTINATION_DOWNLOAD); + $this->runPostAction(); Registry::getUtils()->showMessageAndExit(''); } catch (pdfGeneratorExceptionAbstract $e) { Registry::get(UtilsView::class)->addErrorToDisplay($e); @@ -95,12 +105,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface public function savePdfFile($path, $iLanguage = 0) { try { + $this->runPreAction(); $sFilename = $this->getFilename(); $this->genPdf( rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$sFilename, $iLanguage, self::PDF_DESTINATION_FILE ); + $this->runPostAction(); } catch (pdfGeneratorExceptionAbstract $e) { Registry::get(UtilsView::class)->addErrorToDisplay($e); Registry::getLogger()->error($e); @@ -116,8 +128,11 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface public function getPdfContent($iLanguage = 0) { try { + $this->runPreAction(); $sFilename = $this->getFilename(); - return $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING ); + $ret = $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING ); + $this->runPostAction(); + return $ret; } catch (pdfGeneratorExceptionAbstract $e) { Registry::get(UtilsView::class)->addErrorToDisplay($e); Registry::getLogger()->error($e); diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index c1b2ade..6c49fdf 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -43,22 +43,13 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn return 'invoice'; } - /** - * @param $sFilename - * @param int $iSelLang - * @param string $target - * - * @return mixed|string|void - * @throws Html2PdfException - * @throws noBaseObjectSetException - */ - public function genPdf( $sFilename, $iSelLang = 0, $target = 'I' ) + public function runPreAction() { + parent::runPreAction(); + $this->setInvoiceNumber(); $this->setInvoiceDate(); $this->saveOrderOnChanges(); - - return parent::genPdf( $sFilename, $iSelLang, $target ); } public function setInvoiceNumber() From 369eee2b5cb0522ba859cf4a423367020fbd9aee Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 13 Aug 2020 16:29:25 +0200 Subject: [PATCH 127/134] change id of invoice without logo PDF --- Application/Model/Documents/invoicewithoutlogoPdf.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Application/Model/Documents/invoicewithoutlogoPdf.php b/Application/Model/Documents/invoicewithoutlogoPdf.php index 0b08b49..0d3bafa 100644 --- a/Application/Model/Documents/invoicewithoutlogoPdf.php +++ b/Application/Model/Documents/invoicewithoutlogoPdf.php @@ -17,8 +17,7 @@ class invoicewithoutlogoPdf extends invoicePdf */ public function getRequestId() { - // same like in OXID PDF module - return 'standart_without_logo'; + return 'invoice_without_logo'; } /** From b506d4e7c7252796be046a910120a4ee3be8f763 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 20 Aug 2020 08:53:11 +0200 Subject: [PATCH 128/134] adjust version informations --- docs/daux/changelog/010_Changelog.md | 5 ++++- docs/daux/config.json | 4 ++-- metadata.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/daux/changelog/010_Changelog.md b/docs/daux/changelog/010_Changelog.md index bfc896a..0b8ee5a 100644 --- a/docs/daux/changelog/010_Changelog.md +++ b/docs/daux/changelog/010_Changelog.md @@ -2,7 +2,10 @@ title: Changelog --- -## noch nicht veröffentlicht +## 1.0.1.0 - (2020-08-20) + +### Changed +- Dokumentid für "Rechnung ohne Logo" angepasst --- diff --git a/docs/daux/config.json b/docs/daux/config.json index b42f147..1be3f97 100644 --- a/docs/daux/config.json +++ b/docs/daux/config.json @@ -1,9 +1,9 @@ { "title": " PDF Dokumente", - "moduleversion": "1.0.0.0", + "moduleversion": "1.0.1.0", "titledesc": "für den Oxid eShop", "author": "D³ Data Development", - "moduledate": "13.08.2020", + "moduledate": "20.08.2020", "editors": "", "tagline": "", "image": "", diff --git a/metadata.php b/metadata.php index 783898f..9b6a8c8 100644 --- a/metadata.php +++ b/metadata.php @@ -28,7 +28,7 @@ $aModule = [ 'de' => $logo.' PDF-Dokumente', 'en' => $logo.' PDF documents', ], - 'version' => '1.0', + 'version' => '1.0.1.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', From a8ef16a4b2f74bf2ea2c5015d398a8c682104417 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 20 Nov 2020 11:52:59 +0100 Subject: [PATCH 129/134] don't reset new order state if bill number should set this prevents required save in some cases --- Application/Model/Documents/invoicePdf.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Application/Model/Documents/invoicePdf.php b/Application/Model/Documents/invoicePdf.php index 6c49fdf..e8d32a4 100644 --- a/Application/Model/Documents/invoicePdf.php +++ b/Application/Model/Documents/invoicePdf.php @@ -54,8 +54,6 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn public function setInvoiceNumber() { - $this->blIsNewOrder = false; - if (!$this->getOrder()->getFieldData('oxbillnr')) { $this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]); From 64c1d3f398001062ce6c0fea2efc6582a8cec913 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 24 Nov 2020 20:55:54 +0100 Subject: [PATCH 130/134] make installable in OXID 6.2.3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 29e3340..5bd20e3 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ }, "require": { "php": "^7.0", - "oxid-esales/oxideshop-ce": "6.3 - 6.5", + "oxid-esales/oxideshop-ce": "6.3 - 6.6", "spipu/html2pdf": "^5.2" }, "autoload": { From 293a8a9427c3e671b3a280e8602645778880fb1b Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 22 Feb 2021 10:07:26 +0100 Subject: [PATCH 131/134] use improved filename sanitizing methods of ModCfg --- .../Model/AbstractClasses/pdfdocumentsGeneric.php | 15 +++++++-------- .../Model/AbstractClasses/pdfdocumentsOrder.php | 8 ++++---- composer.json | 3 ++- .../010_Anforderungen/010_Systemanforderungen.md | 1 + 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 0551997..be836a2 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -10,6 +10,7 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses; +use D3\ModCfg\Application\Model\d3filesystem; use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract; use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface; use OxidEsales\Eshop\Core\Base; @@ -218,15 +219,15 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface { // forced filename from setFilename() if ($this->filename) { - return $this->addFilenameExtension( - $this->makeValidFileName( + return $this->makeValidFileName( + $this->addFilenameExtension( $this->filename ) ); } - return $this->addFilenameExtension( - $this->makeValidFileName( + return $this->makeValidFileName( + $this->addFilenameExtension( $this->getTypeForFilename() ) ); @@ -257,10 +258,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function makeValidFileName($sFilename) { - $sFilename = preg_replace('/[\s]+/', '_', $sFilename); - $sFilename = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $sFilename); - - return str_replace(' ', '_', $sFilename); + $fs = oxNew(d3filesystem::class); + return $fs->filterFilename($sFilename); } /** diff --git a/Application/Model/AbstractClasses/pdfdocumentsOrder.php b/Application/Model/AbstractClasses/pdfdocumentsOrder.php index aa38398..98235b9 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsOrder.php +++ b/Application/Model/AbstractClasses/pdfdocumentsOrder.php @@ -63,8 +63,8 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt { // forced filename from setFilename() if ($this->filename) { - return $this->addFilenameExtension( - $this->makeValidFileName( + return $this->makeValidFileName( + $this->addFilenameExtension( $this->filename ) ); @@ -72,8 +72,8 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt $sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname')); - return $this->addFilenameExtension( - $this->makeValidFileName( + return $this->makeValidFileName( + $this->addFilenameExtension( implode( '_', [ diff --git a/composer.json b/composer.json index 5bd20e3..6191757 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,8 @@ "require": { "php": "^7.0", "oxid-esales/oxideshop-ce": "6.3 - 6.6", - "spipu/html2pdf": "^5.2" + "spipu/html2pdf": "^5.2", + "d3/modcfg": "^5.3.6.000" }, "autoload": { "psr-4": { diff --git a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md index c95646c..d4a961b 100644 --- a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md +++ b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md @@ -10,6 +10,7 @@ title: Systemanforderungen * 6.2.x * Themes * Diese Modul bindet sich nicht in Frontendthemes ein und ist daher davon unabhängig +* (D3) Modul-Connector ([kostenfrei bei D3 erhältlich](https://www.oxidmodule.com/connector/)) ab Version 5.3.6.0 * Template-Engine * Smarty * Installation via [Composer](https://getcomposer.org) From 694fd9f142ce87b54e9954596300a9ed2d43489e Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 26 Apr 2021 08:41:13 +0200 Subject: [PATCH 132/134] make installable in OXID 6.3.x --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 6191757..0a38ec7 100644 --- a/composer.json +++ b/composer.json @@ -31,10 +31,10 @@ } }, "require": { - "php": "^7.0", - "oxid-esales/oxideshop-ce": "6.3 - 6.6", + "php": "^7.0 || ^8.0", + "oxid-esales/oxideshop-ce": "6.3 - 6.8", "spipu/html2pdf": "^5.2", - "d3/modcfg": "^5.3.6.000" + "d3/modcfg": "^5.3.6.000 || ^6" }, "autoload": { "psr-4": { From 53048b018959f482ab16b32899a50326e8abdc4d Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 30 Apr 2021 21:42:31 +0200 Subject: [PATCH 133/134] adjust version informations --- README.en.md | 2 +- README.md | 2 +- docs/daux/changelog/010_Changelog.md | 7 +++++++ docs/daux/config.json | 2 +- .../010_Anforderungen/010_Systemanforderungen.md | 3 ++- metadata.php | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.en.md b/README.en.md index 46c36de..5bf2593 100644 --- a/README.en.md +++ b/README.en.md @@ -13,7 +13,7 @@ The module can be easily extended to adapt existing documents or add new ones. E ## System requirements: - installed OXID eShop version from 6.1 -- PHP version for which installation packages are available (PHP 7) +- PHP version for which installation packages are available (PHP 7 + 8) - Installation via Composer ## Compatibility: diff --git a/README.md b/README.md index 80a6ce0..7ae31ae 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder ## Systemanforderungen: - installierter OXID eShop in Version ab 6.1 -- PHP-Version, für die Installationspakete verfügbar sind (PHP 7) +- PHP-Version, für die Installationspakete verfügbar sind (PHP 7 + 8) - Installation via Composer ## Kompatibilität: diff --git a/docs/daux/changelog/010_Changelog.md b/docs/daux/changelog/010_Changelog.md index 0b8ee5a..45e0554 100644 --- a/docs/daux/changelog/010_Changelog.md +++ b/docs/daux/changelog/010_Changelog.md @@ -2,6 +2,13 @@ title: Changelog --- +## 1.0.2.0 - (2021-04-30) + +### Added +- installierbar in OXID 6.2.4 und 6.3.0 + +--- + ## 1.0.1.0 - (2020-08-20) ### Changed diff --git a/docs/daux/config.json b/docs/daux/config.json index 1be3f97..15af3f1 100644 --- a/docs/daux/config.json +++ b/docs/daux/config.json @@ -1,6 +1,6 @@ { "title": " PDF Dokumente", - "moduleversion": "1.0.1.0", + "moduleversion": "1.0.2.0", "titledesc": "für den Oxid eShop", "author": "D³ Data Development", "moduledate": "20.08.2020", diff --git a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md index d4a961b..ec81d7d 100644 --- a/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md +++ b/docs/daux/installation/010_Anforderungen/010_Systemanforderungen.md @@ -3,11 +3,12 @@ title: Systemanforderungen --- * PHP Version - * 7.0.x bis 7.4.x + * 7.0.x bis 8.0.x * Shopversionen / -editionen * OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version * 6.1.x * 6.2.x + * 6.3.x * Themes * Diese Modul bindet sich nicht in Frontendthemes ein und ist daher davon unabhängig * (D3) Modul-Connector ([kostenfrei bei D3 erhältlich](https://www.oxidmodule.com/connector/)) ab Version 5.3.6.0 diff --git a/metadata.php b/metadata.php index 9b6a8c8..0c81839 100644 --- a/metadata.php +++ b/metadata.php @@ -28,7 +28,7 @@ $aModule = [ 'de' => $logo.' PDF-Dokumente', 'en' => $logo.' PDF documents', ], - 'version' => '1.0.1.0', + 'version' => '1.0.2.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'http://www.oxidmodule.com/', From 57839562f23cc9da9433055febf96ae2d74567db Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 30 Apr 2021 21:45:09 +0200 Subject: [PATCH 134/134] complete changelog --- docs/daux/changelog/010_Changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/daux/changelog/010_Changelog.md b/docs/daux/changelog/010_Changelog.md index 45e0554..71de4f6 100644 --- a/docs/daux/changelog/010_Changelog.md +++ b/docs/daux/changelog/010_Changelog.md @@ -6,6 +6,10 @@ title: Changelog ### Added - installierbar in OXID 6.2.4 und 6.3.0 +- Dateinamen werden auf Gültigkeit hin korrigiert + +### Fixed +- Setzen der Rechnungsnummer setzt den "neue Bestellung"-Status nicht zurück ---