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' => [] +];