208 Commits

Author SHA1 Message Date
35f6048a37 update documentation 2025-01-20 14:47:27 +01:00
14aa855bb7 fix typo 2024-12-10 11:36:54 +01:00
40fb77b376 improve code 2024-12-10 10:27:53 +01:00
c34a9067a6 add Composer availability check tag 2024-12-10 08:57:52 +01:00
ec914da45e make installable in OXID 7.2 2024-12-10 08:46:50 +01:00
2f72319820 fix Twig templates 2024-10-04 15:59:17 +02:00
79ec86cdda adjust version information 2024-10-04 10:39:52 +02:00
28d7e692a2 fix tax note syntax in Twig template 2024-10-04 10:36:37 +02:00
99810c9cba add language switch 2024-10-01 09:48:00 +02:00
9a4d09678c complete documentation 2024-10-01 09:32:44 +02:00
813fbb208d adjust documentation 2024-10-01 09:08:27 +02:00
146b68ef1c Merge branch 'dev_2.x_OXID7' into rel_2.x 2024-10-01 08:51:15 +02:00
f58298ae24 [Fixed] missing docs adjustments 2024-09-12 13:11:17 +02:00
adadf94f74 remove unparsable logo from metadata 2024-09-10 12:08:03 +02:00
72e14257eb Merge remote-tracking branch 'remotes/origin/dev_2.x_OXID7_logofile' into dev_2.x_OXID7 2024-09-10 12:01:00 +02:00
4c9dbbdabc remove ModCfg dependency
because of minimal usage
2024-09-10 12:00:45 +02:00
ec7d3f5622 adjust Smarty templates 2024-09-10 09:15:51 +02:00
0b4c634352 add development manual 2024-09-09 23:22:51 +02:00
d89b00843f add template block overloadable company logo 2024-09-09 22:44:49 +02:00
beaa79c0e9 get dev mode from module setting service 2024-09-09 16:29:13 +02:00
ec6a0920d0 don't include stylesheet as file reference, use it as included template 2024-09-09 14:48:01 +02:00
57a1e62248 [Fixed] wrong converted date 2024-09-08 17:39:47 +02:00
4eabe55faa [Changed] translation 2024-09-06 18:42:36 +02:00
785637254b [Fixed] no img leads to an error
[Added] metadata setting for alternative PDF-Logo filename; translations
[Changed] img-handling in documentsGeneric and header.html.twig

