From 89e7064d7c5e950029a3168c9d2883d672b99dd2 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 22 Apr 2020 09:52:07 +0200 Subject: [PATCH] #9641 add oxcountry, oxinfoemail; changed position: oxordernr, custnr, date, ustvat; mod table width --- Application/views/tpl/deliverynote.tpl | 155 +++++++++--------- .../Model/d3_Order_PdfDocuments.php | 2 + 2 files changed, 81 insertions(+), 76 deletions(-) diff --git a/Application/views/tpl/deliverynote.tpl b/Application/views/tpl/deliverynote.tpl index 33074b0..f5f364c 100644 --- a/Application/views/tpl/deliverynote.tpl +++ b/Application/views/tpl/deliverynote.tpl @@ -6,6 +6,7 @@ .aligning{ text-align: right; } + table > td > div, table > td{ font-family: "helvetica"; } @@ -45,7 +46,7 @@ [{oxmultilang ident="ORDER_OVERVIEW_PDF_ACCOUNTNR"}][{$shop->oxshops__oxibannumber->value}] - + [{$shop->oxshops__oxcountry->value}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_USTID"}][{$shop->oxshops__oxvatnumber->value}] [{oxmultilang ident="ORDER_OVERVIEW_PDF_BANKCODE"}][{$shop->oxshops__oxbiccode->value}] @@ -73,19 +74,23 @@ [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_FAX"}][{$shop->oxshops__oxtelefax->value}] + + + [{$shop->oxshops__oxinfoemail->value}] + - -
+
[{$order->oxorder__oxbillcompany->value}]
[{$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}]
+
[{$shop->oxshops__oxcountry->value}]
[{* +++++Lieferadressen dynamisch++++++ *}] [{if $order->oxorder__oxdelstreet->value}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_DELIVERYADDRESS"}]
+
[{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}]
@@ -94,168 +99,166 @@
[{$shop->oxshops__oxdeladdinfo->value}]
[{/if}]
+
[{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}]
- -
+
[{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}]
+
[{if $order->oxorder__d3pdftextkostenstelle_kunden->value}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_INVOICENOTE"}][{$order->oxorder__d3pdftextkostenstelle_kunden->value}][{/if}]
[{if $order->oxorder__oxremark->value }][{$order->oxorder__oxremark->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_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}]
-
- - - + + + - - - + + + [{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_USTPERCENTAGE"}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ARTNR"}][{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__oxartnum->value }][{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }][{$oOrderArticle->oxorderarticles__oxvat->value }][{$oOrderArticle->oxorderarticles__oxamount->value }][{$oOrderArticle->oxorderarticles__oxartnum->value }][{$oOrderArticle->oxorderarticles__oxtitle->getRawValue() }] [{ $oOrderArticle->oxorderarticles__oxselvariant->getRawValue() }][{$oOrderArticle->oxorderarticles__oxvat->value }] [{$oOrderArticle->getBrutPriceFormated()}] [{$currency->name}][{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}][{$oOrderArticle->getTotalBrutPriceFormated()}] [{$currency->name}]
- - - + + + - + - - - + + + - + [{if $order->getFormattedDiscount() != 0}] - - - + + + - + - - - + + + - + - - - + + + - + [{/if}] [{foreach from=$order->getVats() key=VatKey item=oVat}] - - - + + + - + [{/foreach}] - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}] [{$order->getFormattedTotalNetSum()}] [{$currency->name}][{$order->getFormattedTotalNetSum()}] [{$currency->name}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}] -[{$order->getFormattedDiscount()}] [{$currency->name}]-[{$order->getFormattedDiscount()}] [{$currency->name}]
 [{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"}] [{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}][{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}] [{$order->getFormattedTotalBrutSum()}] [{$currency->name}][{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}] [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}][{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
 [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}][{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}][{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}] [{$order->getFormattedTotalOrderSum()}] [{$currency->name}][{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
diff --git a/Modules/Application/Model/d3_Order_PdfDocuments.php b/Modules/Application/Model/d3_Order_PdfDocuments.php index 8117a47..14be5a9 100644 --- a/Modules/Application/Model/d3_Order_PdfDocuments.php +++ b/Modules/Application/Model/d3_Order_PdfDocuments.php @@ -67,6 +67,7 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent $this->save(); } + switch (Registry::getRequest()->getRequestParameter('pdftype')) { case ('dnote'): case ('dnote_without_logo'): @@ -76,6 +77,7 @@ class d3_Order_PdfDocuments extends d3_Order_PdfDocuments_parent $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);