Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
f58298ae24 | |||
57a1e62248 | |||
4eabe55faa | |||
785637254b | |||
d555656a38 | |||
ce3d8c3e29 | |||
5fa706fa3a | |||
d8a1050371 | |||
84225165de | |||
5c0f3b1f77 | |||
7c3eb1895f | |||
7b898aef8f | |||
4bd3b75931 | |||
cb355033f8 | |||
a32d8bc498 | |||
8392de0566 | |||
ce05a811a9 | |||
9cdd4dfb1c | |||
04e466b999 | |||
dfd22940c8 | |||
6ae437ab56 | |||
6da3e99a0e | |||
e320d0f303 | |||
3d1389843d | |||
2e45d644fe | |||
be1a961f88 | |||
18b055c7f7 | |||
f52ed2c95e |
@ -12,14 +12,24 @@ namespace D3\PdfDocuments\Application\Model\AbstractClasses;
|
|||||||
|
|
||||||
use Assert\InvalidArgumentException;
|
use Assert\InvalidArgumentException;
|
||||||
use D3\ModCfg\Application\Model\d3filesystem;
|
use D3\ModCfg\Application\Model\d3filesystem;
|
||||||
|
use D3\PdfDocuments\Application\Model\Constants;
|
||||||
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
|
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
|
||||||
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface;
|
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface;
|
||||||
use OxidEsales\Eshop\Core\Base;
|
use OxidEsales\Eshop\Core\Base;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\Eshop\Core\UtilsView;
|
use OxidEsales\Eshop\Core\UtilsView;
|
||||||
|
use OxidEsales\EshopCommunity\Core\Di\ContainerFacade;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateEngineInterface;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRenderer;
|
||||||
|
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
|
||||||
|
use OxidEsales\Twig\Resolver\TemplateChain\TemplateNotInChainException;
|
||||||
use Smarty;
|
use Smarty;
|
||||||
use Spipu\Html2Pdf\Exception\Html2PdfException;
|
use Spipu\Html2Pdf\Exception\Html2PdfException;
|
||||||
use Spipu\Html2Pdf\Html2Pdf;
|
use Spipu\Html2Pdf\Html2Pdf;
|
||||||
|
use Twig\Error\Error;
|
||||||
|
|
||||||
abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
||||||
{
|
{
|
||||||
@ -36,7 +46,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
public $filenameExtension = 'pdf';
|
public $filenameExtension = 'pdf';
|
||||||
|
|
||||||
/** @var Smarty */
|
/** @var Smarty */
|
||||||
public $oSmarty;
|
public $oTemplateEngine;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $filename;
|
public $filename;
|
||||||
@ -48,8 +58,23 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
/** @var Smarty $oSmarty */
|
$this->oTemplateEngine = $this->d3GetTemplateEngine();
|
||||||
$this->oSmarty = Registry::getUtilsView()->getSmarty(true);
|
}
|
||||||
|
|
||||||
|
public function d3GetTemplateEngine() :TemplateEngineInterface
|
||||||
|
{
|
||||||
|
$renderer = $this->d3GetTemplateRendererBridge()->getTemplateRenderer();
|
||||||
|
return $renderer->getTemplateEngine();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
|
*/
|
||||||
|
public function d3GetTemplateRendererBridge(): TemplateRendererBridgeInterface
|
||||||
|
{
|
||||||
|
return ContainerFactory::getInstance()->getContainer()
|
||||||
|
->get(TemplateRendererBridgeInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function runPreAction()
|
public function runPreAction()
|
||||||
@ -155,14 +180,40 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
/**
|
/**
|
||||||
* @param int $iSelLang
|
* @param int $iSelLang
|
||||||
*/
|
*/
|
||||||
public function setSmartyVars($iSelLang)
|
public function setTemplateEngineVars($iSelLang)
|
||||||
{
|
{
|
||||||
unset($iSelLang);
|
unset($iSelLang);
|
||||||
$this->oSmarty->assign('config', Registry::getSession()->getConfig());
|
|
||||||
$this->oSmarty->assign('viewConfig', Registry::getSession()->getConfig()->getActiveView()->getViewConfig());
|
$this->oTemplateEngine->addGlobal('config', Registry::getConfig());
|
||||||
$this->oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop());
|
$this->oTemplateEngine->addGlobal('sAlternativePdfLogo', $this->getAlternativePdfLogoFileName());
|
||||||
$this->oSmarty->assign('lang', Registry::getLang());
|
$this->oTemplateEngine->addGlobal('oViewConf', Registry::getConfig()->getActiveView()->getViewConfig());
|
||||||
$this->oSmarty->assign('document', $this);
|
$this->oTemplateEngine->addGlobal('shop', Registry::getConfig()->getActiveShop());
|
||||||
|
$this->oTemplateEngine->addGlobal('lang', Registry::getLang());
|
||||||
|
$this->oTemplateEngine->addGlobal('document', $this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getAlternativePdfLogoFileName() :string
|
||||||
|
{
|
||||||
|
$sStandardLogoFile = 'pdf_logo.jpg';
|
||||||
|
$oViewConf = Registry::getConfig()->getActiveView()->getViewConfig();
|
||||||
|
$moduleSettingService = ContainerFacade::get(ModuleSettingServiceInterface::class);
|
||||||
|
$sAlternativePdfLogoName = $moduleSettingService->getString(Constants::OXID_MODULE_ID."_sAlternativePdfLogoName", Constants::OXID_MODULE_ID);
|
||||||
|
|
||||||
|
$sAlternativePdfLogoName = trim($sAlternativePdfLogoName) ?: $sStandardLogoFile;
|
||||||
|
|
||||||
|
$bAlternativeFileExists = file_exists(Registry::getConfig()->getImagePath($sAlternativePdfLogoName));
|
||||||
|
$bFileExists = file_exists(Registry::getConfig()->getImagePath($sStandardLogoFile));
|
||||||
|
|
||||||
|
return $bAlternativeFileExists
|
||||||
|
? $oViewConf->getImageUrl($sAlternativePdfLogoName, true)
|
||||||
|
: (
|
||||||
|
$bFileExists
|
||||||
|
? $oViewConf->getImageUrl($sStandardLogoFile, true)
|
||||||
|
: ""
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -181,9 +232,17 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
$currTplLang = $lang->getTplLanguage();
|
$currTplLang = $lang->getTplLanguage();
|
||||||
$lang->setTplLanguage($iSelLang);
|
$lang->setTplLanguage($iSelLang);
|
||||||
|
|
||||||
$this->setSmartyVars($iSelLang);
|
$this->setTemplateEngineVars($iSelLang);
|
||||||
|
|
||||||
$content = $this->oSmarty->fetch($this->getTemplate());
|
try {
|
||||||
|
$content = $this->oTemplateEngine->render($this->getTemplate(), $this->d3GetTemplateEngine()->getGlobals());
|
||||||
|
} catch (Error|TemplateNotInChainException $error) {
|
||||||
|
|
||||||
|
//Registry::getLogger()->error(dumpVar(__METHOD__." ".__LINE__), [$error->getFile()]);
|
||||||
|
|
||||||
|
$error = oxNew(StandardException::class, $error->getMessage());
|
||||||
|
throw $error;
|
||||||
|
}
|
||||||
|
|
||||||
$lang->setTplLanguage($currTplLang);
|
$lang->setTplLanguage($currTplLang);
|
||||||
|
|
||||||
|
@ -57,19 +57,19 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
|
|||||||
* @param int $iSelLang
|
* @param int $iSelLang
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function setSmartyVars($iSelLang)
|
public function setTemplateEngineVars($iSelLang)
|
||||||
{
|
{
|
||||||
parent::setSmartyVars($iSelLang);
|
parent::setTemplateEngineVars($iSelLang);
|
||||||
|
|
||||||
$this->oSmarty->assign('order', $this->getOrder());
|
$this->oTemplateEngine->addGlobal('order', $this->getOrder());
|
||||||
|
|
||||||
$oUser = oxNew(User::Class);
|
$oUser = oxNew(User::Class);
|
||||||
$oUser->load($this->getOrder()->getFieldData('oxuserid'));
|
$oUser->load($this->getOrder()->getFieldData('oxuserid'));
|
||||||
$this->oSmarty->assign('user', $oUser);
|
$this->oTemplateEngine->addGlobal('user', $oUser);
|
||||||
|
|
||||||
$oPayment = oxNew(Payment::class);
|
$oPayment = oxNew(Payment::class);
|
||||||
$oPayment->loadInLang($iSelLang, $this->getOrder()->getFieldData('oxpaymenttype'));
|
$oPayment->loadInLang($iSelLang, $this->getOrder()->getFieldData('oxpaymenttype'));
|
||||||
$this->oSmarty->assign('payment', $oPayment);
|
$this->oTemplateEngine->addGlobal('payment', $oPayment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
11
Application/Model/Constants.php
Normal file
11
Application/Model/Constants.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace D3\PdfDocuments\Application\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class Constants
|
||||||
|
{
|
||||||
|
public const OXID_MODULE_ID = 'd3PdfDocuments';
|
||||||
|
}
|
@ -43,6 +43,6 @@ class deliverynotePdf extends pdfdocumentsOrder
|
|||||||
*/
|
*/
|
||||||
public function getTemplate()
|
public function getTemplate()
|
||||||
{
|
{
|
||||||
return 'd3deliverynote_pdf.tpl';
|
return '@d3PdfDocuments/documents/deliverynote/deliverynote';
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -41,6 +41,6 @@ class deliverynotewithoutlogoPdf extends deliverynotePdf
|
|||||||
*/
|
*/
|
||||||
public function getTemplate()
|
public function getTemplate()
|
||||||
{
|
{
|
||||||
return 'd3deliverynoteNoLogo_pdf.tpl';
|
return '@d3PdfDocuments/documents/deliverynote/deliverynoteNoLogo';
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -95,7 +95,7 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getTemplate(){
|
public function getTemplate(){
|
||||||
return 'd3invoice_pdf.tpl';
|
return '@d3PdfDocuments/documents/invoice/invoice';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,6 +40,6 @@ class invoicewithoutlogoPdf extends invoicePdf
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTemplate(){
|
public function getTemplate(){
|
||||||
return 'd3invoiceNoLogo_pdf.tpl';
|
return '@d3PdfDocuments/documents/invoice/invoiceNoLogo';
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,3 +0,0 @@
|
|||||||
[{$smarty.block.parent}]
|
|
||||||
|
|
||||||
[{include file="d3orderoverview_pdfform.tpl"}]
|
|
@ -13,7 +13,11 @@ $aLang = array(
|
|||||||
'charset' => 'utf-8',
|
'charset' => 'utf-8',
|
||||||
|
|
||||||
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen',
|
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen',
|
||||||
'SHOP_MODULE_d3PdfDocumentsbDev' => 'Entwicklermodus',
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
|
||||||
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternativer PDF-Logo Name<br><br>
|
||||||
|
Ohne Angabe ( leer ) wird <u style="color: orangered">automatisch</u> folgender Datei-Name gewählt: <b>pdf_logo.jpg</b><br>
|
||||||
|
Diese Datei muss sich im <b>source/out/THEME/img/</b> Ordner befinden <b>und muss aus technischen GrĂĽnden PNG/ JPG sein</b>.<br><br>
|
||||||
|
<u>Notfalls wird kein Bild eingefĂĽgt!</u>',
|
||||||
|
|
||||||
'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
|
'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
|
||||||
'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung',
|
'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung',
|
31
Application/views/admin_smarty/en/pdfdocuments_lang.php
Normal file
31
Application/views/admin_smarty/en/pdfdocuments_lang.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See LICENSE file for license details.
|
||||||
|
*
|
||||||
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
|
||||||
|
* @link http://www.oxidmodule.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sLangName = "English";
|
||||||
|
$aLang = array(
|
||||||
|
'charset' => 'utf-8',
|
||||||
|
|
||||||
|
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
|
||||||
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
|
||||||
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternative PDF Logo Name<br><br>
|
||||||
|
Without specification (empty) the following file name will be <u style="color: orangered">automatically</u> selected: <b>pdf_logo.jpg</b><br>
|
||||||
|
This file must be located in the <b>source/out/THEME/img/</b> folder <b>and must be PNG or JPG for technical reasons</b>.<br><br>
|
||||||
|
<u>If necessary, no image will be inserted!</u>',
|
||||||
|
|
||||||
|
'D3_PDFDOCUMENTS' => 'PDF Documents',
|
||||||
|
'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' => 'Document',
|
||||||
|
'D3_PDFDOCUMENTS_LANGUAGE' => 'Language',
|
||||||
|
'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Create Document',
|
||||||
|
);
|
33
Application/views/admin_twig/de/pdfdocuments_lang.php
Normal file
33
Application/views/admin_twig/de/pdfdocuments_lang.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See LICENSE file for license details.
|
||||||
|
*
|
||||||
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
|
||||||
|
* @link http://www.oxidmodule.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
use D3\PdfDocuments\Application\Model\Constants;
|
||||||
|
|
||||||
|
$sLangName = "Deutsch";
|
||||||
|
$aLang = array(
|
||||||
|
'charset' => 'utf-8',
|
||||||
|
|
||||||
|
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Grundeinstellungen',
|
||||||
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
|
||||||
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternativer PDF-Logo Name<br><br>
|
||||||
|
Ohne Angabe ( leer ) wird <u style="color: orangered">automatisch</u> folgender Datei-Name gewählt: <b>pdf_logo.jpg</b><br>
|
||||||
|
Diese Datei muss sich im <b>source/out/THEME/img/</b> Ordner befinden <b>und muss aus technischen GrĂĽnden PNG oder JPG sein</b>.<br><br>
|
||||||
|
<u>Notfalls wird kein Bild eingefĂĽgt!</u>',
|
||||||
|
|
||||||
|
'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
|
||||||
|
'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' => 'Dokument',
|
||||||
|
'D3_PDFDOCUMENTS_LANGUAGE' => 'Sprache',
|
||||||
|
'D3_PDFDOCUMENTS_PDF_GENERATE' => 'Dokument erstellen',
|
||||||
|
);
|
@ -13,7 +13,11 @@ $aLang = array(
|
|||||||
'charset' => 'utf-8',
|
'charset' => 'utf-8',
|
||||||
|
|
||||||
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
|
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
|
||||||
'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode',
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
|
||||||
|
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName' => 'Alternative PDF Logo Name<br><br>
|
||||||
|
Without specification (empty) the following file name will be <u style="color: orangered">automatically</u> selected: <b>pdf_logo.jpg</b><br>
|
||||||
|
This file must be located in the <b>source/out/THEME/img/</b> folder <b>and must be PNG/ JPG for technical reasons</b>.<br><br>
|
||||||
|
<u>If necessary, no image will be inserted!</u>',
|
||||||
|
|
||||||
'D3_PDFDOCUMENTS' => 'PDF Documents',
|
'D3_PDFDOCUMENTS' => 'PDF Documents',
|
||||||
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',
|
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',
|
@ -1,47 +0,0 @@
|
|||||||
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
|
||||||
[{assign var="showLogo" value=$showLogo|default:true}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_style"}]
|
|
||||||
[{block name="pdfStyles"}]
|
|
||||||
[{include file="d3pdfstyles.css"}]
|
|
||||||
[{/block}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_header"}]
|
|
||||||
[{block name="pdfHeader"}]
|
|
||||||
[{include file="d3pdfheader.tpl" showLogo=$showLogo}]
|
|
||||||
[{/block}]
|
|
||||||
[{/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}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_footer"}]
|
|
||||||
[{block name="pdfFooter"}]
|
|
||||||
[{include file="d3pdffooter.tpl" pagePadding=$pagePadding}]
|
|
||||||
[{/block}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{include file="d3pdfbase.tpl" pagePadding=$pagePadding}]
|
|
@ -1 +0,0 @@
|
|||||||
[{include file="d3deliverynote_pdf.tpl" showLogo=false}]
|
|
@ -1,13 +0,0 @@
|
|||||||
[{assign var="backaddressfile" value=$backaddressfile|default:"d3pdfreturnaddress.tpl"}]
|
|
||||||
[{assign var="addressfile" value=$addressfile|default:"d3pdfrecipientaddress.tpl"}]
|
|
||||||
|
|
||||||
<div class="addressarea">
|
|
||||||
<div class="returnAddress">
|
|
||||||
<div>
|
|
||||||
[{include file=$backaddressfile}]
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="recipientAddress">
|
|
||||||
[{include file=$addressfile}]
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,51 +0,0 @@
|
|||||||
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
|
||||||
[{assign var="showLogo" value=$showLogo|default:true}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_style"}]
|
|
||||||
[{block name="pdfStyles"}]
|
|
||||||
[{include file="d3pdfstyles.css"}]
|
|
||||||
[{/block}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_header"}]
|
|
||||||
[{block name="pdfHeader"}]
|
|
||||||
[{include file="d3pdfheader.tpl" showLogo=$showLogo}]
|
|
||||||
[{/block}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_content"}]
|
|
||||||
[{* include file="d3pdfrulers.tpl" pagePadding=$pagePadding *}]
|
|
||||||
[{include file="d3pdffoldmarks.tpl" pagePadding=$pagePadding}]
|
|
||||||
|
|
||||||
[{block name="pdfAddressArea"}]
|
|
||||||
[{include file="d3pdfaddressarea.tpl"}]
|
|
||||||
[{/block}]
|
|
||||||
|
|
||||||
[{block name="pdfInformations"}]
|
|
||||||
[{include file="d3pdfinformations.tpl" documentinformationfile="d3invoice_pdf_informations.tpl"}]
|
|
||||||
[{/block}]
|
|
||||||
|
|
||||||
[{block name="pdfDeliveryAddress"}]
|
|
||||||
[{include file="d3pdfdeladdress.tpl"}]
|
|
||||||
[{/block}]
|
|
||||||
|
|
||||||
[{block name="pdfSalutation"}]
|
|
||||||
[{include file="d3invoice_pdf_salutation.tpl"}]
|
|
||||||
[{/block}]
|
|
||||||
|
|
||||||
[{block name="pdfArticleList"}]
|
|
||||||
[{include file="d3pdfarticlelist.tpl"}]
|
|
||||||
[{/block}]
|
|
||||||
|
|
||||||
[{block name="pdfConclusion"}]
|
|
||||||
[{include file="d3invoice_pdf_conclusion.tpl"}]
|
|
||||||
[{/block}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{capture append="pdfBlock_footer"}]
|
|
||||||
[{block name="pdfFooter"}]
|
|
||||||
[{include file="d3pdffooter.tpl" pagePadding=$pagePadding}]
|
|
||||||
[{/block}]
|
|
||||||
[{/capture}]
|
|
||||||
|
|
||||||
[{include file="d3pdfbase.tpl" pagePadding=$pagePadding}]
|
|
@ -1 +0,0 @@
|
|||||||
[{include file="d3invoice_pdf.tpl" showLogo=false}]
|
|
23
IntelliSenseHelper.php
Normal file
23
IntelliSenseHelper.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This Software is the property of Data Development and is protected
|
||||||
|
* by copyright law - it is NOT Freeware.
|
||||||
|
* Any unauthorized use of this software without a valid license
|
||||||
|
* is a violation of the license agreement and will be prosecuted by
|
||||||
|
* civil and criminal law.
|
||||||
|
* http://www.shopmodule.com
|
||||||
|
*
|
||||||
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
|
||||||
|
* @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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -21,13 +21,6 @@ use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
|||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\Eshop\Core\TableViewNameGenerator;
|
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
|
class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocuments_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -12,8 +12,8 @@ The module can be easily extended to adapt existing documents or add new ones. E
|
|||||||
|
|
||||||
## System requirements:
|
## System requirements:
|
||||||
|
|
||||||
- installed OXID eShop version from 6.1
|
- installed OXID eShop version from 7.0 - 7.1
|
||||||
- PHP version for which installation packages are available (PHP 7 + 8)
|
- PHP version for which installation packages are available (PHP 8)
|
||||||
- Installation via Composer
|
- Installation via Composer
|
||||||
|
|
||||||
## Compatibility:
|
## Compatibility:
|
||||||
@ -25,7 +25,7 @@ If the `OXID Invoice PDF` module is to be completely replaced by the `D3 PDF Doc
|
|||||||
## Installation:
|
## Installation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
composer require d3/pdfdocuments:^1.0 --update-no-dev
|
composer require d3/pdfdocuments:^2.0 --update-no-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
@ -12,8 +12,8 @@ Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder
|
|||||||
|
|
||||||
## Systemanforderungen:
|
## Systemanforderungen:
|
||||||
|
|
||||||
- installierter OXID eShop in Version ab 6.1
|
- installierter OXID eShop in Version ab 7.0 - 7.1
|
||||||
- PHP-Version, fĂĽr die Installationspakete verfĂĽgbar sind (PHP 7 + 8)
|
- PHP-Version, fĂĽr die Installationspakete verfĂĽgbar sind (PHP 8)
|
||||||
- Installation via Composer
|
- Installation via Composer
|
||||||
|
|
||||||
## Kompatibilität:
|
## Kompatibilität:
|
||||||
@ -25,7 +25,7 @@ Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt wer
|
|||||||
## Installation:
|
## Installation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
composer require d3/pdfdocuments:^1.0 --update-no-dev
|
composer require d3/pdfdocuments:^2.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.
|
Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmodule.com/PDF-Dokumente/) und im docs-Verzeichnis dieses Pakets. Dort ist ebenfalls das Modulhandbuch hinterlegt.
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
@ -26,20 +26,19 @@
|
|||||||
"blacklist-filter": [
|
"blacklist-filter": [
|
||||||
"composer.json",
|
"composer.json",
|
||||||
"docs/**/*.*"
|
"docs/**/*.*"
|
||||||
],
|
]
|
||||||
"target-directory": "d3/pdfdocuments"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.0 || ^8.0",
|
"php": "^8.0",
|
||||||
"oxid-esales/oxideshop-ce": "6.3 - 6.14",
|
"oxid-esales/oxideshop-ce": "7.0 - 7.1",
|
||||||
"spipu/html2pdf": "^5.2",
|
"spipu/html2pdf": "~5.2.8",
|
||||||
"d3/modcfg": "^5.3.6.000 || ^6",
|
"d3/modcfg": "^7.1",
|
||||||
"beberlei/assert": "^3.3.2"
|
"beberlei/assert": "^3.3.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"D3\\PdfDocuments\\": "../../../source/modules/d3/pdfdocuments"
|
"D3\\PdfDocuments\\": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.4.0...rel_1.x)
|
## [Unreleased](https://git.d3data.de/D3Public/pdfdokumente/compare/2.0.0...rel_2.x)
|
||||||
|
|
||||||
|
## [2.0.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.4.0...2.0.0) - 2024-08-XX
|
||||||
|
### Added
|
||||||
|
- installierbar in OXID 7.0 && 7.1 (CE 7.0.x - 7.1.x)
|
||||||
|
|
||||||
## [1.0.4.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.3.1...1.0.4.0) - 2023-12-22
|
## [1.0.4.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.3.1...1.0.4.0) - 2023-12-22
|
||||||
### Added
|
### Added
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"title": "<i class='fab fa-d3 d3fa-color-blue'></i> PDF Dokumente",
|
"title": "<i class='fab fa-d3 d3fa-color-blue'></i> PDF Dokumente",
|
||||||
"moduleversion": "1.0.4.0",
|
"moduleversion": "2.0.0",
|
||||||
"titledesc": "fĂĽr den Oxid eShop",
|
"titledesc": "fĂĽr den Oxid eShop",
|
||||||
"author": "DÂł Data Development",
|
"author": "DÂł Data Development",
|
||||||
"moduledate": "22.12.2023",
|
"moduledate": "12.09.2024",
|
||||||
"editors": "",
|
"editors": "",
|
||||||
"tagline": "",
|
"tagline": "",
|
||||||
"image": "",
|
"image": "",
|
||||||
|
@ -3,17 +3,15 @@ title: Systemanforderungen
|
|||||||
---
|
---
|
||||||
|
|
||||||
* PHP Version
|
* PHP Version
|
||||||
* 7.0.x bis 8.x
|
* 8.x
|
||||||
* Shopversionen / -editionen
|
* Shopversionen / -editionen
|
||||||
* OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version
|
* OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version
|
||||||
* 6.1.x
|
* 7.0.x
|
||||||
* 6.2.x
|
* 7.1.x
|
||||||
* 6.3.x
|
|
||||||
* 6.4.x
|
|
||||||
* 6.5.x
|
|
||||||
* Themes
|
* Themes
|
||||||
* Diese Modul bindet sich nicht in Frontendthemes ein und ist daher davon unabhängig
|
* 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
|
* (D3) Modul-Connector ([kostenfrei bei D3 erhältlich](https://www.oxidmodule.com/connector/)) ab Version 7.1
|
||||||
* Template-Engine
|
* Template-Engine
|
||||||
* Smarty
|
* Smarty ( Ungetestet! )
|
||||||
|
* Twig
|
||||||
* Installation via [Composer](https://getcomposer.org)
|
* Installation via [Composer](https://getcomposer.org)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
title: Funktionen
|
title: Funktionen
|
||||||
---
|
---
|
||||||
|
|
||||||
Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Smartytemplates erstellt.
|
Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Twigtemplates erstellt.
|
||||||
|
|
||||||
An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur VerfĂĽgung.
|
An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur VerfĂĽgung.
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
title: Anpassungen an bestehenden Dokumenten
|
title: Anpassungen an bestehenden Dokumenten
|
||||||
---
|
---
|
||||||
|
|
||||||
Die Dokumente werden aus Smartytemplates erstellt, die Sie im `Application/views/tpl/documents` finden.
|
Die Dokumente werden aus Twigtemplates erstellt, die Sie im `views/twig/documents` finden. Die entsprechenden Smarty Pendants sind unter `views/smarty/documents`.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
@ -14,9 +14,10 @@ Layouts können mit inline CSS-Styles definiert werden. Die Einbindung externer
|
|||||||
|
|
||||||
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.
|
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
|
## Twig
|
||||||
|
|
||||||
Innerhalb der Templates steht Ihnen die komplette Smarty-Funktionalität zur Verfügung.
|
Innerhalb der Templates steht Ihnen die komplette Twig-Funktionalität zur Verfügung.
|
||||||
|
Smarty wird perspektivisch noch nachgereich.
|
||||||
|
|
||||||
## Debug
|
## Debug
|
||||||
|
|
||||||
|
79
metadata.php
79
metadata.php
@ -8,6 +8,7 @@
|
|||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use D3\PdfDocuments\Application\Model\Constants as Constants;
|
||||||
use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments;
|
use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments;
|
||||||
use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
|
use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
|
||||||
|
|
||||||
@ -18,18 +19,17 @@ $sMetadataVersion = '2.1';
|
|||||||
|
|
||||||
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
|
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
|
||||||
|
|
||||||
$sModuleId = 'd3PdfDocuments';
|
|
||||||
/**
|
/**
|
||||||
* Module information
|
* Module information
|
||||||
*/
|
*/
|
||||||
$aModule = [
|
$aModule = [
|
||||||
'id' => $sModuleId,
|
'id' => Constants::OXID_MODULE_ID,
|
||||||
'title' => [
|
'title' => [
|
||||||
'de' => $logo.' PDF-Dokumente',
|
'de' => $logo.' PDF-Dokumente',
|
||||||
'en' => $logo.' PDF documents',
|
'en' => $logo.' PDF documents',
|
||||||
],
|
],
|
||||||
'version' => '1.0.4.0',
|
'version' => '2.0.0',
|
||||||
'author' => 'D³ Data Development (Inh.: Thomas Dartsch)',
|
'author' => $logo.' Data Development (Inh.: Thomas Dartsch)',
|
||||||
'email' => 'support@shopmodule.com',
|
'email' => 'support@shopmodule.com',
|
||||||
'url' => 'https://www.oxidmodule.com/',
|
'url' => 'https://www.oxidmodule.com/',
|
||||||
'extend' => [
|
'extend' => [
|
||||||
@ -38,53 +38,66 @@ $aModule = [
|
|||||||
'controllers' => [],
|
'controllers' => [],
|
||||||
'thumbnail' => 'picture.svg',
|
'thumbnail' => 'picture.svg',
|
||||||
'templates' => [
|
'templates' => [
|
||||||
'd3orderoverview_pdfform.tpl' => 'd3/pdfdocuments/Application/views/tpl/admin/orderoverview_pdfform.tpl',
|
//Admin
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/admin/d3orderoverview_pdfform.tpl' => 'views/smarty/admin/orderoverview_pdfform.tpl',
|
||||||
|
|
||||||
'd3deliverynote_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynote.tpl',
|
// Frontend - Flow - Deliverynote
|
||||||
'd3deliverynoteNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynote.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynote.tpl',
|
||||||
'd3delnote_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/informations.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynoteNoLogo.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl',
|
||||||
'd3delnote_pdf_recipient.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/informations.tpl' => 'views/smarty/flow/documents/deliverynote/inc/informations.tpl',
|
||||||
'd3delnote_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/salutation.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/recipientAddress.tpl' => 'views/smarty/flow/documents/deliverynote/inc/recipientAddress.tpl',
|
||||||
'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/salutation.tpl' => 'views/smarty/flow/documents/deliverynote/inc/salutation.tpl',
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/conclusion.tpl' => 'views/smarty/flow/documents/deliverynote/inc/conclusion.tpl',
|
||||||
|
|
||||||
'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoice.tpl',
|
// Frontend - Flow - Invoice
|
||||||
'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice.tpl' => 'views/smarty/flow/documents/invoice/invoice.tpl',
|
||||||
'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/informations.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoiceNoLogo.tpl' => 'views/smarty/flow/documents/invoice/invoiceNoLogo.tpl',
|
||||||
'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/salutation.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/informations.tpl' => 'views/smarty/flow/documents/invoice/inc/informations.tpl',
|
||||||
'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/conclusion.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/salutation.tpl' => 'views/smarty/flow/documents/invoice/inc/salutation.tpl',
|
||||||
'd3invoice_pdf_payinfo.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/payinfo.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/conclusion.tpl' => 'views/smarty/flow/documents/invoice/inc/conclusion.tpl',
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/payinfo.tpl' => 'views/smarty/flow/documents/invoice/inc/payinfo.tpl',
|
||||||
|
|
||||||
'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl',
|
// Frontend - Flow - Inc - Page
|
||||||
'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/base.tpl' => 'views/smarty/flow/documents/inc/page/base.tpl',
|
||||||
'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/footer.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/header.tpl' => 'views/smarty/flow/documents/inc/page/header.tpl',
|
||||||
'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/footer.tpl' => 'views/smarty/flow/documents/inc/page/footer.tpl',
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/returnaddress.tpl' => 'views/smarty/flow/documents/inc/page/returnaddress.tpl',
|
||||||
|
|
||||||
'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl',
|
// Frontend - Flow - Inc - Elements
|
||||||
'd3pdfrecipientaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/recipientAddress.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/addressarea.tpl' => 'views/smarty/flow/documents/inc/elements/addressarea.tpl',
|
||||||
'd3pdfinformations.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/informations.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/recipientAddress.tpl' => 'views/smarty/flow/documents/inc/elements/recipientAddress.tpl',
|
||||||
'd3pdfdeladdress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/informations.tpl' => 'views/smarty/flow/documents/inc/elements/informations.tpl',
|
||||||
'd3pdfarticlelist.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlelist.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/deliveryaddress.tpl' => 'views/smarty/flow/documents/inc/elements/deliveryaddress.tpl',
|
||||||
'd3pdfarticlecostsummary.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlelist.tpl' => 'views/smarty/flow/documents/inc/elements/articlelist.tpl',
|
||||||
'd3pdffoldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl',
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlecostssummary.tpl' => 'views/smarty/flow/documents/inc/elements/articlecostssummary.tpl',
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/foldmarks.tpl' => 'views/smarty/flow/documents/inc/elements/foldmarks.tpl',
|
||||||
|
|
||||||
'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css',
|
// Frontend - Flow - Inc - Helper
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/documents/inc/helper/rulers.tpl' => 'views/smarty/flow/documents/inc/helper/rulers.tpl',
|
||||||
|
|
||||||
'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/helper/rulers.tpl',
|
// Frontend - Flow - Inc - Styles
|
||||||
|
'@' . Constants::OXID_MODULE_ID . '/assets/d3pdfstyles.css' => 'assets/out/src/css/pdfStyling.css',
|
||||||
],
|
],
|
||||||
'events' => [],
|
'events' => [],
|
||||||
'blocks' => [
|
'blocks' => [
|
||||||
[
|
[
|
||||||
'template' => 'order_overview.tpl',
|
'template' => 'order_overview.tpl',
|
||||||
'block' => 'admin_order_overview_export',
|
'block' => 'admin_order_overview_export',
|
||||||
'file' => 'Application/views/admin/blocks/order_overview.tpl'
|
'file' => 'views/smarty/blocks/order_overview.tpl'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
[
|
[
|
||||||
'group' => $sModuleId.'main',
|
'group' => Constants::OXID_MODULE_ID.'main',
|
||||||
'name' => $sModuleId.'bDev',
|
'name' => Constants::OXID_MODULE_ID.'bDev',
|
||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'value' => false
|
'value' => false
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'group' => Constants::OXID_MODULE_ID.'main',
|
||||||
|
'name' => Constants::OXID_MODULE_ID.'_sAlternativePdfLogoName',
|
||||||
|
'type' => 'str',
|
||||||
|
'value' => ''
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
3
views/smarty/blocks/order_overview.tpl
Normal file
3
views/smarty/blocks/order_overview.tpl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
|
[{include file="@d3PdfDocuments/admin/d3orderoverview_pdfform.tpl"}]
|
46
views/smarty/documents/deliverynote/deliverynote.tpl
Normal file
46
views/smarty/documents/deliverynote/deliverynote.tpl
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
||||||
|
[{assign var="showLogo" value=$showLogo|default:true}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_style"}]
|
||||||
|
[{block name="pdfStyles"}]
|
||||||
|
[{include file="@d3PdfDocuments/assets/d3pdfstyles.css"}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_header"}]
|
||||||
|
[{block name="pdfHeader"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/page/header" showLogo=$showLogo}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_content"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks" pagePadding=$pagePadding}]
|
||||||
|
|
||||||
|
[{block name="pdfAddressArea"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/addressarea" addressfile="@d3PdfDocuments/documents/deliverynote/recipientAddress"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfInformations"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/informations" documentinformationfile="@d3PdfDocuments/documents/deliverynote/informations"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfSalutation"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/deliverynote/salutation"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfArticleList"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/articlelist" showPrices=false}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfConclusion"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/deliverynote/conclusion.tpl"}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_footer"}]
|
||||||
|
[{block name="pdfFooter"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/page/footer" pagePadding=$pagePadding}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/page/base" pagePadding=$pagePadding}]
|
@ -0,0 +1 @@
|
|||||||
|
[{include file="@d3PdfDocuments/documents/deliverynote/deliverynote" showLogo=false}]
|
13
views/smarty/documents/inc/elements/addressarea.tpl
Normal file
13
views/smarty/documents/inc/elements/addressarea.tpl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[{assign var="backaddressfile" value=$backaddressfile|default:"@d3PdfDocuments/documents/inc/page/returnaddress"}]
|
||||||
|
[{assign var="addressfile" value=$addressfile|default:"@d3PdfDocuments/documents/inc/elements/recipientAddress"}]
|
||||||
|
|
||||||
|
<div class="addressarea">
|
||||||
|
<div class="returnAddress">
|
||||||
|
<div>
|
||||||
|
[{include file=$backaddressfile}]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="recipientAddress">
|
||||||
|
[{include file=$addressfile}]
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -54,7 +54,7 @@
|
|||||||
<nobreak>
|
<nobreak>
|
||||||
<table class="article_costs_table">
|
<table class="article_costs_table">
|
||||||
[{block name="d3_article_costs_summary"}]
|
[{block name="d3_article_costs_summary"}]
|
||||||
[{include file="d3pdfarticlecostsummary.tpl"}]
|
[{include file="@d3PdfDocuments/documents/inc/elements/articlecostssummary"}]
|
||||||
[{/block}]
|
[{/block}]
|
||||||
</table>
|
</table>
|
||||||
</nobreak>
|
</nobreak>
|
@ -2,7 +2,7 @@
|
|||||||
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
|
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
|
||||||
|
|
||||||
[{* rulers *}]
|
[{* rulers *}]
|
||||||
[{* include file="d3pdfrulers.tpl" pagePadding=$pagePadding *}]
|
[{* include file="@d3PdfDocuments/documents/inc/helper/rulers" pagePadding=$pagePadding *}]
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.rulerItemHorizontal {
|
.rulerItemHorizontal {
|
@ -5,7 +5,7 @@
|
|||||||
[{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}]
|
[{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}]
|
||||||
[{$payment->getFieldData('oxdesc')}]<br>
|
[{$payment->getFieldData('oxdesc')}]<br>
|
||||||
|
|
||||||
[{include file="d3invoice_pdf_payinfo.tpl"}]
|
[{include file="@d3PdfDocuments/documents/invoice/payinfo"}]
|
||||||
</div>
|
</div>
|
||||||
[{/block}]
|
[{/block}]
|
||||||
|
|
51
views/smarty/documents/invoice/invoice.tpl
Normal file
51
views/smarty/documents/invoice/invoice.tpl
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
[{assign var="pagePadding" value=","|explode:"45,15,30,25"}] [{* top, right, bottom, left *}]
|
||||||
|
[{assign var="showLogo" value=$showLogo|default:true}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_style"}]
|
||||||
|
[{block name="pdfStyles"}]
|
||||||
|
[{include file="@d3PdfDocuments/assets/d3pdfstyles.css"}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_header"}]
|
||||||
|
[{block name="pdfHeader"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/page/header" showLogo=$showLogo}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_content"}]
|
||||||
|
[{* include file="@d3PdfDocuments/documents/inc/helper/rulers" pagePadding=$pagePadding *}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks" pagePadding=$pagePadding}]
|
||||||
|
|
||||||
|
[{block name="pdfAddressArea"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/addressarea"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfInformations"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/informations" documentinformationfile="@d3PdfDocuments/documents/invoice/informations"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfDeliveryAddress"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/deliveryaddress"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfSalutation"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/invoice/salutation"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfArticleList"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/elements/articlelist"}]
|
||||||
|
[{/block}]
|
||||||
|
|
||||||
|
[{block name="pdfConclusion"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/invoice/conclusion"}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{capture append="pdfBlock_footer"}]
|
||||||
|
[{block name="pdfFooter"}]
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/page/footer" pagePadding=$pagePadding}]
|
||||||
|
[{/block}]
|
||||||
|
[{/capture}]
|
||||||
|
|
||||||
|
[{include file="@d3PdfDocuments/documents/inc/page/base" pagePadding=$pagePadding}]
|
1
views/smarty/documents/invoice/invoiceNoLogo.tpl
Normal file
1
views/smarty/documents/invoice/invoiceNoLogo.tpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
[{include file="@d3PdfDocuments/documents/invoice/invoice" showLogo=false}]
|
46
views/twig/admin/orderoverview_pdfform.html.twig
Normal file
46
views/twig/admin/orderoverview_pdfform.html.twig
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{% if edit and oView.d3CanExport() %}
|
||||||
|
<br>
|
||||||
|
<form name="d3CreatePdf" id="d3CreatePdf" action="{{ oViewConf.getSelfLink() }}" method="post" target="d3ExpPDF">
|
||||||
|
{{ oViewConf.getHiddenSid()|raw }}
|
||||||
|
<input type="hidden" name="cl" value="order_overview">
|
||||||
|
<input type="hidden" name="fnc" value="d3CreatePDF">
|
||||||
|
<input type="hidden" name="oxid" value="{{ oxid }}">
|
||||||
|
<fieldset style="padding: 5px">
|
||||||
|
<legend>{{ translate({ ident: "D3_PDFDOCUMENTS" }) }}</legend>
|
||||||
|
<table style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="3">
|
||||||
|
<img src="{{ oViewConf.getModuleUrl('d3PdfDocuments', 'out/img/pdf.svg') }}" style="height:4em;width:4em" alt="{{ translate({ ident: "D3_PDFDOCUMENTS" }) }}">
|
||||||
|
</td>
|
||||||
|
<td style="vertical-align: top; text-align: right" class="edittext">
|
||||||
|
<label for="pdftype">{{ translate({ ident: "D3_PDFDOCUMENTS_PDF_TYPE" }) }}</label>:
|
||||||
|
<select id="pdftype" name="pdftype" class="editinput" style="width:80px;">
|
||||||
|
{% block d3_pdfdocuments_order_overview_pdfTypeOptions %}
|
||||||
|
{% set generatorList = oView.d3getGeneratorList() %}
|
||||||
|
{% for generator in generatorList.getList() %}
|
||||||
|
<option value="{{ generator.getRequestId() }}">{{ translate({ ident: generator.getTitleIdent() }) }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: right" class="edittext">
|
||||||
|
<label for="pdflanguage">{{ translate({ ident: "D3_PDFDOCUMENTS_LANGUAGE" }) }}</label>
|
||||||
|
<select id="pdflanguage" name="pdflanguage" class="saveinnewlanginput" style="width:80px;">
|
||||||
|
{% for lang, slang in alangs %}
|
||||||
|
<option value="{{ lang }}" {% if lang == "0" %}SELECTED{% endif %}>{{ slang }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: right" class="edittext"><br/>
|
||||||
|
<input type="submit" class="edittext" name="save" value="{{ translate({ ident: "D3_PDFDOCUMENTS_PDF_GENERATE" }) }}">
|
||||||
|
<iframe name="d3ExpPDF" style="width: 0; height: 0; border: none; display:none;"></iframe>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
47
views/twig/documents/deliverynote/deliverynote.html.twig
Normal file
47
views/twig/documents/deliverynote/deliverynote.html.twig
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{% set pagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
||||||
|
{% set showLogo = showLogo|default(1) %}
|
||||||
|
|
||||||
|
{% set pdfBlock_style %}
|
||||||
|
{% block pdfStyles %}
|
||||||
|
{{ style({ include: oViewConf.getModuleUrl('d3PdfDocuments', 'out/src/css/pdfStyling.css') }) }}
|
||||||
|
{{ style() }}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set pdfBlock_header %}
|
||||||
|
{% block pdfHeader %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/page/header.html.twig" with {showLogo: showLogo} %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set pdfBlock_content %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/foldmarks.html.twig" with {pagePadding: pagePadding} %}
|
||||||
|
|
||||||
|
{% block pdfAddressArea %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/addressarea.html.twig" with {addressfile: "@d3PdfDocuments/documents/deliverynote/inc/recipientAddress.html.twig"} %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfInformations %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/informations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/deliverynote/inc/informations.html.twig"} %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfSalutation %}
|
||||||
|
{% include "@d3PdfDocuments/documents/deliverynote/inc/salutation.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfArticleList %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/articlelist.html.twig" with {showPrices: 0} %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfConclusion %}
|
||||||
|
{% include "@d3PdfDocuments/documents/deliverynote/inc/conclusion.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set pdfBlock_footer %}
|
||||||
|
{% block pdfFooter %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/page/footer.html.twig" with {pagePadding: pagePadding} %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/page/base.html.twig" with {pagePadding: pagePadding} %}
|
@ -0,0 +1 @@
|
|||||||
|
{% include "@d3PdfDocuments/documents/deliverynote/deliverynote.html.twig" with {showLogo: 0} %}
|
@ -0,0 +1,6 @@
|
|||||||
|
{% block conclusion %}
|
||||||
|
<nobreak>
|
||||||
|
{% block conclusion_thankyou %}
|
||||||
|
{% endblock %}
|
||||||
|
</nobreak>
|
||||||
|
{% endblock %}
|
10
views/twig/documents/deliverynote/inc/informations.html.twig
Normal file
10
views/twig/documents/deliverynote/inc/informations.html.twig
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{% block informations %}
|
||||||
|
<div class="documentinformations">
|
||||||
|
{% block pdfDocumentInformations %}
|
||||||
|
<div>
|
||||||
|
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DATE", suffix: "COLON" }) }} {{ smarty.now|date_format(dateFormat) }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -0,0 +1,25 @@
|
|||||||
|
{% block recipientaddress %}
|
||||||
|
{% if order.getFieldData('oxdellname') %}
|
||||||
|
{% if order.getFieldData('oxdelcompany') %}
|
||||||
|
<div class="company">{{ order.getFieldData('oxdelcompany') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="name">{{ order.getFieldData('oxdelfname') }} {{ order.getFieldData('oxdellname') }}</div>
|
||||||
|
{% if order.getFieldData('oxdeladdinfo') %}
|
||||||
|
<div class="addinfo">{{ order.getFieldData('oxdeladdinfo') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="street">{{ order.getFieldData('oxdelstreet') }} {{ order.getFieldData('oxdelstreetnr') }}</div>
|
||||||
|
<div class="location">{{ order.getFieldData('oxdelzip') }} {{ order.getFieldData('oxdelcity') }}</div>
|
||||||
|
<div class="country">{{ order.getFieldData('oxdelcountry') }}</div>
|
||||||
|
{% else %}
|
||||||
|
{% if order.getFieldData('oxbillcompany') %}
|
||||||
|
<div class="company">{{ order.getFieldData('oxbillcompany') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="name">{{ order.getFieldData('oxbillfname') }} {{ order.getFieldData('oxbilllname') }}</div>
|
||||||
|
{% if order.getFieldData('oxbilladdinfo') %}
|
||||||
|
<div class="addinfo">{{ order.getFieldData('oxbilladdinfo') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="street">{{ order.getFieldData('oxbillstreet') }} {{ order.getFieldData('oxbillstreetnr') }}</div>
|
||||||
|
<div class="location">{{ order.getFieldData('oxbillzip') }} {{ order.getFieldData('oxbillcity') }}</div>
|
||||||
|
<div class="country">{{ order.getFieldData('oxbillcountry') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
12
views/twig/documents/deliverynote/inc/salutation.html.twig
Normal file
12
views/twig/documents/deliverynote/inc/salutation.html.twig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% block salutation %}
|
||||||
|
<div class="salutation">
|
||||||
|
<div class="documenttype">{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERYNOTE" }) }}</div>
|
||||||
|
<div class="documentnumber">{{ translate({ ident: "D3_PDFDOCUMENTS_ORDERNR", suffix: "COLON" }) }} {{ order.getFieldData('oxordernr') }}</div>
|
||||||
|
|
||||||
|
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
|
||||||
|
{% set sArgs = order.getFieldData('oxorderdate')|date_format(dateFormat)|cat("//")|cat(shop.getFieldData('oxname')) %}
|
||||||
|
{% set aArgs = sArgs|split("//") %}
|
||||||
|
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_ORDER_FROM_AT", args: aArgs }) }}</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
13
views/twig/documents/inc/elements/addressarea.html.twig
Normal file
13
views/twig/documents/inc/elements/addressarea.html.twig
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% set backaddressfile = backaddressfile|default("@d3PdfDocuments/documents/inc/page/returnaddress.html.twig") %}
|
||||||
|
{% set addressfile = addressfile|default("@d3PdfDocuments/documents/inc/elements/recipientAddress.html.twig") %}
|
||||||
|
|
||||||
|
<div class="addressarea">
|
||||||
|
<div class="returnAddress">
|
||||||
|
<div>
|
||||||
|
{% include backaddressfile %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="recipientAddress">
|
||||||
|
{% include addressfile %}
|
||||||
|
</div>
|
||||||
|
</div>
|
254
views/twig/documents/inc/elements/articlecostssummary.html.twig
Normal file
254
views/twig/documents/inc/elements/articlecostssummary.html.twig
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
{% set sumnetto %}
|
||||||
|
{% block sumnetto %}
|
||||||
|
<tr class="sumnetto">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_SUMNETTO", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ order.getFormattedTotalNetSum() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set discount %}
|
||||||
|
{% block discount %}
|
||||||
|
<tr class="discount">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DISCOUNT", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ order.getFormattedDiscount() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set producttax %}
|
||||||
|
{% block producttax %}
|
||||||
|
{% for VatKey, oVat in order.getProductVats(false) %}
|
||||||
|
<tr class="producttax">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_TAX", args: VatKey, suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(oVat, currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set sumbrutto %}
|
||||||
|
{% block sumbrutto %}
|
||||||
|
<tr class="sumbrutto">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_SUMBRUTTO", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ order.getFormattedTotalBrutSum() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% if order.getFieldData('oxdiscount') %}
|
||||||
|
{% if order.isNettoMode() %}
|
||||||
|
{{ sumnetto }}
|
||||||
|
{{ discount }}
|
||||||
|
{{ producttax }}
|
||||||
|
{{ sumbrutto }}
|
||||||
|
{% else %}
|
||||||
|
{{ sumbrutto }}
|
||||||
|
{{ discount }}
|
||||||
|
{{ sumnetto }}
|
||||||
|
{{ producttax }}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{{ sumnetto }}
|
||||||
|
{{ producttax }}
|
||||||
|
{{ sumbrutto }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if order.getFieldData('oxvoucherdiscount') %}
|
||||||
|
{% block voucherdiscount %}
|
||||||
|
<tr class="voucherdiscount">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_VOUCHERDISCOUNT", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
-{{ order.getFormattedTotalVouchers() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endblock %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block delivery %}
|
||||||
|
{% if config.getConfigParam('blShowVATForDelivery') %}
|
||||||
|
{% set deliveryPrice = order.getOrderDeliveryPrice() %}
|
||||||
|
<tr class="delivery">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERY_NET", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(deliveryPrice.getNettoPrice(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="deliverytax">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{% if config.getConfigParam('sAdditionalServVATCalcMethod') != 'proportional' %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_TAX", args: order.getFieldData('oxdelvat'), suffix: "COLON" }) }}
|
||||||
|
{% else %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_PROPORTIONAL_TAX", suffix: "COLON" }) }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(deliveryPrice.getVATValue(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% else %}
|
||||||
|
<tr class="delivery">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERY", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(order.getFieldData('oxdelcost'), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block payment %}
|
||||||
|
{% if config.getConfigParam('blShowVATForPayCharge') %}
|
||||||
|
{% set paymentPrice = order.getOrderPaymentPrice() %}
|
||||||
|
<tr class="payment">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_PAYMENT_NET", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(paymentPrice.getNettoPrice(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="paymenttax">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{% if config.getConfigParam('sAdditionalServVATCalcMethod') != 'proportional' %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_TAX", args: order.getFieldData('oxpayvat'), suffix: "COLON" }) }}
|
||||||
|
{% else %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_PROPORTIONAL_TAX", suffix: "COLON" }) }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(paymentPrice.getVATValue(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% else %}
|
||||||
|
<tr class="payment">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_PAYMENT", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(order.getFieldData('oxpaycost'), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block wrapping %}
|
||||||
|
{% if order.getFieldData('oxwrapcost') %}
|
||||||
|
{% if config.getConfigParam('blShowVATForWrapping') %}
|
||||||
|
{% set wrappingPrice = order.getOrderWrappingPrice() %}
|
||||||
|
<tr class="wrapping">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_WRAPPING_NET", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(wrappingPrice.getNettoPrice(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="wrappingtax">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_UNDEFINED_TAX", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(wrappingPrice.getVATValue(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% else %}
|
||||||
|
<tr class="wrapping">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_WRAPPING", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(order.getFieldData('oxwrapcost'), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block giftcard %}
|
||||||
|
{% if order.getFieldData('oxgiftcardcost') %}
|
||||||
|
{% if config.getConfigParam('blShowVATForWrapping') %}
|
||||||
|
{% set giftCardPrice = order.getOrderGiftCardPrice() %}
|
||||||
|
<tr class="giftcard">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_GIFTCARD_NET", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(giftCardPrice.getNettoPrice(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="wrappingtax">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_UNDEFINED_TAX", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(giftCardPrice.getVATValue(), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% else %}
|
||||||
|
<tr class="wrapping">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_GIFTCARD", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ lang.formatCurrency(order.getFieldData('oxgiftcardcost'), currency) }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block totalsum %}
|
||||||
|
<tr class="totalseparator">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description"></td>
|
||||||
|
<td class="values"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="totalsum">
|
||||||
|
<td class="indent"></td>
|
||||||
|
<td class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_TOTALSUMBRUT", suffix: "COLON" }) }}
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
{{ order.getFormattedTotalOrderSum() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endblock %}
|
62
views/twig/documents/inc/elements/articlelist.html.twig
Normal file
62
views/twig/documents/inc/elements/articlelist.html.twig
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{% set currency = order.getOrderCurrency() %}
|
||||||
|
{% set showPrices = showPrices|default(1) %}
|
||||||
|
|
||||||
|
{% block articlelist %}
|
||||||
|
<table class="article_table{% if showPrices %}_prices{% endif %}">
|
||||||
|
<tr>
|
||||||
|
<th class="amount">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_AMOUNT" }) }}
|
||||||
|
</th>
|
||||||
|
<th class="description">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DESCRIPTION" }) }}
|
||||||
|
</th>
|
||||||
|
{% if showPrices %}
|
||||||
|
<th class="tax">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_USTPERCENTAGE" }) }}
|
||||||
|
</th>
|
||||||
|
<th class="unitPrice">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_UNITPRICE" }) }}
|
||||||
|
</th>
|
||||||
|
<th class="totalPrice">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_TOTALPRICE" }) }}
|
||||||
|
</th>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% for orderArticle in order.getOrderArticles(true) %}
|
||||||
|
<tr>
|
||||||
|
<td class="amount">
|
||||||
|
{{ orderArticle.getFieldData('oxamount') }}
|
||||||
|
</td>
|
||||||
|
<td class="description">
|
||||||
|
{{ orderArticle.getFieldData('oxtitle') }} {{ orderArticle.getFieldData('oxselvariant') }}
|
||||||
|
<br>
|
||||||
|
<span class="artnr">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_ARTNR" }) }} {{ orderArticle.getFieldData('oxartnum') }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
{% if showPrices %}
|
||||||
|
<td class="tax">
|
||||||
|
{{ orderArticle.getFieldData('oxvat') }}
|
||||||
|
</td>
|
||||||
|
<td class="unitPrice">
|
||||||
|
{{ orderArticle.getBrutPriceFormated() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
<td class="totalPrice">
|
||||||
|
{{ orderArticle.getTotalBrutPriceFormated() }} {{ currency.name }}
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
|
{% if showPrices %}
|
||||||
|
{% block articleCosts %}
|
||||||
|
<nobreak>
|
||||||
|
<table class="article_costs_table">
|
||||||
|
{% block d3_article_costs_summary %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/articlecostssummary.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
</table>
|
||||||
|
</nobreak>
|
||||||
|
{% endblock %}
|
||||||
|
{% endif %}
|
19
views/twig/documents/inc/elements/deliveryaddress.html.twig
Normal file
19
views/twig/documents/inc/elements/deliveryaddress.html.twig
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{% block deliveryaddress %}
|
||||||
|
{% if order.getFieldData('oxdelstreet') %}
|
||||||
|
<div class="deliveryaddress">
|
||||||
|
<div class="headline">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DELIVERYADDRESS", suffix: "COLON" }) }}
|
||||||
|
</div>
|
||||||
|
{% if order.getFieldData('oxdelcompany') %}
|
||||||
|
<div class="company">{{ order.getFieldData('oxdelcompany') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="name">{{ order.getFieldData('oxdelfname') }} {{ order.getFieldData('oxdellname') }}</div>
|
||||||
|
{% if order.getFieldData('oxdeladdinfo') %}
|
||||||
|
<div class="addinfo">{{ order.getFieldData('oxdeladdinfo') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="street">{{ order.getFieldData('oxdelstreet') }} {{ order.getFieldData('oxdelstreetnr') }}</div>
|
||||||
|
<div class="location">{{ order.getFieldData('oxdelzip') }} {{ order.getFieldData('oxdelcity') }}</div>
|
||||||
|
<div class="country">{{ order.getFieldData('oxdelcountry') }}</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
32
views/twig/documents/inc/elements/foldmarks.html.twig
Normal file
32
views/twig/documents/inc/elements/foldmarks.html.twig
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{% set defaultPagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
||||||
|
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.marks {
|
||||||
|
position: absolute;
|
||||||
|
left: {{ 5 - pagePadding.3|number_format }}mm ;
|
||||||
|
margin-left: 0;
|
||||||
|
width: 7px;
|
||||||
|
height: 0;
|
||||||
|
border-top: 1px solid silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
.foldtop {
|
||||||
|
top: {{ 105 - pagePadding.0|number_format }}mm
|
||||||
|
}
|
||||||
|
|
||||||
|
.foldbottom {
|
||||||
|
top: {{ 210 - pagePadding.0|number_format }}mm
|
||||||
|
}
|
||||||
|
|
||||||
|
.punch {
|
||||||
|
top: {{ 148.5 - pagePadding.0|number_format }}mm
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{# fold marks #}
|
||||||
|
<div class="marks foldtop"></div>
|
||||||
|
<div class="marks foldbottom"></div>
|
||||||
|
|
||||||
|
{# punch mark #}
|
||||||
|
<div class="marks punch"></div>
|
39
views/twig/documents/inc/elements/informations.html.twig
Normal file
39
views/twig/documents/inc/elements/informations.html.twig
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<div class="informations">
|
||||||
|
<div class="contactinformations">
|
||||||
|
{% block pdfContactInformations %}
|
||||||
|
<div class="headline">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_GET_IN_CONTACT" }) }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_TELEFON", suffix: "COLON" }) }} {{ shop.getFieldData('oxtelefon') }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_FAX", suffix: "COLON" }) }} {{ shop.getFieldData('oxtelefax') }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_EMAIL", suffix: "COLON" }) }} {{ shop.getFieldData('oxinfoemail') }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bankaccountinformations">
|
||||||
|
{% block pdfBankaccountInformations %}
|
||||||
|
<div class="headline">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNT" }) }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ shop.getFieldData('oxbankname') }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNTNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxibannumber') }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_BANKCODE_HEADER", suffix: "COLON" }) }} {{ shop.getFieldData('oxbiccode') }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if documentinformationfile %}
|
||||||
|
{% include documentinformationfile %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
12
views/twig/documents/inc/elements/recipientAddress.html.twig
Normal file
12
views/twig/documents/inc/elements/recipientAddress.html.twig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% block recipientaddress %}
|
||||||
|
{% if order.getFieldData('oxbillcompany') %}
|
||||||
|
<div class="company">{{ order.getFieldData('oxbillcompany') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="name">{{ order.getFieldData('oxbillfname') }} {{ order.getFieldData('oxbilllname') }}</div>
|
||||||
|
{% if order.getFieldData('oxbilladdinfo') %}
|
||||||
|
<div class="addinfo">{{ order.getFieldData('oxbilladdinfo') }}</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="street">{{ order.getFieldData('oxbillstreet') }} {{ order.getFieldData('oxbillstreetnr') }}</div>
|
||||||
|
<div class="location">{{ order.getFieldData('oxbillzip') }} {{ order.getFieldData('oxbillcity') }}</div>
|
||||||
|
<div class="country">{{ order.getFieldData('oxbillcountry') }}</div>
|
||||||
|
{% endblock %}
|
38
views/twig/documents/inc/helper/rulers.html.twig
Normal file
38
views/twig/documents/inc/helper/rulers.html.twig
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{% set defaultPagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
||||||
|
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.rulerItemHorizontal {
|
||||||
|
position: absolute;
|
||||||
|
top: -{{ pagePadding.0 }}mm;
|
||||||
|
width: 0;
|
||||||
|
height: 7px;
|
||||||
|
color: blue;
|
||||||
|
border-left: 1px solid blue
|
||||||
|
}
|
||||||
|
|
||||||
|
.rulerItemVertical {
|
||||||
|
position: absolute;
|
||||||
|
left: -{{ pagePadding.3 }}mm;
|
||||||
|
width: 7px;
|
||||||
|
height: 0;
|
||||||
|
color: blue;
|
||||||
|
border-top: 1px solid blue
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{# horizontal #}
|
||||||
|
{% for rulerItemsHorizontal in 10..600 %}
|
||||||
|
<div class="rulerItemHorizontal" style="left: {{ smarty.section.rulerItemsHorizontal.index - pagePadding.3 }}mm">
|
||||||
|
{{ loop.index0 }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{# vertical #}
|
||||||
|
{% for rulerItemsVertical in 0..600 %}
|
||||||
|
<div class="rulerItemVertical" style="top: {{ smarty.section.rulerItemsVertical.index - pagePadding.0 }}mm">
|
||||||
|
{{ loop.index0 }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
21
views/twig/documents/inc/page/base.html.twig
Normal file
21
views/twig/documents/inc/page/base.html.twig
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{% set pageset = pageset|default("new") %}
|
||||||
|
{% set orientation = orientation|default("P") %}
|
||||||
|
{% set format = format|default("A4") %}
|
||||||
|
{% set defaultPagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
||||||
|
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
{{ pdfBlock_style }}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<page backtop="{{ pagePadding.0 }}mm" backright="{{ pagePadding.1 }}mm" backbottom="{{ pagePadding.2 }}mm" backleft="{{ pagePadding.3 }}mm" pageset="{{ pageset }}" orientation="{{ orientation }}" format="{{ format }}">
|
||||||
|
<page_header>
|
||||||
|
{{ pdfBlock_header }}
|
||||||
|
</page_header>
|
||||||
|
|
||||||
|
<page_footer>
|
||||||
|
{{ pdfBlock_footer }}
|
||||||
|
</page_footer>
|
||||||
|
|
||||||
|
{{ pdfBlock_content }}
|
||||||
|
</page>
|
38
views/twig/documents/inc/page/footer.html.twig
Normal file
38
views/twig/documents/inc/page/footer.html.twig
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{% set defaultPagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
||||||
|
{% set pagePadding = pagePadding|default(defaultPagePadding) %}
|
||||||
|
|
||||||
|
{% block pdfFooter %}
|
||||||
|
<div class="footer" style="margin: 0 {{ pagePadding.1 }}mm 10mm {{ pagePadding.3 }}mm">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
{% block pdfFooterLeft %}
|
||||||
|
<td class="footerLeft">
|
||||||
|
<div>{{ shop.getFieldData('oxname') }}</div>
|
||||||
|
<div>{{ shop.getFieldData('oxstreet') }}</div>
|
||||||
|
<div>{{ shop.getFieldData('oxzip') }} {{ shop.getFieldData('oxcity') }}</div>
|
||||||
|
<div>{{ shop.getFieldData('oxcountry') }}</div>
|
||||||
|
<div>{{ shop.getFieldData('oxurl') }}</div>
|
||||||
|
<div>{{ shop.getFieldData('oxinfoemail') }}</div>
|
||||||
|
</td>
|
||||||
|
{% endblock %}
|
||||||
|
{% block pdfFooterCenter %}
|
||||||
|
<td class="footerCenter">
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_MANAGINGDIRECTOR", suffix: "COLON" }) }} {{ shop.getFieldData('oxfname') }} {{ shop.getFieldData('oxlname') }}</div>
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_COURT", suffix: "COLON" }) }} {{ shop.getFieldData('oxcourt') }}</div>
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_HRBNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxhrbnr') }}</div>
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_USTID", suffix: "COLON" }) }} {{ shop.getFieldData('oxvatnumber') }}</div>
|
||||||
|
</td>
|
||||||
|
{% endblock %}
|
||||||
|
{% block pdfFooterRight %}
|
||||||
|
<td class="footerRight">
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNT" }) }}</div>
|
||||||
|
<div>{{ shop.getFieldData('oxbankname') }}</div>
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_ACCOUNTNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxibannumber') }}</div>
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_BANK_BANKCODE", suffix: "COLON" }) }} {{ shop.getFieldData('oxbiccode') }}</div>
|
||||||
|
</td>
|
||||||
|
{% endblock %}
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
16
views/twig/documents/inc/page/header.html.twig
Normal file
16
views/twig/documents/inc/page/header.html.twig
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% set showLogo = showLogo|default(1) %}
|
||||||
|
{% set sPdfLogo = sAlternativePdfLogo %}
|
||||||
|
|
||||||
|
{% block pdfHeader %}
|
||||||
|
<div class="header">
|
||||||
|
{% if showLogo %}
|
||||||
|
{# pdf logo is available only in non admin theme #}
|
||||||
|
{% set isAdmin = oViewConf.isAdmin() %}
|
||||||
|
{{ oViewConf.setAdminMode(false) }}
|
||||||
|
{% if sPdfLogo %}
|
||||||
|
<img class="logo" alt="Logo" src="{{ sPdfLogo }}">
|
||||||
|
{% endif %}
|
||||||
|
{{ oViewConf.setAdminMode(isAdmin) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
1
views/twig/documents/inc/page/returnaddress.html.twig
Normal file
1
views/twig/documents/inc/page/returnaddress.html.twig
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ shop.getFielddata('oxname') }} - {{ shop.getFielddata('oxstreet') }} - {{ shop.getFielddata('oxzip') }} {{ shop.getFielddata('oxcity') }} - {{ shop.getFieldData('oxcountry') }}
|
19
views/twig/documents/invoice/inc/conclusion.html.twig
Normal file
19
views/twig/documents/invoice/inc/conclusion.html.twig
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{% block conclusion %}
|
||||||
|
<nobreak>
|
||||||
|
{% block conclusion_paymethod %}
|
||||||
|
<div class="conclusion_payment">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_USED_PAYMENTMETHOD", suffix: "COLON" }) }}
|
||||||
|
{{ payment.getFieldData('oxdesc') }}<br>
|
||||||
|
|
||||||
|
{% include "@d3PdfDocuments/documents/invoice/inc/payinfo.html.twig" %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block conclusion_thankyou %}
|
||||||
|
<div class="conclusion_thankyou">
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_THANKYOU_1" }) }}<br>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_THANKYOU_2", args: shop.getFieldData('oxname') }) }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
</nobreak>
|
||||||
|
{% endblock %}
|
19
views/twig/documents/invoice/inc/informations.html.twig
Normal file
19
views/twig/documents/invoice/inc/informations.html.twig
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{% block informations %}
|
||||||
|
<div class="documentinformations">
|
||||||
|
{% block pdfDocumentInformations %}
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_ORDERBILLNR", suffix: "COLON" }) }} {{ order.getFieldData('oxbillnr') }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_CUSTOMERNR", suffix: "COLON" }) }} {{ user.getFieldData('oxcustnr') }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_DATE", suffix: "COLON" }) }} {{ order.getFieldData('oxbilldate')|date_format(dateFormat) }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_USTIDNR", suffix: "COLON" }) }} {{ shop.getFieldData('oxvatnumber') }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
16
views/twig/documents/invoice/inc/payinfo.html.twig
Normal file
16
views/twig/documents/invoice/inc/payinfo.html.twig
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% block payinfo %}
|
||||||
|
{% if payment.getId() == 'oxidinvoice' %}
|
||||||
|
{% block payinfo_billable_till %}
|
||||||
|
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_PAYABLEUNTIL" }) }}
|
||||||
|
{{ document.getPayableUntilDate()|date_format(dateFormat) }}
|
||||||
|
{% endblock %}
|
||||||
|
{% elseif payment.getId() == 'oxidpayadvance' or payment.getId() == 'oxidcreditcard' %}
|
||||||
|
{% block payinfo_payed %}
|
||||||
|
{{ translate({ ident: "D3_PDFDOCUMENTS_RECEIVED_PAYMENT" }) }}
|
||||||
|
{% endblock %}
|
||||||
|
{% else %}
|
||||||
|
{% block payinfo_other %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
12
views/twig/documents/invoice/inc/salutation.html.twig
Normal file
12
views/twig/documents/invoice/inc/salutation.html.twig
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% block salutation %}
|
||||||
|
<div class="salutation">
|
||||||
|
<div class="documenttype">{{ translate({ ident: "D3_PDFDOCUMENTS_INVOICE" }) }}</div>
|
||||||
|
<div class="documentnumber">{{ translate({ ident: "D3_PDFDOCUMENTS_ORDERNR", suffix: "COLON" }) }} {{ order.getFieldData('oxordernr') }}</div>
|
||||||
|
|
||||||
|
{% set dateFormat = 'D3_PDFDOCUMENTS_DATE_FORMAT'|translate %}
|
||||||
|
{% set sArgs = order.getFieldData('oxorderdate')|date_format(dateFormat)|cat("//")|cat(shop.getFieldData('oxname')) %}
|
||||||
|
{% set aArgs = sArgs|split("//") %}
|
||||||
|
|
||||||
|
<div>{{ translate({ ident: "D3_PDFDOCUMENTS_ORDER_FROM_AT", args: aArgs }) }}</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
51
views/twig/documents/invoice/invoice.html.twig
Normal file
51
views/twig/documents/invoice/invoice.html.twig
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{% set pagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
|
||||||
|
{% set showLogo = showLogo|default(1) %}
|
||||||
|
|
||||||
|
{% set pdfBlock_style %}
|
||||||
|
{% block pdfStyles %}
|
||||||
|
{{ style({ include: oViewConf.getModuleUrl('d3PdfDocuments', 'out/src/css/pdfStyling.css') }) }}
|
||||||
|
{{ style() }}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set pdfBlock_header %}
|
||||||
|
{% block pdfHeader %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/page/header.html.twig" with {showLogo: showLogo} %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set pdfBlock_content %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/foldmarks.html.twig" with {pagePadding: pagePadding} %}
|
||||||
|
|
||||||
|
{% block pdfAddressArea %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/addressarea.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfInformations %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/informations.html.twig" with {documentinformationfile: "@d3PdfDocuments/documents/invoice/inc/informations.html.twig"} %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfDeliveryAddress %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/deliveryaddress.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfSalutation %}
|
||||||
|
{% include "@d3PdfDocuments/documents/invoice/inc/salutation.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfArticleList %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/elements/articlelist.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block pdfConclusion %}
|
||||||
|
{% include "@d3PdfDocuments/documents/invoice/inc/conclusion.html.twig" %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% set pdfBlock_footer %}
|
||||||
|
{% block pdfFooter %}
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/page/footer.html.twig" with {pagePadding: pagePadding} %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
{% include "@d3PdfDocuments/documents/inc/page/base.html.twig" with {pagePadding: pagePadding} %}
|
1
views/twig/documents/invoice/invoiceNoLogo.html.twig
Normal file
1
views/twig/documents/invoice/invoiceNoLogo.html.twig
Normal file
@ -0,0 +1 @@
|
|||||||
|
{% include "@d3PdfDocuments/documents/invoice/invoice.html.twig" with {showLogo: 0} %}
|
@ -0,0 +1,7 @@
|
|||||||
|
{% extends "order_overview.html.twig" %}
|
||||||
|
|
||||||
|
{% block admin_order_overview_export %}
|
||||||
|
{{ parent() }}
|
||||||
|
|
||||||
|
{% include "@d3PdfDocuments/admin/orderoverview_pdfform" %}
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user