I didn't check for smarty yet!
2024-09-06 18:24:42 +02:00
d555656a38 [OST726416][Added] try+catch for template-exceptions 2024-09-06 01:27:21 +02:00
ce3d8c3e29 [OST726416][Changed] Template Variable 2024-09-06 01:26:10 +02:00
5fa706fa3a [OST726416][Fixed] Template path in dedicated model 2024-09-06 01:23:41 +02:00
d8a1050371 [OST726416][working-state][Changed] smarty-templates
moving files and adjusting code
2024-09-06 01:22:36 +02:00
84225165de [OST726416][Upgrade] smarty-templates to twig
whole rework of the files + readjusting
2024-09-06 01:21:22 +02:00
5c0f3b1f77 [Changed] rename file alias
adjust alias and metadata-entries for Twig && Smarty
2024-09-04 21:53:57 +02:00
7c3eb1895f [Changed] rename file alias 2024-09-03 19:06:16 +02:00
7b898aef8f Merge remote-tracking branch 'origin/dev_2.x_OXID7' into dev_2.x_OXID7
# Conflicts:
#	views/twig/extensions/themes/admin_twig/order_overview.html.twig
2024-09-03 18:36:18 +02:00
4bd3b75931 [Added] twig files 2024-09-03 18:35:45 +02:00
cb355033f8 add includable stand alone template 2024-09-03 09:40:27 +02:00
a32d8bc498 add Twig template block extension 2024-09-03 09:39:57 +02:00
8392de0566 [Changed] engine handler
adjust it for twit ( no safe changes! )
2024-09-02 22:58:49 +02:00
ce05a811a9 [Added] twig multilang 2024-09-02 22:57:16 +02:00
9cdd4dfb1c [Changed] Doks 2024-08-27 16:08:16 +02:00
04e466b999 [Fixed] assets-folder name 2024-08-27 15:59:20 +02:00
dfd22940c8 [Fixed] wrong template alias for d3styles 2024-08-27 15:44:32 +02:00
6ae437ab56 [Fixed] wrong template alias
former aliases needed to be changed to the new ones too
2024-08-27 15:26:13 +02:00
6da3e99a0e [Fixed] TemplateRenderer Getter 2024-08-26 23:43:09 +02:00
e320d0f303 [Fixed] Template Name 2024-08-26 23:42:57 +02:00
3d1389843d [Changed] code-cleanup 2024-08-26 23:42:41 +02:00
2e45d644fe [Fixed] composer.json 2024-08-25 17:04:12 +02:00
be1a961f88 [Changed] general structure to OXID7 Standard ( Metadata, Composer, Constants ) 2024-08-22 20:08:00 +02:00
18b055c7f7 [Changed] general structure to OXID7 Standard 2024-08-22 20:07:37 +02:00
f52ed2c95e [Changed] general structure to OXID7 Standard 2024-08-22 19:40:26 +02:00
e9987b5221 adjust version informations 2023-12-22 10:57:04 +01:00
010dda9050 change to vector module icon 2023-12-05 10:01:57 +01:00
1e91990a28 handle unset order in order based document types 2023-09-19 23:32:55 +02:00
93fd76de19 make installable in 6.5.2 (v6.14) 2023-07-21 10:49:55 +02:00
da203be4f9 add product logo 2023-06-09 12:21:01 +02:00
e0ab753ef2 adjust version 2023-05-09 14:53:42 +02:00
34498edfa4 fix multiple documents at once
when generating several documents in a common call (e.g. order manager task), the contents of the later documents are appended to the earlier ones
2023-05-09 12:10:45 +02:00
88e3af9a51 make installable in OXID 6.4 + 6.5 2023-01-04 09:43:28 +01:00
d835b64fe3 make CLI check compatible to PHP internal server 2021-11-29 10:07:56 +01:00
66ff1aa732 make installable in OXID 6.3.1 2021-08-03 14:30:49 +02:00
31aa9ac3be Merge branch 'rel_1.x' of git.d3data.de:D3Public/pdfdokumente into rel_1.x 2021-08-03 14:30:10 +02:00
76aa27b843 complete changelog 2021-04-30 21:45:09 +02:00
57839562f2 complete changelog 2021-04-30 21:45:09 +02:00
2963aced46 adjust version informations 2021-04-30 21:42:31 +02:00
53048b0189 adjust version informations 2021-04-30 21:42:31 +02:00
ad00dfdea8 make installable in OXID 6.3.x 2021-04-26 08:41:13 +02:00
694fd9f142 make installable in OXID 6.3.x 2021-04-26 08:41:13 +02:00
d7b279a4aa use improved filename sanitizing methods of ModCfg 2021-02-22 10:07:26 +01:00
293a8a9427 use improved filename sanitizing methods of ModCfg 2021-02-22 10:07:26 +01:00
c82fa1f01f make installable in OXID 6.2.3 2020-11-24 20:55:54 +01:00
64c1d3f398 make installable in OXID 6.2.3 2020-11-24 20:55:54 +01:00
09f6111c4d don't reset new order state if bill number should set
this prevents required save in some cases
2020-11-20 11:52:59 +01:00
a8ef16a4b2 don't reset new order state if bill number should set
this prevents required save in some cases
2020-11-20 11:52:59 +01:00
720a506da3 adjust version informations 2020-08-20 08:53:11 +02:00
850976e386 change id of invoice without logo PDF 2020-08-13 16:29:25 +02:00
7d27e27764 add preAction and postAction calls to prevent wrong filenames because unset values 2020-08-13 14:50:48 +02:00
f0eb1423ee update documentation, remove external IntelliSenseHelper 2020-08-13 09:39:19 +02:00
282c7d1a12 change documentation content 2020-08-13 08:57:49 +02:00
f86633a260 divide multi language into different languages 2020-08-13 08:48:21 +02:00
c353175701 extend README 2020-08-13 08:42:51 +02:00
883b4b18d3 adjust README 2020-07-07 23:03:07 +02:00
5d54fa90b4 change license note in composer.json 2020-07-06 11:10:26 +02:00
201e713672 add license note to README 2020-07-05 22:41:26 +02:00
e1be86ca6b complete documentation and manual 2020-07-05 22:35:53 +02:00
caad509386 add basic manual structure 2020-07-05 14:14:55 +02:00
80df5f14cb change OXID contents to D3 contents 2020-07-05 14:08:51 +02:00
4a02e3fd86 remove README 2020-07-04 23:34:18 +02:00
52f904318e apply GPL v3 license 2020-07-04 23:25:24 +02:00
64ddda7825 change installation documentation 2020-07-03 22:24:50 +02:00
772ccfef19 add final changes 2020-07-03 21:59:18 +02:00
5541acaab0 change small syntax issues 2020-07-03 20:04:21 +02:00
242610a8cf change small syntax issues 2020-07-03 10:01:50 +02:00
9c3a2e5680 remove order class extension from metadata 2020-07-03 08:56:04 +02:00
0654ae6e26 change small syntax issues 2020-07-02 22:35:09 +02:00
28ad51b5e3 prevent docs dir from exporting and installing 2020-07-02 16:02:15 +02:00
cfc3d8104d Merge commit 'e10952828a3718cf047645ad9acc12a409826151' as 'docs/daux' 2020-07-02 15:57:09 +02:00
a2d5dbf6aa change small syntax issues 2020-07-02 10:35:56 +02:00
8d0a9e6fac add payment informations 2020-07-02 01:21:14 +02:00
f8f226914d set article summmary 2020-07-02 00:16:45 +02:00
7c3608efaf prevent page break in important chapters 2020-06-30 23:37:08 +02:00
2cf6ce6f4f change HTML structure for article costs area 2020-06-30 23:14:26 +02:00
2f1c256779 add auto colon suffix 2020-06-30 22:21:27 +02:00
9cd96631ad adjust multilang items 2020-06-30 10:33:23 +02:00
91dfce774f adjust translations 2020-06-30 00:44:07 +02:00
71d91b4136 cleanup 2020-06-29 10:52:29 +02:00
b73219f6b5 adjust invoice layout 2020-06-29 00:28:32 +02:00
484d85e431 adjust invoice layout 2020-06-28 01:03:15 +02:00
bac56b8c56 remove 3rd party module dependency 2020-06-27 21:47:43 +02:00
c7cf568e89 Merge remote-tracking branch 'remotes/current/modules/rel_mod_pdfDocumentsFull' into dev_initial
# Conflicts:
#	Application/views/tpl/documents/inc/header.tpl
#	Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl
#	Application/views/tpl/documents/invoice/invoice.tpl
#	Modules/out/src/pdfStyling.css
#	metadata.php
2020-06-23 09:37:05 +02:00
c6e12da6d4 change metadata logo 2020-06-23 09:15:30 +02:00
c7da3e2b91 make available for OXID 6.2 2020-06-22 21:25:13 +02:00
bb1073b894 make valid filenames 2020-06-17 09:05:49 +02:00
b850cd11ec rm: unnecessary file 2020-06-16 16:08:09 +02:00
7de9a940cd change invoice templates 2020-06-14 00:46:17 +02:00
d06c822126 change invoice templates 2020-06-13 22:43:57 +02:00
a6b6918827 #9776 rm: spacing 2020-06-12 17:09:31 +02:00
83f58d806b #9764 rm: bug finding support 2020-06-12 17:01:27 +02:00
21e819afea rm: space 2020-06-12 16:51:25 +02:00
5db3bca501 add: css-classes 2020-06-12 16:22:17 +02:00
4c64993f03 add: css-classes 2020-06-12 14:51:19 +02:00
59b11667f8 add: css-classes 2020-06-12 13:38:31 +02:00
b3a8269fcd changed {if} 2020-06-12 13:38:07 +02:00
ea290f8bf2 add: css-classes, reordering article listing 2020-06-12 11:11:56 +02:00
2264fa99ca add: code - line breaks; rm unnecessary method 2020-06-12 10:27:21 +02:00
916e0807b4 add: include, Line breaks 2020-06-12 09:45:42 +02:00
007ea1a41f add: css-classes 2020-06-11 11:50:34 +02:00
b72f5088dd Merge branch 'modules/rel_mod_pdfDocumentsFull' of git.d3data.de:Customers/elektroversand-schmidt.de into modules/rel_mod_pdfDocumentsFull 2020-06-11 10:21:02 +02:00
9ca4b5c4ef add: css-classes; rm: unneseccary css-classes 2020-06-11 10:20:39 +02:00
0ea3f0e201 add: database require, nl2br 2020-06-11 10:19:31 +02:00
46f3285322 Merge branch 'modules/rel_mod_pdfDocumentsFull' of git.d3data.de:Customers/elektroversand-schmidt.de into modules/rel_mod_pdfDocumentsFull 2020-06-11 10:07:34 +02:00
adff842b8e change PDF logo resolution 2020-06-11 10:07:21 +02:00
56d4d08f89 add: smarty date generation, css-classes; rm unneseccary css-classes, metadata include; 2020-06-11 10:04:48 +02:00
7019053b50 change invoice pdf templates 2020-06-11 01:29:04 +02:00
d49135f6ee add dev mode 2020-06-11 01:26:16 +02:00
f9a0dd11e2 outsource article_cost_summary and included it + metadata entry 2020-06-10 15:36:22 +02:00
15f02f45f0 fix syntax error in invoice tpl template 2020-06-10 14:21:17 +02:00
3d0128ed0e Merge remote-tracking branch 'remotes/origin/modules/dev_mod_pdfDocumentsFull_ordermanager' into modules/rel_mod_pdfDocumentsFull 2020-06-10 13:47:58 +02:00
b20fb0db72 Merge branch 'modules/rel_mod_pdfDocumentsFull' of git.d3data.de:Customers/elektroversand-schmidt.de into modules/rel_mod_pdfDocumentsFull 2020-06-10 11:44:30 +02:00
334122ff3a adding new classes, changed classes 2020-06-10 11:42:47 +02:00
03984e39e9 add simple fold and punch marks 2020-06-09 23:44:33 +02:00
cf2c61078a set PDF metadata 2020-06-09 22:49:47 +02:00
4c561976a6 document can save to disc 2020-06-09 14:56:14 +02:00
7eb770440d add ordermanager combination 2020-06-08 16:39:33 +02:00
5232b1e5a5 Merge remote-tracking branch 'remotes/origin/modules/rel_mod_pdfDocumentsFull' into modules/dev_mod_pdfDocumentsFull_ordermanager 2020-06-08 16:36:20 +02:00
5e0b488ca8 Merge branch 'modules/rel_mod_pdfDocumentsFull' of git.d3data.de:Customers/elektroversand-schmidt.de into modules/rel_mod_pdfDocumentsFull 2020-06-08 16:35:22 +02:00
0fedcf4d9f reordering header 2020-06-08 10:30:35 +02:00
c5ef48d2fc added margin-bottom class 2020-06-08 08:45:47 +02:00
bdec638f14 implementation of smarty.now 2020-06-05 16:06:35 +02:00
b37280fcbf added getFieldData() and spacing 2020-06-05 15:54:16 +02:00
5135e63a6b Merge branch 'modules/rel_mod_pdfDocumentsFull' of git.d3data.de:Customers/elektroversand-schmidt.de into modules/rel_mod_pdfDocumentsFull 2020-06-05 14:45:15 +02:00
95a73b8ef8 adding new css classes and config spaces 2020-06-05 14:33:43 +02:00
0edb64153a add filename extension if it's missing 2020-06-05 10:06:58 +02:00
d13dda978d allow forced filename 2020-06-05 09:37:11 +02:00
015e85c942 use TCPDF functions instead of own implementations, use constants for configuration 2020-06-04 15:18:51 +02:00
0ccbcd07c6 remove isAdmin definition from orderOverview extension for generating pdf documents 2020-06-04 11:11:40 +02:00
157d9540b3 fix set billdate 2020-06-04 11:04:17 +02:00
8affd5e4ae prevent convert exception, if image couldn't loaded 2020-06-04 10:39:21 +02:00
ccb8ffe403 move pdf download to pdf models, use different (changeable) filenames for every document 2020-06-04 10:31:38 +02:00
6a931daa70 changed filename for exported pdfDocs 2020-06-03 15:56:12 +02:00
468339da09 rm unnecessary folder 2020-06-03 13:55:00 +02:00
109f248457 add cellspacing 2020-06-02 14:32:22 +02:00
e9ae890046 move offer templates to offer module 2020-06-02 11:25:00 +02:00
895ea19f89 improve code 2020-06-02 10:12:35 +02:00
efdc63225e simplify registry configuration 2020-06-02 10:04:19 +02:00
fa96df326d add documents without logo 2020-06-02 10:03:00 +02:00
3c2dc2df5f rename classses 2020-05-30 01:17:27 +02:00
0ecdc1281b rename registry classes 2020-05-30 01:02:50 +02:00
f7cfdccefd use registry instead of fix lists 2020-05-30 00:52:41 +02:00
3da3d1e3ab add documents and document classes 2020-05-30 00:48:43 +02:00
eddef3bbbf add exceptions 2020-05-30 00:46:30 +02:00
5b43b21df1 add generator registries 2020-05-30 00:45:18 +02:00
1abce50eda rename classes 2020-05-30 00:43:41 +02:00
226f56db2e change eShop dependency to compilation 6.1 because of used Logger function 2020-05-30 00:40:13 +02:00
0749221899 remove refund pdf templates to refund module 2020-05-29 15:25:55 +02:00
a6378dabe9 revert wrong composer requirements 2020-05-29 14:37:58 +02:00
caeaa02aa6 remove debug notes 2020-05-29 10:20:22 +02:00
5ffd071954 throw exception in case of undefined pdf request type 2020-05-29 09:58:53 +02:00
aa2072d985 prevent module extension from new method in other module extension
(depends difficult right order in extension list)
2020-05-29 09:41:17 +02:00
61f0823051 prevent block extension in block extension 2020-05-28 15:15:46 +02:00
85c8d76da3 use shared templates and template alias names 2020-05-28 14:58:42 +02:00
8437314019 add missing css files, change template aliases 2020-05-28 14:31:35 +02:00
02d16f4f5e fix namespaces 2020-05-28 13:32:34 +02:00
7357722a8f set missing requirements, refactor class structure 2020-05-28 12:21:11 +02:00
ac8498044d extract type specific lines from generic to specific clases 2020-05-27 09:46:44 +02:00
738f5ec772 refactor class structure 2020-05-26 16:32:22 +02:00
5465a7eebd refactor class structure 2020-05-26 16:12:17 +02:00
0c36330610 refector generic pdf documents interface 2020-05-26 15:59:10 +02:00
db13ac943c remove order confirmation pdf template 2020-05-26 15:52:30 +02:00
3969d3695e remove offer pdf templates 2020-05-26 15:50:39 +02:00
02a6022bb6 change folder structure to composer module 2020-05-26 15:45:07 +02:00
4eec91e84b adjusting: modifying files 2020-05-26 15:37:27 +02:00
3349b72a57 rm: unnecessary entries, changing modId in entry 2020-05-26 15:37:26 +02:00
4351677b6e mv: d3invoicePdf pdfDocuments 2020-05-26 15:37:25 +02:00
a7026c6b6c add: block and it's corresponding metadata entry 2020-05-26 15:37:25 +02:00
c9e9f8b8a6 rm: unneseccary interface file 2020-05-26 15:37:24 +02:00
af76a9f8f6 add: interface 2020-05-26 15:37:23 +02:00
d1a09fc220 add: new file; modified 2020-05-26 15:37:22 +02:00
bfe16ec517 rm: unneseccary table_rows and adding new oxmultilang ident 2020-05-26 15:37:20 +02:00
cdaad56455 reword module id in include request 2020-05-26 15:37:19 +02:00
c6d916fedd add: padding class
# Conflicts:
#	source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css
2020-05-26 15:36:45 +02:00
7258d22df1 rm: unneseccary folder 2020-05-26 15:36:25 +02:00
d8e0bda67e extended file 2020-05-26 15:36:24 +02:00
59798d12ec add: .css files 2020-05-26 15:36:23 +02:00
64988576c8 rm path routing misstakes 2020-05-26 15:36:23 +02:00
0e8737750c modifying path of included file's 2020-05-26 15:36:22 +02:00
9fdaecb37e rm unneseccary files and an unnesecarry folder 2020-05-26 15:36:21 +02:00
3aaa2f8e2c modifying path of inlcuded files 2020-05-26 15:36:21 +02:00
703a75962a changing included file's path; add: css classes; reorderung header; including new oxmultilang idents 2020-05-26 15:36:20 +02:00
59e49490b2 add: pdfDocuments_EVS module and it's correspoding files
# Conflicts:
#	source/modules/d3/pdfdocuments/src/Modules/Application/Model/d3_Order_PdfDocuments.php
#	source/modules/d3/pdfdocuments/src/Modules/out/src/deliverynote.css
2020-05-26 15:36:19 +02:00
e7ad653268 move files to current pdf documents branch structure 2020-05-26 15:28:36 +02:00
95 changed files with 1722 additions and 354 deletions

View File

@ -23,7 +23,7 @@ class orderOverviewPdfGenerator
* @param int $iSelLang
* @throws noPdfHandlerFoundException
*/
public function generatePdf(Order $order, $iSelLang = 0)
public function generatePdf(Order $order, int $iSelLang = 0)
{
$Pdf= $this->getPdfClass();

View File

@ -10,14 +10,24 @@
namespace D3\PdfDocuments\Application\Model\AbstractClasses;
use Assert\InvalidArgumentException;
use D3\PdfDocuments\Application\Model\Constants;
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsGenericInterface as genericInterface;
use OxidEsales\Eshop\Core\Base;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
use Smarty;
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\TemplateRendererBridgeInterface;
use OxidEsales\Twig\Resolver\TemplateChain\TemplateNotInChainException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Spipu\Html2Pdf\Exception\Html2PdfException;
use Spipu\Html2Pdf\Html2Pdf;
use Twig\Error\Error;
abstract class pdfdocumentsGeneric extends Base implements genericInterface
{
@ -33,8 +43,8 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
public $filenameExtension = 'pdf';
/** @var Smarty */
public $oSmarty;
/** @var TemplateEngineInterface */
public $oTemplateEngine;
/** @var string */
public $filename;
@ -45,11 +55,26 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
public function __construct()
{
parent::__construct();
/** @var Smarty $oSmarty */
$this->oSmarty = Registry::getUtilsView()->getSmarty();
$this->oTemplateEngine = $this->d3GetTemplateEngine();
}
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()
{
}
@ -62,7 +87,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
* @param $sFilename
* @param int $iSelLang
* @param string $target
* @return mixed|string|null
* @return string|null
* @throws Html2PdfException
*/
public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT)
@ -90,7 +115,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
$this->genPdf($sFilename, $iLanguage, self::PDF_DESTINATION_DOWNLOAD);
$this->runPostAction();
Registry::getUtils()->showMessageAndExit('');
} catch (pdfGeneratorExceptionAbstract $e) {
} catch (pdfGeneratorExceptionAbstract|InvalidArgumentException $e) {
Registry::get(UtilsView::class)->addErrorToDisplay($e);
Registry::getLogger()->error($e);
}
@ -113,7 +138,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
self::PDF_DESTINATION_FILE
);
$this->runPostAction();
} catch (pdfGeneratorExceptionAbstract $e) {
} catch (pdfGeneratorExceptionAbstract|InvalidArgumentException $e) {
Registry::get(UtilsView::class)->addErrorToDisplay($e);
Registry::getLogger()->error($e);
}
@ -133,7 +158,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
$ret = $this->genPdf( $sFilename, $iLanguage, self::PDF_DESTINATION_STRING );
$this->runPostAction();
return $ret;
} catch (pdfGeneratorExceptionAbstract $e) {
} catch (pdfGeneratorExceptionAbstract|InvalidArgumentException $e) {
Registry::get(UtilsView::class)->addErrorToDisplay($e);
Registry::getLogger()->error($e);
}
@ -144,22 +169,24 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/**
* @param int $iSelLang
*/
public function setSmartyVars($iSelLang)
public function setTemplateEngineVars(int $iSelLang)
{
unset($iSelLang);
$this->oSmarty->assign('config', Registry::getSession()->getConfig());
$this->oSmarty->assign('viewConfig', Registry::getSession()->getConfig()->getActiveView()->getViewConfig());
$this->oSmarty->assign('shop', Registry::getSession()->getConfig()->getActiveShop());
$this->oSmarty->assign('lang', Registry::getLang());
$this->oSmarty->assign('document', $this);
$this->oTemplateEngine->addGlobal('config', Registry::getConfig());
$this->oTemplateEngine->addGlobal('oViewConf', Registry::getConfig()->getActiveView()->getViewConfig());
$this->oTemplateEngine->addGlobal('shop', Registry::getConfig()->getActiveShop());
$this->oTemplateEngine->addGlobal('lang', Registry::getLang());
$this->oTemplateEngine->addGlobal('document', $this);
}
/**
* @param int $iSelLang
*
* @return mixed
* @throws InvalidArgumentException
*/
public function getHTMLContent($iSelLang = 0)
public function getHTMLContent(int $iSelLang = 0)
{
$blCurrentRenderFromAdmin = self::$_blIsAdmin;
self::$_blIsAdmin = $this->renderTemplateFromAdmin();
@ -169,11 +196,18 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
$currTplLang = $lang->getTplLanguage();
$lang->setTplLanguage($iSelLang);
$this->setSmartyVars($iSelLang);
$content = $this->oSmarty->fetch($this->getTemplate());
$lang->setTplLanguage($currTplLang);
$this->setTemplateEngineVars($iSelLang);
try {
$content = $this->oTemplateEngine->render($this->getTemplate(), $this->d3GetTemplateEngine()->getGlobals());
} catch (Error|TemplateNotInChainException $error) {
//Registry::getLogger()->error(dumpVar(__METHOD__." ".__LINE__), [$error->getFile()]);
throw oxNew(StandardException::class, $error->getMessage());
}
$lang->setTplLanguage($currTplLang);
self::$_blIsAdmin = $blCurrentRenderFromAdmin;
@ -218,15 +252,15 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
{
// forced filename from setFilename()
if ($this->filename) {
return $this->addFilenameExtension(
$this->makeValidFileName(
return $this->makeValidFileName(
$this->addFilenameExtension(
$this->filename
)
);
}
return $this->addFilenameExtension(
$this->makeValidFileName(
return $this->makeValidFileName(
$this->addFilenameExtension(
$this->getTypeForFilename()
)
);
@ -241,7 +275,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
{
$extension = $this->filenameExtension;
$extensionLength = (strlen($extension) + 1) * -1;
if ((bool) strlen($extension) && substr($filename, $extensionLength) != '.'.$extension) {
if (strlen($extension) && substr($filename, $extensionLength) != '.'.$extension) {
$filename .= '.'.$extension;
}
@ -251,16 +285,66 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/**
* Gets proper file name
*
* @param string $sFilename file name
* @param $filename
*
* @return string
*/
public function makeValidFileName($sFilename)
public function makeValidFileName($filename)
{
$sFilename = preg_replace('/[\s]+/', '_', $sFilename);
$sFilename = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $sFilename);
// sanitize filename
$filename = preg_replace(
'~
[<>:"/\\\\|?*]| # file system reserved
[\x00-\x1F]| # control characters
[\x7F\xA0\xAD]| # non-printing characters DEL, NO-BREAK SPACE, SOFT HYPHEN
[#\[\]@!$&\'()+,;=]| # URI reserved
[{}^\~`] # URL unsafe characters
~x',
'-',
$filename
);
return str_replace(' ', '_', $sFilename);
// avoids ".", ".." or ".hiddenFiles"
$filename = ltrim($filename, '.-');
$filename = $this->beautifyFilename($filename);
// maximize filename length to 255 bytes
$ext = pathinfo($filename, PATHINFO_EXTENSION);
return mb_strcut(
pathinfo($filename, PATHINFO_FILENAME),
0,
255 - ($ext ? strlen($ext) + 1 : 0),
mb_detect_encoding($filename)
) . ($ext ? '.' . $ext : '');
}
public function beautifyFilename($filename)
{
// reduce consecutive characters
$filename = preg_replace([
// "file name.zip" becomes "file-name.zip"
'/ +/',
// "file___name.zip" becomes "file-name.zip"
'/_{2,}/',
// "file---name.zip" becomes "file-name.zip"
'/-+/',
], '-', $filename);
$filename = preg_replace([
// "file--.--.-.--name.zip" becomes "file.name.zip"
'/-*\.-*/',
// "file...name..zip" becomes "file.name.zip"
'/\.{2,}/',
], '.', $filename);
// lowercase for windows/unix interoperability
$filename = mb_strtolower($filename, mb_detect_encoding($filename));
// ".file-name.-" becomes "file-name"
$filename = trim($filename, '.-');
return trim($filename);
}
/**
@ -273,15 +357,19 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/**
* @param Html2Pdf $oPdf
* @param $sFilename
* @param $target
* @param $html
* @param $sFilename
* @param $target
* @param $html
*
* @return string|null
* @throws Html2PdfException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function output(Html2Pdf $oPdf, $sFilename, $target, $html)
{
if ((bool) Registry::getConfig()->getConfigParam('d3PdfDocumentsbDev') === true) {
$moduleSettings = ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class);
if ($moduleSettings->getBoolean( 'd3PdfDocumentsbDev', Constants::OXID_MODULE_ID )) {
return $this->outputDev($oPdf, $sFilename, $target, $html);
} else {
return $oPdf->output($sFilename, $target);
@ -305,7 +393,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
if (ob_get_contents()) {
$oPdf->pdf->Error('Some data has already been output, can\'t send PDF file');
}
if (php_sapi_name() != 'cli') {
if (substr(php_sapi_name(), 0, 3) != 'cli') {
//We send to a browser
header('Content-Type: text/html');
if (headers_sent()) {

View File

@ -10,9 +10,10 @@
namespace D3\PdfDocuments\Application\Model\AbstractClasses;
use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException;
use Assert\Assert;
use Assert\InvalidArgumentException;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderInterface as orderInterface;
use \OxidEsales\Eshop\Application\Model\Order;
use OxidEsales\Eshop\Application\Model\Order;
use OxidEsales\Eshop\Application\Model\Payment;
use OxidEsales\Eshop\Application\Model\User;
use OxidEsales\Eshop\Core\Registry;
@ -22,6 +23,14 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
/** @var Order */
public $oOrder;
/**
* don't use order as constructor argument because of same method interface for all document types
*/
public function __construct()
{
parent::__construct();
}
/**
* @param Order $order
*/
@ -31,40 +40,48 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
}
/**
* @throws InvalidArgumentException
* @return Order
*/
public function getOrder()
{
Assert::lazy()
->that($this->oOrder)->isInstanceOf(Order::class, 'no order for pdf generator set')
->that($this->oOrder->isLoaded())->true('given order is not loaded')
->verifyNow();
return $this->oOrder;
}
/**
* @param int $iSelLang
* @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->load($this->getOrder()->getFieldData('oxuserid'));
$this->oSmarty->assign('user', $oUser);
$this->oTemplateEngine->addGlobal('user', $oUser);
$oPayment = oxNew(Payment::class);
$oPayment->loadInLang($iSelLang, $this->getOrder()->getFieldData('oxpaymenttype'));
$this->oSmarty->assign('payment', $oPayment);
$this->oTemplateEngine->addGlobal('payment', $oPayment);
}
/**
* @return string
* @throws InvalidArgumentException
*/
public function getFilename()
{
// forced filename from setFilename()
if ($this->filename) {
return $this->addFilenameExtension(
$this->makeValidFileName(
return $this->makeValidFileName(
$this->addFilenameExtension(
$this->filename
)
);
@ -72,8 +89,8 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
$sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname'));
return $this->addFilenameExtension(
$this->makeValidFileName(
return $this->makeValidFileName(
$this->addFilenameExtension(
implode(
'_',
[
@ -86,21 +103,6 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
);
}
/**
* @param $sFilename
* @param int $iSelLang
* @param string $target
* @return mixed|string|null
*/
public function genPdf($sFilename, $iSelLang = 0, $target = 'I')
{
if (false == $this->getOrder()) {
throw oxNew(noBaseObjectSetException::class);
}
return parent::genPdf($sFilename, $iSelLang, $target);
}
/**
* @return int
*/
@ -114,7 +116,8 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
}
/**
* @return false|string
* @return false|int
* @throws InvalidArgumentException
*/
public function getPayableUntilDate()
{

View File

@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace D3\PdfDocuments\Application\Model;
class Constants
{
public const OXID_MODULE_ID = 'd3PdfDocuments';
}

View File

@ -43,6 +43,6 @@ class deliverynotePdf extends pdfdocumentsOrder
*/
public function getTemplate()
{
return 'd3deliverynote_pdf.tpl';
return '@d3PdfDocuments/documents/deliverynote/deliverynote';
}
}

View File

@ -41,6 +41,6 @@ class deliverynotewithoutlogoPdf extends deliverynotePdf
*/
public function getTemplate()
{
return 'd3deliverynoteNoLogo_pdf.tpl';
return '@d3PdfDocuments/documents/deliverynote/deliverynoteNoLogo';
}
}

View File

@ -10,10 +10,9 @@
namespace D3\PdfDocuments\Application\Model\Documents;
use Assert\InvalidArgumentException;
use D3\PdfDocuments\Application\Model\AbstractClasses\pdfdocumentsOrder;
use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocumentsOrderinvoiceInterface;
use Spipu\Html2Pdf\Exception\Html2PdfException;
class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceInterface
{
@ -43,6 +42,10 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
return 'invoice';
}
/**
* @return void
* @throws InvalidArgumentException
*/
public function runPreAction()
{
parent::runPreAction();
@ -52,10 +55,12 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
$this->saveOrderOnChanges();
}
/**
* @return void
* @throws InvalidArgumentException
*/
public function setInvoiceNumber()
{
$this->blIsNewOrder = false;
if (!$this->getOrder()->getFieldData('oxbillnr')) {
$this->getOrder()->assign(['oxbillnr' => $this->getOrder()->getNextBillNum()]);
@ -63,6 +68,10 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
}
}
/**
* @return void
* @throws InvalidArgumentException
*/
public function setInvoiceDate()
{
if ($this->getOrder()->getFieldData('oxbilldate') == '0000-00-00') {
@ -74,6 +83,10 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
}
}
/**
* @return void
* @throws InvalidArgumentException
*/
public function saveOrderOnChanges()
{
if ($this->blIsNewOrder) {
@ -82,11 +95,12 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
}
public function getTemplate(){
return 'd3invoice_pdf.tpl';
return '@d3PdfDocuments/documents/invoice/invoice';
}
/**
* @return string
* @throws InvalidArgumentException
*/
public function getFilename()
{

View File

@ -40,6 +40,6 @@ class invoicewithoutlogoPdf extends invoicePdf
* @return string
*/
public function getTemplate(){
return 'd3invoiceNoLogo_pdf.tpl';
return '@d3PdfDocuments/documents/invoice/invoiceNoLogo';
}
}

View File

@ -1,21 +0,0 @@
<?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
*/
namespace D3\PdfDocuments\Application\Model\Exceptions;
use Exception;
class noBaseObjectSetException extends pdfGeneratorExceptionAbstract
{
public function __construct( $sMessage = "no base object (e.g. order) for pdf generator set", $iCode = 0, Exception $previous = null )
{
parent::__construct( $sMessage, $iCode, $previous );
}
}

View File

@ -10,8 +10,6 @@
namespace D3\PdfDocuments\Application\Model\Interfaces;
use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException;
interface pdfdocumentsGenericInterface
{
/**
@ -37,30 +35,29 @@ interface pdfdocumentsGenericInterface
/**
* @param int $iLanguage
*/
public function downloadPdf($iLanguage = 0);
public function downloadPdf(int $iLanguage = 0);
/**
* @param int $iLanguage
*
* @return string|null
*/
public function getPdfContent($iLanguage = 0);
public function getPdfContent(int $iLanguage = 0);
/**
* @param string $path
* @param int $iLanguage
*/
public function savePdfFile($path, $iLanguage = 0);
public function savePdfFile(string $path, int $iLanguage = 0);
/**
* @param $sFilename
* @param string $sFilename
* @param int $iSelLang
* @param string $target
*
* @return mixed
* @throws noBaseObjectSetException
*/
public function genPdf($sFilename, $iSelLang = 0, $target = 'I');
public function genPdf(string $sFilename, int $iSelLang = 0, string $target = 'I');
/**
* @param string $filename

View File

@ -10,6 +10,7 @@
namespace D3\PdfDocuments\Application\Model\Interfaces;
use Assert\InvalidArgumentException;
use OxidEsales\Eshop\Application\Model\Order;
interface pdfdocumentsOrderInterface extends pdfdocumentsGenericInterface
@ -20,6 +21,7 @@ interface pdfdocumentsOrderInterface extends pdfdocumentsGenericInterface
public function setOrder(Order $order);
/**
* @throws InvalidArgumentException
* @return Order
*/
public function getOrder();

View File

@ -31,7 +31,7 @@ abstract class registryAbstract implements registryGenericInterface
*/
public function addGenerator($className)
{
if (false == $this->hasGenerator($className)) {
if ( ! $this->hasGenerator( $className ) ) {
/** @var pdfdocumentsGenericInterface $generator */
$generator = oxNew( $className );
@ -49,7 +49,7 @@ abstract class registryAbstract implements registryGenericInterface
{
$requiredInterface = $this->getRequiredGeneratorInterfaceClassName();
if (false == $item instanceof $requiredInterface) {
if ( ! $item instanceof $requiredInterface ) {
throw oxNew(wrongPdfGeneratorInterface::class, $requiredInterface);
}

View File

@ -1,3 +0,0 @@
[{$smarty.block.parent}]
[{include file="d3orderoverview_pdfform.tpl"}]

View File

@ -8,12 +8,14 @@
* @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_d3PdfDocumentsbDev' => 'Entwicklermodus',
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus',
'D3_PDFDOCUMENTS' => 'PDF-Dokumente',
'D3_PDFDOCUMENTS_INVOICE' => 'Rechnung',

View File

@ -8,12 +8,14 @@
* @link http://www.oxidmodule.com
*/
use D3\PdfDocuments\Application\Model\Constants;
$sLangName = "English";
$aLang = array(
'charset' => 'utf-8',
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
'SHOP_MODULE_d3PdfDocumentsbDev' => 'Developer mode',
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
'D3_PDFDOCUMENTS' => 'PDF Documents',
'D3_PDFDOCUMENTS_INVOICE' => 'Invoice',

View File

@ -0,0 +1,29 @@
<?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',
'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',
);

View File

@ -0,0 +1,29 @@
<?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 = "English";
$aLang = array(
'charset' => 'utf-8',
'SHOP_MODULE_GROUP_d3PdfDocumentsmain' => 'Basic settings',
'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode',
'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',
);

View File

@ -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}]

View File

@ -1 +0,0 @@
[{include file="d3deliverynote_pdf.tpl" showLogo=false}]

View File

@ -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>

View File

@ -1,13 +0,0 @@
[{assign var="showLogo" value=$showLogo|default:true}]
[{block name="pdfHeader"}]
<div class="header">
[{if $showLogo}]
[{* pdf logo is available only in non admin theme *}]
[{assign var="isAdmin" value=$viewConfig->isAdmin()}]
[{$viewConfig->setAdminMode(false)}]
<img class="logo" alt="Logo" src="[{$viewConfig->getImageUrl('pdf_logo.jpg')}]">
[{$viewConfig->setAdminMode($isAdmin)}]
[{/if}]
</div>
[{/block}]

View File

@ -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}]

View File

@ -1 +0,0 @@
[{include file="d3invoice_pdf.tpl" showLogo=false}]

23
IntelliSenseHelper.php Normal file
View 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
{
}
}

View File

@ -11,54 +11,64 @@
namespace D3\PdfDocuments\Modules\Application\Controller;
use D3\PdfDocuments\Application\Controller\orderOverviewPdfGenerator;
use D3\PdfDocuments\Application\Model\Exceptions\noBaseObjectSetException;
use D3\PdfDocuments\Application\Model\Exceptions\noPdfHandlerFoundException;
use D3\PdfDocuments\Application\Model\Exceptions\pdfGeneratorExceptionAbstract;
use D3\PdfDocuments\Application\Model\Registries\registryOrderoverview;
use D3\PdfDocuments\Modules\Application\Model\d3_Order_PdfDocuments;
use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
use Doctrine\DBAL\Driver\Exception;
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Query\QueryBuilder;
use OxidEsales\Eshop\Application\Model\Order;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\TableViewNameGenerator;
if (false) {
class_alias(
d3_overview_controller_pdfdocuments_parent::class,
OrderOverview::class
);
}
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocuments_parent
{
/**
* @return bool
* @throws DatabaseConnectionException
* @throws Exception
*/
public function d3CanExport()
public function d3CanExport(): bool
{
// We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
$masterDb = DatabaseProvider::getMaster();
$sOrderId = $this->getEditObjectId();
try {
$sOrderId = $this->getEditObjectId();
$viewNameGenerator = Registry::get(TableViewNameGenerator::class);
$sTable = $viewNameGenerator->getViewName("oxorderarticles");
$viewNameGenerator = Registry::get( TableViewNameGenerator::class );
$sTable = $viewNameGenerator->getViewName( "oxorderarticles" );
$sQ = "select count(oxid) from {$sTable} where oxorderid = " . $masterDb->quote($sOrderId) . " and oxstorno = 0";
return (bool) $masterDb->getOne($sQ);
/** @var QueryBuilder $queryBuilder */
$queryBuilder = ContainerFactory::getInstance()->getContainer()->get( QueryBuilderFactoryInterface::class )->create();
$queryBuilder
->select( 'oxid' )
->from( $sTable )
->where(
$queryBuilder->expr()->and(
$queryBuilder->expr()->eq( 'oxorderid', $queryBuilder->createNamedParameter( $sOrderId ) ),
$queryBuilder->expr()->eq( 'oxstorno', $queryBuilder->createNamedParameter( 0, ParameterType::INTEGER ) )
)
);
return $queryBuilder->execute()->fetchOne();
} catch (NotFoundExceptionInterface|ContainerExceptionInterface|DBALException) {
return false;
}
}
/**
* @throws noBaseObjectSetException
* @throws noPdfHandlerFoundException
* @throws pdfGeneratorExceptionAbstract
*/
public function d3CreatePDF()
public function d3CreatePDF(): void
{
$soxId = $this->getEditObjectId();
if ($soxId != "-1" && isset($soxId)) {
/** @var d3_Order_PdfDocuments $oOrder */
/** @var Order $oOrder */
$oOrder = oxNew(Order::class);
if ($oOrder->load($soxId)) {
$generator = oxNew( orderOverviewPdfGenerator::class );
@ -67,10 +77,7 @@ class d3_overview_controller_pdfdocuments extends d3_overview_controller_pdfdocu
}
}
/**
* @return registryOrderoverview
*/
public function d3getGeneratorList()
public function d3getGeneratorList(): registryOrderoverview
{
return oxNew(registryOrderoverview::class);
}

View File

@ -1,10 +1,15 @@
> [german version](README.md)
![stability mature](https://img.shields.io/badge/stability-mature-008000.svg)
[![latest tag](https://img.shields.io/packagist/v/d3/pdfdocuments?label=release)](https://packagist.org/packages/d3/pdfdocuments)
![License](https://img.shields.io/packagist/l/d3/pdfdocuments)
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
# PDF Documents
PDF document generator for OXID eShop
Create a wide variety of static or dynamic PDF documents at the touch of a button. The document content is created from Smarty templates.
Create a wide variety of static or dynamic PDF documents at the touch of a button. The document content is created from templates (Smarty or Twig).
At the orders of your OXID shop you have the option of creating an invoice and delivery note.
@ -12,8 +17,8 @@ The module can be easily extended to adapt existing documents or add new ones. E
## System requirements:
- installed OXID eShop version from 6.1
- PHP version for which installation packages are available (PHP 7)
- installed OXID eShop version from 7.0 - 7.1
- PHP version for which installation packages are available (PHP 8)
- Installation via Composer
## Compatibility:
@ -25,7 +30,7 @@ If the `OXID Invoice PDF` module is to be completely replaced by the `D3 PDF Doc
## Installation:
```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.
@ -38,7 +43,8 @@ Detailed installation instructions can be found [online](https://docs.oxidmodule
## Credits:
- PDF logo made by Dimitriy Morilubov from www.flaticon.com
- PDF logo made by Dimitriy Morilubov by www.flaticon.com
- example company logo by https://www.logologo.com/
## License

View File

@ -1,10 +1,15 @@
> [english version](README.en.md)
![stability mature](https://img.shields.io/badge/stability-mature-008000.svg)
[![latest tag](https://img.shields.io/packagist/v/d3/pdfdocuments?label=release)](https://packagist.org/packages/d3/pdfdocuments)
![License](https://img.shields.io/packagist/l/d3/pdfdocuments)
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
# PDF-Dokumente
PDF-Dokumentgenerator fĂĽr OXID eShop
Erstellen Sie unterschiedlichste statische oder dynamische PDF-Dokument auf Kopfdruck. Der Dokumentinhalt wird aus Smartytemplates erstellt.
Erstellen Sie unterschiedliche statische oder dynamische PDF-Dokumente auf Knopfdruck. Der Dokumentinhalt wird aus Templates (Smarty bzw. Twig) erstellt.
An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur VerfĂĽgung.
@ -12,8 +17,8 @@ Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder
## Systemanforderungen:
- installierter OXID eShop in Version ab 6.1
- PHP-Version, fĂĽr die Installationspakete verfĂĽgbar sind (PHP 7)
- installierter OXID eShop in Version ab 7.0 - 7.1
- PHP-Version, fĂĽr die Installationspakete verfĂĽgbar sind (PHP 8)
- Installation via Composer
## Kompatibilität:
@ -25,7 +30,7 @@ Soll das `OXID Invoice-PDF`-Modul komplett vom `PDF Dokumente` Modul ersetzt wer
## Installation:
```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.
@ -39,6 +44,7 @@ Eine detaillierte Installationsanleitung finden Sie [online](https://docs.oxidmo
## Danksagung:
- PDF-Logo erstellt von Dimitriy Morilubov von www.flaticon.com
- Beispielfirmenlogo von https://www.logologo.com/
## Lizenz

BIN
assets/out/img/clogo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

57
assets/picture.svg Normal file
View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="201px" height="124px" viewBox="0 0 201 124" enable-background="new 0 0 201 124" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="47.0591" y1="67.5117" x2="47.0591" y2="54.6143">
<stop offset="0.0056" style="stop-color:#3266A9"/>
<stop offset="1" style="stop-color:#0099FF"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M50.282,55.502c-0.784-0.592-2.104-0.888-3.961-0.888h-1.376l-2.283,12.898h1.779
c3.76,0,6.032-2.245,6.815-6.733c0.134-0.871,0.202-1.642,0.202-2.313C51.457,57.081,51.064,56.093,50.282,55.502z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="65.9609" y1="49.104" x2="65.9609" y2="36.9434">
<stop offset="0.0056" style="stop-color:#3266A9"/>
<stop offset="1" style="stop-color:#0099FF"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M65.72,40.482c1.074,0,1.611,0.381,1.611,1.143c0,0.701-0.321,1.201-0.962,1.5
c-0.209,0.119-0.366,0.194-0.471,0.224c-0.065,0.019-0.158,0.037-0.271,0.056c1.98,1.621,3.702,3.544,5.097,5.699
c0.117-0.321,0.21-0.658,0.277-1.013l0.09-1.008c0-1.223-0.568-2.081-1.701-2.574c0.776-0.402,1.376-0.94,1.801-1.611
c0.425-0.672,0.638-1.418,0.638-2.239c0-0.642-0.198-1.265-0.593-1.868c-0.396-0.605-0.98-1.049-1.757-1.333
c-0.433-0.193-0.876-0.328-1.332-0.402c-0.456-0.075-1.003-0.113-1.645-0.113c-0.82,0-1.663,0.124-2.529,0.37
c-0.865,0.246-1.6,0.563-2.204,0.952s-1.13,0.907-1.578,1.557c-0.036,0.052-0.066,0.109-0.101,0.163
c1.196,0.534,2.341,1.163,3.426,1.874C63.947,40.943,64.68,40.482,65.72,40.482z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="50.0576" y1="87.0566" x2="50.0576" y2="37.8525">
<stop offset="0.0056" style="stop-color:#3266A9"/>
<stop offset="1" style="stop-color:#0099FF"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M70.725,49.104c-0.433,1.189-1.208,2.147-2.331,2.871c-1.425,0.918-3.182,1.377-5.271,1.377
c-1.179,0-2.175-0.176-2.988-0.525c-0.813-0.35-1.444-0.864-1.891-1.543c-0.448-0.678-0.671-1.481-0.671-2.405l0.022-0.694
l0.156-0.693h4.367l-0.028,0.179v0.179v0.246c0,1.164,0.628,1.746,1.884,1.746c0.635,0,1.201-0.217,1.696-0.649
c0.495-0.434,0.742-0.94,0.742-1.522c0-0.522-0.194-0.887-0.582-1.097c-0.329-0.208-1.007-0.313-2.036-0.313l0.47-2.754
l1.141-0.067c0.083-0.011,0.154-0.022,0.221-0.033c-0.674-0.551-1.378-1.067-2.11-1.546c-0.044,0.096-0.087,0.195-0.125,0.302
h-4.185c0.192-0.837,0.49-1.56,0.884-2.175c-3.064-1.372-6.46-2.133-10.034-2.133c-13.588,0-24.603,11.014-24.603,24.601
c0,13.59,11.015,24.604,24.603,24.604S74.66,76.043,74.66,62.453C74.66,57.532,73.214,52.949,70.725,49.104z M59.413,59.233
l-0.168,1.275c-0.538,2.953-1.511,5.404-2.921,7.35c-1.298,1.835-3.016,3.179-5.153,4.028c-2.138,0.851-4.494,1.274-7.067,1.274
H33.731l4.264-24.198h10.441c1.141,0,2.204,0.073,3.189,0.218c0.984,0.146,1.868,0.364,2.651,0.655
c1.611,0.537,2.887,1.471,3.827,2.802c0.94,1.332,1.41,2.992,1.41,4.984L59.413,59.233z"/>
</g>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="107.3027" y1="105.8555" x2="93.0727" y2="16.0106">
<stop offset="0" style="stop-color:#B2B2B2;stop-opacity:0"/>
<stop offset="0.2" style="stop-color:#B2B2B2"/>
<stop offset="0.8" style="stop-color:#B2B2B2"/>
<stop offset="1" style="stop-color:#B2B2B2;stop-opacity:0"/>
</linearGradient>
<rect x="99.875" y="14.933" fill="url(#SVGID_4_)" width="0.625" height="92"/>
<script xmlns=""></script>
<path d="M126.531,43.25c0-3.446,2.801-6.25,6.25-6.25h15.624v12.5c0,1.729,1.398,3.125,3.126,3.125h12.5v14.063h-20.313
c-3.448,0-6.25,2.801-6.25,6.25V87h-4.688c-3.449,0-6.25-2.801-6.25-6.248V43.25z M164.031,49.5h-12.5V37L164.031,49.5z
M143.719,71.375h3.125c3.018,0,5.469,2.451,5.469,5.469s-2.451,5.471-5.469,5.471h-1.563v3.123c0,0.861-0.702,1.563-1.563,1.563
c-0.861,0-1.563-0.701-1.563-1.563v-4.686v-7.814C142.156,72.076,142.857,71.375,143.719,71.375z M146.844,79.188
c1.3,0,2.343-1.043,2.343-2.344c0-1.299-1.043-2.344-2.343-2.344h-1.563v4.688H146.844z M156.218,71.375h3.125
c2.589,0,4.688,2.102,4.688,4.688v6.252c0,2.586-2.1,4.686-4.688,4.686h-3.125c-0.86,0-1.562-0.701-1.562-1.563v-12.5
C154.656,72.076,155.357,71.375,156.218,71.375z M159.343,83.875c0.861,0,1.563-0.703,1.563-1.561v-6.252
c0-0.861-0.702-1.563-1.563-1.563h-1.563v9.375H159.343z M167.155,72.938c0-0.861,0.703-1.563,1.563-1.563h4.688
c0.861,0,1.563,0.701,1.563,1.563s-0.701,1.563-1.563,1.563h-3.124v3.125h3.124c0.861,0,1.563,0.703,1.563,1.563
s-0.701,1.564-1.563,1.564h-3.124v4.686c0,0.861-0.703,1.563-1.563,1.563c-0.859,0-1.563-0.701-1.563-1.563v-6.25V72.938z"/>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -7,13 +7,18 @@
"modules",
"eShop",
"d3",
"PDF"
"PDF",
"documents",
"invoice",
"delivery note",
"d3dependencycheck",
"id_d3PdfDocuments"
],
"authors": [
{
"name": "D3 Data Development (Inh. Thomas Dartsch)",
"email": "info@shopmodule.com",
"homepage": "http://www.d3data.de",
"homepage": "https://www.d3data.de",
"role": "Owner"
}
],
@ -21,23 +26,15 @@
"license": [
"GPL-3.0-or-later"
],
"extra": {
"oxideshop": {
"blacklist-filter": [
"composer.json",
"docs/**/*.*"
],
"target-directory": "d3/pdfdocuments"
}
},
"require": {
"php": "^7.0",
"oxid-esales/oxideshop-ce": "6.3 - 6.5",
"spipu/html2pdf": "^5.2"
"php": "^8.0",
"oxid-esales/oxideshop-ce": "7.0 - 7.2",
"spipu/html2pdf": "~5.2.8",
"beberlei/assert": "^3.3.2"
},
"autoload": {
"psr-4": {
"D3\\PdfDocuments\\": "../../../source/modules/d3/pdfdocuments"
"D3\\PdfDocuments\\": ""
}
}
}

29
development.md Normal file
View File

@ -0,0 +1,29 @@
# Entwicklungen
Um das Modul anzupassen, gibt es verschiedene Möglichkeiten:
## Grundsätzliches
Wir empfehlen dringend, alle Veränderungen bestehender Dokumente und auch neue Dokumente in einem eigenen Modul abzulegen,
um die Updatefähigkeit zu behalten.
## neue Dokumente hinzufĂĽgen
Neue Dokumente können analog zu den Bestehenden angelegt werden. Jedes Dokument besteht aus der entsprechenden
PHP-Klasse (unter Application/Model/Documents) und deren Template (unter views/.../documents). Verwenden Sie die
Bestandsdokumente als Implementierungsreferenz.
Dokumentlisten sind fĂĽr den Bestellbereich im Shopadmin sowie fĂĽr die Generierung ĂĽber den D3 Auftragsmanagers
enthalten (unter Application/Model/Registries). Überladen Sie die Klassen und ergänzen Sie im Konstruktor Ihre neuen
Dokumente.
## bestehende Dokumente verändern
Die Grundangaben eines Dokuments sind in dessen PHP-Datei definiert. Überladen Sie diese bei Bedarf und ändern die
Einstellung.
Die Inhalte der Dokumente sind in Templates definiert. In den Templates sind Blöcke eingerichtet, die mit den
Überladungsmöglichkeiten des Shops ergänzt oder ersetzt werden können.
Bei umfangreichen Anpassungen kann es sinnvoll sein, eigene Templates anzulegen, die in der PHP-Klasse des Dokuments als
Quelle definiert wird.

View File

@ -2,15 +2,68 @@
title: Changelog
---
## 1.0.1.0 - (2020-08-20)
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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.d3data.de/D3Public/pdfdokumente/compare/2.0.1.1...rel_2.x)
### Added
- installierbar in OXID 7.2
### Fixed
- Syntaxfehler in Twig Templates
## [2.0.1.1](https://git.d3data.de/D3Public/pdfdokumente/compare/2.0.1.0...2.0.1.1) - 2024-10-04
### Fixed
- Syntax der Steuerangaben in Twig-Templates
## [2.0.1.0](https://git.d3data.de/D3Public/pdfdokumente/compare/2.0.0.0...2.0.1.0) - 2024-10-01
### Added
- Entwicklungshandbuch
- Ăśberladungsblock fĂĽr Unternehmenslogo
### Fixed
- CSS wird nicht als Referenz sondern inline eingebunden
- Entwicklermodus kann konfiguriert werden
- Smarty Templates
### Removed
- Modul Connector Bedingung
## [2.0.0.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.4.0...2.0.0.0) - 2024-09-12
### Added
- installierbar in OXID 7.0 && 7.1 (CE 7.0.x - 7.1.x)
- Support fĂĽr Smarty- und Twig-Templates
### Removed
- Support fĂĽr OXID < 7.0
## [1.0.4.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.3.1...1.0.4.0) - 2023-12-22
### Added
- installierbar in OXID 6.5.2 + 6.5.3 (CE 6.14)
- Modullogo
### Changed
- behandelt fehlende Bestellung bei auf Bestellungen basierenden Dokumenten
## [1.0.3.1](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.3.0...1.0.3.1) - 2023-05-09
### Fixed
- kann mehrere Dokumente auf einmal generieren
## [1.0.3.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.2.0...1.0.3.0) - 2023-01-04
### Added
- installierbar in OXID 6.4 und 6.5
## [1.0.2.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.1.0...1.0.2.0) - 2021-04-30
### Added
- installierbar in OXID 6.2.4 und 6.3.0
- Dateinamen werden auf GĂĽltigkeit hin korrigiert
### Fixed
- Setzen der Rechnungsnummer setzt den "neue Bestellung"-Status nicht zurĂĽck
## [1.0.1.0](https://git.d3data.de/D3Public/pdfdokumente/compare/1.0.0.0...1.0.1.0) - 2020-08-20
### Changed
- Dokumentid fĂĽr "Rechnung ohne Logo" angepasst
---
## 1.0.0.0 - (2020-08-13)
## [1.0.1.0](https://git.d3data.de/D3Public/pdfdokumente/tag/1.0.0.0) - 2020-08-13
#### Added
- Framework zur Erstellung unterschiedlichster PDF Dokumente
- ermöglicht Generierung von Rechnungen und Lieferscheinen für Bestellungen aus dem Adminbereich

View File

@ -1,9 +1,9 @@
{
"title": "<i class='fab fa-d3 d3fa-color-blue'></i> PDF Dokumente",
"moduleversion": "1.0.1.0",
"moduleversion": "2.0.1.1",
"titledesc": "fĂĽr den Oxid eShop",
"author": "DÂł Data Development",
"moduledate": "20.08.2020",
"moduledate": "04.10.2024",
"editors": "",
"tagline": "",
"image": "",

View File

@ -3,13 +3,15 @@ title: Systemanforderungen
---
* PHP Version
* 7.0.x bis 7.4.x
* 8.x
* Shopversionen / -editionen
* OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version
* 6.1.x
* 6.2.x
* OXID eShop Community Edition (CE), Professional Edition (PE) oder Enterprise Edition (EE) in Compilation Version
* 7.0.x
* 7.1.x
* 7.2.x
* Themes
* Diese Modul bindet sich nicht in Frontendthemes ein und ist daher davon unabhängig
* Template-Engine
* Smarty
* Twig
* Installation via [Composer](https://getcomposer.org)

View File

@ -2,4 +2,4 @@
title: Kompatibilität mit anderen Modulen
---
Das PDF Dokumente-Modul integriert sich auch in die Erweiterung "Auftragsmanager" von (D3) Data Development, sofern dieses im Shop installiert wurde. Diese Integration wurde fĂĽr die Version 4.0.0.0 des "Auftragsmanager"-Moduls entwickelt.
Das PDF Dokumente-Modul integriert sich auch in die Erweiterung "Auftragsmanager" von (D3) Data Development, sofern dieses im Shop installiert wurde. Diese Integration wurde fĂĽr die Version 6.0.0.0 des "Auftragsmanager"-Moduls entwickelt.

View File

@ -2,8 +2,7 @@
title: Dateien löschen
---
Löschen Sie den Ordner `{$modulefolder}` und seine enthaltenen Elemente aus dem Verzeichnis `source/modules/d3` Ihres Shops.
Bestätigen Sie anschließend im Shopadmin unter [ Erweiterungen ] -> [ Module ] -> [ Installierte Shop-Module ] die Nachricht:
Sofern nötig, bestätigen Sie im Shopadmin unter [ Erweiterungen ] -> [ Module ] -> [ Installierte Shop-Module ] die Nachricht:
> Es gibt registrierte Erweiterungen im eShop, deren Verzeichnis nicht vorhanden ist.
> Möchten Sie alle Modulinformationen einschließlich Konfigurationseinstellungen und Blockinformationen für Templates löschen?

View File

@ -2,8 +2,8 @@
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 Templates (Smarty bzw. Twig) erstellt.
An den Bestellungen Ihres OXID-Shops steht Ihnen die Erstellung von Rechnung und Lieferschein zur VerfĂĽgung.
Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufĂĽgen.
Das Modul kann einfach erweitert werden, um bestehende Dokumente anzupassen oder Neue hinzuzufĂĽgen.

View File

@ -2,7 +2,7 @@
title: Anpassungen an bestehenden Dokumenten
---
Die Dokumente werden aus Smartytemplates erstellt, die Sie im `Application/views/tpl/documents` finden.
Die Dokumente werden aus Templates (Smarty bzw. Twig) erstellt, die Sie im Ordner `views/smarty/documents` bzw. `views/twig/documents` finden.
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.

View File

@ -14,9 +14,9 @@ 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.
## Smarty
## Templates
Innerhalb der Templates steht Ihnen die komplette Smarty-Funktionalität zur Verfügung.
Innerhalb der Templates steht Ihnen die komplette Twig- bzw. Smarty-Funktionalität zur Verfügung.
## Debug

View File

@ -8,6 +8,7 @@
* @link http://www.oxidmodule.com
*/
use D3\PdfDocuments\Application\Model\Constants as Constants;
use D3\PdfDocuments\Modules\Application\Controller\d3_overview_controller_pdfdocuments;
use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
@ -16,72 +17,77 @@ use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview;
*/
$sMetadataVersion = '2.1';
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
$sModuleId = 'd3PdfDocuments';
/**
* Module information
*/
$aModule = [
'id' => $sModuleId,
'id' => Constants::OXID_MODULE_ID,
'title' => [
'de' => $logo.' PDF-Dokumente',
'en' => $logo.' PDF documents',
'de' => '(D3) PDF-Dokumente',
'en' => '(D3) PDF documents',
],
'version' => '1.0.1.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'version' => '2.0.1.1',
'author' => 'D3 Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'url' => 'https://www.oxidmodule.com/',
'extend' => [
OrderOverview::class => d3_overview_controller_pdfdocuments::class
],
'controllers' => [],
'templates' => [
'd3orderoverview_pdfform.tpl' => 'd3/pdfdocuments/Application/views/tpl/admin/orderoverview_pdfform.tpl',
'controllers' => [],
'thumbnail' => 'picture.svg',
'templates' => [
//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',
'd3deliverynoteNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl',
'd3delnote_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/informations.tpl',
'd3delnote_pdf_recipient.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl',
'd3delnote_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/salutation.tpl',
'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl',
// Frontend - Flow - Deliverynote
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynote.tpl' => 'views/smarty/documents/deliverynote/deliverynote.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/deliverynoteNoLogo.tpl' => 'views/smarty/documents/deliverynote/deliverynoteNoLogo.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/informations.tpl' => 'views/smarty/documents/deliverynote/inc/informations.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/recipientAddress.tpl' => 'views/smarty/documents/deliverynote/inc/recipientAddress.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/salutation.tpl' => 'views/smarty/documents/deliverynote/inc/salutation.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/conclusion.tpl' => 'views/smarty/documents/deliverynote/inc/conclusion.tpl',
'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoice.tpl',
'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl',
'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/informations.tpl',
'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/salutation.tpl',
'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/conclusion.tpl',
'd3invoice_pdf_payinfo.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/payinfo.tpl',
// Frontend - Flow - Invoice
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoice.tpl' => 'views/smarty/documents/invoice/invoice.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/invoiceNoLogo.tpl' => 'views/smarty/documents/invoice/invoiceNoLogo.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/informations.tpl' => 'views/smarty/documents/invoice/inc/informations.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/salutation.tpl' => 'views/smarty/documents/invoice/inc/salutation.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/conclusion.tpl' => 'views/smarty/documents/invoice/inc/conclusion.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/invoice/payinfo.tpl' => 'views/smarty/documents/invoice/inc/payinfo.tpl',
'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl',
'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl',
'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/footer.tpl',
'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl',
// Frontend - Flow - Inc - Page
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/base.tpl' => 'views/smarty/documents/inc/page/base.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/header.tpl' => 'views/smarty/documents/inc/page/header.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/footer.tpl' => 'views/smarty/documents/inc/page/footer.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/page/returnaddress.tpl' => 'views/smarty/documents/inc/page/returnaddress.tpl',
'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl',
'd3pdfrecipientaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/recipientAddress.tpl',
'd3pdfinformations.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/informations.tpl',
'd3pdfdeladdress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl',
'd3pdfarticlelist.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlelist.tpl',
'd3pdfarticlecostsummary.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl',
'd3pdffoldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl',
// Frontend - Flow - Inc - Elements
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/addressarea.tpl' => 'views/smarty/documents/inc/elements/addressarea.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/recipientAddress.tpl' => 'views/smarty/documents/inc/elements/recipientAddress.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/informations.tpl' => 'views/smarty/documents/inc/elements/informations.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/deliveryaddress.tpl' => 'views/smarty/documents/inc/elements/deliveryaddress.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlelist.tpl' => 'views/smarty/documents/inc/elements/articlelist.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/articlecostssummary.tpl' => 'views/smarty/documents/inc/elements/articlecostssummary.tpl',
'@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/foldmarks.tpl' => 'views/smarty/documents/inc/elements/foldmarks.tpl',
'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css',
'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/helper/rulers.tpl',
// Frontend - Flow - Inc - Helper
'@' . Constants::OXID_MODULE_ID . '/documents/inc/helper/rulers.tpl' => 'views/smarty/documents/inc/helper/rulers.tpl',
// Frontend - Flow - Inc - Styles
'@' . Constants::OXID_MODULE_ID . '/assets/d3pdfstyles.css.tpl' => 'views/smarty/assets/pdfStyling.css.tpl',
],
'events' => [],
'blocks' => [
[
'template' => 'order_overview.tpl',
'block' => 'admin_order_overview_export',
'file' => 'Application/views/admin/blocks/order_overview.tpl'
'file' => 'views/smarty/blocks/order_overview.tpl'
]
],
'settings' => [
[
'group' => $sModuleId.'main',
'name' => $sModuleId.'bDev',
'group' => Constants::OXID_MODULE_ID.'main',
'name' => Constants::OXID_MODULE_ID.'bDev',
'type' => 'bool',
'value' => false
]

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="@d3PdfDocuments/admin/d3orderoverview_pdfform.tpl"}]

View 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.tpl"}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_header"}]
[{block name="pdfHeader"}]
[{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_content"}]
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
[{block name="pdfAddressArea"}]
[{include file="@d3PdfDocuments/documents/inc/elements/addressarea.tpl" addressfile="@d3PdfDocuments/documents/deliverynote/recipientAddress.tpl"}]
[{/block}]
[{block name="pdfInformations"}]
[{include file="@d3PdfDocuments/documents/inc/elements/informations.tpl" documentinformationfile="@d3PdfDocuments/documents/deliverynote/informations.tpl"}]
[{/block}]
[{block name="pdfSalutation"}]
[{include file="@d3PdfDocuments/documents/deliverynote/salutation.tpl"}]
[{/block}]
[{block name="pdfArticleList"}]
[{include file="@d3PdfDocuments/documents/inc/elements/articlelist.tpl" 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.tpl" pagePadding=$pagePadding}]
[{/block}]
[{/capture}]
[{include file="@d3PdfDocuments/documents/inc/page/base.tpl" pagePadding=$pagePadding}]

View File

@ -0,0 +1 @@
[{include file="@d3PdfDocuments/documents/deliverynote/deliverynote.tpl" showLogo=false}]

View File

@ -0,0 +1,13 @@
[{assign var="backaddressfile" value=$backaddressfile|default:"@d3PdfDocuments/documents/inc/page/returnaddress.tpl"}]
[{assign var="addressfile" value=$addressfile|default:"@d3PdfDocuments/documents/inc/elements/recipientAddress.tpl"}]
<div class="addressarea">
<div class="returnAddress">
<div>
[{include file=$backaddressfile}]
</div>
</div>
<div class="recipientAddress">
[{include file=$addressfile}]
</div>
</div>

View File

@ -54,7 +54,7 @@
<nobreak>
<table class="article_costs_table">
[{block name="d3_article_costs_summary"}]
[{include file="d3pdfarticlecostsummary.tpl"}]
[{include file="@d3PdfDocuments/documents/inc/elements/articlecostssummary.tpl"}]
[{/block}]
</table>
</nobreak>

View File

@ -1,7 +1,7 @@
[{assign var="defaultPagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
<style type="text/css">
<style>
.marks {
position: absolute;
left: [{math equation="left - padding" left=5 padding=$pagePadding.3}]mm ;

View File

@ -2,9 +2,9 @@
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
[{* rulers *}]
[{* include file="d3pdfrulers.tpl" pagePadding=$pagePadding *}]
[{* include file="@d3PdfDocuments/documents/inc/helper/rulers" pagePadding=$pagePadding *}]
<style type="text/css">
<style>
.rulerItemHorizontal {
position: absolute;
top: -[{$pagePadding.0}]mm;

View File

@ -4,7 +4,7 @@
[{assign var="defaultPagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}]
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
<style type="text/css">
<style>
[{foreach from=$pdfBlock_style item="_block"}]
[{$_block}]
[{/foreach}]

View File

@ -0,0 +1,11 @@
[{assign var="showLogo" value=$showLogo|default:true}]
[{block name="pdfHeader"}]
<div class="header">
[{if $showLogo}]
[{block name="pdfHeaderLogo"}]
<img class="logo" alt="Logo" src="[{$oViewConf->getModulePath('d3PdfDocuments', 'out/img/clogo.jpg')}]">
[{/block}]
[{/if}]
</div>
[{/block}]

View File

@ -5,7 +5,7 @@
[{oxmultilang ident="D3_PDFDOCUMENTS_USED_PAYMENTMETHOD" suffix="COLON"}]
[{$payment->getFieldData('oxdesc')}]<br>
[{include file="d3invoice_pdf_payinfo.tpl"}]
[{include file="@d3PdfDocuments/documents/invoice/payinfo.tpl"}]
</div>
[{/block}]

View 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.tpl"}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_header"}]
[{block name="pdfHeader"}]
[{include file="@d3PdfDocuments/documents/inc/page/header.tpl" showLogo=$showLogo}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_content"}]
[{* include file="@d3PdfDocuments/documents/inc/helper/rulers" pagePadding=$pagePadding *}]
[{include file="@d3PdfDocuments/documents/inc/elements/foldmarks.tpl" pagePadding=$pagePadding}]
[{block name="pdfAddressArea"}]
[{include file="@d3PdfDocuments/documents/inc/elements/addressarea.tpl"}]
[{/block}]
[{block name="pdfInformations"}]
[{include file="@d3PdfDocuments/documents/inc/elements/informations.tpl" documentinformationfile="@d3PdfDocuments/documents/invoice/informations.tpl"}]
[{/block}]
[{block name="pdfDeliveryAddress"}]
[{include file="@d3PdfDocuments/documents/inc/elements/deliveryaddress.tpl"}]
[{/block}]
[{block name="pdfSalutation"}]
[{include file="@d3PdfDocuments/documents/invoice/salutation.tpl"}]
[{/block}]
[{block name="pdfArticleList"}]
[{include file="@d3PdfDocuments/documents/inc/elements/articlelist.tpl"}]
[{/block}]
[{block name="pdfConclusion"}]
[{include file="@d3PdfDocuments/documents/invoice/conclusion.tpl"}]
[{/block}]
[{/capture}]
[{capture append="pdfBlock_footer"}]
[{block name="pdfFooter"}]
[{include file="@d3PdfDocuments/documents/inc/page/footer.tpl" pagePadding=$pagePadding}]
[{/block}]
[{/capture}]
[{include file="@d3PdfDocuments/documents/inc/page/base.tpl" pagePadding=$pagePadding}]

View File

@ -0,0 +1 @@
[{include file="@d3PdfDocuments/documents/invoice/invoice.tpl" showLogo=false}]

View 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>:&nbsp;
<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 %}

View File

@ -0,0 +1,219 @@
table{
font-family: "helvetica";
}
.header {
padding: 5mm;
height: 35mm;
width: 100%;
position: relative;
}
.header img.logo {
float: right;
margin: 10mm;
margin-right: 0;
}
.addressarea,
.deliveryaddress {
left: 0;
width: 80mm;
height: 45mm;
position: relative;
}
.deliveryaddress {
margin-top: 10mm;
height: 27.3mm;
}
.addressarea .returnAddress,
.addressarea .recipientAddress {
position: relative;
}
.addressarea .returnAddress {
height: 17.7mm;
font-size: 8px;
}
.addressarea .returnAddress div {
padding-top: 3mm;
}
.addressarea .recipientAddress {
height: 27.3mm;
}
.addressarea .recipientAddress .location,
.deliveryaddress .location {
font-weight: bold;
}
.addressarea .recipientAddress .country {
padding-top: 5mm;
}
.deliveryaddress .headline {
font-size: 10px;
padding-bottom: 2mm;
}
.informations {
width: 75mm;
right: 0;
top: 5mm;
position: absolute;
}
.contactinformations,
.bankaccountinformations,
.documentinformations {
margin-bottom: 5mm;
}
.contactinformations div,
.bankaccountinformations div,
.documentinformations div {
text-align: right;
font-size: 11px;
}
.contactinformations div.headline,
.bankaccountinformations div.headline,
.documentinformations div.headline {
font-weight: bold;
}
.salutation {
margin-top: 5mm;
}
.salutation .documenttype {
font-weight: bold;
margin-bottom: 5mm;
}
.article_table,
.article_table_prices {
width: 100%;
margin-top: 5mm;
border-spacing: 0;
border-collapse: collapse;
}
.article_table th,
.article_table td,
.article_table_prices th,
.article_table_prices td {
padding-bottom: 2mm;
vertical-align: top;
}
.article_table th,
.article_table_prices th {
border-bottom: solid 0.75pt #000;
font-weight: normal;
font-size: 11px;
}
.article_table td,
.article_table_prices td {
padding-top: 2mm;
font-size: 12px;
}
.article_table th.amount,
.article_table td.amount {
width: 10%;
}
.article_table_prices th.amount,
.article_table_prices td.amount,
.article_table_prices th.tax,
.article_table_prices td.tax {
width: 10%;
}
.article_table_prices th.tax,
.article_table_prices td.tax {
text-align: right;
padding-right: 0;
}
.article_table th.description,
.article_table td.description {
width: 90%;
}
.article_table_prices th.description,
.article_table_prices td.description {
width: 50%;
}
.article_table td.description .artnr,
.article_table_prices td.description .artnr {
font-size: 9px;
}
.article_table_prices th.unitPrice,
.article_table_prices td.unitPrice,
.article_table_prices th.totalPrice,
.article_table_prices td.totalPrice {
width: 15%;
text-align: right;
}
.article_table td.amount,
.article_table_prices td.amount {
text-align: right;
padding-right: 10mm;
}
.article_table_prices td.unitPrice,
.article_table_prices td.totalPrice {
text-align: right;
padding-right: 0;
}
.article_costs_table{
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
.article_costs_table .indent {
width: 10%;
}
.article_costs_table .description {
width: 75%;
}
.article_costs_table td {
padding-bottom: 5px;
padding-top: 5px;
font-size: 12px;
}
.article_costs_table .values {
width: 15%;
margin-right: -2.2px;
text-align: right;
}
.article_costs_table .sumnetto td {
border-top: 0.75pt solid #000;
}
.article_costs_table .voucherdiscount td,
.article_costs_table .sumbrutto td {
border-bottom: solid 0.75pt #000;
}
.article_costs_table .totalseparator td {
height: 0;
line-height: 0;
}
.article_costs_table .totalseparator td,
.article_costs_table .totalsum td {
border-bottom: solid 0.75pt #000;
font-weight: bold;
}
.article_costs_table .totalsum td {
border-bottom: double 2pt #000;
}
.conclusion_payment,
.conclusion_thankyou {
margin-top: 5mm;
font-size: 12px;
}
.footer{
width: 173mm;
font-size: 9px;
position: relative;
margin: 0;
padding: 0;
}
.footer table {
border-top: solid 0.75pt #000;
width: 100%;
position: relative;
}
.footerLeft,
.footerCenter,
.footerRight {
width: 33%;
padding: 0 2mm;
}

View File

@ -0,0 +1,46 @@
{% set pagePadding = "45,15,25,25"|split(",") %} {# top, right, bottom, left #}
{% set showLogo = showLogo|default(1) %}
{% set pdfBlock_style %}
{% block pdfStyles %}
{% include "@d3PdfDocuments/assets/pdfStyling.css.twig" %}
{% 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} %}

View File

@ -0,0 +1 @@
{% include "@d3PdfDocuments/documents/deliverynote/deliverynote.html.twig" with {showLogo: 0} %}

View File

@ -0,0 +1,6 @@
{% block conclusion %}
<nobreak>
{% block conclusion_thankyou %}
{% endblock %}
</nobreak>
{% endblock %}

View 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" }) }} {{ "now"|date_format(dateFormat) }}
</div>
{% endblock %}
</div>
{% endblock %}

View File

@ -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 %}

View 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 %}

View 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>

View 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", suffix: "COLON" }) | format( VatKey ) }}
</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", suffix: "COLON" }) | format( order.getFieldData('oxdelvat') ) }}
{% 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", suffix: "COLON" }) | format( order.getFieldData('oxpayvat') ) }}
{% 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 %}

View 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 %}

View 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 %}

View 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>

View 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>

View 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 %}

View 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 range(10, 600, 10) %}
<div class="rulerItemHorizontal" style="left: {{ loop.index0 - pagePadding.3 }}mm">
{{ loop.index0 }}
</div>
{% endfor %}
{# vertical #}
{% for rulerItemsVertical in range(0, 600, 10) %}
<div class="rulerItemVertical" style="top: {{ loop.index0 - pagePadding.0 }}mm">
{{ loop.index0 }}
</div>
{% endfor %}

View 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>

View 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 %}

View File

@ -0,0 +1,11 @@
{% set showLogo = showLogo|default(1) %}
{% block pdfHeader %}
<div class="header">
{% if showLogo %}
{% block pdfHeaderLogo %}
<img class="logo" alt="Logo" src="{{ oViewConf.getModulePath('d3PdfDocuments', 'out/img/clogo.jpg') }}">
{% endblock %}
{% endif %}
</div>
{% endblock %}

View File

@ -0,0 +1 @@
{{ shop.getFielddata('oxname') }} - {{ shop.getFielddata('oxstreet') }} - {{ shop.getFielddata('oxzip') }} {{ shop.getFielddata('oxcity') }} - {{ shop.getFieldData('oxcountry') }}

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View 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 %}
{% include "@d3PdfDocuments/assets/pdfStyling.css.twig" %}
{% 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/helper/rulers.html.twig" with {pagePadding: pagePadding} %}#}
{% 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} %}

View File

@ -0,0 +1 @@
{% include "@d3PdfDocuments/documents/invoice/invoice.html.twig" with {showLogo: 0} %}

View File

@ -0,0 +1,7 @@
{% extends "order_overview.html.twig" %}
{% block admin_order_overview_export %}
{{ parent() }}
{% include "@d3PdfDocuments/admin/orderoverview_pdfform" %}
{% endblock %}